
On Sun, 24 Sep 2023 13:21:16 +0300 Okhunjon Sobirjonov okhunjon72@gmail.com wrote:
Hi Okhunjon,
thanks for sending this!
Added support for on-chip EMMC(SMHC2) pin pull ups for sunxi R528 board. Otherwise, "No pinmux setup defined for MMC2" appears. Moreover, adding CONFIG_MMC_SUNXI_SLOT_EXTRA=2 to defconfig might be needed in order to inform SPL code that another MMC instance on top of the default 0 for booting should be considered.
The patch itself looks alright, but sunxi_mmc_init() in drivers/mmc/sunxi_mmc.c seems to enable 8-bit mode for MMC2. Can you double check this?
Signed-off-by: Okhunjon Sobirjonov Okhunjon.Sobirjonov@Mec-electronics.com
Reviewed-by: Andre Przywara andre.przywara@arm.com
I will integrate this patch into v2 of the T113s support series.
Cheers, Andre
board/sunxi/board.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index f321cd58a6..764a1ea998 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -482,6 +482,13 @@ static void mmc_pinmux_setup(int sdc) sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN8I_R528)
/* SDC2: PC2-PC7 */
for (pin = SUNXI_GPC(2); pin <= SUNXI_GPC(7); pin++) {
sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);
sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
sunxi_gpio_set_drv(pin, 2);
}
#else puts("ERROR: No pinmux setup defined for MMC2!\n"); #endif