* [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support
@ 2023-04-01 0:18 Andre Przywara
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
2023-04-21 7:32 ` [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Lee Jones
0 siblings, 2 replies; 6+ messages in thread
From: Andre Przywara @ 2023-04-01 0:18 UTC (permalink / raw)
To: Lee Jones, Liam Girdwood, Chen-Yu Tsai, Mark Brown,
Krzysztof Kozlowski, Rob Herring
Cc: Martin Botka, martin.botka1, Shengyu Qu, Samuel Holland,
Jernej Skrabec, linux-sunxi, linux-kernel, devicetree
This patch series adds support for the X-Powers AXP313a PMIC, which is
often bundled with Allwinner H616 or H313 SoCs.
It's my turn again for this revision of the series, after Martin did
v7 and v8.
After some more significant changes in v9, this is fixing some nits,
and builds on Krzysztof's patch to simplify the DT binding document
(patch ID at the end of this email). For a complete changelog see below.
Up to v5 this was speaking of the AXP1530, which seems to be some internal
name. The chips we have seen in the wild are all labeled AXP313a, so we
go with this name here, from now on. This is supported by the fact that
there is an AXP313a datasheet, but none for the AXP1530.
Patch 1 is the binding documentation (just the new compatible string),
patch 2 adds the MFD bits (mostly describing the extent of the regmap),
while patch 3 describes the actual AXP313a register definitions.
Since this ties neatly into the existing AXP and generic regulator
framework, the patches are indeed only structure definitions, there is
little new code.
For now we papered over this "fixed customizable" RTC-LDO regulator in the
same way this was done before for other PMICs (AXP803, for instance), We
think we can fix this properly with a follow-up patch, for all instances.
Please have a look!
Cheers,
Andre
Changelog:
v9 .. v10:
- use MFD_CELL_RES macro
- mark dcdc-freq property as "false" for AXP313a
- add Lee's ACK
v8 .. v9:
- use MFD_CELL_NAME macro
- fix LDO regulator names to match the datasheet
- only mark changing registers as volatile
- use correct register for shutdown operation
- add power key resources
- disallow x-powers,dcdc-freq in the DT binding
- drop unused OUTPUT_MONITOR register name, add SHUTDOWN_CTRL
- require dcdcfreq being 0 (non-present DT property default)
v7 .. v8:
- Add check for dcdcfreq being zero
v6 .. v7:
- Use alphabetical ordering
v5 .. v6:
- change name from AXP1530 to AXP313a
- extend commit messages
- drop AXP*_FREQUENCY register (not used anyway)
- better vertically align struct definitions
- rename IRQs to match names used for other PMICs
- add RTC_LDO regulator
- use decimal numbers for selector ranges
- use macro definitions to name some values
- force DC/DC switching frequency to be fixed at 3 MHz
- change LDO source supply to VIN1 (as per datasheet)
v4 .. v5:
- Use alphabetical ordering in mfd
- Correct { placement line
- Replace spaces with tabs in 1 struct
v3 .. v4:
- Fix indentation
v2 .. v3:
- Move AXP1530 dt-binding to alphabetical order
v1 .. v2:
- Remove RSB support.
- Drop .id = 0
- Add dt-binding for the AXP1530
Martin Botka (3):
dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
mfd: axp20x: Add support for AXP313a PMIC
regulator: axp20x: Add support for AXP313a variant
.../bindings/mfd/x-powers,axp152.yaml | 11 +++
drivers/mfd/axp20x-i2c.c | 2 +
drivers/mfd/axp20x.c | 78 ++++++++++++++++++-
drivers/regulator/axp20x-regulator.c | 60 ++++++++++++++
include/linux/mfd/axp20x.h | 32 ++++++++
5 files changed, 182 insertions(+), 1 deletion(-)
base-commit: a0264d198aad19429df0ca2e320caf8b1f98ec64
prerequisite-patch-id: b1636dbb381288f5c2c117615a9c1a005d5dcd94
--
2.35.7
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
2023-04-01 0:18 [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Andre Przywara
@ 2023-04-01 0:18 ` Andre Przywara
2023-04-01 19:22 ` Krzysztof Kozlowski
` (2 more replies)
2023-04-21 7:32 ` [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Lee Jones
1 sibling, 3 replies; 6+ messages in thread
From: Andre Przywara @ 2023-04-01 0:18 UTC (permalink / raw)
To: Lee Jones, Liam Girdwood, Chen-Yu Tsai, Mark Brown,
Krzysztof Kozlowski, Rob Herring
Cc: Martin Botka, martin.botka1, Shengyu Qu, Samuel Holland,
Jernej Skrabec, linux-sunxi, linux-kernel, devicetree
From: Martin Botka <martin.botka@somainline.org>
The X-Powers AXP313a is a PMIC used on some devices with the Allwinner
H616 or H313 SoC.
According to the datasheet, the DC/DC converter PWM frequency is fixed
(to 3 MHz), so disallow the property that lets us set this frequency
for the other PMICs.
Signed-off-by: Martin Botka <martin.botka@somainline.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../devicetree/bindings/mfd/x-powers,axp152.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
index 2691ac08f5362..ed76b1c58cdf4 100644
--- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
+++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
@@ -73,6 +73,16 @@ allOf:
required:
- interrupts
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: x-powers,axp313a
+
+ then:
+ properties:
+ x-powers,dcdc-freq: false
+
properties:
compatible:
oneOf:
@@ -82,6 +92,7 @@ properties:
- x-powers,axp209
- x-powers,axp221
- x-powers,axp223
+ - x-powers,axp313a
- x-powers,axp803
- x-powers,axp806
- x-powers,axp809
--
2.35.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
@ 2023-04-01 19:22 ` Krzysztof Kozlowski
2023-04-02 6:09 ` Chen-Yu Tsai
2023-04-21 7:30 ` Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-01 19:22 UTC (permalink / raw)
To: Andre Przywara, Lee Jones, Liam Girdwood, Chen-Yu Tsai,
Mark Brown, Krzysztof Kozlowski, Rob Herring
Cc: Martin Botka, martin.botka1, Shengyu Qu, Samuel Holland,
Jernej Skrabec, linux-sunxi, linux-kernel, devicetree
On 01/04/2023 02:18, Andre Przywara wrote:
> From: Martin Botka <martin.botka@somainline.org>
>
> The X-Powers AXP313a is a PMIC used on some devices with the Allwinner
> H616 or H313 SoC.
> According to the datasheet, the DC/DC converter PWM frequency is fixed
> (to 3 MHz), so disallow the property that lets us set this frequency
> for the other PMICs.
>
> Signed-off-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
2023-04-01 19:22 ` Krzysztof Kozlowski
@ 2023-04-02 6:09 ` Chen-Yu Tsai
2023-04-21 7:30 ` Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2023-04-02 6:09 UTC (permalink / raw)
To: Andre Przywara
Cc: Lee Jones, Liam Girdwood, Mark Brown, Krzysztof Kozlowski,
Rob Herring, Martin Botka, martin.botka1, Shengyu Qu,
Samuel Holland, Jernej Skrabec, linux-sunxi, linux-kernel,
devicetree
On Sat, Apr 1, 2023 at 8:19 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> From: Martin Botka <martin.botka@somainline.org>
>
> The X-Powers AXP313a is a PMIC used on some devices with the Allwinner
> H616 or H313 SoC.
> According to the datasheet, the DC/DC converter PWM frequency is fixed
> (to 3 MHz), so disallow the property that lets us set this frequency
> for the other PMICs.
>
> Signed-off-by: Martin Botka <martin.botka@somainline.org>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
2023-04-01 19:22 ` Krzysztof Kozlowski
2023-04-02 6:09 ` Chen-Yu Tsai
@ 2023-04-21 7:30 ` Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2023-04-21 7:30 UTC (permalink / raw)
To: Andre Przywara
Cc: Liam Girdwood, Chen-Yu Tsai, Mark Brown, Krzysztof Kozlowski,
Rob Herring, Martin Botka, martin.botka1, Shengyu Qu,
Samuel Holland, Jernej Skrabec, linux-sunxi, linux-kernel,
devicetree
On Sat, 01 Apr 2023, Andre Przywara wrote:
> From: Martin Botka <martin.botka@somainline.org>
>
> The X-Powers AXP313a is a PMIC used on some devices with the Allwinner
> H616 or H313 SoC.
> According to the datasheet, the DC/DC converter PWM frequency is fixed
> (to 3 MHz), so disallow the property that lets us set this frequency
> for the other PMICs.
>
> Signed-off-by: Martin Botka <martin.botka@somainline.org>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> .../devicetree/bindings/mfd/x-powers,axp152.yaml | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Applied, thanks
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support
2023-04-01 0:18 [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Andre Przywara
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
@ 2023-04-21 7:32 ` Lee Jones
1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2023-04-21 7:32 UTC (permalink / raw)
To: Andre Przywara
Cc: Liam Girdwood, Chen-Yu Tsai, Mark Brown, Krzysztof Kozlowski,
Rob Herring, Martin Botka, martin.botka1, Shengyu Qu,
Samuel Holland, Jernej Skrabec, linux-sunxi, linux-kernel,
devicetree
On Sat, 01 Apr 2023, Andre Przywara wrote:
> This patch series adds support for the X-Powers AXP313a PMIC, which is
> often bundled with Allwinner H616 or H313 SoCs.
> It's my turn again for this revision of the series, after Martin did
> v7 and v8.
> After some more significant changes in v9, this is fixing some nits,
> and builds on Krzysztof's patch to simplify the DT binding document
> (patch ID at the end of this email). For a complete changelog see below.
>
> Up to v5 this was speaking of the AXP1530, which seems to be some internal
> name. The chips we have seen in the wild are all labeled AXP313a, so we
> go with this name here, from now on. This is supported by the fact that
> there is an AXP313a datasheet, but none for the AXP1530.
>
> Patch 1 is the binding documentation (just the new compatible string),
> patch 2 adds the MFD bits (mostly describing the extent of the regmap),
> while patch 3 describes the actual AXP313a register definitions.
> Since this ties neatly into the existing AXP and generic regulator
> framework, the patches are indeed only structure definitions, there is
> little new code.
>
> For now we papered over this "fixed customizable" RTC-LDO regulator in the
> same way this was done before for other PMICs (AXP803, for instance), We
> think we can fix this properly with a follow-up patch, for all instances.
MFD patches applied. PR for Mark to follow.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-21 7:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-01 0:18 [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Andre Przywara
2023-04-01 0:18 ` [PATCH v10 1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant Andre Przywara
2023-04-01 19:22 ` Krzysztof Kozlowski
2023-04-02 6:09 ` Chen-Yu Tsai
2023-04-21 7:30 ` Lee Jones
2023-04-21 7:32 ` [PATCH v10 0/3] regulator: Add X-Powers AXP313a PMIC support Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).