sunxi: boards: Enable SPI flash support in U-Boot proper
authorAndre Przywara <andre.przywara@arm.com>
Tue, 11 Jan 2022 12:46:06 +0000 (12:46 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 10 Mar 2022 12:04:44 +0000 (17:34 +0530)
commit280294c5dfe02a11c9080ee51bd85880a23d769b
tree3c03ab67310d01f0ab1aaf9e6bfffc43438d756f
parent753a85fd151d28a55c6bb4d15bd3bc44dd4b5e22
sunxi: boards: Enable SPI flash support in U-Boot proper

Some sunxi boards ship with SPI flash, which allows booting through the
BootROM. We cover this functionality by a separate SPL "mini" driver.
Separately we have a proper DM_SPI driver for U-Boot proper, which
provides access to the SPI flash through the "sf" command. That allows
to update the firmware on the SPI flash, also to store the environment
there.

However only very few boards actually enable support for U-Boot proper,
even though that would work and the SPL part is configured.

Use the cleaned up configuration scheme to enable SPI flash on those
boards which mention a SPI flash in their .dts, or which use the SPL SPI
support.

Out of the box this would enable storing the environment on the SPI
flash, and allows people to read or write the flash from U-Boot, for
instance to update the SPI flash when booted via an SD card.

For this to actually work there must be a "spi0" alias in the DT, which
most boards are missing. But this should be addressed separately.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
configs/orangepi_pc2_defconfig
configs/orangepi_r1_defconfig
configs/orangepi_win_defconfig
configs/orangepi_zero2_defconfig
configs/orangepi_zero_defconfig
configs/pine64-lts_defconfig
configs/pine_h64_defconfig
configs/pinecube_defconfig