[v3,03/16] dt-bindings: pinctrl: sunxi: Add A100 pinctrl bindings
diff mbox series

Message ID 20200708071942.22595-4-frank@allwinnertech.com
State New
Headers show
Series
  • Allwinner A100 Initial support
Related show

Commit Message

Frank Lee July 8, 2020, 7:19 a.m. UTC
Add device tree binding Documentation details for A100 pinctrl driver,
whic has an r pin controller and a pin controller with more irq lines.

Signed-off-by: Frank Lee <frank@allwinnertech.com>
---
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml       | 74 +++++++++++++---------
 1 file changed, 44 insertions(+), 30 deletions(-)

Comments

Rob Herring July 13, 2020, 11:01 p.m. UTC | #1
On Wed, Jul 08, 2020 at 03:19:29PM +0800, Frank Lee wrote:
> Add device tree binding Documentation details for A100 pinctrl driver,
> whic has an r pin controller and a pin controller with more irq lines.

s/whic/which/

'an r pin controller'?

> 
> Signed-off-by: Frank Lee <frank@allwinnertech.com>
> ---
>  .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml       | 74 +++++++++++++---------
>  1 file changed, 44 insertions(+), 30 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> index bfefd09..226aba0 100644
> --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> @@ -48,6 +48,8 @@ properties:
>        - allwinner,sun9i-a80-r-pinctrl
>        - allwinner,sun50i-a64-pinctrl
>        - allwinner,sun50i-a64-r-pinctrl
> +      - allwinner,sun50i-a100-pinctrl
> +      - allwinner,sun50i-a100-r-pinctrl
>        - allwinner,sun50i-h5-pinctrl
>        - allwinner,sun50i-h6-pinctrl
>        - allwinner,sun50i-h6-r-pinctrl
> @@ -59,7 +61,7 @@ properties:
>  
>    interrupts:
>      minItems: 1
> -    maxItems: 5
> +    maxItems: 7
>      description:
>        One interrupt per external interrupt bank supported on the
>        controller, sorted by bank number ascending order.
> @@ -144,75 +146,87 @@ allOf:
>    # FIXME: We should have the pin bank supplies here, but not a lot of
>    # boards are defining it at the moment so it would generate a lot of
>    # warnings.
> -
>    - if:
>        properties:
>          compatible:
>            enum:
> -            - allwinner,sun9i-a80-pinctrl
> +            - allwinner,sun50i-a100-pinctrl
>  
>      then:
>        properties:
>          interrupts:
> -          minItems: 5
> -          maxItems: 5
> +          minItems: 7
> +          maxItems: 7
>  
>      else:
>        if:

This diff is hard to follow. Rather than a continual nesting of 'else' 
clauses, just make each 'if' a new entry under 'allOf' and get rid of 
the else. Perhaps do that in a separate patch first, then this change 
will be easier to review.

>          properties:
>            compatible:
>              enum:
> -              - allwinner,sun6i-a31-pinctrl
> -              - allwinner,sun6i-a31s-pinctrl
> -              - allwinner,sun50i-h6-pinctrl
> +              - allwinner,sun9i-a80-pinctrl
>  
>        then:
>          properties:
>            interrupts:
> -            minItems: 4
> -            maxItems: 4
> +            minItems: 5
> +            maxItems: 5
>  
>        else:
>          if:
>            properties:
>              compatible:
>                enum:
> -                - allwinner,sun8i-a23-pinctrl
> -                - allwinner,sun8i-a83t-pinctrl
> -                - allwinner,sun50i-a64-pinctrl
> -                - allwinner,sun50i-h5-pinctrl
> -                - allwinner,suniv-f1c100s-pinctrl
> +                - allwinner,sun6i-a31-pinctrl
> +                - allwinner,sun6i-a31s-pinctrl
> +                - allwinner,sun50i-h6-pinctrl
>  
>          then:
>            properties:
>              interrupts:
> -              minItems: 3
> -              maxItems: 3
> +              minItems: 4
> +              maxItems: 4
>  
>          else:
>            if:
>              properties:
>                compatible:
>                  enum:
> -                  - allwinner,sun6i-a31-r-pinctrl
> -                  - allwinner,sun8i-a33-pinctrl
> -                  - allwinner,sun8i-h3-pinctrl
> -                  - allwinner,sun8i-v3-pinctrl
> -                  - allwinner,sun8i-v3s-pinctrl
> -                  - allwinner,sun9i-a80-r-pinctrl
> -                  - allwinner,sun50i-h6-r-pinctrl
> +                  - allwinner,sun8i-a23-pinctrl
> +                  - allwinner,sun8i-a83t-pinctrl
> +                  - allwinner,sun50i-a64-pinctrl
> +                  - allwinner,sun50i-h5-pinctrl
> +                  - allwinner,suniv-f1c100s-pinctrl
>  
>            then:
>              properties:
>                interrupts:
> -                minItems: 2
> -                maxItems: 2
> +                minItems: 3
> +                maxItems: 3
>  
>            else:
> -            properties:
> -              interrupts:
> -                minItems: 1
> -                maxItems: 1
> +            if:
> +              properties:
> +                compatible:
> +                  enum:
> +                    - allwinner,sun6i-a31-r-pinctrl
> +                    - allwinner,sun8i-a33-pinctrl
> +                    - allwinner,sun8i-h3-pinctrl
> +                    - allwinner,sun8i-v3-pinctrl
> +                    - allwinner,sun8i-v3s-pinctrl
> +                    - allwinner,sun9i-a80-r-pinctrl
> +                    - allwinner,sun50i-h6-r-pinctrl
> +
> +            then:
> +              properties:
> +                interrupts:
> +                  minItems: 2
> +                  maxItems: 2
> +
> +            else:
> +              properties:
> +                interrupts:
> +                  minItems: 1
> +                  maxItems: 1
>  
>  additionalProperties: false
>  
> -- 
> 1.9.1
>

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
index bfefd09..226aba0 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
@@ -48,6 +48,8 @@  properties:
       - allwinner,sun9i-a80-r-pinctrl
       - allwinner,sun50i-a64-pinctrl
       - allwinner,sun50i-a64-r-pinctrl
+      - allwinner,sun50i-a100-pinctrl
+      - allwinner,sun50i-a100-r-pinctrl
       - allwinner,sun50i-h5-pinctrl
       - allwinner,sun50i-h6-pinctrl
       - allwinner,sun50i-h6-r-pinctrl
@@ -59,7 +61,7 @@  properties:
 
   interrupts:
     minItems: 1
-    maxItems: 5
+    maxItems: 7
     description:
       One interrupt per external interrupt bank supported on the
       controller, sorted by bank number ascending order.
@@ -144,75 +146,87 @@  allOf:
   # FIXME: We should have the pin bank supplies here, but not a lot of
   # boards are defining it at the moment so it would generate a lot of
   # warnings.
-
   - if:
       properties:
         compatible:
           enum:
-            - allwinner,sun9i-a80-pinctrl
+            - allwinner,sun50i-a100-pinctrl
 
     then:
       properties:
         interrupts:
-          minItems: 5
-          maxItems: 5
+          minItems: 7
+          maxItems: 7
 
     else:
       if:
         properties:
           compatible:
             enum:
-              - allwinner,sun6i-a31-pinctrl
-              - allwinner,sun6i-a31s-pinctrl
-              - allwinner,sun50i-h6-pinctrl
+              - allwinner,sun9i-a80-pinctrl
 
       then:
         properties:
           interrupts:
-            minItems: 4
-            maxItems: 4
+            minItems: 5
+            maxItems: 5
 
       else:
         if:
           properties:
             compatible:
               enum:
-                - allwinner,sun8i-a23-pinctrl
-                - allwinner,sun8i-a83t-pinctrl
-                - allwinner,sun50i-a64-pinctrl
-                - allwinner,sun50i-h5-pinctrl
-                - allwinner,suniv-f1c100s-pinctrl
+                - allwinner,sun6i-a31-pinctrl
+                - allwinner,sun6i-a31s-pinctrl
+                - allwinner,sun50i-h6-pinctrl
 
         then:
           properties:
             interrupts:
-              minItems: 3
-              maxItems: 3
+              minItems: 4
+              maxItems: 4
 
         else:
           if:
             properties:
               compatible:
                 enum:
-                  - allwinner,sun6i-a31-r-pinctrl
-                  - allwinner,sun8i-a33-pinctrl
-                  - allwinner,sun8i-h3-pinctrl
-                  - allwinner,sun8i-v3-pinctrl
-                  - allwinner,sun8i-v3s-pinctrl
-                  - allwinner,sun9i-a80-r-pinctrl
-                  - allwinner,sun50i-h6-r-pinctrl
+                  - allwinner,sun8i-a23-pinctrl
+                  - allwinner,sun8i-a83t-pinctrl
+                  - allwinner,sun50i-a64-pinctrl
+                  - allwinner,sun50i-h5-pinctrl
+                  - allwinner,suniv-f1c100s-pinctrl
 
           then:
             properties:
               interrupts:
-                minItems: 2
-                maxItems: 2
+                minItems: 3
+                maxItems: 3
 
           else:
-            properties:
-              interrupts:
-                minItems: 1
-                maxItems: 1
+            if:
+              properties:
+                compatible:
+                  enum:
+                    - allwinner,sun6i-a31-r-pinctrl
+                    - allwinner,sun8i-a33-pinctrl
+                    - allwinner,sun8i-h3-pinctrl
+                    - allwinner,sun8i-v3-pinctrl
+                    - allwinner,sun8i-v3s-pinctrl
+                    - allwinner,sun9i-a80-r-pinctrl
+                    - allwinner,sun50i-h6-r-pinctrl
+
+            then:
+              properties:
+                interrupts:
+                  minItems: 2
+                  maxItems: 2
+
+            else:
+              properties:
+                interrupts:
+                  minItems: 1
+                  maxItems: 1
 
 additionalProperties: false