diff mbox series

[2/4] dt-bindings: mfd: x-powers,axp152: document AXP717

Message ID 20240310010211.28653-3-andre.przywara@arm.com
State Not Applicable
Headers show
Series regulator: Add X-Powers AXP717 PMIC support | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Andre Przywara March 10, 2024, 1:02 a.m. UTC
The X-Powers AXP717 is a PMIC used on some newer Allwinner devices.
Among quite some regulators it features the usual ADC/IRQ/power key
parts, plus a battery charger circuit, and some newly introduced USB
type-C circuitry.
Like two other recent PMICs, it lacks the DC/DC converter PWM frequency
control register, that rate is fixed here as well.

Add the new compatible string, and add that to the list of PMICs without
the PWM frequency property.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Krzysztof Kozlowski March 10, 2024, 8:40 a.m. UTC | #1
On 10/03/2024 02:02, Andre Przywara wrote:
> The X-Powers AXP717 is a PMIC used on some newer Allwinner devices.
> Among quite some regulators it features the usual ADC/IRQ/power key
> parts, plus a battery charger circuit, and some newly introduced USB
> type-C circuitry.
> Like two other recent PMICs, it lacks the DC/DC converter PWM frequency
> control register, that rate is fixed here as well.
> 
> Add the new compatible string, and add that to the list of PMICs without
> the PWM frequency property.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Samuel Holland March 11, 2024, 10:20 p.m. UTC | #2
Hi Andre,

On 3/9/24 19:02, Andre Przywara wrote:
> The X-Powers AXP717 is a PMIC used on some newer Allwinner devices.
> Among quite some regulators it features the usual ADC/IRQ/power key
> parts, plus a battery charger circuit, and some newly introduced USB
> type-C circuitry.

Do you plan to put the Type-C logic under a subnode, or should the
Type-C connector node go directly under the PMIC node? Either way, the
binding probably needs to be updated for that.

> Like two other recent PMICs, it lacks the DC/DC converter PWM frequency
> control register, that rate is fixed here as well.
> 
> Add the new compatible string, and add that to the list of PMICs without
> the PWM frequency property.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> index 06f1779835a1e..b8e8db0d58e9c 100644
> --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> @@ -83,6 +83,7 @@ allOf:
>              enum:
>                - x-powers,axp313a
>                - x-powers,axp15060
> +              - x-powers,axp717
>  
>      then:
>        properties:
> @@ -99,6 +100,7 @@ properties:
>            - x-powers,axp221
>            - x-powers,axp223
>            - x-powers,axp313a
> +          - x-powers,axp717
>            - x-powers,axp803
>            - x-powers,axp806
>            - x-powers,axp809

The regulators patternProperties needs to be updated for the new boost
regulator.

Regards,
Samuel
Andre Przywara March 13, 2024, 5:35 p.m. UTC | #3
On Mon, 11 Mar 2024 17:20:50 -0500
Samuel Holland <samuel@sholland.org> wrote:

Hi Samuel,

thanks for having a look!

> On 3/9/24 19:02, Andre Przywara wrote:
> > The X-Powers AXP717 is a PMIC used on some newer Allwinner devices.
> > Among quite some regulators it features the usual ADC/IRQ/power key
> > parts, plus a battery charger circuit, and some newly introduced USB
> > type-C circuitry.  
> 
> Do you plan to put the Type-C logic under a subnode, or should the
> Type-C connector node go directly under the PMIC node? Either way, the
> binding probably needs to be updated for that.

I haven't looked into this yet, so cannot say which way to go. I
definitely consider this some non-trivial task, so indeed wanted to push
this off to later.
For now there is a device (Anbernic RG35XX) with that PMIC, so we need at
least the regulators to unblock this. USB support is not critical for now.

> > Like two other recent PMICs, it lacks the DC/DC converter PWM frequency
> > control register, that rate is fixed here as well.
> > 
> > Add the new compatible string, and add that to the list of PMICs without
> > the PWM frequency property.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> >  Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > index 06f1779835a1e..b8e8db0d58e9c 100644
> > --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > @@ -83,6 +83,7 @@ allOf:
> >              enum:
> >                - x-powers,axp313a
> >                - x-powers,axp15060
> > +              - x-powers,axp717
> >  
> >      then:
> >        properties:
> > @@ -99,6 +100,7 @@ properties:
> >            - x-powers,axp221
> >            - x-powers,axp223
> >            - x-powers,axp313a
> > +          - x-powers,axp717
> >            - x-powers,axp803
> >            - x-powers,axp806
> >            - x-powers,axp809  
> 
> The regulators patternProperties needs to be updated for the new boost
> regulator.

Ah, I indeed missed this one. I think the former PMICs had this
batter->VBUS boost regulator hidden, controlled entirely by the PMIC?
I will need to check if exposing this will present any surprises. I
guess this goes together with the USB-C support, to have role switching,
unless this appears on some device with just USB-A or micro-B.
I will check what it takes to add this one, the regulator itself looks
easy.

Thanks!
Andre.
Chen-Yu Tsai March 13, 2024, 6:13 p.m. UTC | #4
On Thu, Mar 14, 2024 at 1:35 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Mon, 11 Mar 2024 17:20:50 -0500
> Samuel Holland <samuel@sholland.org> wrote:
>
> Hi Samuel,
>
> thanks for having a look!
>
> > On 3/9/24 19:02, Andre Przywara wrote:
> > > The X-Powers AXP717 is a PMIC used on some newer Allwinner devices.
> > > Among quite some regulators it features the usual ADC/IRQ/power key
> > > parts, plus a battery charger circuit, and some newly introduced USB
> > > type-C circuitry.
> >
> > Do you plan to put the Type-C logic under a subnode, or should the
> > Type-C connector node go directly under the PMIC node? Either way, the
> > binding probably needs to be updated for that.
>
> I haven't looked into this yet, so cannot say which way to go. I
> definitely consider this some non-trivial task, so indeed wanted to push
> this off to later.
> For now there is a device (Anbernic RG35XX) with that PMIC, so we need at
> least the regulators to unblock this. USB support is not critical for now.
>
> > > Like two other recent PMICs, it lacks the DC/DC converter PWM frequency
> > > control register, that rate is fixed here as well.
> > >
> > > Add the new compatible string, and add that to the list of PMICs without
> > > the PWM frequency property.
> > >
> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > > ---
> > >  Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > > index 06f1779835a1e..b8e8db0d58e9c 100644
> > > --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > > +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > > @@ -83,6 +83,7 @@ allOf:
> > >              enum:
> > >                - x-powers,axp313a
> > >                - x-powers,axp15060
> > > +              - x-powers,axp717
> > >
> > >      then:
> > >        properties:
> > > @@ -99,6 +100,7 @@ properties:
> > >            - x-powers,axp221
> > >            - x-powers,axp223
> > >            - x-powers,axp313a
> > > +          - x-powers,axp717
> > >            - x-powers,axp803
> > >            - x-powers,axp806
> > >            - x-powers,axp809
> >
> > The regulators patternProperties needs to be updated for the new boost
> > regulator.
>
> Ah, I indeed missed this one. I think the former PMICs had this
> batter->VBUS boost regulator hidden, controlled entirely by the PMIC?
> I will need to check if exposing this will present any surprises. I
> guess this goes together with the USB-C support, to have role switching,
> unless this appears on some device with just USB-A or micro-B.
> I will check what it takes to add this one, the regulator itself looks
> easy.

I don't think there was such a boost regulator on previous PMICs. It was
just a passthrough, which is why on some boards such as the Cubietruck
there is an external boost converter to put out 5V when just the battery
is used.

ChenYu
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
index 06f1779835a1e..b8e8db0d58e9c 100644
--- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
+++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
@@ -83,6 +83,7 @@  allOf:
             enum:
               - x-powers,axp313a
               - x-powers,axp15060
+              - x-powers,axp717
 
     then:
       properties:
@@ -99,6 +100,7 @@  properties:
           - x-powers,axp221
           - x-powers,axp223
           - x-powers,axp313a
+          - x-powers,axp717
           - x-powers,axp803
           - x-powers,axp806
           - x-powers,axp809