Skip to contentSkip to conversation

Booting from SD-card on StarFive VisionFive 2 is broken in master

DISCUSSION Yao Zi 2 participants 3 messages Oct 20, 2025

lore
Share & tools
lore

Yao Zi

author
#0 lore raw

Hi there,

While testing the behavior of my previous patch on JH7110 platforms, it's found that StarFive VisionFive 2 fails to boot from SD-card with current U-Boot master "a58089ad2e4 (fs: semihosting: Use correct variable for error check, 2025-10-02)" with messages like

U-Boot SPL 2025.10-00669-ga58089ad2e41 (Oct 20 2025 - 10:29:30 +0000) DDR version: dc2e84f0.
Trying to boot from MMC2
spl: partition error
Error: -38
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Bisecting shows the failure is introduced by commit 27f617019dd (riscv:
dts: starfive: prune redundant jh7110-common overrides, 2025-09-16), where the U-Boot devicetree overrides are removed since these have been in the upstream devicetree.

However, this is not totally true: for mmc0_pins, mmc1_pins, i2c5_pins and their subnodes, the bootph-pre-ram properties aren't present in the upstream 6.16 devicetree, and a simple removal seems to break SD card initialization on StarFive VisionFive2 in SPL stage.

A simple (but obviously not acceptable as it modifies files in dts/upstream) patch could be found here[1]. Manually adding the bootph-pre-ram properties back to mmc1_pins and its children fixes the booting process.

I don't think it's good idea to revert the problematic commit since several follow-up commits depend on it. Maybe we could bring the overrides back to arch/riscv/dts/starfive-visionfive2-u-boot.dtsi?

Best regards,
Yao Zi

[1]: https://gist.github.com/ziyao233/0bcce16753b3956a30113cf41631e720

author
#1 lore raw
Quoted 7 lines · Yao Zi

Hi there,

While testing the behavior of my previous patch on JH7110 platforms, it's found that StarFive VisionFive 2 fails to boot from SD-card with current U-Boot master "a58089ad2e4 (fs: semihosting: Use correct variable for error check, 2025-10-02)" with messages like

Quoted 7 lines

U-Boot SPL 2025.10-00669-ga58089ad2e41 (Oct 20 2025 - 10:29:30 +0000) DDR version: dc2e84f0.
Trying to boot from MMC2
spl: partition error
Error: -38
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Forgot to mention it, this problem was also independently found by Vivian Wang in later September, so here's also

Adding her CC as well.

Best regards,
Yao Zi

#2 lore raw

Hi Yao,

Quoted 19 lines · Yao Zi
Quoted 7 lines · Yao Zi

Hi there,

While testing the behavior of my previous patch on JH7110 platforms, it's found that StarFive VisionFive 2 fails to boot from SD-card with current U-Boot master "a58089ad2e4 (fs: semihosting: Use correct variable for error check, 2025-10-02)" with messages like

Quoted 7 lines

U-Boot SPL 2025.10-00669-ga58089ad2e41 (Oct 20 2025 - 10:29:30 +0000) DDR version: dc2e84f0.
Trying to boot from MMC2
spl: partition error
Error: -38
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Forgot to mention it, this problem was also independently found by Vivian Wang in later September, so here's also

Quoted 6 lines

Adding her CC as well.

Best regards,
Yao Zi

The eMMC / SD Card methods of BootROM loader are deprecated in the StarFive JH-7110 Technical Reference Manual. Please migrate to using SPI NOR flash or UART boot methods that are supported.

The lack of support for this method is intentional as a result of non-compliance in the upstream code review process. In response to the request to support these deprecated methods I asked for supporting documentation in the form of BootROM source code (for which StarFive is in violation of GPL2.0+ by the way, it is required to publish source of modifications and StarFive have not done this). If we want to support this deprecated mode I will agree when GPL compliance is adhered to; this would give us the documentation in form of source code that I expect to be able to make a reasoned decision about whether or not to support this deprecated feature set.

If you would like to engage with this discussion it should go to upstream Linux Kernel Mailing List:

https://lore.kernel.org/lkml/[email protected]/

-E