[PATCH 1/4] ARM: omap3_beagle: Remove non-DM initialization

With DM_MMC working for both SPL and U-Boot, this patch removes the legacy style of initializing the MMC driver.
Based on omap3_logic: 42140dd0962bc134c0aad27524d0f4cc3955f255.
Signed-off-by: Romain Naour romain.naour@gmail.com --- board/ti/beagle/beagle.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 888a958491..d5a122af2b 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -500,13 +500,6 @@ void set_muxconf_regs(void) MUX_BEAGLE(); }
-#if defined(CONFIG_MMC) -int board_mmc_init(struct bd_info *bis) -{ - return omap_mmc_init(0, 0, 0, -1, -1); -} -#endif - #if defined(CONFIG_MMC) void board_mmc_power_init(void) {

The PMIC enables power to the MMC card by default, but depending on the state it was left when restarted, it's possible the MMC may be powered down.
This patch patch explicitly tells the twl4030 to power the MMC.
Based on commits [1][2].
[1] 64fd2d26140aa72b43428d079974f7c0e7f88353 [2] 27b653449178e80b333e7bc5a81eed3bd1bd6861
Signed-off-by: Romain Naour romain.naour@gmail.com --- board/ti/beagle/beagle.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index d5a122af2b..847d596646 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -447,6 +447,8 @@ int misc_init_r(void) env_set(expansion_config.env_var, expansion_config.env_setting);
twl4030_power_init(); + twl4030_power_mmc_init(0); + switch (get_board_revision()) { case REVISION_XM_AB: twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); @@ -499,10 +501,3 @@ void set_muxconf_regs(void) { MUX_BEAGLE(); } - -#if defined(CONFIG_MMC) -void board_mmc_power_init(void) -{ - twl4030_power_mmc_init(0); -} -#endif

On Fri, Feb 25, 2022 at 12:18:32PM +0100, Romain Naour wrote:
The PMIC enables power to the MMC card by default, but depending on the state it was left when restarted, it's possible the MMC may be powered down.
This patch patch explicitly tells the twl4030 to power the MMC.
Based on commits [1][2].
[1] 64fd2d26140aa72b43428d079974f7c0e7f88353 [2] 27b653449178e80b333e7bc5a81eed3bd1bd6861
Signed-off-by: Romain Naour romain.naour@gmail.com
Applied to u-boot/next, thanks!

The simple pinctrl driver currently available works with the omap3. Enabling this will use the device tree to automatically set the pin-muxing for various drivers.
Based on commit: 57dbf754e37d3347cad441f3869bf72c0d726a71
Signed-off-by: Romain Naour romain.naour@gmail.com --- configs/omap3_beagle_defconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig index 206118e6af..a9b2c15cee 100644 --- a/configs/omap3_beagle_defconfig +++ b/configs/omap3_beagle_defconfig @@ -83,6 +83,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_DM_ETH=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_OMAP3_SPI=y

On Fri, Feb 25, 2022 at 12:18:33PM +0100, Romain Naour wrote:
The simple pinctrl driver currently available works with the omap3. Enabling this will use the device tree to automatically set the pin-muxing for various drivers.
Based on commit: 57dbf754e37d3347cad441f3869bf72c0d726a71
Signed-off-by: Romain Naour romain.naour@gmail.com
Applied to u-boot/next, thanks!

Enabling DM_PMIC, DM_REGULATOR_FIXED, and DM_REGULATOR_GPIO gives us the ability to better monitor voltages and enable hardware through the device tree. The TL4030 (TPS65950) is not yet migrated to DM, so this patch only enables the fixed and GPIO controlled regulators.
Based on commit [1][2].
[1] a40d3cc845756e1e38af5ac31986539417e64abb [2] 2448e42d73fb91e4b56bb41b2677e18ab99a6c83
Signed-off-by: Romain Naour romain.naour@gmail.com --- configs/omap3_beagle_defconfig | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig index a9b2c15cee..c7111f4e63 100644 --- a/configs/omap3_beagle_defconfig +++ b/configs/omap3_beagle_defconfig @@ -85,6 +85,11 @@ CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_DM_ETH=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y +CONFIG_DM_PMIC=y +# CONFIG_SPL_PMIC_CHILDREN is not set +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_OMAP3_SPI=y

On Fri, Feb 25, 2022 at 12:18:34PM +0100, Romain Naour wrote:
Enabling DM_PMIC, DM_REGULATOR_FIXED, and DM_REGULATOR_GPIO gives us the ability to better monitor voltages and enable hardware through the device tree. The TL4030 (TPS65950) is not yet migrated to DM, so this patch only enables the fixed and GPIO controlled regulators.
Based on commit [1][2].
[1] a40d3cc845756e1e38af5ac31986539417e64abb [2] 2448e42d73fb91e4b56bb41b2677e18ab99a6c83
Signed-off-by: Romain Naour romain.naour@gmail.com
Applied to u-boot/next, thanks!

On Fri, Feb 25, 2022 at 12:18:31PM +0100, Romain Naour wrote:
With DM_MMC working for both SPL and U-Boot, this patch removes the legacy style of initializing the MMC driver.
Based on omap3_logic: 42140dd0962bc134c0aad27524d0f4cc3955f255.
Signed-off-by: Romain Naour romain.naour@gmail.com
Applied to u-boot/next, thanks!
participants (2)
-
Romain Naour
-
Tom Rini