[PATCH v3] spi: rockchip: initialize bus_num to -1

support support at armdesigner.com
Thu Aug 27 05:06:26 PDT 2026


Applied, thanks!  




Thanks for the quick turnaround on this one. This bug class is more common than the MNT report suggests — any RK3588/RK3568 board 



design with a PMIC on one SPI controller and peripherals on another (which is the standard topology for RK806-based designs, 



e.g. our own boards with the PMIC on SPI2) hits the same bus_num=0 collision the moment a second controller is enabled. 



So far most of these designs simply never enabled two controllers in barebox, which is probably why it stayed latent this long. 




One observation on the failure mode itself: the XFM_RO while(1) hang in rockchip_spi_pio is a separate latent hazard. Even with bus routing now correct, 



any future misrouted or wrong-device read can still wedge the bootloader with no timeout and no diagnostic output. 



Might be worth a follow-up hardening patch — a transfer timeout in the PIO loop would turn a silent hang into a loud error at the cost of a few lines.



We're tracking this fix for our RK35xx barebox evaluation (secure boot path for industrial designs), so it's on the regression checklist for the next release.



 --Boardcon Embedded Design — Rockchip-based industrial SBCs & SoMs



https://www.boardcon.com




-------------- next part --------------
A non-text attachment was scrubbed...
Name: InsertPic_.jpg
Type: image/jpeg
Size: 2573 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20260827/3eac78b1/attachment-0001.jpg>


More information about the barebox mailing list