diff mbox series

[v9,1/3] dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant

Message ID 20230324113013.254371-2-andre.przywara@arm.com
State Changes Requested, archived
Headers show
Series regulator: Add X-Powers AXP313a 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 24, 2023, 11:30 a.m. UTC
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     | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Krzysztof Kozlowski March 25, 2023, 11:40 a.m. UTC | #1
On 24/03/2023 12:30, 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     | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> index b7a8747d5fa0e..4b4f42cb09ef7 100644
> --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> @@ -79,6 +79,17 @@ allOf:
>        required:
>          - interrupts
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: x-powers,axp313a
> +
> +    then:
> +      not:
> +        required:
> +          - x-powers,dcdc-freq

Should be simpler x-powers,dcdc-freq: false

I'll fix the other cases.

Best regards,
Krzysztof
Andre Przywara March 27, 2023, 11:44 p.m. UTC | #2
On Sat, 25 Mar 2023 12:40:38 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

Hi,

> On 24/03/2023 12:30, 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     | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > index b7a8747d5fa0e..4b4f42cb09ef7 100644
> > --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> > @@ -79,6 +79,17 @@ allOf:
> >        required:
> >          - interrupts
> >  
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: x-powers,axp313a
> > +
> > +    then:
> > +      not:
> > +        required:
> > +          - x-powers,dcdc-freq  
> 
> Should be simpler x-powers,dcdc-freq: false

Ah, many thanks! I was a bit concerned about "not required" not sounding
quite right, but I indeed copied from the other cases and verified that
it worked as expected.
But yours is indeed much better, thanks for the other patch!

Cheers,
Andre

> I'll fix the other cases.
> 
> Best regards,
> Krzysztof
>
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 b7a8747d5fa0e..4b4f42cb09ef7 100644
--- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
+++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
@@ -79,6 +79,17 @@  allOf:
       required:
         - interrupts
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: x-powers,axp313a
+
+    then:
+      not:
+        required:
+          - x-powers,dcdc-freq
+
 properties:
   compatible:
     oneOf:
@@ -88,6 +99,7 @@  properties:
           - x-powers,axp209
           - x-powers,axp221
           - x-powers,axp223
+          - x-powers,axp313a
           - x-powers,axp803
           - x-powers,axp806
           - x-powers,axp809