[U-Boot] [linux-sunxi] [PATCH 0/9] sunxi: enable DM_MMC

Andre Przywara andre.przywara at arm.com
Mon Jan 21 08:51:10 UTC 2019


Hi,

....

>>> Testing with A10 Gemei G9 Tablet, FEL mode is broken:
>>>
>>> a) With usb-boot via fel:
>>>
>>> I get following error/warning: 
>>> Loading Environment from FAT... Card did not respond to voltage select!
>>>
>>> => mmc list
>>> mmc at 1c0f000: 0
>>> ### All commands below stalls for a bit (~2 seconds), but return nothing
>>> => mmc info  
>>> => mmc dev 0
>>> => mmc part
>>>
> Similar issue with A20 Olinuxino Lime2 revk with SPI.
> 
> a) Fel mode usb-boot failure (cannot properly initialize sd / emmc)
> b) SPI boot failure (cannot properly initialize sd / emmc)
> 
> c) Regular SD-card boot works ok!
> d) eMMC boot works ok!

Can you please try whether the patch below fixes this? At least it worked
for me with FEL booting my Pine64-LTS.

Not totally happy with it, but it seems like we do a similar trick for
I2C anyway, so ...

Cheers,
Andre

---
 board/sunxi/board.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index ad14837291..e330367d1d 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -208,6 +208,10 @@ enum env_location env_get_location(enum env_operation op, int prio)
 }
 #endif
 
+#ifdef CONFIG_DM_MMC
+static void mmc_pinmux_setup(int sdc);
+#endif
+
 /* add board specific code here */
 int board_init(void)
 {
@@ -269,6 +273,17 @@ int board_init(void)
 	i2c_init_board();
 #endif
 
+#ifdef CONFIG_DM_MMC
+	/*
+	 * Temporary workaround for enabling I2C clocks until proper sunxi DM
+	 * clk, reset and pinctrl drivers land.
+	 */
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);
+#endif
+#endif	/* CONFIG_DM_MMC */
+
 	/* Uses dm gpio code so do this here and not in i2c_init_board() */
 	return soft_i2c_board_init();
 }
-- 
2.14.5



More information about the U-Boot mailing list