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

Jonas Karlman jonas at kwiboo.se
Fri Oct 31 21:47:08 CET 2025


Hi Brian,

On 10/31/2025 9:16 PM, Sune Brian wrote:
>> Is your issue specific to a reboot or cold boot?
> 
> First got to think in logical flow. As the SD card fail to pass the
> detection of valid SD card aka -5 error then it is 100% impossible
> to enter U-Boot user control phase, same as kernel nor distro.
> Hence, also cannot do 'reset' on U-Boot nor 'sudo reboot' on distro.

Your original mail mentions "sometimes fails" and that you tested U-Boot
v2026.01-rc1+, the most recent change for the nanpi4 family was related
to sd-card regulator handling to improve reboot when card was using uhs
speed in os and boot fails in spl due to this.

> 
> So the answer is cold boot.
> However, do reboot also have issue? This is not tested yet as
> we got to solve the regulator behavior trouble first.

Thanks for clarifying the condition when you observe this issue.

> 
>> Try adding something like following to rk3399-nanopi-neo4-u-boot.dtsi
>> to add a 2ms delay to ensure the voltage for the vcc3v0_sd regulator is
>> stabilized when it is enabled. Or any other timing that is required.
>>
>> &vcc3v0_sd {
>>         startup-delay-us = <2000>;
>> };
> 
> So far i got to comment this in the dts in order to boot.

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.

Regards,
Jonas

> 
> &sdmmc {
> // vmmc-supply = <&vcc3v0_sd>;
> };
> 
>> I only have a NanoPi M4B from the nanopi4 family to run tests on.
> 
> My board is nanopi neo4. If my reading is correct.
> The schematic on your board is mostly same as the neo4 on SD card.
> 
> M4B page 19 [1], NEO4 page 18 [2]
> 
> Should able to check if issue can be reproduced. The LDO itself could be
> slow as this is not digital based LDO, it is old analog control-loop
> one I guess.
> Meantime, the RK3399 may not have internal ADC or HW to sense the rail sanity.
> 
> Brian
> 
> [1] https://wiki.friendlyelec.com/wiki/images/1/16/NanoPi-M4B-1909-Schematic.pdf
> [2] https://wiki.friendlyelec.com/wiki/images/b/bb/NanoPi_NEO4_2008_SCH.pdf



More information about the U-Boot mailing list