Skip to contentSkip to conversation

dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format

PATCH Superseded Leonardo Felipe Takao Hirata 2 participants 3 messages Feb 24, 2025 – Feb 25, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format

Convert NXP LPC3220-MIC to DT schema.

---
 .../interrupt-controller/nxp,lpc3220-mic.txt  | 58 -------------
 .../interrupt-controller/nxp,lpc3220-mic.yaml | 86 +++++++++++++++++++
 2 files changed, 86 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt deleted +0 -58
deleted file mode 100644
index 0bfb3ba55f4c..000000000000
@@ -1,58 +0,0 @@
-* NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
-
-Required properties:
-- compatible: "nxp,lpc3220-mic" or "nxp,lpc3220-sic".
-- reg: should contain IC registers location and length.
-- interrupt-controller: identifies the node as an interrupt controller.
-- #interrupt-cells: the number of cells to define an interrupt, should be 2.
-  The first cell is the IRQ number, the second cell is used to specify
-  one of the supported IRQ types:
-      IRQ_TYPE_EDGE_RISING = low-to-high edge triggered,
-      IRQ_TYPE_EDGE_FALLING = high-to-low edge triggered,
-      IRQ_TYPE_LEVEL_HIGH = active high level-sensitive,
-      IRQ_TYPE_LEVEL_LOW = active low level-sensitive.
-  Reset value is IRQ_TYPE_LEVEL_LOW.
-
-Optional properties:
-- interrupts: empty for MIC interrupt controller, cascaded MIC
-  hardware interrupts for SIC1 and SIC2
-
-Examples:
-
-	/* LPC32xx MIC, SIC1 and SIC2 interrupt controllers */
-	mic: interrupt-controller@40008000 {
-		compatible = "nxp,lpc3220-mic";
-		reg = <0x40008000 0x4000>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-	};
-
-	sic1: interrupt-controller@4000c000 {
-		compatible = "nxp,lpc3220-sic";
-		reg = <0x4000c000 0x4000>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-
-		interrupt-parent = <&mic>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
-			     <30 IRQ_TYPE_LEVEL_LOW>;
-	};
-
-	sic2: interrupt-controller@40010000 {
-		compatible = "nxp,lpc3220-sic";
-		reg = <0x40010000 0x4000>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-
-		interrupt-parent = <&mic>;
-		interrupts = <1 IRQ_TYPE_LEVEL_LOW>,
-			     <31 IRQ_TYPE_LEVEL_LOW>;
-	};
-
-	/* ADC */
-	adc@40048000 {
-		compatible = "nxp,lpc3220-adc";
-		reg = <0x40048000 0x1000>;
-		interrupt-parent = <&sic1>;
-		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
-	};
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
2.43.0
#1 lore raw
Quoted 3 lines · Leonardo Felipe Takao Hirata

Convert NXP LPC3220-MIC to DT schema.

SoB mismatch.

Run checkpatch.

Quoted 6 lines
---
 .../interrupt-controller/nxp,lpc3220-mic.txt  | 58 -------------
 .../interrupt-controller/nxp,lpc3220-mic.yaml | 86 +++++++++++++++++++
 2 files changed, 86 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml

...

Quoted 4 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +4 -0
+title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
+
+maintainers:
+  - Vladimir Zapolskiy <[email protected]>

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 20

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +10 -0
+
+properties:
+  compatible:
+    enum:
+      - nxp,lpc3220-mic
+      - nxp,lpc3220-sic
+
+  reg:
+    description:
+      Should contain IC registers location and length.

Drop description

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 28

Quoted 8 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +8 -0
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+    description:
+      The number of cells to define an interrupt, should be 2.

Don't repeat constraints in free form text. Drop.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 37

Quoted 9 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +9 -0
+      The first cell is the IRQ number, the second cell is used to specify
+      one of the supported IRQ types.
+          IRQ_TYPE_EDGE_RISING = low-to-high edge triggered,
+          IRQ_TYPE_EDGE_FALLING = high-to-low edge triggered,
+          IRQ_TYPE_LEVEL_HIGH = active high level-sensitive,
+          IRQ_TYPE_LEVEL_LOW = active low level-sensitive.
+      Reset value is IRQ_TYPE_LEVEL_LOW.
+
+  interrupts:

Need to list and describe the items.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 40

Quoted 3 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +3 -0
+    description:
+      Empty for MIC interrupt controller, cascaded MIC hardware interrupts for
+      SIC1 and SIC2

And then allOf:if:then restricting it per variant (interrupts: false).

Quoted 21 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +21 -0
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - '#interrupt-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    mic: interrupt-controller@40008000 {
+      compatible = "nxp,lpc3220-mic";
+      reg = <0x40008000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+    };
+
+    sic1: interrupt-controller@4000c000 {

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 71

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +10 -0
+      compatible = "nxp,lpc3220-sic";
+      reg = <0x4000c000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+      interrupt-parent = <&mic>;
+      interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
+                  <30 IRQ_TYPE_LEVEL_LOW>;
+    };
+
+    sic2: interrupt-controller@40010000 {

Drop, two examples are enough.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 82

Quoted 11 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +11 -0
+      compatible = "nxp,lpc3220-sic";
+      reg = <0x40010000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+      interrupt-parent = <&mic>;
+      interrupts = <1 IRQ_TYPE_LEVEL_LOW>,
+                  <31 IRQ_TYPE_LEVEL_LOW>;
+    };
+
+    adc@40048000 {
+      compatible = "nxp,lpc3220-adc";

Drop, not relevant.

Best regards,
Krzysztof

#2 lore raw

Hello Krzysztof,

Quoted 102 lines · Krzysztof Kozlowski
Quoted 3 lines · Leonardo Felipe Takao Hirata

Convert NXP LPC3220-MIC to DT schema.

SoB mismatch.

Run checkpatch.

Quoted 6 lines
---
  .../interrupt-controller/nxp,lpc3220-mic.txt  | 58 -------------
  .../interrupt-controller/nxp,lpc3220-mic.yaml | 86 +++++++++++++++++++
  2 files changed, 86 insertions(+), 58 deletions(-)

delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml

...

Quoted 4 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +4 -0
+title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
+
+maintainers:
+  - Vladimir Zapolskiy <[email protected]>

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 20

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +10 -0
+
+properties:
+  compatible:
+    enum:
+      - nxp,lpc3220-mic
+      - nxp,lpc3220-sic
+
+  reg:
+    description:
+      Should contain IC registers location and length.

Drop description

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 28

Quoted 8 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +8 -0
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+    description:
+      The number of cells to define an interrupt, should be 2.

Don't repeat constraints in free form text. Drop.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 37

Quoted 9 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +9 -0
+      The first cell is the IRQ number, the second cell is used to specify
+      one of the supported IRQ types.
+          IRQ_TYPE_EDGE_RISING = low-to-high edge triggered,
+          IRQ_TYPE_EDGE_FALLING = high-to-low edge triggered,
+          IRQ_TYPE_LEVEL_HIGH = active high level-sensitive,
+          IRQ_TYPE_LEVEL_LOW = active low level-sensitive.
+      Reset value is IRQ_TYPE_LEVEL_LOW.
+
+  interrupts:

Need to list and describe the items.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 40

Quoted 3 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +3 -0
+    description:
+      Empty for MIC interrupt controller, cascaded MIC hardware interrupts for
+      SIC1 and SIC2

And then allOf:if:then restricting it per variant (interrupts: false).

Quoted 21 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +21 -0
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - '#interrupt-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    mic: interrupt-controller@40008000 {
+      compatible = "nxp,lpc3220-mic";
+      reg = <0x40008000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+    };
+
+    sic1: interrupt-controller@4000c000 {

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 71

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +10 -0
+      compatible = "nxp,lpc3220-sic";
+      reg = <0x4000c000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+      interrupt-parent = <&mic>;
+      interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
+                  <30 IRQ_TYPE_LEVEL_LOW>;
+    };
+
+    sic2: interrupt-controller@40010000 {

Drop, two examples are enough.

Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml line 82

Quoted 11 lines
Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml new file +11 -0
+      compatible = "nxp,lpc3220-sic";
+      reg = <0x40010000 0x4000>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+      interrupt-parent = <&mic>;
+      interrupts = <1 IRQ_TYPE_LEVEL_LOW>,
+                  <31 IRQ_TYPE_LEVEL_LOW>;
+    };
+
+    adc@40048000 {
+      compatible = "nxp,lpc3220-adc";
Quoted 5 lines

Drop, not relevant.

Best regards,
Krzysztof

Thanks for the feedback. The fixes will be in v2.

Best regards,
Leonardo Hirata