* [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
@ 2025-02-28 3:39 Leonardo Felipe Takao Hirata
2025-02-28 18:48 ` Conor Dooley
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Leonardo Felipe Takao Hirata @ 2025-02-28 3:39 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, vz
Cc: Leonardo Felipe Takao Hirata, linux-kernel, devicetree, skhan,
linux-kernel-mentees
Convert NXP LPC3220-MIC to DT schema.
Signed-off-by: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>
---
Changes in v3:
- Add interrupts property description
- Fix interrupts items descriptions
- Remove else condition
---
.../interrupt-controller/nxp,lpc3220-mic.txt | 58 ----------------
.../interrupt-controller/nxp,lpc3220-mic.yaml | 69 +++++++++++++++++++
2 files changed, 69 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
diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
deleted file mode 100644
index 0bfb3ba55f4c..000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
+++ /dev/null
@@ -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>;
- };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
new file mode 100644
index 000000000000..59e8814a15b7
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
+
+maintainers:
+ - Vladimir Zapolskiy <vz@mleia.com>
+
+properties:
+ compatible:
+ enum:
+ - nxp,lpc3220-mic
+ - nxp,lpc3220-sic
+
+ reg:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 2
+
+ interrupts:
+ items:
+ - description: Regular interrupt request
+ - description: Fast interrupt request
+ description: IRQ and FIQ outputs of SIC1/SIC2 to the MIC.
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - '#interrupt-cells'
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: nxp,lpc3220-sic
+ then:
+ required:
+ - interrupts
+
+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 {
+ 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>;
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
2025-02-28 3:39 [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format Leonardo Felipe Takao Hirata
@ 2025-02-28 18:48 ` Conor Dooley
2025-02-28 22:23 ` Rob Herring (Arm)
2025-03-03 4:27 ` Vladimir Zapolskiy
2 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2025-02-28 18:48 UTC (permalink / raw)
To: Leonardo Felipe Takao Hirata
Cc: tglx, robh, krzk+dt, conor+dt, vz, linux-kernel, devicetree,
skhan, linux-kernel-mentees
[-- Attachment #1: Type: text/plain, Size: 2366 bytes --]
On Fri, Feb 28, 2025 at 12:39:15AM -0300, Leonardo Felipe Takao Hirata wrote:
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> new file mode 100644
> index 000000000000..59e8814a15b7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
> +
> +maintainers:
> + - Vladimir Zapolskiy <vz@mleia.com>
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,lpc3220-mic
> + - nxp,lpc3220-sic
> +
> + reg:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + '#interrupt-cells':
> + const: 2
> +
> + interrupts:
> + items:
> + - description: Regular interrupt request
> + - description: Fast interrupt request
> + description: IRQ and FIQ outputs of SIC1/SIC2 to the MIC.
If you respin, drop this line and...
> +
> +required:
> + - compatible
> + - reg
> + - interrupt-controller
> + - '#interrupt-cells'
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: nxp,lpc3220-sic
> + then:
> + required:
> + - interrupts
> +
> +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 {
...the unused label "sic1".
Acked-by: Conor Dooley <conor.dooley@microchip.com>
> + 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>;
> + };
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
2025-02-28 3:39 [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format Leonardo Felipe Takao Hirata
2025-02-28 18:48 ` Conor Dooley
@ 2025-02-28 22:23 ` Rob Herring (Arm)
2025-03-03 4:27 ` Vladimir Zapolskiy
2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2025-02-28 22:23 UTC (permalink / raw)
To: Leonardo Felipe Takao Hirata
Cc: vz, skhan, tglx, conor+dt, krzk+dt, linux-kernel-mentees,
linux-kernel, devicetree
On Fri, 28 Feb 2025 00:39:15 -0300, Leonardo Felipe Takao Hirata wrote:
> Convert NXP LPC3220-MIC to DT schema.
>
> Signed-off-by: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>
> ---
> Changes in v3:
> - Add interrupts property description
> - Fix interrupts items descriptions
> - Remove else condition
> ---
> .../interrupt-controller/nxp,lpc3220-mic.txt | 58 ----------------
> .../interrupt-controller/nxp,lpc3220-mic.yaml | 69 +++++++++++++++++++
> 2 files changed, 69 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
>
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
2025-02-28 3:39 [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format Leonardo Felipe Takao Hirata
2025-02-28 18:48 ` Conor Dooley
2025-02-28 22:23 ` Rob Herring (Arm)
@ 2025-03-03 4:27 ` Vladimir Zapolskiy
2025-03-04 1:27 ` Leonardo Felipe Takao Hirata
2 siblings, 1 reply; 5+ messages in thread
From: Vladimir Zapolskiy @ 2025-03-03 4:27 UTC (permalink / raw)
To: Leonardo Felipe Takao Hirata, tglx, robh, krzk+dt, conor+dt
Cc: linux-kernel, devicetree, skhan, linux-kernel-mentees
Hello Leonardo.
On 2/28/25 05:39, Leonardo Felipe Takao Hirata wrote:
> Convert NXP LPC3220-MIC to DT schema.
>
> Signed-off-by: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>
> ---
> Changes in v3:
> - Add interrupts property description
> - Fix interrupts items descriptions
> - Remove else condition
> ---
<snip>
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> new file mode 100644
> index 000000000000..59e8814a15b7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
> +
> +maintainers:
> + - Vladimir Zapolskiy <vz@mleia.com>
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,lpc3220-mic
> + - nxp,lpc3220-sic
> +
> + reg:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + '#interrupt-cells':
> + const: 2
> +
> + interrupts:
Please put here
minItems: 2
maxItems: 2
> + items:
> + - description: Regular interrupt request
> + - description: Fast interrupt request
> + description: IRQ and FIQ outputs of SIC1/SIC2 to the MIC.
Having both two descriptions under 'items:' and another description is
excessive, please leave only one of two.
> +
> +required:
> + - compatible
> + - reg
> + - interrupt-controller
> + - '#interrupt-cells'
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: nxp,lpc3220-sic
> + then:
> + required:
> + - interrupts
> +
> +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 {
Here sic1 label is not used, please remove.
> + 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>;
> + };
After the fixes please feel free to add the tag:
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
--
Best wishes,
Vladimir
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
2025-03-03 4:27 ` Vladimir Zapolskiy
@ 2025-03-04 1:27 ` Leonardo Felipe Takao Hirata
0 siblings, 0 replies; 5+ messages in thread
From: Leonardo Felipe Takao Hirata @ 2025-03-04 1:27 UTC (permalink / raw)
To: Vladimir Zapolskiy, tglx, robh, krzk+dt, conor+dt
Cc: linux-kernel, devicetree, skhan, linux-kernel-mentees
Hi Vladimir.
On 03/03/2025 1:27 AM, Vladimir Zapolskiy wrote:
> Hello Leonardo.
>
> On 2/28/25 05:39, Leonardo Felipe Takao Hirata wrote:
>> Convert NXP LPC3220-MIC to DT schema.
>>
>> Signed-off-by: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>
>> ---
>> Changes in v3:
>> - Add interrupts property description
>> - Fix interrupts items descriptions
>> - Remove else condition
>> ---
>
> <snip>
>
>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/
>> nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/
>> nxp,lpc3220-mic.yaml
>> new file mode 100644
>> index 000000000000..59e8814a15b7
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
>> @@ -0,0 +1,69 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
>> +
>> +maintainers:
>> + - Vladimir Zapolskiy <vz@mleia.com>
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - nxp,lpc3220-mic
>> + - nxp,lpc3220-sic
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupt-controller: true
>> +
>> + '#interrupt-cells':
>> + const: 2
>> +
>> + interrupts:
>
> Please put here
>
> minItems: 2
> maxItems: 2
>
I didn't add them in this patch because example-schema.yaml states that minItems
and maxItems are already implied. The following code is taken from the
example-schema.yaml.
items:
- description: core registers
- description: aux registers
# minItems/maxItems equal to 2 is implied
Besides, adding minItems and maxItems triggers the respective warnings:
- "minItems" is only needed if less than the "items" list length
- "maxItems" is not needed with an "items" list
>> + items:
>> + - description: Regular interrupt request
>> + - description: Fast interrupt request
>> + description: IRQ and FIQ outputs of SIC1/SIC2 to the MIC.
>
> Having both two descriptions under 'items:' and another description is
> excessive, please leave only one of two.
>
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupt-controller
>> + - '#interrupt-cells'
>> +
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: nxp,lpc3220-sic
>> + then:
>> + required:
>> + - interrupts
>> +
>> +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 {
>
> Here sic1 label is not used, please remove.
>
>> + 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>;
>> + };
>
> After the fixes please feel free to add the tag:
>
> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
>
> --
> Best wishes,
> Vladimir
Rob,
Do you want these changes on top of what was applied or a complete patch?
Best regards,
Leonardo Hirata
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-04 1:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 3:39 [PATCH v3] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format Leonardo Felipe Takao Hirata
2025-02-28 18:48 ` Conor Dooley
2025-02-28 22:23 ` Rob Herring (Arm)
2025-03-03 4:27 ` Vladimir Zapolskiy
2025-03-04 1:27 ` Leonardo Felipe Takao Hirata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox