[PATCH 0/8] sunxi: (early) Allwinner A133 SoC support

Andre Przywara andre.przywara at arm.com
Fri Jan 17 02:45:29 CET 2025


The Allwinner A100 SoC has been around for a while, mostly on cheap
tablets, but didn't generate much interest in the community so far.
There were some efforts by two Allwinner employees in 2020, which led
to basic upstream Linux support for that SoC, although this momentum
dried up pretty quickly, leaving a lot of peripherals unsupported.
    
The A100 was silently replaced with the seemingly identical Allwinner
A133, which is reportedly a better bin of the A100. So far we assume
that both are compatible from a software perspective. There are some
more devices with the A133 out there now, so people are working on
filling the gaps, and adding U-Boot and TF-A support.

This series is a somewhat early version of a series to support boards
with the A133 SoC in U-Boot.

Since the basic SoC .dtsi and its bindings are upstream in the Linux
kernel repository, we can go ahead and add support for the pinctrl and
clock drivers: this is handled in patches 4 and 5. Similarly ready are
some refactoring patches, which will be needed later, those are the
first three patches. Patch 6 adds SPL support for the AXP707/803 PMIC,
which is often paired with the A133. Pending some review I am tempted to
push those patches rather quickly.

Patch 7 is the technically most advanced and challenging patch: to add
support for the DRAM controller. Huge thanks and kudos go to Cody, for
reverse engineering, debugging and testing this. The patch itself is
work in progress, and surely needs some love beyond the missing register
bits, to improve formatting, coding style and patch split. However it
works for me (TM), and is essential for the SoC support, so I include it
here, as an early reference. Cody hinted at sending a proper version,
this can then later replace this preliminary patch.

Patch 8 then puts the right values for various existing Allwinner
specific configuration options in Kconfig, and adds the remaining bits
required to enable configuration and build for boards with the A133 SoC.
Due to a lack of an upstream DT for the boards floating around at the
moment, this lacks any defconfig for now, but adding support for a board
just requires providing the defconfig with the DRAM parameters and
generic options, plus the respective .dts file. This has been tested
locally on a Liontron H-A133L here, I will send both the .dts and the
defconfig when they are ready.

For now please have a look, comment and review on the patches, so that
we can start upstream support for this SoC.

Cheers,
Andre

Andre Przywara (7):
  sunxi: clock: improve grouping of default clock register values
  sunxi: pmic_bus: support alternative I2C address
  sunxi: H616: DRAM: rename Kconfig parameters to be more generic
  clk: sunxi: Add support for the A100/A133 CCU
  pinctrl: sunxi: add Allwinner A100/A133 pinctrl description
  power: pmic: sunxi: add SPL support for the AXP803
  sunxi: add support for the Allwinner A100/A133 SoC

Cody Eksal (1):
  sunxi: A133: add DRAM init code [WIP!]

 arch/arm/cpu/armv8/fel_utils.S                |    2 +-
 .../include/asm/arch-sunxi/clock_sun50i_h6.h  |   25 +-
 .../include/asm/arch-sunxi/cpu_sun50i_h6.h    |    4 +
 arch/arm/include/asm/arch-sunxi/dram.h        |    2 +
 .../include/asm/arch-sunxi/dram_sun50i_a133.h |  210 +++
 arch/arm/mach-sunxi/Kconfig                   |  254 +++-
 arch/arm/mach-sunxi/Makefile                  |    2 +
 arch/arm/mach-sunxi/board.c                   |    4 +
 arch/arm/mach-sunxi/clock_sun50i_h6.c         |    3 +-
 arch/arm/mach-sunxi/cpu_info.c                |    2 +
 arch/arm/mach-sunxi/dram_sun50i_a133.c        | 1217 +++++++++++++++++
 arch/arm/mach-sunxi/dram_sun50i_h616.c        |   26 +-
 arch/arm/mach-sunxi/dram_timings/Makefile     |    2 +
 arch/arm/mach-sunxi/dram_timings/a133_ddr4.c  |   80 ++
 .../arm/mach-sunxi/dram_timings/a133_lpddr4.c |  102 ++
 arch/arm/mach-sunxi/pmic_bus.c                |   10 +-
 board/sunxi/board.c                           |   13 +-
 common/spl/Kconfig                            |    6 +-
 configs/anbernic_rg35xx_h700_defconfig        |   20 +-
 configs/orangepi_zero2_defconfig              |    8 +-
 configs/orangepi_zero2w_defconfig             |   16 +-
 configs/orangepi_zero3_defconfig              |   16 +-
 configs/tanix_tx1_defconfig                   |   16 +-
 configs/transpeed-8k618-t_defconfig           |   14 +-
 configs/x96_mate_defconfig                    |   14 +-
 drivers/clk/sunxi/Kconfig                     |    7 +
 drivers/clk/sunxi/Makefile                    |    1 +
 drivers/clk/sunxi/clk_a100.c                  |  102 ++
 drivers/clk/sunxi/clk_sunxi.c                 |    5 +
 drivers/pinctrl/sunxi/Kconfig                 |   10 +
 drivers/pinctrl/sunxi/pinctrl-sunxi.c         |   47 +
 drivers/power/Kconfig                         |   23 +-
 drivers/power/Makefile                        |    1 +
 drivers/power/axp_spl.c                       |   17 +
 34 files changed, 2151 insertions(+), 130 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun50i_a133.h
 create mode 100644 arch/arm/mach-sunxi/dram_sun50i_a133.c
 create mode 100644 arch/arm/mach-sunxi/dram_timings/a133_ddr4.c
 create mode 100644 arch/arm/mach-sunxi/dram_timings/a133_lpddr4.c
 create mode 100644 drivers/clk/sunxi/clk_a100.c

-- 
2.46.2



More information about the U-Boot mailing list