Skip to content

power: add AXP313 PMIC support

Andre Przywara linux-sunxi u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sunxi: board: simplify early PMIC setup conditionsboard/sunxi/board.c drivers/power/Kconfig+15 -194 replies
2/3power: pmic: sunxi: add AXP313 SPL driverarch/arm/mach-sunxi/pmic_bus.c board/sunxi/board.c drivers/power/Kconfig +2 more+155 -31 reply
3/3power: regulator: add AXP313 supportdrivers/power/pmic/axp.c drivers/power/regulator/axp_regulator.c include/axp_pmic.h+19 -03 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJernej SkrabecJaehoon Chung
1/3
2/3A-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] power: add AXP313 PMIC support

The X-Powers AXP313 is a small PMIC that is controlled via I2C and provides just three buck converters and three LDOs, plus a power button. It is used on many newer boards using the Allwinner H616 or H618 SoCs.

Mostly all rails need to be always on, since each of them supplies an essential part of the system, consequentially the reset default is to have all of them enabled.
However the voltages need to be adjusted, especially the DRAM rail is typically at 900mV, for instance, which is too low.

This series adds support for the proper DM AXP PMIC driver (patch 3/3), but also adds a small driver to be used in (our non-DM) SPL, to adjust the DRAM voltage before the DRAM initialisation starts (patch 2/3).

This also uses the opportunity to clean up an #ifdef nightmare in our board.c (patch 1/3), which was actually duplicating some dependencies already described in Kconfig.

This is one part of the enablement of many newer boards with the H616/H618 SoC: without the DRAM voltage increased to 1.1V they won't boot.

Cheers,
Andre

Andre Przywara (3):
sunxi: board: simplify early PMIC setup conditions
power: pmic: sunxi: add AXP313 SPL driver
power: regulator: add AXP313 support

 arch/arm/mach-sunxi/pmic_bus.c          |   3 +
 board/sunxi/board.c                     |  35 +++----
 drivers/power/Kconfig                   |  19 +++-
 drivers/power/Makefile                  |   1 +
 drivers/power/axp313.c                  | 134 ++++++++++++++++++++++++
 drivers/power/pmic/axp.c                |   1 +
 drivers/power/regulator/axp_regulator.c |  17 +++
 include/axp_pmic.h                      |   1 +
 8 files changed, 189 insertions(+), 22 deletions(-)
 create mode 100644 drivers/power/axp313.c
Signature · 1 line
2.25.1