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

dt-bindings: interrupt-controller: Convert mrvl,intc to json-schema

Convert the mrvl,intc binding to DT schema format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20200616223353.993567-4-lkundrak@v3.sk
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Lubomir Rintel and committed by
Rob Herring
c1cd67d2 ecb11b2c

+134 -64
-64
Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
··· 1 - * Marvell MMP Interrupt controller 2 - 3 - Required properties: 4 - - compatible : Should be 5 - "mrvl,mmp-intc" on Marvel MMP, 6 - "mrvl,mmp2-intc" along with "mrvl,mmp2-mux-intc" on MMP2 or 7 - "marvell,mmp3-intc" with "mrvl,mmp2-mux-intc" on MMP3 8 - - reg : Address and length of the register set of the interrupt controller. 9 - If the interrupt controller is intc, address and length means the range 10 - of the whole interrupt controller. The "marvell,mmp3-intc" controller 11 - also has a secondary range for the second CPU core. If the interrupt 12 - controller is mux-intc, address and length means one register. Since 13 - address of mux-intc is in the range of intc. mux-intc is secondary 14 - interrupt controller. 15 - - reg-names : Name of the register set of the interrupt controller. It's 16 - only required in mux-intc interrupt controller. 17 - - interrupts : Should be the port interrupt shared by mux interrupts. It's 18 - only required in mux-intc interrupt controller. 19 - - interrupt-controller : Identifies the node as an interrupt controller. 20 - - #interrupt-cells : Specifies the number of cells needed to encode an 21 - interrupt source. 22 - - mrvl,intc-nr-irqs : Specifies the number of interrupts in the interrupt 23 - controller. 24 - - mrvl,clr-mfp-irq : Specifies the interrupt that needs to clear MFP edge 25 - detection first. 26 - 27 - Example: 28 - intc: interrupt-controller@d4282000 { 29 - compatible = "mrvl,mmp2-intc"; 30 - interrupt-controller; 31 - #interrupt-cells = <1>; 32 - reg = <0xd4282000 0x1000>; 33 - mrvl,intc-nr-irqs = <64>; 34 - }; 35 - 36 - intcmux4@d4282150 { 37 - compatible = "mrvl,mmp2-mux-intc"; 38 - interrupts = <4>; 39 - interrupt-controller; 40 - #interrupt-cells = <1>; 41 - reg = <0x150 0x4>, <0x168 0x4>; 42 - reg-names = "mux status", "mux mask"; 43 - mrvl,intc-nr-irqs = <2>; 44 - }; 45 - 46 - * Marvell Orion Interrupt controller 47 - 48 - Required properties 49 - - compatible : Should be "marvell,orion-intc". 50 - - #interrupt-cells: Specifies the number of cells needed to encode an 51 - interrupt source. Supported value is <1>. 52 - - interrupt-controller : Declare this node to be an interrupt controller. 53 - - reg : Interrupt mask address. A list of 4 byte ranges, one per controller. 54 - One entry in the list represents 32 interrupts. 55 - 56 - Example: 57 - 58 - intc: interrupt-controller { 59 - compatible = "marvell,orion-intc", "marvell,intc"; 60 - interrupt-controller; 61 - #interrupt-cells = <1>; 62 - reg = <0xfed20204 0x04>, 63 - <0xfed20214 0x04>; 64 - };
+134
Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/interrupt-controller/mrvl,intc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell MMP/Orion Interrupt controller bindings 8 + 9 + maintainers: 10 + - Thomas Gleixner <tglx@linutronix.de> 11 + - Jason Cooper <jason@lakedaemon.net> 12 + - Marc Zyngier <maz@kernel.org> 13 + - Rob Herring <robh+dt@kernel.org> 14 + 15 + allOf: 16 + - if: 17 + properties: 18 + compatible: 19 + not: 20 + contains: 21 + const: marvell,orion-intc 22 + then: 23 + required: 24 + - mrvl,intc-nr-irqs 25 + - if: 26 + properties: 27 + compatible: 28 + contains: 29 + enum: 30 + - mrvl,mmp-intc 31 + - mrvl,mmp2-intc 32 + then: 33 + properties: 34 + reg: 35 + maxItems: 1 36 + - if: 37 + properties: 38 + compatible: 39 + contains: 40 + enum: 41 + - marvell,mmp3-intc 42 + - mrvl,mmp2-mux-intc 43 + then: 44 + properties: 45 + reg: 46 + minItems: 2 47 + - if: 48 + properties: 49 + compatible: 50 + contains: 51 + const: mrvl,mmp2-mux-intc 52 + then: 53 + properties: 54 + interrupts: 55 + maxItems: 1 56 + reg-names: 57 + items: 58 + - const: 'mux status' 59 + - const: 'mux mask' 60 + required: 61 + - interrupts 62 + else: 63 + properties: 64 + interrupts: false 65 + 66 + properties: 67 + '#interrupt-cells': 68 + const: 1 69 + 70 + compatible: 71 + enum: 72 + - mrvl,mmp-intc 73 + - mrvl,mmp2-intc 74 + - marvell,mmp3-intc 75 + - marvell,orion-intc 76 + - mrvl,mmp2-mux-intc 77 + 78 + reg: 79 + minItems: 1 80 + maxItems: 2 81 + 82 + reg-names: true 83 + 84 + interrupts: true 85 + 86 + interrupt-controller: true 87 + 88 + mrvl,intc-nr-irqs: 89 + description: | 90 + Specifies the number of interrupts in the interrupt controller. 91 + $ref: /schemas/types.yaml#/definitions/uint32 92 + 93 + mrvl,clr-mfp-irq: 94 + description: | 95 + Specifies the interrupt that needs to clear MFP edge detection first. 96 + $ref: /schemas/types.yaml#/definitions/uint32 97 + 98 + required: 99 + - '#interrupt-cells' 100 + - compatible 101 + - reg 102 + - interrupt-controller 103 + 104 + additionalProperties: false 105 + 106 + examples: 107 + - | 108 + interrupt-controller@d4282000 { 109 + compatible = "mrvl,mmp2-intc"; 110 + interrupt-controller; 111 + #interrupt-cells = <1>; 112 + reg = <0xd4282000 0x1000>; 113 + mrvl,intc-nr-irqs = <64>; 114 + }; 115 + 116 + interrupt-controller@d4282150 { 117 + compatible = "mrvl,mmp2-mux-intc"; 118 + interrupts = <4>; 119 + interrupt-controller; 120 + #interrupt-cells = <1>; 121 + reg = <0x150 0x4>, <0x168 0x4>; 122 + reg-names = "mux status", "mux mask"; 123 + mrvl,intc-nr-irqs = <2>; 124 + }; 125 + - | 126 + interrupt-controller@fed20204 { 127 + compatible = "marvell,orion-intc"; 128 + interrupt-controller; 129 + #interrupt-cells = <1>; 130 + reg = <0xfed20204 0x04>, 131 + <0xfed20214 0x04>; 132 + }; 133 + 134 + ...