linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
@ 2020-05-18  2:10 Anson Huang
  2020-05-18  3:40 ` Aisheng Dong
  0 siblings, 1 reply; 5+ messages in thread
From: Anson Huang @ 2020-05-18  2:10 UTC (permalink / raw)
  To: tglx, jason, maz, robh+dt, l.stach, linux-kernel, devicetree; +Cc: Linux-imx

Convert the i.MX IRQSTEER binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 .../bindings/interrupt-controller/fsl,irqsteer.txt | 35 ---------
 .../interrupt-controller/fsl,irqsteer.yaml         | 87 ++++++++++++++++++++++
 2 files changed, 87 insertions(+), 35 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
deleted file mode 100644
index 582991c..0000000
--- a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Freescale IRQSTEER Interrupt multiplexer
-
-Required properties:
-
-- compatible: should be:
-	- "fsl,imx8m-irqsteer"
-	- "fsl,imx-irqsteer"
-- reg: Physical base address and size of registers.
-- interrupts: Should contain the up to 8 parent interrupt lines used to
-  multiplex the input interrupts. They should be specified sequentially
-  from output 0 to 7.
-- clocks: Should contain one clock for entry in clock-names
-  see Documentation/devicetree/bindings/clock/clock-bindings.txt
-- clock-names:
-   - "ipg": main logic clock
-- interrupt-controller: Identifies the node as an interrupt controller.
-- #interrupt-cells: Specifies the number of cells needed to encode an
-  interrupt source. The value must be 1.
-- fsl,channel: The output channel that all input IRQs should be steered into.
-- fsl,num-irqs: Number of input interrupts of this channel.
-  Should be multiple of 32 input interrupts and up to 512 interrupts.
-
-Example:
-
-	interrupt-controller@32e2d000 {
-		compatible = "fsl,imx8m-irqsteer", "fsl,imx-irqsteer";
-		reg = <0x32e2d000 0x1000>;
-		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>;
-		clock-names = "ipg";
-		fsl,channel = <0>;
-		fsl,num-irqs = <64>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-	};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
new file mode 100644
index 0000000..a2bc723
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/fsl,irqsteer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale IRQSTEER Interrupt multiplexer
+
+maintainers:
+  - Lucas Stach <l.stach@pengutronix.de>
+
+properties:
+  compatible:
+    const: fsl,imx-irqsteer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: |
+      should contain the up to 8 parent interrupt lines used to multiplex
+      the input interrupts. They should be specified sequentially from
+      output 0 to 7.
+    items:
+      - description: irqsteer channel 0
+      - description: irqsteer channel 1
+      - description: irqsteer channel 2
+      - description: irqsteer channel 3
+      - description: irqsteer channel 4
+      - description: irqsteer channel 5
+      - description: irqsteer channel 6
+      - description: irqsteer channel 7
+    minItems: 1
+    maxItems: 8
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: ipg
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 1
+
+  fsl,channel:
+    $ref: '/schemas/types.yaml#/definitions/uint32'
+    description: |
+      u32 value representing the output channel that all input IRQs should be
+      steered into.
+
+  fsl,num-irqs:
+    $ref: '/schemas/types.yaml#/definitions/uint32'
+    description: |
+      u32 value representing the number of input interrupts of this channel,
+      should be multiple of 32 input interrupts and up to 512 interrupts.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - interrupt-controller
+  - "#interrupt-cells"
+  - fsl,channel
+  - fsl,num-irqs
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx8mq-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    interrupt-controller@32e2d000 {
+        compatible = "fsl,imx-irqsteer";
+        reg = <0x32e2d000 0x1000>;
+        interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>;
+        clock-names = "ipg";
+        fsl,channel = <0>;
+        fsl,num-irqs = <64>;
+        interrupt-controller;
+        #interrupt-cells = <1>;
+    };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
  2020-05-18  2:10 [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema Anson Huang
@ 2020-05-18  3:40 ` Aisheng Dong
  2020-05-18  5:20   ` Anson Huang
  0 siblings, 1 reply; 5+ messages in thread
From: Aisheng Dong @ 2020-05-18  3:40 UTC (permalink / raw)
  To: Anson Huang, tglx, jason, maz, robh+dt, l.stach, linux-kernel,
	devicetree
  Cc: dl-linux-imx

...
> +
> +title: Freescale IRQSTEER Interrupt multiplexer
> +
> +maintainers:
> +  - Lucas Stach <l.stach@pengutronix.de>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx-irqsteer

You changed binding here without comments?

Regards
Aisheng

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: |
> +      should contain the up to 8 parent interrupt lines used to multiplex
> +      the input interrupts. They should be specified sequentially from
> +      output 0 to 7.
> +    items:
> +      - description: irqsteer channel 0
> +      - description: irqsteer channel 1
> +      - description: irqsteer channel 2
> +      - description: irqsteer channel 3
> +      - description: irqsteer channel 4
> +      - description: irqsteer channel 5
> +      - description: irqsteer channel 6
> +      - description: irqsteer channel 7
> +    minItems: 1
> +    maxItems: 8
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: ipg
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 1
> +
> +  fsl,channel:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: |
> +      u32 value representing the output channel that all input IRQs should be
> +      steered into.
> +
> +  fsl,num-irqs:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: |
> +      u32 value representing the number of input interrupts of this channel,
> +      should be multiple of 32 input interrupts and up to 512 interrupts.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - interrupt-controller
> +  - "#interrupt-cells"
> +  - fsl,channel
> +  - fsl,num-irqs
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx8mq-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    interrupt-controller@32e2d000 {
> +        compatible = "fsl,imx-irqsteer";
> +        reg = <0x32e2d000 0x1000>;
> +        interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>;
> +        clock-names = "ipg";
> +        fsl,channel = <0>;
> +        fsl,num-irqs = <64>;
> +        interrupt-controller;
> +        #interrupt-cells = <1>;
> +    };
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
  2020-05-18  3:40 ` Aisheng Dong
@ 2020-05-18  5:20   ` Anson Huang
  2020-05-18  6:04     ` Aisheng Dong
  0 siblings, 1 reply; 5+ messages in thread
From: Anson Huang @ 2020-05-18  5:20 UTC (permalink / raw)
  To: Aisheng Dong, tglx, jason, maz, robh+dt, l.stach, linux-kernel,
	devicetree
  Cc: dl-linux-imx



> Subject: RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to
> json-schema
> 
> ...
> > +
> > +title: Freescale IRQSTEER Interrupt multiplexer
> > +
> > +maintainers:
> > +  - Lucas Stach <l.stach@pengutronix.de>
> > +
> > +properties:
> > +  compatible:
> > +    const: fsl,imx-irqsteer
> 
> You changed binding here without comments?

It is because drivers/irqchip/irq-imx-irqsteer.c ONLY has "fsl,imx-irqsteer" as valid compatible,
so take this chance to fix it in this patch.

Anson 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
  2020-05-18  5:20   ` Anson Huang
@ 2020-05-18  6:04     ` Aisheng Dong
  2020-05-18  6:08       ` Anson Huang
  0 siblings, 1 reply; 5+ messages in thread
From: Aisheng Dong @ 2020-05-18  6:04 UTC (permalink / raw)
  To: Anson Huang, tglx, jason, maz, robh+dt, l.stach, linux-kernel,
	devicetree
  Cc: dl-linux-imx

> From: Anson Huang <anson.huang@nxp.com>
> Sent: Monday, May 18, 2020 1:20 PM
> 
> > Subject: RE: [PATCH] dt-bindings: interrupt-controller: Convert imx
> > irqsteer to json-schema
> >
> > ...
> > > +
> > > +title: Freescale IRQSTEER Interrupt multiplexer
> > > +
> > > +maintainers:
> > > +  - Lucas Stach <l.stach@pengutronix.de>
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: fsl,imx-irqsteer
> >
> > You changed binding here without comments?
> 
> It is because drivers/irqchip/irq-imx-irqsteer.c ONLY has "fsl,imx-irqsteer" as valid
> compatible, so take this chance to fix it in this patch.

Nope. You might be misunderstood about dt-binding. It's HW description language.
Drivers does not define bindings, drivers only implement bindings.

Regards
Aisheng

> 
> Anson


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
  2020-05-18  6:04     ` Aisheng Dong
@ 2020-05-18  6:08       ` Anson Huang
  0 siblings, 0 replies; 5+ messages in thread
From: Anson Huang @ 2020-05-18  6:08 UTC (permalink / raw)
  To: Aisheng Dong, tglx, jason, maz, robh+dt, l.stach, linux-kernel,
	devicetree
  Cc: dl-linux-imx


> Subject: RE: [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to
> json-schema
> 
> > From: Anson Huang <anson.huang@nxp.com>
> > Sent: Monday, May 18, 2020 1:20 PM
> >
> > > Subject: RE: [PATCH] dt-bindings: interrupt-controller: Convert imx
> > > irqsteer to json-schema
> > >
> > > ...
> > > > +
> > > > +title: Freescale IRQSTEER Interrupt multiplexer
> > > > +
> > > > +maintainers:
> > > > +  - Lucas Stach <l.stach@pengutronix.de>
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    const: fsl,imx-irqsteer
> > >
> > > You changed binding here without comments?
> >
> > It is because drivers/irqchip/irq-imx-irqsteer.c ONLY has
> > "fsl,imx-irqsteer" as valid compatible, so take this chance to fix it in this
> patch.
> 
> Nope. You might be misunderstood about dt-binding. It's HW description
> language.
> Drivers does not define bindings, drivers only implement bindings.

OK, will add it back.

Anson


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-18  6:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18  2:10 [PATCH] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema Anson Huang
2020-05-18  3:40 ` Aisheng Dong
2020-05-18  5:20   ` Anson Huang
2020-05-18  6:04     ` Aisheng Dong
2020-05-18  6:08       ` Anson Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).