sunxi: Enable SPL/SPI boot for OLinuXino Lime2
PATCH 1/1 sunxi: Enable SPL/SPI boot for OLinuXino Lime2
58e9502e6 "arm: sunxi: Enable SPL/SPI boot for Olinuxino Lime2-eMMC boards" enabled SPI boot for the eMMC variant. Olimex offers the "s16MB" variant with SPI flash populated but without eMMC populated. Tested on board rev L.
--- configs/A20-OLinuXino-Lime2_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/A20-OLinuXino-Lime2_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2" CONFIG_SPL=y +CONFIG_SPL_SPI_SUNXI=y CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_I2C1_ENABLE=y
Signature · 1 line
2.50.0
On Sat, 12 Jul 2025 17:27:41 -0700
Eric Anderson <[email protected]> wrote:
Hi,
Quoted 4 lines
58e9502e6"arm: sunxi: Enable SPL/SPI boot for Olinuxino Lime2-eMMC boards" enabled SPI boot for the eMMC variant. Olimex offers the "s16MB" variant with SPI flash populated but without eMMC populated. Tested on board rev L.
Indeed there is a config without eMMC and with SPI flash in their shop.
But actually I wonder why Olimex has two different DTs for the eMMC-less boards and the board with eMMC. Many other boards make eMMC optional, either as separate SKUs, or when eMMC is on a module. And we just go with one DT, describing the eMMC, the code will just skip the initialisation if no "card" is found. That affects the A20 and A64 boards.
So I wonder if anyone wants to clean this up, because I think we would only need the A20-OLinuXino-Lime2-eMMC_defconfig, A20-OLinuXino_MICRO-eMMC_defconfig and a64-olinuxino_defconfig.
Quoted 10 lines
Signed-off-by Eric Anderson <[email protected]>--- configs/A20-OLinuXino-Lime2_defconfig | 1 + 1 file changed, 1 insertion(+)configs/A20-OLinuXino-Lime2_defconfig +0
-0
configs/A20-OLinuXino-Lime2_defconfig CONFIG_ARM=y · line 5
Quoted 4 lines
configs/A20-OLinuXino-Lime2_defconfig +1
-0@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2" CONFIG_SPL=y +CONFIG_SPL_SPI_SUNXI=y
This needs to go further down below. After configuring for a board, run "make savedefconfig", then compare the generated "defconfig" file with your ..._defconfig version (or just copy ./defconfig over).
With this fixed:
Will fix this up while committing, so no further action needed.
Cheers,
Andre
Quoted 3 lines
configs/A20-OLinuXino-Lime2_defconfig +0
-0CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_I2C1_ENABLE=y
Quoted 6 lines · Andre Przywara
But actually I wonder why Olimex has two different DTs for the eMMC-less boards and the board with eMMC.
...snip...
So I wonder if anyone wants to clean this up, because I think we would only need the A20-OLinuXino-Lime2-eMMC_defconfig, A20-OLinuXino_MICRO-eMMC_defconfig and a64-olinuxino_defconfig.
I had wondered the same, but expected I'd not understand. Looking just now, it sounds like it doesn't mix with the NAND variant (-n8G) well?
https://github.com/torvalds/linux/commit/27dd9af6bc000ab21fdd41e58e3dddedba57ab92
It looks like the emmc DT has gotten slightly slimmer since being introduced. It doesn't seem the eMMC DT turns off any part of the NAND DT, so I might try to poke at this some. But I don't have a NAND version of the board to fully test.
Quoted 6 lines
Quoted 2 lines
CONFIG_SPL=y
+CONFIG_SPL_SPI_SUNXI=yThis needs to go further down below. After configuring for a board, run "make savedefconfig", then compare the generated "defconfig" file with your ..._defconfig version (or just copy ./defconfig over).
Oh, right, the tooling would know the proper order. I just sorted it, but I forgot I had wondered earlier how things were ordered. Thanks for the explanation.
Thanks for fixing it up.