[U-Boot] [PATCH 0/2] sunxi: support for a second SD card socket

Hello,
this patchset enables the full-size SD card socket on the A20-Olimex-SOM-EVB baseboard in u-boot and adds support for including this kind of secondary socket into the boot process provided by config_distro_bootcmd.h.
The latter is particularly useful on the A20-Olimex-SOM-EVB as changing the card in the primary micro-SD socket is kind of fiddly when the SOM is plugged into the baseboard.
Regards, Karsten
Karsten Merker (2): sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3 sunxi: Enable a second mmc socket as boot target in the environment
configs/A20-Olimex-SOM-EVB_defconfig | 3 +++ include/configs/sunxi-common.h | 6 ++++++ 2 files changed, 9 insertions(+)

The Olimex A20-SOM-EVB is an evaluation board for the Olimex A20-SOM system-on-module. The baseboard provides a full-size SD socket (connected to mmc3) in addition to the micro-SD socket on the SOM itself (which is connected to mmc0).
Enable the mmc3 controller in the board defconfig.
Signed-off-by: Karsten Merker merker@debian.org --- configs/A20-Olimex-SOM-EVB_defconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig index 5166c06..34b3f36 100644 --- a/configs/A20-Olimex-SOM-EVB_defconfig +++ b/configs/A20-Olimex-SOM-EVB_defconfig @@ -3,6 +3,9 @@ CONFIG_ARCH_SUNXI=y CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=480 CONFIG_MMC0_CD_PIN="PH1" +CONFIG_MMC3_CD_PIN="PH0" +CONFIG_MMC3_PINS="PH" +CONFIG_MMC_SUNXI_SLOT_EXTRA=3 CONFIG_USB0_VBUS_PIN="PB9" CONFIG_USB0_VBUS_DET="PH5" CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"

Some sunxi-based boards (such as the Olimex A20-SOM-EVB) have a second MMC socket. This socket is not bootable hardware-wise, i.e. u-boot itself cannot be loaded from it, but once u-boot has started, the second socket can be used in the boot process provided by config_distro_bootcmd.h.
If a second MMC socket is present, place it in the boot order after the first MMC socket.
Signed-off-by: Karsten Merker merker@debian.org --- include/configs/sunxi-common.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 98a2c74..53ad6d2 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -418,6 +418,11 @@ extern int soft_i2c_gpio_scl;
#ifdef CONFIG_MMC #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) +#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 +#define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1) +#else +#define BOOT_TARGET_DEVICES_MMC_EXTRA(func) +#endif #else #define BOOT_TARGET_DEVICES_MMC(func) #endif @@ -447,6 +452,7 @@ extern int soft_i2c_gpio_scl; #define BOOT_TARGET_DEVICES(func) \ func(FEL, fel, na) \ BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_MMC_EXTRA(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \
participants (1)
-
Karsten Merker