sunxi: SPL SPI: Add SPI boot support for the Allwinner H6 SoC
authorAndre Przywara <andre.przywara@arm.com>
Tue, 28 Jan 2020 00:46:43 +0000 (00:46 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 18 Mar 2020 12:42:04 +0000 (18:12 +0530)
commitfd40ad0d579412ea2cd31388e287d0592ddb5d73
tree8a7f3ab46c3034e812818e029a0c5dfbdf723808
parentda19a0dbc817fcda7a564360767e02b5c174cf1e
sunxi: SPL SPI: Add SPI boot support for the Allwinner H6 SoC

The Allwinner H6 SoC uses a quite different memory map, also changes the
clocks quite a bit. This requires some changes to the SPL SPI routine,
which hardcodes these values so far.

Using the just introduced helper functions to determine base address
and SPI controller generation, we can cover some of these differences
easily.
The clock setup is different, so requires some explicit code changes
there (reset and clock gate in one register at a different address).
Also we need to change the pinmux function to use a different set of
pins that the H6 uses for SPI0.

Eventually we can enable the H6 to use SPI booting in Kconfig.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-sunxi/spl_spi_sunxi.c