sunxi: support for a second SD card socket
cover 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(+)
Signature · 1 line
2.1.4
PATCH 1/2 sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3
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.
--- configs/A20-Olimex-SOM-EVB_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/A20-Olimex-SOM-EVB_defconfig +3 -0
@@ -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"
Signature · 1 line
2.1.4
PATCH 2/2 sunxi: Enable a second mmc socket as boot target in the environment
In reply to Karsten MerkerSome 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.
--- include/configs/sunxi-common.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/configs/sunxi-common.h +6 -0
@@ -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) \
Signature · 1 line
2.1.4