The SD I/O rail of the K1 boards (VCC1833_MMC1, PMIC aldo1, the
vqmmc-supply of sdhci0) can run at 1.8 V or 3.3 V. Without
SPL_MMC_IO_VOLTAGE the MMC core in the SPL never sets it:
mmc_set_signal_voltage() is an empty stub, so the card is driven at
whatever voltage the rail was left at, which is 1.8 V from
pmic_init(). SD Default and High Speed use 3.3 V signalling.

Single-block reads happen to work at 1.8 V, and the SPL reads SD cards
one block at a time, which hid this. With multi-block reads, a 32-block
read on a Banana Pi BPI-F3 aborted part-way with a Data End Bit error,
while U-Boot proper, which sets 3.3 V, read the same blocks without
error.

Enable SPL_MMC_IO_VOLTAGE so that the SPL sets the rail to 3.3 V
through vqmmc-supply before it talks to the card.

Reported-by: Zixian Zeng <[email protected]>
Closes: 
https://lore.kernel.org/u-boot/[email protected]/
Signed-off-by: Tanmay Kathpalia <[email protected]>
---
Changes in v3:
- New patch
---
 configs/spacemit_k1_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/spacemit_k1_defconfig b/configs/spacemit_k1_defconfig
index 39c490438d3..b67b9f3058a 100644
--- a/configs/spacemit_k1_defconfig
+++ b/configs/spacemit_k1_defconfig
@@ -83,6 +83,7 @@ CONFIG_SPL_I2C_EEPROM=y
 CONFIG_MMC=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_SPL_MMC_IO_VOLTAGE=y
 CONFIG_MMC_HS400_ES_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
 CONFIG_MMC_SDHCI=y
-- 
2.43.7

Reply via email to