Skip to content

sunxi: enable DM_MMC

Andre Przywara u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 9 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 9 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

Hi,

....

Quoted 14 lines
Quoted 7 lines
Quoted 7 lines

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!

Quoted 7 lines
Quoted 7 lines

=> 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

Quoted 7 lines

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(+)
board/sunxi/board.c +15 -0
index ad14837291..e330367d1d 100644
@@ -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();
 }
Signature · 1 line
2.14.5