dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
Subsystems (3)
Frank Li
maintainerPATCH 1/1 dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml
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.
--- .../interrupt-controller/fsl,ls-msi.yaml | 72 +++++++++++++++++++ .../interrupt-controller/fsl,ls-scfg-msi.txt | 30 -------- 2 files changed, 72 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
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +72 -0
@@ -0,0 +1,72 @@ +# 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 <[email protected]> + +properties: + compatible: + enum: + - fsl,ls1021a-msi + - fsl,ls1043a-msi + - fsl,ls1046a-msi + - fsl,ls1043a-v1.1-msi + - fsl,ls1012a-msi + + reg: + maxItems: 1 + + msi-controller: true + + interrupts: + minItems: 1 + maxItems: 4 + +required: + - compatible + - reg + - msi-controller + - interrupts + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,ls1046a-msi + then: + properties: + interrupts: + minItems: 4 + else: + properties: + interrupts: + maxItems: 1 + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + interrupt-controller@1571000 { + compatible = "fsl,ls1043a-msi"; + reg = <0x1571000 0x8>; + msi-controller; + interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; + };
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt deleted +0 -30
@@ -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>; - };
Signature · 1 line
2.34.1
Quoted 11 lines · Frank Li
Convert device tree binding fsl,ls-scfg-msi to yaml format.
Additional changes:
- Includegic.hand 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.
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml line 28
Quoted 9 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +9
-0+ +properties: + compatible: + enum: + - fsl,ls1021a-msi + - fsl,ls1043a-msi + - fsl,ls1046a-msi + - fsl,ls1043a-v1.1-msi + - fsl,ls1012a-msi
Keep the list ordered alpha-numerically.
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml line 33
Quoted 5 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +5
-0+ + reg: + maxItems: 1 + + msi-controller: true
No msi-cells?
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml line 37
Quoted 4 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +4
-0+ + interrupts: + minItems: 1 + maxItems: 4
Please describe the interrupts (items: - description: ...)
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml line 45
Quoted 8 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +8
-0+ +required: + - compatible + - reg + - msi-controller + - interrupts + +additionalProperties: false
This goes after allOf: block.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +allOf:
No $ref to msi-controller.yaml?
Quoted 4 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +4
-0+ - if: + properties: + compatible: + contains:
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml line 61
Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-msi.yaml new file +10
-0+ enum: + - fsl,ls1046a-msi + then: + properties: + interrupts: + minItems: 4 + else: + properties: + interrupts: + maxItems: 1
Best regards,
Krzysztof