diff mbox series

[02/13] dt-bindings: interrupt-controller: via,vt8500-intc: Convert to YAML

Message ID 20250416-wmt-updates-v1-2-f9af689cdfc2@gmail.com
State New
Headers show
Series ARM: vt8500: DT bindings and dts updates | expand

Commit Message

Alexey Charkov April 16, 2025, 8:21 a.m. UTC
Rewrite the textual description for the VIA/WonderMedia interrupt
controller as YAML schema.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
 .../interrupt-controller/via,vt8500-intc.txt       | 16 --------
 .../interrupt-controller/via,vt8500-intc.yaml      | 47 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 3 files changed, 48 insertions(+), 16 deletions(-)

Comments

Rob Herring April 16, 2025, 8:10 p.m. UTC | #1
On Wed, Apr 16, 2025 at 12:21:27PM +0400, Alexey Charkov wrote:
> Rewrite the textual description for the VIA/WonderMedia interrupt
> controller as YAML schema.
> 
> Signed-off-by: Alexey Charkov <alchark@gmail.com>
> ---
>  .../interrupt-controller/via,vt8500-intc.txt       | 16 --------
>  .../interrupt-controller/via,vt8500-intc.yaml      | 47 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  3 files changed, 48 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
> deleted file mode 100644
> index 0a4ce1051b0252bbbdeef3288b90e9913d3f16f0..0000000000000000000000000000000000000000
> --- a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -VIA/Wondermedia VT8500 Interrupt Controller
> ------------------------------------------------------
> -
> -Required properties:
> -- compatible : "via,vt8500-intc"
> -- reg : Should contain 1 register ranges(address and length)
> -- #interrupt-cells : should be <1>
> -
> -Example:
> -
> -	intc: interrupt-controller@d8140000 {
> -		compatible = "via,vt8500-intc";
> -		interrupt-controller;
> -		reg = <0xd8140000 0x10000>;
> -		#interrupt-cells = <1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..a3fbe985db276e6a3b65cc66c7de097ed0719c0c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/via,vt8500-intc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VIA and WonderMedia SoCs Interrupt Controller
> +
> +maintainers:
> +  - Alexey Charkov <alchark@gmail.com>
> +
> +allOf:
> +  - $ref: /schemas/interrupt-controller.yaml#
> +
> +
> +properties:
> +  compatible:
> +    const: via,vt8500-intc
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 8

This wasn't in the original binding. Find to add, but note that in 
the commit msg. Here, what each of the 8 entries are must be defined.

> +
> +  interrupt-controller: true
> +
> +  '#interrupt-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupt-controller
> +  - '#interrupt-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    interrupt-controller@d8140000 {
> +        compatible = "via,vt8500-intc";
> +        interrupt-controller;
> +        reg = <0xd8140000 0x10000>;
> +        #interrupt-cells = <1>;
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c5195a98b15a39583d337fb6310b80432b0f6922..2444282096e03b301ed0e3209b4de7a114709764 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3428,6 +3428,7 @@ M:	Krzysztof Kozlowski <krzk@kernel.org>
>  L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
>  S:	Odd Fixes
>  F:	Documentation/devicetree/bindings/i2c/wm,wm8505-i2c.yaml
> +F:	Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
>  F:	arch/arm/boot/dts/vt8500/
>  F:	arch/arm/mach-vt8500/
>  F:	drivers/clocksource/timer-vt8500.c
> 
> -- 
> 2.49.0
>
Alexey Charkov April 17, 2025, 6:15 a.m. UTC | #2
On Thu, Apr 17, 2025 at 12:10 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Apr 16, 2025 at 12:21:27PM +0400, Alexey Charkov wrote:
> > Rewrite the textual description for the VIA/WonderMedia interrupt
> > controller as YAML schema.
> >
> > Signed-off-by: Alexey Charkov <alchark@gmail.com>
> > ---
> >  .../interrupt-controller/via,vt8500-intc.txt       | 16 --------
> >  .../interrupt-controller/via,vt8500-intc.yaml      | 47 ++++++++++++++++++++++
> >  MAINTAINERS                                        |  1 +
> >  3 files changed, 48 insertions(+), 16 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
> > deleted file mode 100644
> > index 0a4ce1051b0252bbbdeef3288b90e9913d3f16f0..0000000000000000000000000000000000000000
> > --- a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
> > +++ /dev/null
> > @@ -1,16 +0,0 @@
> > -VIA/Wondermedia VT8500 Interrupt Controller
> > ------------------------------------------------------
> > -
> > -Required properties:
> > -- compatible : "via,vt8500-intc"
> > -- reg : Should contain 1 register ranges(address and length)
> > -- #interrupt-cells : should be <1>
> > -
> > -Example:
> > -
> > -     intc: interrupt-controller@d8140000 {
> > -             compatible = "via,vt8500-intc";
> > -             interrupt-controller;
> > -             reg = <0xd8140000 0x10000>;
> > -             #interrupt-cells = <1>;
> > -     };
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..a3fbe985db276e6a3b65cc66c7de097ed0719c0c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/interrupt-controller/via,vt8500-intc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: VIA and WonderMedia SoCs Interrupt Controller
> > +
> > +maintainers:
> > +  - Alexey Charkov <alchark@gmail.com>
> > +
> > +allOf:
> > +  - $ref: /schemas/interrupt-controller.yaml#
> > +
> > +
> > +properties:
> > +  compatible:
> > +    const: via,vt8500-intc
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 8
>
> This wasn't in the original binding. Find to add, but note that in
> the commit msg. Here, what each of the 8 entries are must be defined.

Will do, thank you.

The primary interrupt controller only has a single line routed to the
CPU (out of the 8 outputs it technically has), while the (identical)
chained interrupt controller has all its 8 output lines routed to the
primary controller. There's not much difference between those outputs
other than the names IC1_IRQ0~7.

The original textual description only listed one interrupt, because it
worked ok with one interrupt (the chained controller can be configured
wrt. which output to trigger for each of the inputs, and those can all
be IC1_IRQ0), even though it is not a complete description of the
actual hardware.

Will reflect that in the commit message and descriptions.

Best regards,
Alexey
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
deleted file mode 100644
index 0a4ce1051b0252bbbdeef3288b90e9913d3f16f0..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
+++ /dev/null
@@ -1,16 +0,0 @@ 
-VIA/Wondermedia VT8500 Interrupt Controller
------------------------------------------------------
-
-Required properties:
-- compatible : "via,vt8500-intc"
-- reg : Should contain 1 register ranges(address and length)
-- #interrupt-cells : should be <1>
-
-Example:
-
-	intc: interrupt-controller@d8140000 {
-		compatible = "via,vt8500-intc";
-		interrupt-controller;
-		reg = <0xd8140000 0x10000>;
-		#interrupt-cells = <1>;
-	};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..a3fbe985db276e6a3b65cc66c7de097ed0719c0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/via,vt8500-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VIA and WonderMedia SoCs Interrupt Controller
+
+maintainers:
+  - Alexey Charkov <alchark@gmail.com>
+
+allOf:
+  - $ref: /schemas/interrupt-controller.yaml#
+
+
+properties:
+  compatible:
+    const: via,vt8500-intc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 8
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - '#interrupt-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    interrupt-controller@d8140000 {
+        compatible = "via,vt8500-intc";
+        interrupt-controller;
+        reg = <0xd8140000 0x10000>;
+        #interrupt-cells = <1>;
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index c5195a98b15a39583d337fb6310b80432b0f6922..2444282096e03b301ed0e3209b4de7a114709764 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3428,6 +3428,7 @@  M:	Krzysztof Kozlowski <krzk@kernel.org>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Odd Fixes
 F:	Documentation/devicetree/bindings/i2c/wm,wm8505-i2c.yaml
+F:	Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
 F:	arch/arm/boot/dts/vt8500/
 F:	arch/arm/mach-vt8500/
 F:	drivers/clocksource/timer-vt8500.c