[U-Boot] [PATCH 3/6] sunxi: add Cubieboard2 support
Siarhei Siamashka
siarhei.siamashka at gmail.com
Thu Jul 24 05:12:09 CEST 2014
On Thu, 5 Jun 2014 19:00:14 +0100
Ian Campbell <ijc at hellion.org.uk> wrote:
> This is a sun7i (A20) based followup to the sun4i (A10)
> Cubieboard. It has GMAC using MII mode.
>
> Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
> Acked-by: Hans de Goede <hdegoede at redhat.com>
This board is using exactly the same PCB as the Cubieboard1. And only
the SoC is different (Allwinner A20 instead of the pin-compatible
Allwinner A10).
Before piling up more board configurations, we might want to consider
supporting both Cubieboard1 and Cubieboard2 with a single u-boot binary
(and perhaps keep Cubieboard1 and Cubieboard2 as aliases in boards.cfg).
The Allwinner SoCs have support for runtime identification of the SoC
type (sun4i/sun5i/sun7i) via the VER_REG (Version Register) located at
the address 0x01C00024 as explained in the Allwinner A20 user manual.
This requires replacing all the CONFIG_SUN4I/CONFIG_SUN5I/CONFIG_SUN7I
ifdefs in the u-boot code with a runtime SoC type checks, but there
are not too many places affected (mostly just the DRAM code).
Here is a quick and dirty example (not a patch submission yet), which
allows to boot the Cubieboard2 hardware using the existing Cubieboard1
config:
https://github.com/ssvb/u-boot-sunxi-dram/commit/3153905e0221
If the u-boot code is further extended to define a variable with the
relevant dtb file name in the u-boot environment (depending on the
runtime detected SoC type and selecting from "sun4i-a10-cubieboard.dtb"
and "sun7i-a20-cubieboard2.dtb"), then we can have the same SD card
with the whole pre-installed Linux system usable on both Cubieboard1
and Cubieboard2 hardware by just swapping the card.
Also the Cubieboards are not alone. Sharing the same PCB happens for
the LIME boards from Olimex too:
https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME
> Active arm armv7 sunxi - sunxi Cubieboard sun4i:CUBIEBOARD,SPL,AXP209_POWER,SUNXI_EMAC Hans de Goede <hdegoede at redhat.com>
> +Active arm armv7 sunxi - sunxi Cubieboard2 sun7i:CUBIEBOARD2,SPL,SUNXI_GMAC Ian Campbell <ijc at hellion.org.uk>:Hans de Goede <hdegoede at redhat.com>
> +Active arm armv7 sunxi - sunxi Cubieboard2_FEL sun7i:CUBIEBOARD2,SPL_FEL,SUNXI_GMAC Ian Campbell <ijc at hellion.org.uk>:Hans de Goede <hdegoede at redhat.com>
The newly added Cubieboard2 from your patch appears to be missing the
important AXP209_POWER option. So the patch is not good enough to be
pushed anywhere in its current form.
--
Best regards,
Siarhei Siamashka
More information about the U-Boot
mailing list