[PATCH 0/6] power: pmic: sunxi: consolidate AXP SPL drivers
Andre Przywara
andre.przywara at arm.com
Thu May 16 01:48:33 CEST 2024
Hi,
this is the first series in an attempt to clean up the X-Powers AXP PMIC
drivers used by the SPL for sunxi boards. So far we have a separate
driver file for each AXP variant, but the code was largely the same,
just differing by the regulator ranges.
This adds a new generic driver, which reads the regulator description
from an array of structs. This is similar to how the DM AXP driver used
for U-Boot proper works, but is simplified, since we won't need the full
feature set for the SPL, and we want to keep the code size small.
To help bisect-ability, and to simplify review, each of the simpler AXP
drivers covered by this approach is handled in a separate patch.
We just convert the AXP313, AXP305, AXP717 for now, and on the way add
support for the AXP707, just because it's now very easy, and we will
need it soon enough.
The other AXP SPL drivers are more complex, and support more regulators,
but my hunch is that we really just need the DC/DC converters in the
SPL. However I need to prove and test this, so I will convert the other
AXP chips later.
Please have a look and comment whether the approach in general is a good
idea.
Cheers,
Andre
Andre Przywara (6):
power: pmic: sunxi: only build AXP drivers for SPL
power: pmic: sunxi: introduce generic SPL AXP DC/DC driver
power: pmic: sunxi: replace AXP717 SPL driver
power: pmic: sunxi: use generic AXP SPL driver for AXP313
power: pmic: sunxi: use generic AXP SPL driver for AXP305
power: pmic: sunxi: add AXP707 support
drivers/power/Makefile | 8 +-
drivers/power/axp305.c | 82 ------------------
drivers/power/axp313.c | 133 -----------------------------
drivers/power/axp717.c | 92 --------------------
drivers/power/axp_spl.c | 184 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 189 insertions(+), 310 deletions(-)
delete mode 100644 drivers/power/axp305.c
delete mode 100644 drivers/power/axp313.c
delete mode 100644 drivers/power/axp717.c
create mode 100644 drivers/power/axp_spl.c
--
2.35.8
More information about the U-Boot
mailing list