Message ID | 20160804144332.4841-1-kbeldan@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Aug 04, 2016 at 02:43:32PM +0000, Karl Beldan wrote: > The LCDK is the successor to the late Hawkboard and has the same machine > number. > Among the differences are the flash (16bits vs 8bits) and some pins > (MMC, LEDs, buttons, some external connectors), however the main > components remain the same (eth. PHY, Audio Codec, Video decoder and > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > LDOs and DCDCs are always ON). > A DT-only boot with this addition gives functional uart, reboot via > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > although davinci_mmc doesn't call yet the mmc core OF facilities). > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> > --- > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > arch/arm/mach-davinci/da8xx-dt.c | 1 + > 4 files changed, 77 insertions(+) > create mode 100644 arch/arm/boot/dts/omapl138-lcdk.dts > > diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt > index cfaeda4..1482c74 100644 > --- a/Documentation/devicetree/bindings/arm/davinci.txt > +++ b/Documentation/devicetree/bindings/arm/davinci.txt > @@ -5,6 +5,10 @@ DA850/OMAP-L138/AM18x Evaluation Module (EVM) board > Required root node properties: > - compatible = "ti,da850-evm", "ti,da850"; > > +DA850/OMAP-L138/AM18x L138/C6748 Development Kit (LCDK) board > +Required root node properties: > + - compatible = "ti,omapl138-lcdk", "ti,da850"; > + > EnBW AM1808 based CMC board > Required root node properties: > - compatible = "enbw,cmc", "ti,da850; > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 414b427..da3f69b 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \ > dtb-$(CONFIG_ARCH_BRCMSTB) += \ > bcm7445-bcm97445svmb.dtb > dtb-$(CONFIG_ARCH_DAVINCI) += \ > + omapl138-lcdk.dtb \ > da850-enbw-cmc.dtb \ > da850-evm.dtb > dtb-$(CONFIG_ARCH_DIGICOLOR) += \ > diff --git a/arch/arm/boot/dts/omapl138-lcdk.dts b/arch/arm/boot/dts/omapl138-lcdk.dts > new file mode 100644 > index 0000000..fad3b6d > --- /dev/null > +++ b/arch/arm/boot/dts/omapl138-lcdk.dts > @@ -0,0 +1,71 @@ > +/* > + * Copyright (c) 2016 BayLibre, Inc. > + * > + * Licensed under GPLv2 or later. > + */ > +/dts-v1/; > +#include "da850.dtsi" > +#include <dt-bindings/gpio/gpio.h> > + > +/ { > + model = "DA850/AM1808/OMAP-L138 LCDK"; > + compatible = "ti,omapl138-lcdk", "ti,da850"; > + > + aliases { > + serial2 = &serial2; > + }; > + > + chosen { > + bootargs = "console=ttyS2,115200n8 earlycon"; You don't need console with stdout-path set. And really, earlycon should not be the default. > + stdout-path = "serial2:115200n8"; > + }; > + > + memory { > + device_type = "memory"; > + reg = <0xc0000000 0x08000000>; > + }; > +}; > + > +&pmx_core { > + status = "okay"; > +}; > + > +&serial2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&serial2_rxtx_pins>; > + status = "okay"; > +}; > + > +&wdt { > + status = "okay"; > +}; > + > +&rtc0 { > + status = "okay"; > +}; > + > +&gpio { > + status = "okay"; > +}; > + > +&mdio { > + pinctrl-names = "default"; > + pinctrl-0 = <&mdio_pins>; > + bus_freq = <2200000>; > + status = "okay"; > +}; > + > +ð0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mii_pins>; > + status = "okay"; > +}; > + > +&mmc0 { > + max-frequency = <50000000>; > + bus-width = <4>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc0_pins>; > + cd-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>; > + status = "okay"; > +}; > diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c > index 754f478..d5f710c 100644 > --- a/arch/arm/mach-davinci/da8xx-dt.c > +++ b/arch/arm/mach-davinci/da8xx-dt.c > @@ -49,6 +49,7 @@ static void __init da850_init_machine(void) > > static const char *const da850_boards_compat[] __initconst = { > "enbw,cmc", > + "ti,omapl138-lcdk", > "ti,da850-evm", > "ti,da850", > NULL, > -- > 2.9.0.rc1 >
+ Sekhar Hi Karl, Karl Beldan <kbeldan@baylibre.com> writes: > The LCDK is the successor to the late Hawkboard and has the same machine > number. Machine number is only relevant for legacy (non-DT) boot and this is DT boot, so the machine number bit really relevant for this changelog. BTW, have you tried legacy boot on LCDK with board-omapl138-hawk.c? I assume it mostly works? > Among the differences are the flash (16bits vs 8bits) and some pins > (MMC, LEDs, buttons, some external connectors), however the main > components remain the same (eth. PHY, Audio Codec, Video decoder and > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > LDOs and DCDCs are always ON). > A DT-only boot with this addition gives functional uart, reboot via > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > although davinci_mmc doesn't call yet the mmc core OF facilities). > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> Tested with v4.7 on my LCDK board. Tested-by: Kevin Hilman <khilman@baylibre.com> Note that I also needed CONFIG_RTC_DRV_OMAP=m enabled in davinci_all_defconfig for the RTC driver. Could you add a patch for that to this series as well? Also, plese Cc the co-maintainer Sekhar Nori (now Cc'd) on all future davinci patches. > --- > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ I think this should be called da850-lcdk.dts. The OMAP prefix in the DT directory is just going to cause confusion, and the other DTs using this same SoC are already called da850. Sekhar do you have any opinion here? [...] > +/ { > + model = "DA850/AM1808/OMAP-L138 LCDK"; > + compatible = "ti,omapl138-lcdk", "ti,da850"; > + > + aliases { > + serial2 = &serial2; > + }; > + > + chosen { > + bootargs = "console=ttyS2,115200n8 earlycon"; earlycon is kind of a debug option, so probably should be left out of the default DT. > + stdout-path = "serial2:115200n8"; > + }; Kevin
On Thu, Aug 04, 2016 at 12:15:05PM -0700, Kevin Hilman wrote: > + Sekhar > > Hi Karl, > > Karl Beldan <kbeldan@baylibre.com> writes: > > > The LCDK is the successor to the late Hawkboard and has the same machine > > number. > > Machine number is only relevant for legacy (non-DT) boot and this is DT > boot, so the machine number bit really relevant for this changelog. > Hi Kevin, It was purely informative. > BTW, have you tried legacy boot on LCDK with board-omapl138-hawk.c? I > assume it mostly works? > Yes. > > Among the differences are the flash (16bits vs 8bits) and some pins > > (MMC, LEDs, buttons, some external connectors), however the main > > components remain the same (eth. PHY, Audio Codec, Video decoder and > > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > > LDOs and DCDCs are always ON). > > A DT-only boot with this addition gives functional uart, reboot via > > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > > although davinci_mmc doesn't call yet the mmc core OF facilities). > > > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> > > Tested with v4.7 on my LCDK board. > > Tested-by: Kevin Hilman <khilman@baylibre.com> > > Note that I also needed CONFIG_RTC_DRV_OMAP=m enabled in > davinci_all_defconfig for the RTC driver. Could you add a patch for that > to this series as well? > No problem. BTW do you also consider CONFIG_ items not arch specific (like CONFIG_NET_VENDOR_SMSC) ? > Also, plese Cc the co-maintainer Sekhar Nori (now Cc'd) on all future > davinci patches. > Sure. > > --- > > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > > arch/arm/boot/dts/Makefile | 1 + > > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > > I think this should be called da850-lcdk.dts. > > The OMAP prefix in the DT directory is just going to cause confusion, > and the other DTs using this same SoC are already called da850. > That's what I thought too, mainline U-Boot is using omapl138_lcdk but yes da850 is less confusing given the code already present (downside is when you search for da850 on the net there's nothing). > Sekhar do you have any opinion here? > > [...] > > > +/ { > > + model = "DA850/AM1808/OMAP-L138 LCDK"; > > + compatible = "ti,omapl138-lcdk", "ti,da850"; > > + > > + aliases { > > + serial2 = &serial2; > > + }; > > + > > + chosen { > > + bootargs = "console=ttyS2,115200n8 earlycon"; > > earlycon is kind of a debug option, so probably should be left out of > the default DT. > Sure. Karl
On Thu, Aug 04, 2016 at 01:29:02PM -0500, Rob Herring wrote: > On Thu, Aug 04, 2016 at 02:43:32PM +0000, Karl Beldan wrote: > > The LCDK is the successor to the late Hawkboard and has the same machine > > number. > > Among the differences are the flash (16bits vs 8bits) and some pins > > (MMC, LEDs, buttons, some external connectors), however the main > > components remain the same (eth. PHY, Audio Codec, Video decoder and > > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > > LDOs and DCDCs are always ON). > > A DT-only boot with this addition gives functional uart, reboot via > > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > > although davinci_mmc doesn't call yet the mmc core OF facilities). > > > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> > > --- > > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > > arch/arm/boot/dts/Makefile | 1 + > > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > > arch/arm/mach-davinci/da8xx-dt.c | 1 + > > 4 files changed, 77 insertions(+) > > create mode 100644 arch/arm/boot/dts/omapl138-lcdk.dts > > > > diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt > > index cfaeda4..1482c74 100644 > > --- a/Documentation/devicetree/bindings/arm/davinci.txt > > +++ b/Documentation/devicetree/bindings/arm/davinci.txt > > @@ -5,6 +5,10 @@ DA850/OMAP-L138/AM18x Evaluation Module (EVM) board > > Required root node properties: > > - compatible = "ti,da850-evm", "ti,da850"; > > > > +DA850/OMAP-L138/AM18x L138/C6748 Development Kit (LCDK) board > > +Required root node properties: > > + - compatible = "ti,omapl138-lcdk", "ti,da850"; > > + > > EnBW AM1808 based CMC board > > Required root node properties: > > - compatible = "enbw,cmc", "ti,da850; > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index 414b427..da3f69b 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \ > > dtb-$(CONFIG_ARCH_BRCMSTB) += \ > > bcm7445-bcm97445svmb.dtb > > dtb-$(CONFIG_ARCH_DAVINCI) += \ > > + omapl138-lcdk.dtb \ > > da850-enbw-cmc.dtb \ > > da850-evm.dtb > > dtb-$(CONFIG_ARCH_DIGICOLOR) += \ > > diff --git a/arch/arm/boot/dts/omapl138-lcdk.dts b/arch/arm/boot/dts/omapl138-lcdk.dts > > new file mode 100644 > > index 0000000..fad3b6d > > --- /dev/null > > +++ b/arch/arm/boot/dts/omapl138-lcdk.dts > > @@ -0,0 +1,71 @@ > > +/* > > + * Copyright (c) 2016 BayLibre, Inc. > > + * > > + * Licensed under GPLv2 or later. > > + */ > > +/dts-v1/; > > +#include "da850.dtsi" > > +#include <dt-bindings/gpio/gpio.h> > > + > > +/ { > > + model = "DA850/AM1808/OMAP-L138 LCDK"; > > + compatible = "ti,omapl138-lcdk", "ti,da850"; > > + > > + aliases { > > + serial2 = &serial2; > > + }; > > + > > + chosen { > > + bootargs = "console=ttyS2,115200n8 earlycon"; > > You don't need console with stdout-path set. And really, earlycon should > not be the default. > Ok for earlycon. For the console, I thought likewise .. until I _struggled_ to understand why the console was disappearing under my feet. It seemed even stranger when I started looking at the codepath because drivers/of/base.c would properly add_preferred_console as expected after the corresponding UART was added. But the reality was there, without it the console was not like stdout-path. Among the commits that could instill doubt as to whether stdout-path rules is f64255b5072d: "The assumption that at least 1 preferred console will be registered when the stdout-path property is set is invalid, which can result in _no_ consoles.", though it didn't answer my question. I started looking whether tty0 was not getting in the way and in the end I came up with setting console. But you seem affirmative. Karl
+Peter H On Thu, Aug 4, 2016 at 4:03 PM, Karl Beldan <kbeldan@baylibre.com> wrote: > On Thu, Aug 04, 2016 at 01:29:02PM -0500, Rob Herring wrote: >> On Thu, Aug 04, 2016 at 02:43:32PM +0000, Karl Beldan wrote: >> > The LCDK is the successor to the late Hawkboard and has the same machine >> > number. >> > Among the differences are the flash (16bits vs 8bits) and some pins >> > (MMC, LEDs, buttons, some external connectors), however the main >> > components remain the same (eth. PHY, Audio Codec, Video decoder and >> > DAC) except for the main PMIC, different and hard-wired on the LCDK (the >> > LDOs and DCDCs are always ON). >> > A DT-only boot with this addition gives functional uart, reboot via >> > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC >> > although davinci_mmc doesn't call yet the mmc core OF facilities). [...] >> > + aliases { >> > + serial2 = &serial2; >> > + }; >> > + >> > + chosen { >> > + bootargs = "console=ttyS2,115200n8 earlycon"; >> >> You don't need console with stdout-path set. And really, earlycon should >> not be the default. >> > Ok for earlycon. > > For the console, I thought likewise .. until I _struggled_ to understand > why the console was disappearing under my feet. > It seemed even stranger when I started looking at the codepath because > drivers/of/base.c would properly add_preferred_console as expected after > the corresponding UART was added. But the reality was there, without it > the console was not like stdout-path. > Among the commits that could instill doubt as to whether stdout-path > rules is f64255b5072d: > "The assumption that at least 1 preferred console will be registered > when the stdout-path property is set is invalid, which can result in > _no_ consoles.", though it didn't answer my question. > I started looking whether tty0 was not getting in the way and in the end > I came up with setting console. > But you seem affirmative. There have been some issues in this area, but I thought they were in conjunction with earlycon and solved now. This is a fairly common review request for dts files, so I'm surprised if it doesn't work right. Maybe having tty0 or not has some influence. Or people just accept review comments without testing or caring... Rob
On Thu, Aug 04, 2016 at 04:13:10PM -0500, Rob Herring wrote: > +Peter H > > On Thu, Aug 4, 2016 at 4:03 PM, Karl Beldan <kbeldan@baylibre.com> wrote: > > On Thu, Aug 04, 2016 at 01:29:02PM -0500, Rob Herring wrote: > >> On Thu, Aug 04, 2016 at 02:43:32PM +0000, Karl Beldan wrote: > >> > The LCDK is the successor to the late Hawkboard and has the same machine > >> > number. > >> > Among the differences are the flash (16bits vs 8bits) and some pins > >> > (MMC, LEDs, buttons, some external connectors), however the main > >> > components remain the same (eth. PHY, Audio Codec, Video decoder and > >> > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > >> > LDOs and DCDCs are always ON). > >> > A DT-only boot with this addition gives functional uart, reboot via > >> > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > >> > although davinci_mmc doesn't call yet the mmc core OF facilities). > > [...] > > >> > + aliases { > >> > + serial2 = &serial2; > >> > + }; > >> > + > >> > + chosen { > >> > + bootargs = "console=ttyS2,115200n8 earlycon"; > >> > >> You don't need console with stdout-path set. And really, earlycon should > >> not be the default. > >> > > Ok for earlycon. > > > > For the console, I thought likewise .. until I _struggled_ to understand > > why the console was disappearing under my feet. > > It seemed even stranger when I started looking at the codepath because > > drivers/of/base.c would properly add_preferred_console as expected after > > the corresponding UART was added. But the reality was there, without it > > the console was not like stdout-path. > > Among the commits that could instill doubt as to whether stdout-path > > rules is f64255b5072d: > > "The assumption that at least 1 preferred console will be registered > > when the stdout-path property is set is invalid, which can result in > > _no_ consoles.", though it didn't answer my question. > > I started looking whether tty0 was not getting in the way and in the end > > I came up with setting console. > > But you seem affirmative. > > There have been some issues in this area, but I thought they were in > conjunction with earlycon and solved now. This is a fairly common > review request for dts files, so I'm surprised if it doesn't work > right. Maybe having tty0 or not has some influence. Or people just > accept review comments without testing or caring... > I can assure you I tested without early{con,printk} ;). Now I have just rechecked the codepaths and something caught my attention in kernel/printk/printk.c:__add_preferred_console(): if console_cmdline is empty selected_console gets unconditionally set to zero ! Knowing this I confirmed by replacing with idx (works), and also by using ttyS0 (i.e. alias serial0 = &uart2) (works), this would not affect DTs using serial0. It's late here so I'll stop there. Karl
Karl Beldan <kbeldan@baylibre.com> writes: > On Thu, Aug 04, 2016 at 12:15:05PM -0700, Kevin Hilman wrote: >> + Sekhar >> >> Hi Karl, >> >> Karl Beldan <kbeldan@baylibre.com> writes: >> >> > The LCDK is the successor to the late Hawkboard and has the same machine >> > number. >> >> Machine number is only relevant for legacy (non-DT) boot and this is DT >> boot, so the machine number bit really relevant for this changelog. >> > Hi Kevin, > > It was purely informative. > >> BTW, have you tried legacy boot on LCDK with board-omapl138-hawk.c? I >> assume it mostly works? >> > Yes. > >> > Among the differences are the flash (16bits vs 8bits) and some pins >> > (MMC, LEDs, buttons, some external connectors), however the main >> > components remain the same (eth. PHY, Audio Codec, Video decoder and >> > DAC) except for the main PMIC, different and hard-wired on the LCDK (the >> > LDOs and DCDCs are always ON). >> > A DT-only boot with this addition gives functional uart, reboot via >> > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC >> > although davinci_mmc doesn't call yet the mmc core OF facilities). >> > >> > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> >> >> Tested with v4.7 on my LCDK board. >> >> Tested-by: Kevin Hilman <khilman@baylibre.com> >> >> Note that I also needed CONFIG_RTC_DRV_OMAP=m enabled in >> davinci_all_defconfig for the RTC driver. Could you add a patch for that >> to this series as well? >> > No problem. BTW do you also consider CONFIG_ items not arch specific > (like CONFIG_NET_VENDOR_SMSC) ? Do you mean for davinci_all_config? Yes. > >> Also, plese Cc the co-maintainer Sekhar Nori (now Cc'd) on all future >> davinci patches. >> > Sure. > >> > --- >> > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ >> > arch/arm/boot/dts/Makefile | 1 + >> > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ >> >> I think this should be called da850-lcdk.dts. >> >> The OMAP prefix in the DT directory is just going to cause confusion, >> and the other DTs using this same SoC are already called da850. >> > That's what I thought too, mainline U-Boot is using omapl138_lcdk but > yes da850 is less confusing given the code already present (downside is > when you search for da850 on the net there's nothing). OK, let's stick with da850 for the DT names. The other help texts already list all the names da850/omapl138/am18x so we should be fine. Kevin
On Friday 05 August 2016 12:45 AM, Kevin Hilman wrote: >> Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ >> arch/arm/boot/dts/Makefile | 1 + >> arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > > I think this should be called da850-lcdk.dts. > > The OMAP prefix in the DT directory is just going to cause confusion, > and the other DTs using this same SoC are already called da850. > > Sekhar do you have any opinion here? Prefer using da850 in file names and in code. The explanatory or help text can contain rest of the part names. For file names or code catering both to da850 and da830, da8xx should be used. I know documentation for da850 and da830 is not public, but thats what the parts first came out as, and we want to be consistent with existing code. Regards, Sekhar
This depends on "ARM: dts: da850: Add missing pin muxing for the UARTs". Changes from v1: - s/omapl138/da850/ - Remove earlycon from bootargs - Remove console=ttyS2,115200n8 from bootargs (workaround for preferred console) - Add patches for CONFIG_SMSC_PHY=y and CONFIG_RTC_DRV_OMAP=m Karl Beldan (3): ARM: dts: da850: Add basic DTS for the L138/C6748 Dev Kit ARM: davinci_all_defconfig: enable RTC driver as module ARM: davinci_all_defconfig: enable SMSC ethernet PHY Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/da850-lcdk.dts | 70 +++++++++++++++++++++++ arch/arm/configs/davinci_all_defconfig | 2 + arch/arm/mach-davinci/da8xx-dt.c | 1 + 5 files changed, 78 insertions(+) create mode 100644 arch/arm/boot/dts/da850-lcdk.dts
On Thursday 04 August 2016 08:13 PM, Karl Beldan wrote: > The LCDK is the successor to the late Hawkboard and has the same machine > number. > Among the differences are the flash (16bits vs 8bits) and some pins > (MMC, LEDs, buttons, some external connectors), however the main > components remain the same (eth. PHY, Audio Codec, Video decoder and > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > LDOs and DCDCs are always ON). > A DT-only boot with this addition gives functional uart, reboot via > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > although davinci_mmc doesn't call yet the mmc core OF facilities). > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> C6748 is a pin-compatible DSP-only part which does not run Linux. The OMAP-L138 and C6748 LCDKs are physically different boards. So, I would just stick with subject line ".. for the OMAP-L138 LCDK board" > --- > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > arch/arm/mach-davinci/da8xx-dt.c | 1 + > 4 files changed, 77 insertions(+) > create mode 100644 arch/arm/boot/dts/omapl138-lcdk.dts > > diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt > index cfaeda4..1482c74 100644 > --- a/Documentation/devicetree/bindings/arm/davinci.txt > +++ b/Documentation/devicetree/bindings/arm/davinci.txt > @@ -5,6 +5,10 @@ DA850/OMAP-L138/AM18x Evaluation Module (EVM) board > Required root node properties: > - compatible = "ti,da850-evm", "ti,da850"; > > +DA850/OMAP-L138/AM18x L138/C6748 Development Kit (LCDK) board here too, drop reference to C6748. > +Required root node properties: > + - compatible = "ti,omapl138-lcdk", "ti,da850"; let the compatible be "ti,da850-lcdk" for consistency. > + > EnBW AM1808 based CMC board > Required root node properties: > - compatible = "enbw,cmc", "ti,da850; > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 414b427..da3f69b 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \ > dtb-$(CONFIG_ARCH_BRCMSTB) += \ > bcm7445-bcm97445svmb.dtb > dtb-$(CONFIG_ARCH_DAVINCI) += \ > + omapl138-lcdk.dtb \ > da850-enbw-cmc.dtb \ > da850-evm.dtb > dtb-$(CONFIG_ARCH_DIGICOLOR) += \ > diff --git a/arch/arm/boot/dts/omapl138-lcdk.dts b/arch/arm/boot/dts/omapl138-lcdk.dts > new file mode 100644 > index 0000000..fad3b6d > --- /dev/null > +++ b/arch/arm/boot/dts/omapl138-lcdk.dts > @@ -0,0 +1,71 @@ > +/* > + * Copyright (c) 2016 BayLibre, Inc. > + * > + * Licensed under GPLv2 or later. are you sure about "or later"? Thanks, Sekhar
On Fri, Aug 05, 2016 at 07:44:18PM +0530, Sekhar Nori wrote: > On Thursday 04 August 2016 08:13 PM, Karl Beldan wrote: > > The LCDK is the successor to the late Hawkboard and has the same machine > > number. > > Among the differences are the flash (16bits vs 8bits) and some pins > > (MMC, LEDs, buttons, some external connectors), however the main > > components remain the same (eth. PHY, Audio Codec, Video decoder and > > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > > LDOs and DCDCs are always ON). > > A DT-only boot with this addition gives functional uart, reboot via > > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > > although davinci_mmc doesn't call yet the mmc core OF facilities). > > > > Signed-off-by: Karl Beldan <kbeldan@baylibre.com> > > C6748 is a pin-compatible DSP-only part which does not run Linux. The > OMAP-L138 and C6748 LCDKs are physically different boards. So, I would > just stick with subject line ".. for the OMAP-L138 LCDK board" > That was my understanding but LCDK stands for L138-C6748-Dev-Kit right ? Anyways, I'll remove the said references as per your request. > > --- > > Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ > > arch/arm/boot/dts/Makefile | 1 + > > arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ > > arch/arm/mach-davinci/da8xx-dt.c | 1 + > > 4 files changed, 77 insertions(+) > > create mode 100644 arch/arm/boot/dts/omapl138-lcdk.dts > > > > diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt > > index cfaeda4..1482c74 100644 > > --- a/Documentation/devicetree/bindings/arm/davinci.txt > > +++ b/Documentation/devicetree/bindings/arm/davinci.txt > > @@ -5,6 +5,10 @@ DA850/OMAP-L138/AM18x Evaluation Module (EVM) board > > Required root node properties: > > - compatible = "ti,da850-evm", "ti,da850"; > > > > +DA850/OMAP-L138/AM18x L138/C6748 Development Kit (LCDK) board > > here too, drop reference to C6748. > Ditto. > > +Required root node properties: > > + - compatible = "ti,omapl138-lcdk", "ti,da850"; > > let the compatible be "ti,da850-lcdk" for consistency. > Kevin pointed that out. > > + > > EnBW AM1808 based CMC board > > Required root node properties: > > - compatible = "enbw,cmc", "ti,da850; > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index 414b427..da3f69b 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \ > > dtb-$(CONFIG_ARCH_BRCMSTB) += \ > > bcm7445-bcm97445svmb.dtb > > dtb-$(CONFIG_ARCH_DAVINCI) += \ > > + omapl138-lcdk.dtb \ > > da850-enbw-cmc.dtb \ > > da850-evm.dtb > > dtb-$(CONFIG_ARCH_DIGICOLOR) += \ > > diff --git a/arch/arm/boot/dts/omapl138-lcdk.dts b/arch/arm/boot/dts/omapl138-lcdk.dts > > new file mode 100644 > > index 0000000..fad3b6d > > --- /dev/null > > +++ b/arch/arm/boot/dts/omapl138-lcdk.dts > > @@ -0,0 +1,71 @@ > > +/* > > + * Copyright (c) 2016 BayLibre, Inc. > > + * > > + * Licensed under GPLv2 or later. > > are you sure about "or later"? > I will remove it. Karl
On Friday 05 August 2016 08:15 PM, Karl Beldan wrote: > On Fri, Aug 05, 2016 at 07:44:18PM +0530, Sekhar Nori wrote: >> On Thursday 04 August 2016 08:13 PM, Karl Beldan wrote: >>> The LCDK is the successor to the late Hawkboard and has the same machine >>> number. >>> Among the differences are the flash (16bits vs 8bits) and some pins >>> (MMC, LEDs, buttons, some external connectors), however the main >>> components remain the same (eth. PHY, Audio Codec, Video decoder and >>> DAC) except for the main PMIC, different and hard-wired on the LCDK (the >>> LDOs and DCDCs are always ON). >>> A DT-only boot with this addition gives functional uart, reboot via >>> watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC >>> although davinci_mmc doesn't call yet the mmc core OF facilities). >>> >>> Signed-off-by: Karl Beldan <kbeldan@baylibre.com> >> >> C6748 is a pin-compatible DSP-only part which does not run Linux. The >> OMAP-L138 and C6748 LCDKs are physically different boards. So, I would >> just stick with subject line ".. for the OMAP-L138 LCDK board" >> > That was my understanding but LCDK stands for L138-C6748-Dev-Kit right ? > Anyways, I'll remove the said references as per your request. You are right. And now that you clarify that, I think I am okay leaving what you have as-it-is. Use of C6748 threw me off. But thats just the acronym expansion. Thanks, Sekhar
This depends on "ARM: dts: da850: Add missing pin muxing for the UARTs". Changes from v1: - s/omapl138/da850/ - Remove earlycon from bootargs - Remove console=ttyS2,115200n8 from bootargs (workaround for preferred console) - Add patches for CONFIG_SMSC_PHY=y and CONFIG_RTC_DRV_OMAP=m Changes from v2: - Remove references to C6748: replace 'L138/C6748 Dev Kit (LCDK)' with 'LCDK' - Change license from 'GPLv2 or later' to 'GPLv2' Karl Beldan (3): ARM: dts: da850: Add basic DTS for the LCDK ARM: davinci_all_defconfig: enable RTC driver as module ARM: davinci_all_defconfig: enable SMSC ethernet PHY Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/da850-lcdk.dts | 70 +++++++++++++++++++++++ arch/arm/configs/davinci_all_defconfig | 2 + arch/arm/mach-davinci/da8xx-dt.c | 1 + 5 files changed, 78 insertions(+) create mode 100644 arch/arm/boot/dts/da850-lcdk.dts
This depends on "ARM: dts: da850: Add missing pin muxing for the UARTs". Changes from v1: - s/omapl138/da850/ - Remove earlycon from bootargs - Remove console=ttyS2,115200n8 from bootargs (workaround for preferred console) - Add patches for CONFIG_SMSC_PHY=y and CONFIG_RTC_DRV_OMAP=m Changes from v2: - [1] Remove references to C6748: replace 'L138/C6748 Dev Kit (LCDK)' with 'LCDK' - Change license from 'GPLv2 or later' to 'GPLv2' Changes from v3: - revert v2 [1] Karl Beldan (3): ARM: dts: da850: Add basic DTS for the LCDK ARM: davinci_all_defconfig: enable RTC driver as module ARM: davinci_all_defconfig: enable SMSC ethernet PHY Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/da850-lcdk.dts | 70 +++++++++++++++++++++++ arch/arm/configs/davinci_all_defconfig | 2 + arch/arm/mach-davinci/da8xx-dt.c | 1 + 5 files changed, 78 insertions(+) create mode 100644 arch/arm/boot/dts/da850-lcdk.dts
On Saturday 06 August 2016 01:59 AM, Karl Beldan wrote: > This depends on "ARM: dts: da850: Add missing pin muxing for the UARTs". > > Changes from v1: > - s/omapl138/da850/ > - Remove earlycon from bootargs > - Remove console=ttyS2,115200n8 from bootargs (workaround for preferred console) > - Add patches for CONFIG_SMSC_PHY=y and CONFIG_RTC_DRV_OMAP=m > > Changes from v2: > - [1] Remove references to C6748: replace 'L138/C6748 Dev Kit (LCDK)' with 'LCDK' > - Change license from 'GPLv2 or later' to 'GPLv2' > > Changes from v3: > - revert v2 [1] Series applied and boot tested on my LCDK. For future, when posting a new version, please send as an independent series and not reply to the very first posting. Thanks, Sekhar
On Thu, Aug 04, 2016 at 11:43:49PM +0000, Karl Beldan wrote: > On Thu, Aug 04, 2016 at 04:13:10PM -0500, Rob Herring wrote: > > +Peter H > > > > On Thu, Aug 4, 2016 at 4:03 PM, Karl Beldan <kbeldan@baylibre.com> wrote: > > > On Thu, Aug 04, 2016 at 01:29:02PM -0500, Rob Herring wrote: > > >> On Thu, Aug 04, 2016 at 02:43:32PM +0000, Karl Beldan wrote: > > >> > The LCDK is the successor to the late Hawkboard and has the same machine > > >> > number. > > >> > Among the differences are the flash (16bits vs 8bits) and some pins > > >> > (MMC, LEDs, buttons, some external connectors), however the main > > >> > components remain the same (eth. PHY, Audio Codec, Video decoder and > > >> > DAC) except for the main PMIC, different and hard-wired on the LCDK (the > > >> > LDOs and DCDCs are always ON). > > >> > A DT-only boot with this addition gives functional uart, reboot via > > >> > watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC > > >> > although davinci_mmc doesn't call yet the mmc core OF facilities). > > > > [...] > > > > >> > + aliases { > > >> > + serial2 = &serial2; > > >> > + }; > > >> > + > > >> > + chosen { > > >> > + bootargs = "console=ttyS2,115200n8 earlycon"; > > >> > > >> You don't need console with stdout-path set. And really, earlycon should > > >> not be the default. > > >> > > > Ok for earlycon. > > > > > > For the console, I thought likewise .. until I _struggled_ to understand > > > why the console was disappearing under my feet. > > > It seemed even stranger when I started looking at the codepath because > > > drivers/of/base.c would properly add_preferred_console as expected after > > > the corresponding UART was added. But the reality was there, without it > > > the console was not like stdout-path. > > > Among the commits that could instill doubt as to whether stdout-path > > > rules is f64255b5072d: > > > "The assumption that at least 1 preferred console will be registered > > > when the stdout-path property is set is invalid, which can result in > > > _no_ consoles.", though it didn't answer my question. > > > I started looking whether tty0 was not getting in the way and in the end > > > I came up with setting console. > > > But you seem affirmative. > > > > There have been some issues in this area, but I thought they were in > > conjunction with earlycon and solved now. This is a fairly common > > review request for dts files, so I'm surprised if it doesn't work > > right. Maybe having tty0 or not has some influence. Or people just > > accept review comments without testing or caring... > > > I can assure you I tested without early{con,printk} ;). > > Now I have just rechecked the codepaths and something caught my > attention in kernel/printk/printk.c:__add_preferred_console(): if > console_cmdline is empty selected_console gets unconditionally set to > zero ! Knowing this I confirmed by replacing with idx (works), and also > by using ttyS0 (i.e. alias serial0 = &uart2) (works), this would not > affect DTs using serial0. It's late here so I'll stop there. > The stdout-path bug was fixed last week by Paul Burton in 05fd007e4629 ("console: don't prefer first registered if DT specifies stdout-path"). Karl
diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt index cfaeda4..1482c74 100644 --- a/Documentation/devicetree/bindings/arm/davinci.txt +++ b/Documentation/devicetree/bindings/arm/davinci.txt @@ -5,6 +5,10 @@ DA850/OMAP-L138/AM18x Evaluation Module (EVM) board Required root node properties: - compatible = "ti,da850-evm", "ti,da850"; +DA850/OMAP-L138/AM18x L138/C6748 Development Kit (LCDK) board +Required root node properties: + - compatible = "ti,omapl138-lcdk", "ti,da850"; + EnBW AM1808 based CMC board Required root node properties: - compatible = "enbw,cmc", "ti,da850; diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 414b427..da3f69b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \ dtb-$(CONFIG_ARCH_BRCMSTB) += \ bcm7445-bcm97445svmb.dtb dtb-$(CONFIG_ARCH_DAVINCI) += \ + omapl138-lcdk.dtb \ da850-enbw-cmc.dtb \ da850-evm.dtb dtb-$(CONFIG_ARCH_DIGICOLOR) += \ diff --git a/arch/arm/boot/dts/omapl138-lcdk.dts b/arch/arm/boot/dts/omapl138-lcdk.dts new file mode 100644 index 0000000..fad3b6d --- /dev/null +++ b/arch/arm/boot/dts/omapl138-lcdk.dts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016 BayLibre, Inc. + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "da850.dtsi" +#include <dt-bindings/gpio/gpio.h> + +/ { + model = "DA850/AM1808/OMAP-L138 LCDK"; + compatible = "ti,omapl138-lcdk", "ti,da850"; + + aliases { + serial2 = &serial2; + }; + + chosen { + bootargs = "console=ttyS2,115200n8 earlycon"; + stdout-path = "serial2:115200n8"; + }; + + memory { + device_type = "memory"; + reg = <0xc0000000 0x08000000>; + }; +}; + +&pmx_core { + status = "okay"; +}; + +&serial2 { + pinctrl-names = "default"; + pinctrl-0 = <&serial2_rxtx_pins>; + status = "okay"; +}; + +&wdt { + status = "okay"; +}; + +&rtc0 { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&mdio { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + bus_freq = <2200000>; + status = "okay"; +}; + +ð0 { + pinctrl-names = "default"; + pinctrl-0 = <&mii_pins>; + status = "okay"; +}; + +&mmc0 { + max-frequency = <50000000>; + bus-width = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + cd-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 754f478..d5f710c 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -49,6 +49,7 @@ static void __init da850_init_machine(void) static const char *const da850_boards_compat[] __initconst = { "enbw,cmc", + "ti,omapl138-lcdk", "ti,da850-evm", "ti,da850", NULL,
The LCDK is the successor to the late Hawkboard and has the same machine number. Among the differences are the flash (16bits vs 8bits) and some pins (MMC, LEDs, buttons, some external connectors), however the main components remain the same (eth. PHY, Audio Codec, Video decoder and DAC) except for the main PMIC, different and hard-wired on the LCDK (the LDOs and DCDCs are always ON). A DT-only boot with this addition gives functional uart, reboot via watchdog, rtc, ethernet and MMC (I added the CD gpio for the MMC although davinci_mmc doesn't call yet the mmc core OF facilities). Signed-off-by: Karl Beldan <kbeldan@baylibre.com> --- Documentation/devicetree/bindings/arm/davinci.txt | 4 ++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/omapl138-lcdk.dts | 71 +++++++++++++++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 1 + 4 files changed, 77 insertions(+) create mode 100644 arch/arm/boot/dts/omapl138-lcdk.dts