devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
@ 2024-06-27 14:42 Frank Li
  2024-06-28  8:24 ` Krzysztof Kozlowski
  2024-06-28 19:34 ` Rob Herring (Arm)
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Li @ 2024-06-27 14:42 UTC (permalink / raw)
  To: krzk; +Cc: Frank.Li, conor+dt, devicetree, imx, krzk+dt, linux-kernel, robh,
	tglx

Convert device tree binding fsl,ls-scfg-msi to yaml format.

Additional changes:
- Include gic.h and use predefined macro in example.
- Remove label in example.
- Change node name to interrupt-controller in example.
- Fix error in example.
- ls1046a allow 4 irqs, other platform only 1 irq.
- Add $ref: msi-controller.yaml
- Add #msi-cells.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Change from v1 to v2
- sort compatible string
- add ref to msi-controller.yaml
- add msi-cells
- add interrupts description
- remove msi-controller, which already in msi-controller.yaml
---
 .../interrupt-controller/fsl,ls-msi.yaml      | 79 +++++++++++++++++++
 .../interrupt-controller/fsl,ls-scfg-msi.txt  | 30 -------
 2 files changed, 79 insertions(+), 30 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml
 delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt

diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml
new file mode 100644
index 0000000000000..9ba8d4d73351b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/fsl,ls-msi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Layerscape SCFG PCIe MSI controller
+
+description: |
+  This interrupt controller hardware is a second level interrupt controller that
+  is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based
+  platforms. If interrupt-parent is not provided, the default parent interrupt
+  controller will be used.
+
+  Each PCIe node needs to have property msi-parent that points to
+  MSI controller node
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - fsl,ls1012a-msi
+      - fsl,ls1021a-msi
+      - fsl,ls1043a-msi
+      - fsl,ls1043a-v1.1-msi
+      - fsl,ls1046a-msi
+
+  reg:
+    maxItems: 1
+
+  '#msi-cells':
+    const: 1
+
+  interrupts:
+    items:
+      - description: Shared MSI interrupt group 0
+      - description: Shared MSI interrupt group 1
+      - description: Shared MSI interrupt group 2
+      - description: Shared MSI interrupt group 3
+    minItems: 1
+
+required:
+  - compatible
+  - reg
+  - msi-controller
+  - interrupts
+
+allOf:
+  - $ref: msi-controller.yaml
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,ls1046a-msi
+    then:
+      properties:
+        interrupts:
+          minItems: 4
+    else:
+      properties:
+        interrupts:
+          maxItems: 1
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    interrupt-controller@1571000 {
+        compatible = "fsl,ls1043a-msi";
+        reg = <0x1571000 0x8>;
+        msi-controller;
+        #msi-cells = <1>;
+        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+    };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt b/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt
deleted file mode 100644
index 454ce04d67874..0000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-* Freescale Layerscape SCFG PCIe MSI controller
-
-Required properties:
-
-- compatible: should be "fsl,<soc-name>-msi" to identify
-	      Layerscape PCIe MSI controller block such as:
-              "fsl,ls1021a-msi"
-              "fsl,ls1043a-msi"
-              "fsl,ls1046a-msi"
-              "fsl,ls1043a-v1.1-msi"
-              "fsl,ls1012a-msi"
-- msi-controller: indicates that this is a PCIe MSI controller node
-- reg: physical base address of the controller and length of memory mapped.
-- interrupts: an interrupt to the parent interrupt controller.
-
-This interrupt controller hardware is a second level interrupt controller that
-is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based
-platforms. If interrupt-parent is not provided, the default parent interrupt
-controller will be used.
-Each PCIe node needs to have property msi-parent that points to
-MSI controller node
-
-Examples:
-
-	msi1: msi-controller@1571000 {
-		compatible = "fsl,ls1043a-msi";
-		reg = <0x0 0x1571000 0x0 0x8>,
-		msi-controller;
-		interrupts = <0 116 0x4>;
-	};
-- 
2.34.1


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

* Re: [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
  2024-06-27 14:42 [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml Frank Li
@ 2024-06-28  8:24 ` Krzysztof Kozlowski
  2024-06-28 19:34 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-28  8:24 UTC (permalink / raw)
  To: Frank Li; +Cc: conor+dt, devicetree, imx, krzk+dt, linux-kernel, robh, tglx

On 27/06/2024 16:42, Frank Li wrote:
> Convert device tree binding fsl,ls-scfg-msi to yaml format.
> 
> Additional changes:
> - Include gic.h and use predefined macro in example.
> - Remove label in example.
> - Change node name to interrupt-controller in example.
> - Fix error in example.
> - ls1046a allow 4 irqs, other platform only 1 irq.
> - Add $ref: msi-controller.yaml
> - Add #msi-cells.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
  2024-06-27 14:42 [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml Frank Li
  2024-06-28  8:24 ` Krzysztof Kozlowski
@ 2024-06-28 19:34 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2024-06-28 19:34 UTC (permalink / raw)
  To: Frank Li; +Cc: krzk+dt, devicetree, imx, krzk, tglx, linux-kernel, conor+dt


On Thu, 27 Jun 2024 10:42:07 -0400, Frank Li wrote:
> Convert device tree binding fsl,ls-scfg-msi to yaml format.
> 
> Additional changes:
> - Include gic.h and use predefined macro in example.
> - Remove label in example.
> - Change node name to interrupt-controller in example.
> - Fix error in example.
> - ls1046a allow 4 irqs, other platform only 1 irq.
> - Add $ref: msi-controller.yaml
> - Add #msi-cells.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change from v1 to v2
> - sort compatible string
> - add ref to msi-controller.yaml
> - add msi-cells
> - add interrupts description
> - remove msi-controller, which already in msi-controller.yaml
> ---
>  .../interrupt-controller/fsl,ls-msi.yaml      | 79 +++++++++++++++++++
>  .../interrupt-controller/fsl,ls-scfg-msi.txt  | 30 -------
>  2 files changed, 79 insertions(+), 30 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt
> 

Applied, thanks!


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

end of thread, other threads:[~2024-06-28 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27 14:42 [PATCH v2 1/1] dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml Frank Li
2024-06-28  8:24 ` Krzysztof Kozlowski
2024-06-28 19:34 ` Rob Herring (Arm)

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).