diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 38f38b2ed1a..db37094ce21 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -582,6 +582,10 @@ config MACPWR Set the pin used to power the MAC. This takes a string in the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. +config MMC2_BUS_WIDTH + int "Bus width for mmc2 (4 or 8)" + default 8 + config MMC0_CD_PIN string "Card detect pin for mmc0" default "PF6" if MACH_SUN8I_A83T || MACH_SUNXI_H3_H5 || MACH_SUN50I diff --git a/board/sunxi/board.c b/board/sunxi/board.c index f5cb1dabe76..1d48c5d17a0 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -467,8 +467,13 @@ static void mmc_pinmux_setup(int sdc) sunxi_gpio_set_drv(pin, 2); } } else { +#if CONFIG_MMC2_BUS_WIDTH == 4 + /* SDC2: PC6-PC15 */ + for (pin = SUNXI_GPC(6); pin <= SUNXI_GPC(11); pin++) { +#else /* SDC2: PC6-PC15 */ for (pin = SUNXI_GPC(6); pin <= SUNXI_GPC(15); pin++) { +#endif sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2); sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP); sunxi_gpio_set_drv(pin, 2); diff --git a/configs/pocketbook_touch_lux_3_defconfig b/configs/pocketbook_touch_lux_3_defconfig index 279d29b9a4c..7cc21875df3 100644 --- a/configs/pocketbook_touch_lux_3_defconfig +++ b/configs/pocketbook_touch_lux_3_defconfig @@ -8,6 +8,7 @@ CONFIG_DRAM_EMR1=0 CONFIG_MMC0_CD_PIN="PG0" CONFIG_CONS_INDEX=2 CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_MMC2_BUS_WIDTH=4 CONFIG_AXP_GPIO=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-pocketbook-touch-lux-3"