[DEBUG] rk3399-nanopi-neo4: SPL SD init may report -5 due to SD power-on timing

Sune Brian briansune at gmail.com
Fri Oct 31 23:06:59 CET 2025


> Please try my suggestion above, the datasheet for the LDO mention 50us
> start-time and card may need one ms to fully init. Defining this timing
> requirement in the device tree that U-Boot SPL uses should match the
> workaround/fix you mention in your original mail.

Modification on dts as such:

vcc3v0_sd: regulator-vcc3v0-sd {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_pwr_h>;
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc3v0_sd";
startup-delay-us = <2000>;
vin-supply = <&vcc3v3_sys>;
};

SD node on dts roll back to latest U-Boot as such:

&sdmmc {
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v0_sd>;
vqmmc-supply = <&vcc_sdio>;
status = "okay";
};

Test Result:


U-Boot TPL 2026.01-rc1-00070-ge34d01d23e45-dirty (Nov 01 2025 - 06:01:06)
Channel 0: DDR3, 933MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
no stride
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2026.01-rc1-00070-ge34d01d23e45-dirty (Nov 01 2025 - 06:01:06 +0800)
Trying to boot from MMC2
spl: mmc init failed with error: -5
Error: -5
Trying to boot from MMC1
Card did not respond to voltage select! : -110
spl: mmc init failed with error: -95
Error: -95
Trying to boot from MMC2
spl: mmc init failed with error: -5
Error: -5
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Thank you Jonas ' feedback on dts.
But sadly stall.

Thank you,
Brian


More information about the U-Boot mailing list