[PATCH 0/3] sunxi: H616: SPI boot support
Andre Przywara
andre.przywara at arm.com
Tue Jul 6 01:04:42 CEST 2021
The Allwinner H616 supports booting from SPI NOR flash, for which we
use our SPL specific SPI driver. Since this uses hardcoded values for
clocks, resets and pins, we need to extend it to cover the H616 SoC
as well.
Patch 1/3 extends the logic that determines the offset of the U-Boot
payload, from a fixed value to actually observing the SPL size.
Patch 2/3 piggy backs on the existing H6 SPI boot support, to cover
the (very similar) H616 as well. The only actual difference between the
two is one pin configuration.
Patch 3/3 enables SPI boot for the OrangePi Zero 2 board, which comes
with a 2MiB SPI flash chip soldered.
In my experiments I couldn't actually convince the BROM to load the SPL,
it always fell through to FEL mode. I post this series anyway, because:
1) We will need this code in any case, since it loads the rest of U-Boot
(and TF-A) from SPI flash. By hacking sunxi-fel I could verify that
this part works: the SPL code detected "SPI boot" and booted the rest
of the firmware successfully from SPI flash.
2) I would encourage other people to try this, maybe it's just my board
that is broken? (I dimly remember booting something some months ago.)
The easiest way to flash U-Boot is via sunxi-fel:
$ sunxi-fel -v -p spiflash-write 0 u-boot-sunxi-with-spl.bin
Cheers,
Andre
Andre Przywara (3):
sunxi: SPL SPI: Allow larger SPL
sunxi: SPL SPI: Add SPI boot support for the Allwinner H616 SoC
sunxi: OrangePi Zero 2: Enable SPI booting
arch/arm/mach-sunxi/Kconfig | 2 +-
arch/arm/mach-sunxi/spl_spi_sunxi.c | 37 +++++++++++++++++------------
configs/orangepi_zero2_defconfig | 1 +
3 files changed, 24 insertions(+), 16 deletions(-)
--
2.17.5
More information about the U-Boot
mailing list