[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 05:10:36 CET 2025
    
    
  
Hello U-Boot maintainers,
While testing mainline U-Boot (v2026.01-rc1-00070-ge34d01d23e45) on the
FriendlyARM NanoPi NEO4 (RK3399), I observed that SPL sometimes fails to
initialize the SD card with the following message:
    spl: mmc init failed with error: -5
    SPL: failed to boot from all boot devices
After investigation, the root cause appears to be related to the **SD card
power rail (`vcc3v0_sd`) timing during SPL startup**. On the NanoPi NEO4,
the SD slot is powered via GPIO0_A1 to a fixed 3.0 V supply. SPL may attempt
MMC initialization **before this supply has fully stabilized**, resulting in
a generic I/O error (`-5`). The SD card itself and the controller are
functioning correctly once the supply is stable.
**Workarounds / fixes observed:**
- Add a small delay after enabling `vcc3v0_sd` before SPL starts MMC init.
- Ensure the regulator is fully powered and stable at SPL start.
This appears to be a **hardware/platform-specific power-on timing issue**
rather than a device tree or software bug, but documenting it would help
users encountering similar errors on the NanoPi NEO4.
**Hardware:** FriendlyARM NanoPi NEO4
**SoC:** Rockchip RK3399
**U-Boot version:** v2026.01-rc1-00070-ge34d01d23e45
**Reproducibility:** 100% with SD boot
Best regards,
Brian
    
    
More information about the U-Boot
mailing list