mbox series

[RESEND,0/2] spacemit: k1: SPL robustness for boards without a PMIC or SPI NOR

Message ID cover.1790976767.git.DaveWK225@protonmail.com
Headers show
Series spacemit: k1: SPL robustness for boards without a PMIC or SPI NOR | expand

Message

Dave Klotz Oct. 2, 2026, 9:32 p.m. UTC
Resent: the first posting's cover letter went out with the same
Message-ID as the cover letter of "pci: spacemit: fixes for the K1 PCIe
host driver", so this series threaded under that one. No changes.

Two small SPL changes for K1 boards that do not look like the BPI-F3
and MusePi Pro:

1. pmic_init() and nor_early_init() panic when the device tree gives
   the SPL no PMIC or no SPI controller. A board that boots from eMMC or
   microSD with its rails already up (the OrangePi R2S and RV2) stops
   there. Log it and carry on.
2. Provide board_boot_order(): the device the BootROM booted from, as
   detected now, then the other MMC controller and SPI NOR, so an
   unexpected BootROM path still finds U-Boot.

Tested on an OrangePi RV2 booting from microSD (no SPI controller in
the SPL): "No SPI controller", then the SPL loads U-Boot from the card
through the detected MMC2. The fallback order was not exercised, since
the detection was right.

Dave Klotz (2):
  spacemit: k1: do not require a PMIC or an SPI controller in SPL
  spacemit: k1: fall back to the other boot devices in SPL

 board/spacemit/k1/spl.c | 48 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 44 insertions(+), 4 deletions(-)


base-commit: a000f2af240eaa996cec92f8d44bad96fdf3f898

Comments

Dave Klotz Oct. 2, 2026, 10:07 p.m. UTC | #1
Also tested on an OrangePi R2S (K1, 2 GiB, boots from eMMC), with the
same tree as the RV2 runs (upstream next plus these series and board
support that is not posted yet):

- the SPL logs "No PMIC (-19)" and "No SPI controller (-96)" and goes
  on to load U-Boot from the eMMC, which the boot-mode detection named
  correctly (BOOT_DEVICE_MMC1), so the fallback order was not needed;
- FreeBSD's reboot resets the board through OpenSBI and the board comes
  back up unattended.
Yixun Lan Oct. 22, 2026, 10:49 p.m. UTC | #2
Hi Dave,

On 21:32 Fri 02 Oct     , Dave Klotz wrote:
> Resent: the first posting's cover letter went out with the same
> Message-ID as the cover letter of "pci: spacemit: fixes for the K1 PCIe
> host driver", so this series threaded under that one. No changes.
> 
> Two small SPL changes for K1 boards that do not look like the BPI-F3
> and MusePi Pro:
> 
> 1. pmic_init() and nor_early_init() panic when the device tree gives
>    the SPL no PMIC or no SPI controller. A board that boots from eMMC or
>    microSD with its rails already up (the OrangePi R2S and RV2) stops
>    there. Log it and carry on.
> 2. Provide board_boot_order(): the device the BootROM booted from, as
>    detected now, then the other MMC controller and SPI NOR, so an
>    unexpected BootROM path still finds U-Boot.
> 
> Tested on an OrangePi RV2 booting from microSD (no SPI controller in
> the SPL): "No SPI controller", then the SPL loads U-Boot from the card
> through the detected MMC2. The fallback order was not exercised, since
> the detection was right.
> 
> Dave Klotz (2):
>   spacemit: k1: do not require a PMIC or an SPI controller in SPL
>   spacemit: k1: fall back to the other boot devices in SPL
> 
>  board/spacemit/k1/spl.c | 48 +++++++++++++++++++++++++++++++++++++----
>  1 file changed, 44 insertions(+), 4 deletions(-)
> 
For the series, with
Reviewed-by: Yixun Lan <dlan@kernel.org>
Yixun Lan Oct. 23, 2026, 1:17 a.m. UTC | #3
On Fri, 02 Oct 2026 21:32:56 +0000, Dave Klotz wrote:
> Resent: the first posting's cover letter went out with the same
> Message-ID as the cover letter of "pci: spacemit: fixes for the K1 PCIe
> host driver", so this series threaded under that one. No changes.
> 
> Two small SPL changes for K1 boards that do not look like the BPI-F3
> and MusePi Pro:
> 
> [...]

Applied, thanks!

[1/2] spacemit: k1: do not require a PMIC or an SPI controller in SPL
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/758250c6f99e33088ba3b7430532c3ef5dccf7e8
[2/2] spacemit: k1: fall back to the other boot devices in SPL
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/53d5fc5d42bf31d3e627bea34a5199d7790d9f43

Best regards,