public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/8] sunxi: (early) Allwinner A133 SoC support
@ 2025-01-17  1:45 Andre Przywara
  2025-01-17  1:45 ` [PATCH 1/8] sunxi: clock: improve grouping of default clock register values Andre Przywara
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Andre Przywara @ 2025-01-17  1:45 UTC (permalink / raw)
  To: u-boot, Lukasz Majewski, Sean Anderson, Jaehoon Chung
  Cc: Tom Rini, Jernej Skrabec, Cody Eksal, Simon Glass, linux-sunxi,
	Parthiban

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-03-18  0:34 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17  1:45 [PATCH 0/8] sunxi: (early) Allwinner A133 SoC support Andre Przywara
2025-01-17  1:45 ` [PATCH 1/8] sunxi: clock: improve grouping of default clock register values Andre Przywara
2025-01-18  7:16   ` Jernej Škrabec
2025-01-17  1:45 ` [PATCH 2/8] sunxi: pmic_bus: support alternative I2C address Andre Przywara
2025-01-18  7:21   ` Jernej Škrabec
2025-01-19 22:25     ` Andre Przywara
2025-01-20 16:42       ` Jernej Škrabec
2025-01-20 19:21         ` Simon Glass
2025-01-21  0:05           ` Andre Przywara
2025-01-23 14:37             ` Simon Glass
2025-03-18  0:34               ` Andre Przywara
2025-01-17  1:45 ` [PATCH 3/8] sunxi: H616: DRAM: rename Kconfig parameters to be more generic Andre Przywara
2025-01-18  7:22   ` Jernej Škrabec
2025-01-17  1:45 ` [PATCH 4/8] clk: sunxi: Add support for the A100/A133 CCU Andre Przywara
2025-01-18  7:24   ` Jernej Škrabec
2025-01-17  1:45 ` [PATCH 5/8] pinctrl: sunxi: add Allwinner A100/A133 pinctrl description Andre Przywara
2025-01-18  7:25   ` Jernej Škrabec
2025-01-17  1:45 ` [PATCH 6/8] power: pmic: sunxi: add SPL support for the AXP803 Andre Przywara
2025-01-18  7:29   ` Jernej Škrabec
2025-01-17  1:45 ` [PATCH 7/8] sunxi: A133: add DRAM init code [WIP!] Andre Przywara
2025-01-18  8:17   ` Jernej Škrabec
2025-01-18 15:20     ` Cody Eksal
2025-01-17  1:45 ` [PATCH 8/8] sunxi: add support for the Allwinner A100/A133 SoC Andre Przywara
2025-01-18  7:35   ` Jernej Škrabec
2025-01-19 23:52     ` Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox