Hello, I've used this code extensively, incorporated it in to an RFC branch of mine during development and reviewed it in the process.
John. Reviewed-by: John Watts <cont...@jookia.org> Tested-by: John Watts <cont...@jookia.org> On Fri, Oct 14, 2022 at 11:05:12AM +0800, Icenowy Zheng wrote: > This patchset tries to extend SPI-based boot code in sunxi SPL to > support SPI NAND, following the same principle with current SPI NOR code > (mimicking the behavior of sunxi BROM). In addition, as part of test to > this patchset, some patches for Source Parts Inc. PopStick is attached, > although marked DO NOT MERGE because the DT should come from Linux after > it's ready. > > To keep thr code that accesses SPI NAND as simple as possible, it > assumes fixed page size, which is also what sunxi BROM does. The SUNIV > SPL assumes 0x400 page size, but here to utilize the space better, in > the attached example of PopStick, U-Boot main part is assumed to be > with 0x800 page size (which is the real situation of the W25N01 flash > used by PopStick). > > Icenowy Zheng (8): > sunxi: SPL SPI: extract code for doing SPI transfer > sunxi: SPL SPI: add support for read command with 2 byte address > sunxi: SPL SPI: allow multiple boot attempt > sunxi: SPL SPI: add initial support for booting from SPI NAND > sunxi: enable support for SPI NAND booting on SUNIV > [DO NOT MERGE] sunxi: sync DT from my tree for PopStick > [DO NOT MERGE, DIRTY HACK] sunxi: use UBI for environement storage > [DO NOT MERGE] sunxi: add a defconfig for PopStick > > arch/arm/dts/Makefile | 3 +- > arch/arm/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++ > arch/arm/dts/suniv-f1c100s.dtsi | 26 ++ > arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts | 101 ++++++++ > arch/arm/mach-sunxi/Kconfig | 16 ++ > arch/arm/mach-sunxi/board.c | 4 +- > arch/arm/mach-sunxi/spl_spi_sunxi.c | 247 ++++++++++++++----- > board/sunxi/board.c | 1 + > configs/popstick_defconfig | 35 +++ > 9 files changed, 377 insertions(+), 72 deletions(-) > create mode 100644 arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts > create mode 100644 configs/popstick_defconfig > > -- > 2.37.1 >