Skip to contentSkip to conversation

dt-bindings: soc: imx: fsl,imx-anatop: Fix the i.MX7 irq number

PATCH Applied Fabio Estevam 4 participants 7 messages Oct 25, 2024 – Nov 2, 2024

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 dt-bindings: soc: imx: fsl,imx-anatop: Fix the i.MX7 irq number

From: Fabio Estevam <[email protected]>

Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.

Add logic that contemplates such case to fix the following dt-schema warning:

anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short

---
 .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +18 -0
index c4ae4f28422b..ae708a658d52 100644
@@ -36,6 +36,7 @@ properties:
       - description: Temperature sensor event
       - description: Brown-out event on either of the support regulators
       - description: Brown-out event on either the core, gpu or soc regulators
+    minItems: 2
 
   tempmon:
     type: object
@@ -52,6 +53,23 @@ required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx7d-anatop
+    then:
+      properties:
+        interrupts:
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+
 additionalProperties: false
 
 examples:
Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH 2/2 dt-bindings: soc: imx: fsl,imx-anatop: Add additional regulators

From: Fabio Estevam <[email protected]>

i.MX7 has the following anatop regulators: vdd1p0d and vdd1p2.

i.MX6SX has the following anatop regulators: vddpcie.

Add them to the allowed patternProperties.

---
 Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +1 -1
index ae708a658d52..f40c157908aa 100644
@@ -44,7 +44,7 @@ properties:
     $ref: /schemas/thermal/imx-thermal.yaml
 
 patternProperties:
-  "regulator-((1p1)|(2p5)|(3p0)|(vddcore)|(vddpu)|(vddsoc))$":
+  "regulator-((1p1)|(2p5)|(3p0)|(vdd1p0d)|(vdd1p2)|(vddcore)|(vddpcie)|(vddpu)|(vddsoc))$":
     type: object
     unevaluatedProperties: false
     $ref: /schemas/regulator/anatop-regulator.yaml
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] dt-bindings: soc: imx: fsl, imx-anatop: Add additional regulators

Hi Fabio,

thanks for the patch.

Am Freitag, 25. Oktober 2024, 02:41:59 CEST schrieb Fabio Estevam:

Quoted 9 lines

From: Fabio Estevam <[email protected]>

i.MX7 has the following anatop regulators: vdd1p0d and vdd1p2.

i.MX6SX has the following anatop regulators: vddpcie.

Add them to the allowed patternProperties.

Quoted 18 lines
---
 Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +1 -1
index ae708a658d52..f40c157908aa 100644
@@ -44,7 +44,7 @@ properties:
     $ref: /schemas/thermal/imx-thermal.yaml
 
 patternProperties:
-  "regulator-((1p1)|(2p5)|(3p0)|(vddcore)|(vddpu)|(vddsoc))$":
+  "regulator-((1p1)|(2p5)|(3p0)|(vdd1p0d)|(vdd1p2)|(vddcore)|(vddpcie)|(vddpu)|(vddsoc))$":
     type: object
     unevaluatedProperties: false
     $ref: /schemas/regulator/anatop-regulator.yaml
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
maintainer Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] dt-bindings: soc: imx: fsl,imx-anatop: Add additional regulators

In reply to Fabio Estevam
Quoted 18 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

i.MX7 has the following anatop regulators: vdd1p0d and vdd1p2.

i.MX6SX has the following anatop regulators: vddpcie.

Add them to the allowed patternProperties.

---
 Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +0 -0
index ae708a658d52..f40c157908aa 100644

Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml properties: · line 47

Quoted 5 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +1 -1
@@ -44,7 +44,7 @@ properties:
     $ref: /schemas/thermal/imx-thermal.yaml
 
 patternProperties:
-  "regulator-((1p1)|(2p5)|(3p0)|(vddcore)|(vddpu)|(vddsoc))$":
+  "regulator-((1p1)|(2p5)|(3p0)|(vdd1p0d)|(vdd1p2)|(vddcore)|(vddpcie)|(vddpu)|(vddsoc))$":

Perhaps to shorten a bit: (vdd(1p0d|1p2|core|pcie|pu|soc))

Either way,

Reviewed-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] dt-bindings: soc: imx: fsl, imx-anatop: Fix the i.MX7 irq number

In reply to Fabio Estevam

Hi Fabio,

thanks for the patch.

Am Freitag, 25. Oktober 2024, 02:41:58 CEST schrieb Fabio Estevam:

Quoted 10 lines

From: Fabio Estevam <[email protected]>

Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.

Add logic that contemplates such case to fix the following dt-schema warning:

anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short

Quoted 41 lines
---
 .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml +18 -0
index c4ae4f28422b..ae708a658d52 100644
@@ -36,6 +36,7 @@ properties:
       - description: Temperature sensor event
       - description: Brown-out event on either of the support regulators
       - description: Brown-out event on either the core, gpu or soc regulators
+    minItems: 2
 
   tempmon:
     type: object
@@ -52,6 +53,23 @@ required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx7d-anatop
+    then:
+      properties:
+        interrupts:
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+
 additionalProperties: false
 
 examples:
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
maintainer Acked-by on v1 1/2
#5 lore raw
In reply to Fabio Estevam
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.

Add logic that contemplates such case to fix the following dt-schema warning:

Quoted 7 lines

anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short

---
 .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)