diff mbox series

[1/5] dt-bindings: gpio: vf610: correct i.MX8ULP and i.MX93 interrupts

Message ID 20230914-vf610-gpio-v1-1-3ed418182a6a@nxp.com
State Changes Requested
Headers show
Series gpio: update i.MX93/8ULP and support i.MX95 | 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

Peng Fan (OSS) Sept. 14, 2023, 2:20 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

i.MX8ULP and i.MX93 actually has two interrupts for each gpio
controller, one for Trustzone non-secure world, one for secure world.

And i.MX93 is directly derived from i.MX8ULP, so make i.MX93 GPIO
compatible with i.MX8ULP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../devicetree/bindings/gpio/gpio-vf610.yaml       | 27 ++++++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)

Comments

Krzysztof Kozlowski Sept. 14, 2023, 5:47 a.m. UTC | #1
On 14/09/2023 04:20, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> i.MX8ULP and i.MX93 actually has two interrupts for each gpio
> controller, one for

...

> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - fsl,vf610-gpio
> +              - fsl,imx7ulp-gpio
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 1
> +    else:
> +      properties:
> +        interrupts:
> +          maxItems: 2

Instead describe the items with "items:" and descriptions.

Best regards,
Krzysztof
Rob Herring (Arm) Sept. 14, 2023, 3:03 p.m. UTC | #2
On Thu, Sep 14, 2023 at 07:47:29AM +0200, Krzysztof Kozlowski wrote:
> On 14/09/2023 04:20, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> > 
> > i.MX8ULP and i.MX93 actually has two interrupts for each gpio
> > controller, one for
> 
> ...
> 
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - fsl,vf610-gpio
> > +              - fsl,imx7ulp-gpio
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 1
> > +    else:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 2
> 
> Instead describe the items with "items:" and descriptions.

Except not here, but in the top level 'interrupts' entry.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index 7c2d152e8617..2593cc96fcbb 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -20,15 +20,14 @@  description: |
 properties:
   compatible:
     oneOf:
+      - const: fsl,imx8ulp-gpio
       - const: fsl,vf610-gpio
       - items:
           - const: fsl,imx7ulp-gpio
           - const: fsl,vf610-gpio
       - items:
-          - enum:
-              - fsl,imx93-gpio
-              - fsl,imx8ulp-gpio
-          - const: fsl,imx7ulp-gpio
+          - const: fsl,imx93-gpio
+          - const: fsl,imx8ulp-gpio
 
   reg:
     description: The first reg tuple represents the PORT module, the second tuple
@@ -36,7 +35,8 @@  properties:
     maxItems: 2
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   interrupt-controller: true
 
@@ -77,6 +77,23 @@  required:
   - "#gpio-cells"
   - gpio-controller
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,vf610-gpio
+              - fsl,imx7ulp-gpio
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+    else:
+      properties:
+        interrupts:
+          maxItems: 2
+
 additionalProperties: false
 
 examples: