Skip to contentSkip to conversation

sunxi: Enable eMMC on Libre Computer Board ALL-H3-CC boards

PATCH New Chen-Yu Tsai 3 participants 3 messages Jul 14, 2018 – Jul 17, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Enable eMMC on Libre Computer Board ALL-H3-CC boards

The Libretech ALL-H3-CC has a high density connector for attaching an eMMC module. The module form factor and connection is specific to Libretech, and has provisions for split vmmc/vqmmc (core and I/O) voltage supplies, but this board does not wire the vqmmc side. The H2+/H3/H5 SoCs do not support alternate I/O voltages for eMMC either. Only 3.3V is supported. A specific module that ties vqmmc to vmmc, with both at 3.3V, must be used.

Given that a) eMMC is not designed to be hotplugged, b) power is always provided on the pins, and c) MMC controllers can deal with missing cards, we can enable this by default. If a module is attached it will be picked up by the system.

The device tree change was also submitted to the Linux Kernel and has already been queued up for 4.19.

---
This patch is based on u-boot master at submission time:

5e9a9645816e mach-stm32: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET

---
 arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi   | 9 +++++++++
 configs/libretech_all_h3_cc_h2_plus_defconfig | 1 +
 configs/libretech_all_h3_cc_h3_defconfig      | 1 +
 configs/libretech_all_h3_cc_h5_defconfig      | 1 +
 4 files changed, 12 insertions(+)
arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi +9 -0
index 5d01bba180e4..46ae4550c741 100644
@@ -140,6 +140,15 @@
 	status = "okay";
 };
 
+&mmc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc2_8bit_pins>;
+	vmmc-supply = <&reg_vcc_io>;
+	bus-width = <8>;
+	non-removable;
+	status = "okay";
+};
+
 &ohci1 {
 	status = "okay";
 };
configs/libretech_all_h3_cc_h2_plus_defconfig +1 -0
index 0cbcd48aadb8..071be93697cb 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/libretech_all_h3_cc_h3_defconfig +1 -0
index 185facdf3eab..c20ad9f3a249 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
configs/libretech_all_h3_cc_h5_defconfig +1 -0
index 061bddc8fd5e..5db8dfcd4f98 100644
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN50I_H5=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-libretech-all-h3-cc"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 # CONFIG_CMD_FLASH is not set
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 sunxi: Enable eMMC on Libre Computer Board ALL-H3-CC boards

Quoted 13 lines · Chen-Yu Tsai

The Libretech ALL-H3-CC has a high density connector for attaching an eMMC module. The module form factor and connection is specific to Libretech, and has provisions for split vmmc/vqmmc (core and I/O) voltage supplies, but this board does not wire the vqmmc side. The H2+/H3/H5 SoCs do not support alternate I/O voltages for eMMC either. Only 3.3V is supported. A specific module that ties vqmmc to vmmc, with both at 3.3V, must be used.

Given that a) eMMC is not designed to be hotplugged, b) power is always provided on the pins, and c) MMC controllers can deal with missing cards, we can enable this by default. If a module is attached it will be picked up by the system.

Quoted 4 lines

The device tree change was also submitted to the Linux Kernel and has already been queued up for 4.19.

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180717/c24857b2/attachment.sig>
#2 lore raw

PATCH 1/1 sunxi: Enable eMMC on Libre Computer Board ALL-H3-CC boards

In reply to Chen-Yu Tsai
Quoted 13 lines · Chen-Yu Tsai

The Libretech ALL-H3-CC has a high density connector for attaching an eMMC module. The module form factor and connection is specific to Libretech, and has provisions for split vmmc/vqmmc (core and I/O) voltage supplies, but this board does not wire the vqmmc side. The H2+/H3/H5 SoCs do not support alternate I/O voltages for eMMC either. Only 3.3V is supported. A specific module that ties vqmmc to vmmc, with both at 3.3V, must be used.

Given that a) eMMC is not designed to be hotplugged, b) power is always provided on the pins, and c) MMC controllers can deal with missing cards, we can enable this by default. If a module is attached it will be picked up by the system.

Quoted 5 lines

The device tree change was also submitted to the Linux Kernel and has already been queued up for 4.19.

---

Applied to u-boot-sunxi/master