arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7
Subsystems (3)
cover arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7
My previous "Add DM support for omap PWM backlight" series synchronized much of the am33xx device tree with Linux 5.9-rc7, except for those nodes that were not affected by that patch set. GPIO nodes were among those left out of sync.
The patch series can be cleanly applied to the HEAD of the master which
at the time of release points to 7c82e12cc4
("Merge tag 'u-boot-atmel-fixes-2021.04-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel") commit.
Dario Binacchi (3):
arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7
am33xx: board: remove GPIO platforma data
dm: am33xx: drop GPIO domain clock enabling by SOC api
arch/arm/dts/am33xx-clocks.dtsi | 2 +- arch/arm/dts/am33xx-l4.dtsi | 64 +++++++++++++++++++++++ arch/arm/dts/am33xx.dtsi | 44 ---------------- arch/arm/mach-omap2/am33xx/board.c | 23 -------- arch/arm/mach-omap2/am33xx/clock_am33xx.c | 4 ++ 5 files changed, 69 insertions(+), 68 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7
Move gpio controller nodes from am33xx.dtsi to am33xx-l4.dtsi. Now both files are more similar to those found in Linux 5.9-rc7. To be fully operational as before it was also necessary to fix the am33xx-clock.dtsi file. It too is now almost the same as the Linux kernel.
---
arch/arm/dts/am33xx-clocks.dtsi | 2 +- arch/arm/dts/am33xx-l4.dtsi | 64 +++++++++++++++++++++++++++++++++ arch/arm/dts/am33xx.dtsi | 44 ----------------------- 3 files changed, 65 insertions(+), 45 deletions(-)
arch/arm/dts/am33xx-clocks.dtsi +1 -1
@@ -604,7 +604,7 @@ l4_wkup_clkctrl: l4-wkup-clkctrl at 0 { compatible = "ti,clkctrl"; - reg = <0x4 0x10>, <0xb4 0x24>; + reg = <0x0 0x10>, <0xb4 0x24>; #clock-cells = <2>; };
arch/arm/dts/am33xx-l4.dtsi +64 -0
88 lines not on this page · raw message
arch/arm/dts/am33xx.dtsi +0 -44
50 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/3 arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7
Quoted 6 lines · Dario Binacchi
Move gpio controller nodes from
am33xx.dtsitoam33xx-l4.dtsi. Now both files are more similar to those found in Linux 5.9-rc7. To be fully operational as before it was also necessary to fix theam33xx-clock.dtsifile. It too is now almost the same as the Linux kernel.Signed-off-by Dario Binacchi <[email protected]>
Applied PATCH 1/3 to u-boot-ti/for-rc branch.
Thanks and regards,
Lokesh
Quoted 172 lines
---
arch/arm/dts/am33xx-clocks.dtsi | 2 +- arch/arm/dts/am33xx-l4.dtsi | 64 +++++++++++++++++++++++++++++++++ arch/arm/dts/am33xx.dtsi | 44 ----------------------- 3 files changed, 65 insertions(+), 45 deletions(-)arch/arm/dts/am33xx-clocks.dtsi +1
-1@@ -604,7 +604,7 @@ l4_wkup_clkctrl: l4-wkup-clkctrl at 0 { compatible = "ti,clkctrl"; - reg = <0x4 0x10>, <0xb4 0x24>; + reg = <0x0 0x10>, <0xb4 0x24>; #clock-cells = <2>; };arch/arm/dts/am33xx-l4.dtsi +64
-0@@ -148,6 +148,28 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x7000 0x1000>; + + gpio0: gpio at 0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 82 8>, + <&am33xx_pinmux 8 52 4>, + <&am33xx_pinmux 12 94 4>, + <&am33xx_pinmux 16 71 2>, + <&am33xx_pinmux 18 135 1>, + <&am33xx_pinmux 19 108 2>, + <&am33xx_pinmux 21 73 1>, + <&am33xx_pinmux 22 8 2>, + <&am33xx_pinmux 26 10 2>, + <&am33xx_pinmux 28 74 1>, + <&am33xx_pinmux 29 81 1>, + <&am33xx_pinmux 30 28 2>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <96>; + }; }; target-module at 9000 { /* 0x44e09000, ap 16 04.0 */@@ -1200,6 +1222,20 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x4c000 0x1000>; + + gpio1: gpio at 0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 0 8>, + <&am33xx_pinmux 8 90 4>, + <&am33xx_pinmux 12 12 16>, + <&am33xx_pinmux 28 30 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <98>; + }; }; target-module at 50000 { /* 0x48050000, ap 34 2c.0 */@@ -1570,6 +1606,19 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0xac000 0x1000>; + + gpio2: gpio at 0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 34 18>, + <&am33xx_pinmux 18 77 4>, + <&am33xx_pinmux 22 56 10>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <32>; + }; }; target-module at ae000 { /* 0x481ae000, ap 56 3a.0 */@@ -1593,6 +1642,21 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0xae000 0x1000>; + + gpio3: gpio at 0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 66 5>, + <&am33xx_pinmux 5 98 2>, + <&am33xx_pinmux 7 75 2>, + <&am33xx_pinmux 13 141 1>, + <&am33xx_pinmux 14 100 8>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <62>; + }; }; target-module at b0000 { /* 0x481b0000, ap 58 50.0 */arch/arm/dts/am33xx.dtsi +0
-44@@ -301,50 +301,6 @@ }; }; - gpio0: gpio at 44e07000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio1"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x44e07000 0x1000>; - interrupts = <96>; - }; - - gpio1: gpio at 4804c000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio2"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x4804c000 0x1000>; - interrupts = <98>; - }; - - gpio2: gpio at 481ac000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio3"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x481ac000 0x1000>; - interrupts = <32>; - }; - - gpio3: gpio at 481ae000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio4"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x481ae000 0x1000>; - interrupts = <62>; - }; - i2c0: i2c at 44e0b000 { compatible = "ti,omap4-i2c"; #address-cells = <1>;
PATCH 2/3 am33xx: board: remove GPIO platforma data
In reply to Dario BinacchiSince the board has been converted to driver model and DT is supported, GPIO platform are no more required and can be removed.
---
arch/arm/mach-omap2/am33xx/board.c | 23 ----------------------- 1 file changed, 23 deletions(-)
arch/arm/mach-omap2/am33xx/board.c +0 -23
@@ -126,29 +126,6 @@ U_BOOT_DRVINFOS(am33xx_i2c) = { };#endif -#if CONFIG_IS_ENABLED (DM_GPIO ) -static const struct omap_gpio_plat am33xx_gpio[] = { - {0 ,AM33XX_GPIO0_BASE }, - {1 ,AM33XX_GPIO1_BASE }, - {2 ,AM33XX_GPIO2_BASE }, - {3 ,AM33XX_GPIO3_BASE }, -#ifdef CONFIG_AM43XX - {4 ,AM33XX_GPIO4_BASE }, - {5 ,AM33XX_GPIO5_BASE }, -#endif -}; - -U_BOOT_DRVINFOS (am33xx_gpios) = { - {"gpio_omap" , &am33xx_gpio[0 ] }, - {"gpio_omap" , &am33xx_gpio[1 ] }, - {"gpio_omap" , &am33xx_gpio[2 ] }, - {"gpio_omap" , &am33xx_gpio[3 ] }, -#ifdef CONFIG_AM43XX - {"gpio_omap" , &am33xx_gpio[4 ] }, - {"gpio_omap" , &am33xx_gpio[5 ] }, -#endif -}; -#endif #if CONFIG_IS_ENABLED (DM_SPI ) && !CONFIG_IS_ENABLED (OF_CONTROL )static const struct omap3_spi_plat omap3_spi_pdata = { .regs = (struct mcspi *)AM33XX_SPI0_OFFSET,
Signature · 1 line
2.17.1
PATCH 2/3 am33xx: board: remove GPIO platforma data
Hi Dario,
Quoted 4 lines · Dario Binacchi
Since the board has been converted to driver model and DT is supported, GPIO platform are no more required and can be removed.
Signed-off-by Dario Binacchi <[email protected]>
Not all am335x platforms are converted to DT. Due to SPL size constraints am335x_evm_defconfig is still using plat data. This patch will break such platforms no?
Thanks and regards,
Lokesh
Quoted 40 lines
---
arch/arm/mach-omap2/am33xx/board.c | 23 ----------------------- 1 file changed, 23 deletions(-)arch/arm/mach-omap2/am33xx/board.c +0
-23@@ -126,29 +126,6 @@ U_BOOT_DRVINFOS(am33xx_i2c) = { };#endif -#if CONFIG_IS_ENABLED (DM_GPIO ) -static const struct omap_gpio_plat am33xx_gpio[] = { - {0 ,AM33XX_GPIO0_BASE }, - {1 ,AM33XX_GPIO1_BASE }, - {2 ,AM33XX_GPIO2_BASE }, - {3 ,AM33XX_GPIO3_BASE }, -#ifdef CONFIG_AM43XX - {4 ,AM33XX_GPIO4_BASE }, - {5 ,AM33XX_GPIO5_BASE }, -#endif -}; - -U_BOOT_DRVINFOS (am33xx_gpios) = { - {"gpio_omap" , &am33xx_gpio[0 ] }, - {"gpio_omap" , &am33xx_gpio[1 ] }, - {"gpio_omap" , &am33xx_gpio[2 ] }, - {"gpio_omap" , &am33xx_gpio[3 ] }, -#ifdef CONFIG_AM43XX - {"gpio_omap" , &am33xx_gpio[4 ] }, - {"gpio_omap" , &am33xx_gpio[5 ] }, -#endif -}; -#endif #if CONFIG_IS_ENABLED (DM_SPI ) && !CONFIG_IS_ENABLED (OF_CONTROL )static const struct omap3_spi_plat omap3_spi_pdata = { .regs = (struct mcspi *)AM33XX_SPI0_OFFSET,
PATCH 2/3 am33xx: board: remove GPIO platforma data
Hi Lokesh,
Quoted 6 lines
Il 22/02/2021 07:08 Lokesh Vutla <[email protected]> ha scritto:
Hi Dario,
On 13/02/21 4:30 pm, Dario Binacchi wrote:
Quoted 8 lines
Quoted 4 lines
Since the board has been converted to driver model and DT is supported, GPIO platform are no more required and can be removed.
Signed-off-by Dario Binacchi <[email protected]>Not all am335x platforms are converted to DT. Due to SPL size constraints
am335x_evm_defconfigis still using plat data. This patch will break such platforms no?
I ran the commands:
$ ./tools/buildman/buildman -o /tmp -P -E -W am33 $ grep -r 'OF_PLATDATA=y' /tmp/.bm-work/ | grep '\.config' | wc -l 0
Is this enough to exclude the use of platform data by some configuration? I would think that am335x_evm_defconfig is not using platforma data. What am I doing wrong?
Thanks and regards,
Dario
Quoted 44 lines
Thanks and regards,
LokeshQuoted 40 lines
---
arch/arm/mach-omap2/am33xx/board.c | 23 ----------------------- 1 file changed, 23 deletions(-)arch/arm/mach-omap2/am33xx/board.c +0
-23@@ -126,29 +126,6 @@ U_BOOT_DRVINFOS(am33xx_i2c) = { };#endif -#if CONFIG_IS_ENABLED (DM_GPIO ) -static const struct omap_gpio_plat am33xx_gpio[] = { - {0 ,AM33XX_GPIO0_BASE }, - {1 ,AM33XX_GPIO1_BASE }, - {2 ,AM33XX_GPIO2_BASE }, - {3 ,AM33XX_GPIO3_BASE }, -#ifdef CONFIG_AM43XX - {4 ,AM33XX_GPIO4_BASE }, - {5 ,AM33XX_GPIO5_BASE }, -#endif -}; - -U_BOOT_DRVINFOS (am33xx_gpios) = { - {"gpio_omap" , &am33xx_gpio[0 ] }, - {"gpio_omap" , &am33xx_gpio[1 ] }, - {"gpio_omap" , &am33xx_gpio[2 ] }, - {"gpio_omap" , &am33xx_gpio[3 ] }, -#ifdef CONFIG_AM43XX - {"gpio_omap" , &am33xx_gpio[4 ] }, - {"gpio_omap" , &am33xx_gpio[5 ] }, -#endif -}; -#endif #if CONFIG_IS_ENABLED (DM_SPI ) && !CONFIG_IS_ENABLED (OF_CONTROL )static const struct omap3_spi_plat omap3_spi_pdata = { .regs = (struct mcspi *)AM33XX_SPI0_OFFSET,
PATCH 3/3 dm: am33xx: drop GPIO domain clock enabling by SOC api
In reply to Dario BinacchiEnabling the domain clock is performed by the sysc interconnect target module driver during the GPIO device probing.
---
arch/arm/mach-omap2/am33xx/clock_am33xx.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-omap2/am33xx/clock_am33xx.c +4 -0
@@ -208,7 +208,9 @@ void enable_basic_clocks(void) &cmwkup->wkl4wkclkctrl, &cmper->l3instrclkctrl, &cmper->l4hsclkctrl, +#if !CONFIG_IS_ENABLED(DM_GPIO) &cmwkup->wkgpio0clkctrl, +#endif &cmwkup->wkctrlclkctrl, &cmper->timer2clkctrl, &cmper->gpmcclkctrl,
@@ -216,9 +218,11 @@ void enable_basic_clocks(void) &cmper->mmc0clkctrl, &cmper->mmc1clkctrl, &cmwkup->wkup_i2c0ctrl, +#if !CONFIG_IS_ENABLED(DM_GPIO) &cmper->gpio1clkctrl, &cmper->gpio2clkctrl, &cmper->gpio3clkctrl, +#endif &cmper->i2c1clkctrl, &cmper->cpgmac0clkctrl, &cmper->spi0clkctrl,
Signature · 1 line
2.17.1