Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: interrupt-controller: fsl,ls-extirq: convert to YAML

Convert the fsl,ls-extirq binding to the new YAML format.

In contrast to the original binding documentation, there are three
compatibles which are used in their corresponding device trees which
have a specific compatible and the (already documented) fallback
compatible:
- "fsl,ls1046a-extirq", "fsl,ls1043a-extirq"
- "fsl,ls2080a-extirq", "fsl,ls1088a-extirq"
- "fsl,lx2160a-extirq", "fsl,ls1088a-extirq"

Depending on the number of the number of the external IRQs which is
usually 12 except for the LS1021A where there are only 6, the
interrupt-map-mask was reduced from 0xffffffff to 0xf and 0x7
respectively and the number of interrupt-map entries have to
match.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220427075338.1156449-4-michael@walle.cc

authored by

Michael Walle and committed by
Rob Herring
0037c30a 4ae547ce

+118 -53
-53
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.txt
··· 1 - * Freescale Layerscape external IRQs 2 - 3 - Some Layerscape SOCs (LS1021A, LS1043A, LS1046A 4 - LS1088A, LS208xA, LX216xA) support inverting 5 - the polarity of certain external interrupt lines. 6 - 7 - The device node must be a child of the node representing the 8 - Supplemental Configuration Unit (SCFG). 9 - 10 - Required properties: 11 - - compatible: should be "fsl,<soc-name>-extirq", e.g. "fsl,ls1021a-extirq". 12 - "fsl,ls1043a-extirq": for LS1043A, LS1046A. 13 - "fsl,ls1088a-extirq": for LS1088A, LS208xA, LX216xA. 14 - - #interrupt-cells: Must be 2. The first element is the index of the 15 - external interrupt line. The second element is the trigger type. 16 - - #address-cells: Must be 0. 17 - - interrupt-controller: Identifies the node as an interrupt controller 18 - - reg: Specifies the Interrupt Polarity Control Register (INTPCR) in 19 - the SCFG or the External Interrupt Control Register (IRQCR) in 20 - the ISC. 21 - - interrupt-map: Specifies the mapping from external interrupts to GIC 22 - interrupts. 23 - - interrupt-map-mask: Must be <0xffffffff 0>. 24 - 25 - Example: 26 - scfg: scfg@1570000 { 27 - compatible = "fsl,ls1021a-scfg", "syscon"; 28 - reg = <0x0 0x1570000 0x0 0x10000>; 29 - big-endian; 30 - #address-cells = <1>; 31 - #size-cells = <1>; 32 - ranges = <0x0 0x0 0x1570000 0x10000>; 33 - 34 - extirq: interrupt-controller@1ac { 35 - compatible = "fsl,ls1021a-extirq"; 36 - #interrupt-cells = <2>; 37 - #address-cells = <0>; 38 - interrupt-controller; 39 - reg = <0x1ac 4>; 40 - interrupt-map = 41 - <0 0 &gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>, 42 - <1 0 &gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>, 43 - <2 0 &gic GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>, 44 - <3 0 &gic GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>, 45 - <4 0 &gic GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>, 46 - <5 0 &gic GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>; 47 - interrupt-map-mask = <0xffffffff 0x0>; 48 - }; 49 - }; 50 - 51 - 52 - interrupts-extended = <&gic GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>, 53 - <&extirq 1 IRQ_TYPE_LEVEL_LOW>;
+118
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/interrupt-controller/fsl,ls-extirq.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale Layerscape External Interrupt Controller 8 + 9 + maintainers: 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Li Yang <leoyang.li@nxp.com> 12 + 13 + description: | 14 + Some Layerscape SOCs (LS1021A, LS1043A, LS1046A LS1088A, LS208xA, 15 + LX216xA) support inverting the polarity of certain external interrupt 16 + lines. 17 + 18 + properties: 19 + compatible: 20 + oneOf: 21 + - enum: 22 + - fsl,ls1021a-extirq 23 + - fsl,ls1043a-extirq 24 + - fsl,ls1088a-extirq 25 + - items: 26 + - enum: 27 + - fsl,ls1046a-extirq 28 + - const: fsl,ls1043a-extirq 29 + - items: 30 + - enum: 31 + - fsl,ls2080a-extirq 32 + - fsl,lx2160a-extirq 33 + - const: fsl,ls1088a-extirq 34 + 35 + '#interrupt-cells': 36 + const: 2 37 + 38 + '#address-cells': 39 + const: 0 40 + 41 + interrupt-controller: true 42 + 43 + reg: 44 + maxItems: 1 45 + description: 46 + Specifies the Interrupt Polarity Control Register (INTPCR) in the 47 + SCFG or the External Interrupt Control Register (IRQCR) in the ISC. 48 + 49 + interrupt-map: 50 + description: Specifies the mapping from external interrupts to GIC interrupts. 51 + 52 + interrupt-map-mask: true 53 + 54 + required: 55 + - compatible 56 + - '#interrupt-cells' 57 + - '#address-cells' 58 + - interrupt-controller 59 + - reg 60 + - interrupt-map 61 + - interrupt-map-mask 62 + 63 + allOf: 64 + - if: 65 + properties: 66 + compatible: 67 + contains: 68 + enum: 69 + - fsl,ls1021a-extirq 70 + then: 71 + properties: 72 + interrupt-map: 73 + minItems: 6 74 + maxItems: 6 75 + interrupt-map-mask: 76 + items: 77 + - const: 0x7 78 + - const: 0 79 + - if: 80 + properties: 81 + compatible: 82 + contains: 83 + enum: 84 + - fsl,ls1043a-extirq 85 + - fsl,ls1046a-extirq 86 + - fsl,ls1088a-extirq 87 + - fsl,ls2080a-extirq 88 + - fsl,lx2160a-extirq 89 + then: 90 + properties: 91 + interrupt-map: 92 + minItems: 12 93 + maxItems: 12 94 + interrupt-map-mask: 95 + items: 96 + - const: 0xf 97 + - const: 0 98 + 99 + additionalProperties: false 100 + 101 + examples: 102 + - | 103 + #include <dt-bindings/interrupt-controller/arm-gic.h> 104 + interrupt-controller@1ac { 105 + compatible = "fsl,ls1021a-extirq"; 106 + #interrupt-cells = <2>; 107 + #address-cells = <0>; 108 + interrupt-controller; 109 + reg = <0x1ac 4>; 110 + interrupt-map = 111 + <0 0 &gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>, 112 + <1 0 &gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>, 113 + <2 0 &gic GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>, 114 + <3 0 &gic GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>, 115 + <4 0 &gic GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>, 116 + <5 0 &gic GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>; 117 + interrupt-map-mask = <0x7 0x0>; 118 + };