To be able to use FEL booting (Allwinner's USB-OTG protocol), we need a
32 bit SPL, to easily return into the 32 bit BootROM.
Add two generic defconfigs for that purpose, one for boards with DDR3
DRAM, the other for those with LPDDR3 DRAM chips.
The resulting spl/sunxi-spl.bin can be used with the sunxi-fel tool to
initialise the DRAM via FEL. This allows to load the normal versions for
the rest of the firmware components (ATF, 64 bit U-Boot proper).
This SPL will determine the architecture of the loaded binaries and will
switch the bitness if necessary.

Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
 configs/sun50i-a64-ddr3-spl_defconfig   | 13 +++++++++++++
 configs/sun50i-a64-lpddr3-spl_defconfig | 17 +++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 configs/sun50i-a64-ddr3-spl_defconfig
 create mode 100644 configs/sun50i-a64-lpddr3-spl_defconfig

diff --git a/configs/sun50i-a64-ddr3-spl_defconfig 
b/configs/sun50i-a64-ddr3-spl_defconfig
new file mode 100644
index 0000000000..fda15e2491
--- /dev/null
+++ b/configs/sun50i-a64-ddr3-spl_defconfig
@@ -0,0 +1,13 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I=y
+CONFIG_SUNXI_ARMV8_32BIT_BUILD=y
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
diff --git a/configs/sun50i-a64-lpddr3-spl_defconfig 
b/configs/sun50i-a64-lpddr3-spl_defconfig
new file mode 100644
index 0000000000..20bc376cbd
--- /dev/null
+++ b/configs/sun50i-a64-lpddr3-spl_defconfig
@@ -0,0 +1,17 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I=y
+CONFIG_SUNXI_ARMV8_32BIT_BUILD=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
+CONFIG_MMC0_CD_PIN=""
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
-- 
2.14.5

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to