arm: mmc: Add "ti, am335-sdhci" compatible for TI's omap_hsmmc driver
Subsystems (2)
PATCH 1/3 arm: mmc: Add "ti, am335-sdhci" compatible for TI's omap_hsmmc driver
In the Linux kernel (v5.16) for this SoC there are two separate drivers
- namely sdhci-omap.c and omap_hsmmc.c which have separate set of compatibles.
The U-Boot's drivers/mmc/omap_hsmmc.c driver supports both eMMC and SD devices - hence the compatible for SDHCI can be added.
After this change the am335x DTS description can be easier ported from Linux kernel.
---
drivers/mmc/omap_hsmmc.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/omap_hsmmc.c +1 -0
@@ -2019,6 +2019,7 @@ static const struct udevice_id omap_hsmmc_ids[] = { { .compatible = "ti,omap3-hsmmc" }, { .compatible = "ti,omap4-hsmmc" }, { .compatible = "ti,am33xx-hsmmc" }, + { .compatible = "ti,am335-sdhci" }, { .compatible = "ti,dra7-hsmmc", .data = (ulong)&dra7_mmc_of_data }, { } };
Signature · 1 line
2.20.1
PATCH 2/3 arm: dts: Add mmc[01] aliases to am33xx.dtsi
This change provides similar aliases definitions as now present in Linux kernel v5.16.9 for am33xx.dtsi file.
---
arch/arm/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/dts/am33xx.dtsi +2 -0
@@ -40,6 +40,8 @@ ethernet1 = &cpsw_emac1; spi0 = &spi0; spi1 = &spi1; + mmc0 = &mmc1; + mmc1 = &mmc2; }; cpus {
Signature · 1 line
2.20.1
Re: [PATCH 2/3] arm: dts: Add mmc[01] aliases to am33xx.dtsi
Quoted 4 lines · Lukasz Majewski
This change provides similar aliases definitions as now present in Linux kernel v5.16.9 for
am33xx.dtsifile.Signed-off-by Lukasz Majewski <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH 3/3 arm: dts: Add DTS description for MMC2 am33xx devices
In reply to Lukasz MajewskiThis code has been ported from Linux v5.16.9 arch/arm/boot/dts/am33xx.dtsi file to allow correct usage of MMC2 controller in U-Boot.
This IP block is a bit specific as it is connected to L3 interconnect bus, whereas mmc[01] are connected to L4.
Proper configuration of this block (including providing clock) is handled in ti-sysc.c driver.
---
arch/arm/dts/am33xx.dtsi | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-)
arch/arm/dts/am33xx.dtsi +30 -9
@@ -42,6 +42,7 @@ spi1 = &spi1; mmc0 = &mmc1; mmc1 = &mmc2; + mmc2 = &mmc3; }; cpus {
@@ -303,6 +304,35 @@ }; }; + target-module@47810000 { + compatible = "ti,sysc-omap2", "ti,sysc"; + reg = <0x478102fc 0x4>, + <0x47810110 0x4>, + <0x47810114 0x4>; + reg-names = "rev", "sysc", "syss"; + ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY | + SYSC_OMAP2_ENAWAKEUP | + SYSC_OMAP2_SOFTRESET | + SYSC_OMAP2_AUTOIDLE)>; + ti,sysc-sidle = <SYSC_IDLE_FORCE>, + <SYSC_IDLE_NO>, + <SYSC_IDLE_SMART>; + ti,syss-mask = <1>; + clocks = <&l3s_clkctrl AM3_L3S_MMC3_CLKCTRL 0>; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x47810000 0x1000>; + + mmc3: mmc@0 { + compatible = "ti,am335-sdhci"; + ti,needs-special-reset; + interrupts = <29>; + reg = <0x0 0x1000>; + status = "disabled"; + }; + }; + i2c0: i2c@44e0b000 { compatible = "ti,omap4-i2c"; #address-cells = <1>;
@@ -359,15 +389,6 @@ status = "disabled"; }; - mmc3: mmc@47810000 { - compatible = "ti,omap4-hsmmc"; - ti,hwmods = "mmc3"; - ti,needs-special-reset; - interrupts = <29>; - reg = <0x47810000 0x1000>; - status = "disabled"; - }; - wdt2: wdt@44e35000 { compatible = "ti,omap3-wdt"; ti,hwmods = "wd_timer2";
Signature · 1 line
2.20.1
Re: [PATCH 3/3] arm: dts: Add DTS description for MMC2 am33xx devices
Quoted 10 lines · Lukasz Majewski
This code has been ported from Linux v5.16.9
arch/arm/boot/dts/am33xx.dtsifile to allow correct usage of MMC2 controller in U-Boot.This IP block is a bit specific as it is connected to L3 interconnect bus, whereas mmc[01] are connected to L4.
Proper configuration of this block (including providing clock) is handled in
ti-sysc.cdriver.Signed-off-by Lukasz Majewski <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Re: [PATCH 1/3] arm: mmc: Add "ti,am335-sdhci" compatible for TI's omap_hsmmc driver
In reply to Lukasz MajewskiQuoted 11 lines · Lukasz Majewski
In the Linux kernel (v5.16) for this SoC there are two separate drivers
- namelysdhci-omap.candomap_hsmmc.cwhich have separate set of compatibles.The U-Boot's
drivers/mmc/omap_hsmmc.cdriver supports both eMMC and SD devices - hence the compatible for SDHCI can be added.After this change the am335x DTS description can be easier ported from Linux kernel.
Signed-off-by Lukasz Majewski <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 17 lines
---
drivers/mmc/omap_hsmmc.c | 1 + 1 file changed, 1 insertion(+)drivers/mmc/omap_hsmmc.c +1
-0@@ -2019,6 +2019,7 @@ static const struct udevice_id omap_hsmmc_ids[] = { { .compatible = "ti,omap3-hsmmc" }, { .compatible = "ti,omap4-hsmmc" }, { .compatible = "ti,am33xx-hsmmc" }, + { .compatible = "ti,am335-sdhci" }, { .compatible = "ti,dra7-hsmmc", .data = (ulong)&dra7_mmc_of_data }, { } };
Re: [PATCH 1/3] arm: mmc: Add "ti,am335-sdhci" compatible for TI's omap_hsmmc driver
In reply to Lukasz MajewskiHi Tom,
Quoted 11 lines
In the Linux kernel (v5.16) for this SoC there are two separate drivers
- namelysdhci-omap.candomap_hsmmc.cwhich have separate set of compatibles.The U-Boot's
drivers/mmc/omap_hsmmc.cdriver supports both eMMC and SD devices - hence the compatible for SDHCI can be added.After this change the am335x DTS description can be easier ported from Linux kernel.
Gentle ping on this patch series.
Quoted 11 lines
Signed-off-by Lukasz Majewski <[email protected]>---
drivers/mmc/omap_hsmmc.c | 1 + 1 file changed, 1 insertion(+)drivers/mmc/omap_hsmmc.c +0
-0
drivers/mmc/omap_hsmmc.c static const struct udevice_id omap_hsmmc_ids[] · line 2025
Quoted 7 lines
drivers/mmc/omap_hsmmc.c +1
-0@@ -2019,6 +2019,7 @@ static const struct udevice_id omap_hsmmc_ids[] = { { .compatible ="ti,omap3-hsmmc" }, { .compatible ="ti,omap4-hsmmc" }, { .compatible ="ti,am33xx-hsmmc" }, + { .compatible ="ti,am335-sdhci" }, { .compatible ="ti,dra7-hsmmc" , .data = (ulong)&dra7_mmc_of_data }, { } };
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 4 lines · Lukasz Majewski
In the Linux kernel (v5.16) for this SoC there are two separate drivers
- namelysdhci-omap.candomap_hsmmc.cwhich have separate set of compatibles.
Quoted 8 lines
The U-Boot's
drivers/mmc/omap_hsmmc.cdriver supports both eMMC and SD devices - hence the compatible for SDHCI can be added.After this change the am335x DTS description can be easier ported from Linux kernel.
Signed-off-by Lukasz Majewski <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom