diff mbox series

[1/6] dt-bindings: mfd: ti,j721e-system-controller: Fix mux node errors

Message ID 20210518232858.1535403-2-robh@kernel.org
State Superseded
Headers show
Series dt-bindings: Convert mux bindings to schema | expand

Commit Message

Rob Herring May 18, 2021, 11:28 p.m. UTC
The ti,j721e-system-controller binding does not follow the standard mux
controller node name 'mux-controller' and the example is incomplete. Fix
these to avoid schema errors before the mux controller binding is
converted to schema.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Rob Herring <robh@kernel.org>

---
 .../mfd/ti,j721e-system-controller.yaml       | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

-- 
2.27.0

Comments

Lee Jones May 19, 2021, 3 p.m. UTC | #1
On Tue, 18 May 2021, Rob Herring wrote:

> The ti,j721e-system-controller binding does not follow the standard mux

> controller node name 'mux-controller' and the example is incomplete. Fix

> these to avoid schema errors before the mux controller binding is

> converted to schema.

> 

> Cc: Lee Jones <lee.jones@linaro.org>

> Cc: Kishon Vijay Abraham I <kishon@ti.com>

> Cc: Roger Quadros <rogerq@ti.com>


Would one of the original authors be kind enough to review please?

> Signed-off-by: Rob Herring <robh@kernel.org>

> ---

>  .../mfd/ti,j721e-system-controller.yaml       | 19 +++++++++++++------

>  1 file changed, 13 insertions(+), 6 deletions(-)

> 

> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> index 19fcf59fd2fe..272832e9f8f2 100644

> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> @@ -43,12 +43,10 @@ properties:

>  

>  patternProperties:

>    # Optional children

> -  "^serdes-ln-ctrl@[0-9a-f]+$":

> +  "^mux-controller@[0-9a-f]+$":

>      type: object

> -    description: |

> -      This is the SERDES lane control mux. It should follow the bindings

> -      specified in

> -      Documentation/devicetree/bindings/mux/reg-mux.txt

> +    description:

> +      This is the SERDES lane control mux.

>  

>  required:

>    - compatible

> @@ -68,9 +66,18 @@ examples:

>          #size-cells = <1>;

>          ranges;

>  

> -        serdes_ln_ctrl: serdes-ln-ctrl@4080 {

> +        serdes_ln_ctrl: mux-controller@4080 {

>              compatible = "mmio-mux";

>              reg = <0x00004080 0x50>;

> +

> +            #mux-control-cells = <1>;

> +            mux-reg-masks =

> +                <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */

> +                <0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */

> +                <0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */

> +                <0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */

> +                <0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;

> +                /* SERDES4 lane0/1/2/3 select */

>          };

>      };

>  ...


-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Kishon Vijay Abraham I May 20, 2021, 2:41 p.m. UTC | #2
Hi Rob,

On 19/05/21 4:58 am, Rob Herring wrote:
> The ti,j721e-system-controller binding does not follow the standard mux

> controller node name 'mux-controller' and the example is incomplete. Fix

> these to avoid schema errors before the mux controller binding is

> converted to schema.

> 

> Cc: Lee Jones <lee.jones@linaro.org>

> Cc: Kishon Vijay Abraham I <kishon@ti.com>

> Cc: Roger Quadros <rogerq@ti.com>

> Signed-off-by: Rob Herring <robh@kernel.org>

> ---

>  .../mfd/ti,j721e-system-controller.yaml       | 19 +++++++++++++------

>  1 file changed, 13 insertions(+), 6 deletions(-)

> 

> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> index 19fcf59fd2fe..272832e9f8f2 100644

> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> @@ -43,12 +43,10 @@ properties:

>  

>  patternProperties:

>    # Optional children

> -  "^serdes-ln-ctrl@[0-9a-f]+$":

> +  "^mux-controller@[0-9a-f]+$":

>      type: object

> -    description: |

> -      This is the SERDES lane control mux. It should follow the bindings

> -      specified in

> -      Documentation/devicetree/bindings/mux/reg-mux.txt

> +    description:

> +      This is the SERDES lane control mux.

>  

>  required:

>    - compatible

> @@ -68,9 +66,18 @@ examples:

>          #size-cells = <1>;

>          ranges;

>  

> -        serdes_ln_ctrl: serdes-ln-ctrl@4080 {

> +        serdes_ln_ctrl: mux-controller@4080 {

>              compatible = "mmio-mux";

>              reg = <0x00004080 0x50>;


"mmio-mux" compatible doesn't define using "reg" property. But a system
can have multiple mux-controllers which would require us to use
mux-controller@0, mux-controller@1,..

And IIRC if we have "@", 'reg' will be a required required property.
Would it be an issue here?

Thanks
Kishon
Rob Herring May 20, 2021, 3:19 p.m. UTC | #3
On Thu, May 20, 2021 at 9:42 AM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>

> Hi Rob,

>

> On 19/05/21 4:58 am, Rob Herring wrote:

> > The ti,j721e-system-controller binding does not follow the standard mux

> > controller node name 'mux-controller' and the example is incomplete. Fix

> > these to avoid schema errors before the mux controller binding is

> > converted to schema.

> >

> > Cc: Lee Jones <lee.jones@linaro.org>

> > Cc: Kishon Vijay Abraham I <kishon@ti.com>

> > Cc: Roger Quadros <rogerq@ti.com>

> > Signed-off-by: Rob Herring <robh@kernel.org>

> > ---

> >  .../mfd/ti,j721e-system-controller.yaml       | 19 +++++++++++++------

> >  1 file changed, 13 insertions(+), 6 deletions(-)

> >

> > diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> > index 19fcf59fd2fe..272832e9f8f2 100644

> > --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> > +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml

> > @@ -43,12 +43,10 @@ properties:

> >

> >  patternProperties:

> >    # Optional children

> > -  "^serdes-ln-ctrl@[0-9a-f]+$":

> > +  "^mux-controller@[0-9a-f]+$":

> >      type: object

> > -    description: |

> > -      This is the SERDES lane control mux. It should follow the bindings

> > -      specified in

> > -      Documentation/devicetree/bindings/mux/reg-mux.txt

> > +    description:

> > +      This is the SERDES lane control mux.

> >

> >  required:

> >    - compatible

> > @@ -68,9 +66,18 @@ examples:

> >          #size-cells = <1>;

> >          ranges;

> >

> > -        serdes_ln_ctrl: serdes-ln-ctrl@4080 {

> > +        serdes_ln_ctrl: mux-controller@4080 {

> >              compatible = "mmio-mux";

> >              reg = <0x00004080 0x50>;

>

> "mmio-mux" compatible doesn't define using "reg" property. But a system

> can have multiple mux-controllers which would require us to use

> mux-controller@0, mux-controller@1,..


It does now in patch 3 as part of the schema conversion. It's optional
as getting folks to use 'reg' for syscon child nodes is an uphill
battle.

Rob
>

> And IIRC if we have "@", 'reg' will be a required required property.

> Would it be an issue here?

>

> Thanks

> Kishon
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
index 19fcf59fd2fe..272832e9f8f2 100644
--- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
@@ -43,12 +43,10 @@  properties:
 
 patternProperties:
   # Optional children
-  "^serdes-ln-ctrl@[0-9a-f]+$":
+  "^mux-controller@[0-9a-f]+$":
     type: object
-    description: |
-      This is the SERDES lane control mux. It should follow the bindings
-      specified in
-      Documentation/devicetree/bindings/mux/reg-mux.txt
+    description:
+      This is the SERDES lane control mux.
 
 required:
   - compatible
@@ -68,9 +66,18 @@  examples:
         #size-cells = <1>;
         ranges;
 
-        serdes_ln_ctrl: serdes-ln-ctrl@4080 {
+        serdes_ln_ctrl: mux-controller@4080 {
             compatible = "mmio-mux";
             reg = <0x00004080 0x50>;
+
+            #mux-control-cells = <1>;
+            mux-reg-masks =
+                <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
+                <0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */
+                <0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */
+                <0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */
+                <0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;
+                /* SERDES4 lane0/1/2/3 select */
         };
     };
 ...