diff mbox series

[1/2] dt-bindings: ocelot: document lan969x-pinctrl

Message ID 20240914-lan969x-pinctrl-v1-1-1b3a4d454b0d@microchip.com
State Superseded
Headers show
Series pinctrl: ocelot: add support for lan969x SoC | expand

Commit Message

Daniel Machon Sept. 14, 2024, 7:10 p.m. UTC
Lan969x is going to reuse the existing Ocelot pinctrl driver - document
that by adding compatible strings for the different SKU's that we
support.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
 .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml      | 32 ++++++++++++++++------
 1 file changed, 24 insertions(+), 8 deletions(-)

Comments

Conor Dooley Sept. 16, 2024, 4:16 p.m. UTC | #1
On Sat, Sep 14, 2024 at 09:10:08PM +0200, Daniel Machon wrote:
> Lan969x is going to reuse the existing Ocelot pinctrl driver - document
> that by adding compatible strings for the different SKU's that we
> support.
> 
> Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> ---
>  .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml      | 32 ++++++++++++++++------
>  1 file changed, 24 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> index dbb3e1bd58c1..45e9dfc50660 100644
> --- a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> @@ -12,14 +12,24 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - microchip,lan966x-pinctrl
> -      - microchip,sparx5-pinctrl
> -      - mscc,jaguar2-pinctrl
> -      - mscc,luton-pinctrl
> -      - mscc,ocelot-pinctrl
> -      - mscc,serval-pinctrl
> -      - mscc,servalt-pinctrl
> +    oneOf:
> +      - enum:
> +          - microchip,lan966x-pinctrl
> +          - microchip,lan9691-pinctrl
> +          - microchip,sparx5-pinctrl
> +          - mscc,jaguar2-pinctrl
> +          - mscc,luton-pinctrl
> +          - mscc,ocelot-pinctrl
> +          - mscc,serval-pinctrl
> +          - mscc,servalt-pinctrl
> +      - items:
> +          - enum:
> +              - microchip,lan9698-pinctrl
> +              - microchip,lan9696-pinctrl
> +              - microchip,lan9694-pinctrl
> +              - microchip,lan9693-pinctrl
> +              - microchip,lan9692-pinctrl
> +          - const: microchip,lan9691-pinctrl
>  
>    reg:
>      items:
> @@ -85,6 +95,12 @@ allOf:
>            contains:
>              enum:
>                - microchip,lan966x-pinctrl
> +              - microchip,lan9698-pinctrl
> +              - microchip,lan9696-pinctrl
> +              - microchip,lan9694-pinctrl
> +              - microchip,lan9693-pinctrl
> +              - microchip,lan9692-pinctrl

> +              - microchip,lan9691-pinctrl

This should work on its own, since the other devices here have it as a
fallback.

>                - microchip,sparx5-pinctrl
>      then:
>        properties:
> 
> -- 
> 2.34.1
>
Daniel Machon Sept. 17, 2024, 7:52 a.m. UTC | #2
> >    reg:
> >      items:
> > @@ -85,6 +95,12 @@ allOf:
> >            contains:
> >              enum:
> >                - microchip,lan966x-pinctrl
> > +              - microchip,lan9698-pinctrl
> > +              - microchip,lan9696-pinctrl
> > +              - microchip,lan9694-pinctrl
> > +              - microchip,lan9693-pinctrl
> > +              - microchip,lan9692-pinctrl
> 
> > +              - microchip,lan9691-pinctrl
> 
> This should work on its own, since the other devices here have it as a
> fallback.

Just to be clear - we only need the "microchip,lan9691-pinctrl" here?

/Daniel
Conor Dooley Sept. 17, 2024, 12:36 p.m. UTC | #3
On Tue, Sep 17, 2024 at 07:52:59AM +0000, Daniel Machon wrote:
> > >    reg:
> > >      items:
> > > @@ -85,6 +95,12 @@ allOf:
> > >            contains:
> > >              enum:
> > >                - microchip,lan966x-pinctrl
> > > +              - microchip,lan9698-pinctrl
> > > +              - microchip,lan9696-pinctrl
> > > +              - microchip,lan9694-pinctrl
> > > +              - microchip,lan9693-pinctrl
> > > +              - microchip,lan9692-pinctrl
> > 
> > > +              - microchip,lan9691-pinctrl
> > 
> > This should work on its own, since the other devices here have it as a
> > fallback.
> 
> Just to be clear - we only need the "microchip,lan9691-pinctrl" here?

Ye, in the enum you should only need that compatible (in addition to the
exsting one) because lan9691 is the fallback for all the others and
therefore the compatible must contain it.
Daniel Machon Sept. 17, 2024, 12:40 p.m. UTC | #4
> > > >    reg:
> > > >      items:
> > > > @@ -85,6 +95,12 @@ allOf:
> > > >            contains:
> > > >              enum:
> > > >                - microchip,lan966x-pinctrl
> > > > +              - microchip,lan9698-pinctrl
> > > > +              - microchip,lan9696-pinctrl
> > > > +              - microchip,lan9694-pinctrl
> > > > +              - microchip,lan9693-pinctrl
> > > > +              - microchip,lan9692-pinctrl
> > > 
> > > > +              - microchip,lan9691-pinctrl
> > > 
> > > This should work on its own, since the other devices here have it as a
> > > fallback.
> > 
> > Just to be clear - we only need the "microchip,lan9691-pinctrl" here?
> 
> Ye, in the enum you should only need that compatible (in addition to the
> exsting one) because lan9691 is the fallback for all the others and
> therefore the compatible must contain it.

OK, got it.

Thanks Conor.

/Daniel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
index dbb3e1bd58c1..45e9dfc50660 100644
--- a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
@@ -12,14 +12,24 @@  maintainers:
 
 properties:
   compatible:
-    enum:
-      - microchip,lan966x-pinctrl
-      - microchip,sparx5-pinctrl
-      - mscc,jaguar2-pinctrl
-      - mscc,luton-pinctrl
-      - mscc,ocelot-pinctrl
-      - mscc,serval-pinctrl
-      - mscc,servalt-pinctrl
+    oneOf:
+      - enum:
+          - microchip,lan966x-pinctrl
+          - microchip,lan9691-pinctrl
+          - microchip,sparx5-pinctrl
+          - mscc,jaguar2-pinctrl
+          - mscc,luton-pinctrl
+          - mscc,ocelot-pinctrl
+          - mscc,serval-pinctrl
+          - mscc,servalt-pinctrl
+      - items:
+          - enum:
+              - microchip,lan9698-pinctrl
+              - microchip,lan9696-pinctrl
+              - microchip,lan9694-pinctrl
+              - microchip,lan9693-pinctrl
+              - microchip,lan9692-pinctrl
+          - const: microchip,lan9691-pinctrl
 
   reg:
     items:
@@ -85,6 +95,12 @@  allOf:
           contains:
             enum:
               - microchip,lan966x-pinctrl
+              - microchip,lan9698-pinctrl
+              - microchip,lan9696-pinctrl
+              - microchip,lan9694-pinctrl
+              - microchip,lan9693-pinctrl
+              - microchip,lan9692-pinctrl
+              - microchip,lan9691-pinctrl
               - microchip,sparx5-pinctrl
     then:
       properties: