Skip to content

regulator: add X-Powers AXP323 support

Andre Przywara linux-devicetree linux-sunxi lkml 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 6 repliesApplied
  2. v15 patches 10 repliesSuperseded

Changelog from the cover letter

v1 ... v2:
- change regmap cache type to maple tree (as all the others use)
- add R-b: and ACK tags

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5dt-bindings: mfd: x-powers,axp152: Document AXP323Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml+3 -00 replies
2/5mfd: axp20x: ensure relationship between IDs and model namesdrivers/mfd/axp20x.c drivers/regulator/axp20x-regulator.c include/linux/mfd/axp20x.h+17 -170 replies
3/5mfd: axp20x: Allow multiple regulatorsdrivers/mfd/axp20x.c+1 -13 replies
4/5mfd: axp20x: Add support for AXP323drivers/mfd/axp20x-i2c.c drivers/mfd/axp20x.c include/linux/mfd/axp20x.h+29 -00 replies
5/5regulator: axp20x: add support for the AXP323drivers/regulator/axp20x-regulator.c+11 -02 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchChen-Yu TsaiRob Herring (Arm)Mark Brown
1/5R-b A-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/5] regulator: add X-Powers AXP323 support

A small update of version, just changing the regmap cache type to maple tree, and adding the accrued tags (thanks to the reviewers!).
================================
The X-Powers AXP323 is a close sibling to the AXP313a PMIC, only that it allows to dual-phase the first two DC/DC converters. This is controlled via a new register. On the first glance that would sound like a compatible extension, but any random AXP313a driver would not know about the potential dual-phase nature of the second DCDC rail, so might want to turn that off, spoiling the whole setup. So this patchset introduces a new compatible string, without any fallbacks.

Patch 1 adds the DT binding documentation, patch 2 fixes some fragile connection between PMIC IDs and an array. Patch 3 allows multiple AXP chips, since the AXP323 seems to be often paired with the AXP717, and there is some sysfs naming clash with the current code.
Patch 4 then adds the MFD bits, to introduce the new device type and that extra register, while patch 4 eventually adds the new regulator device, and takes care about the proper poly-phase detection.

One note: so far the poly-phased AXP PMICs had that setting already enabled at reset time, so we just detected it and were good. However the AXP323 on my board does not, so it requires enabling the dual-phase bit at boot time. The BSP kernel does that in their boot0 (SPL) early boot code, and the plan would be to do this either in U-Boot or TF-A for mainline. But should we actually expose this in the DT, as some new property, to give kernels a chance to set it? The rails in question power the secondary cluster, so it's not strictly required at boot time, but it's probably too late for the kernel anyway, given that SMP bringup is much earlier than drivers? I would appreciate any thoughts here.

Thanks,
Andre

Changelog:
v1 ... v2:
- change regmap cache type to maple tree (as all the others use)
- add R-b: and ACK tags

Andre Przywara (5):
dt-bindings: mfd: x-powers,axp152: Document AXP323
mfd: axp20x: ensure relationship between IDs and model names
mfd: axp20x: Allow multiple regulators
mfd: axp20x: Add support for AXP323
regulator: axp20x: add support for the AXP323

 .../bindings/mfd/x-powers,axp152.yaml         |  3 +
 drivers/mfd/axp20x-i2c.c                      |  1 +
 drivers/mfd/axp20x.c                          | 58 ++++++++++++++-----
 drivers/regulator/axp20x-regulator.c          | 13 ++++-
 include/linux/mfd/axp20x.h                    |  4 +-
 5 files changed, 61 insertions(+), 18 deletions(-)
Signature · 1 line
2.46.2