xref: /freebsd/sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v5.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/interrupt-controller/arm,gic-v5.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: ARM Generic Interrupt Controller, version 5
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotmaintainers:
10*833e5d42SEmmanuel Vadot  - Lorenzo Pieralisi <lpieralisi@kernel.org>
11*833e5d42SEmmanuel Vadot  - Marc Zyngier <maz@kernel.org>
12*833e5d42SEmmanuel Vadot
13*833e5d42SEmmanuel Vadotdescription: |
14*833e5d42SEmmanuel Vadot  The GICv5 architecture defines the guidelines to implement GICv5
15*833e5d42SEmmanuel Vadot  compliant interrupt controllers for AArch64 systems.
16*833e5d42SEmmanuel Vadot
17*833e5d42SEmmanuel Vadot  The GICv5 specification can be found at
18*833e5d42SEmmanuel Vadot  https://developer.arm.com/documentation/aes0070
19*833e5d42SEmmanuel Vadot
20*833e5d42SEmmanuel Vadot  The GICv5 architecture is composed of multiple components:
21*833e5d42SEmmanuel Vadot    - one or more IRS (Interrupt Routing Service)
22*833e5d42SEmmanuel Vadot    - zero or more ITS (Interrupt Translation Service)
23*833e5d42SEmmanuel Vadot
24*833e5d42SEmmanuel Vadot  The architecture defines:
25*833e5d42SEmmanuel Vadot    - PE-Private Peripheral Interrupts (PPI)
26*833e5d42SEmmanuel Vadot    - Shared Peripheral Interrupts (SPI)
27*833e5d42SEmmanuel Vadot    - Logical Peripheral Interrupts (LPI)
28*833e5d42SEmmanuel Vadot
29*833e5d42SEmmanuel VadotallOf:
30*833e5d42SEmmanuel Vadot  - $ref: /schemas/interrupt-controller.yaml#
31*833e5d42SEmmanuel Vadot
32*833e5d42SEmmanuel Vadotproperties:
33*833e5d42SEmmanuel Vadot  compatible:
34*833e5d42SEmmanuel Vadot    const: arm,gic-v5
35*833e5d42SEmmanuel Vadot
36*833e5d42SEmmanuel Vadot  "#address-cells":
37*833e5d42SEmmanuel Vadot    enum: [ 1, 2 ]
38*833e5d42SEmmanuel Vadot
39*833e5d42SEmmanuel Vadot  "#size-cells":
40*833e5d42SEmmanuel Vadot    enum: [ 1, 2 ]
41*833e5d42SEmmanuel Vadot
42*833e5d42SEmmanuel Vadot  ranges: true
43*833e5d42SEmmanuel Vadot
44*833e5d42SEmmanuel Vadot  "#interrupt-cells":
45*833e5d42SEmmanuel Vadot    description: |
46*833e5d42SEmmanuel Vadot      The 1st cell corresponds to the INTID.Type field in the INTID; 1 for PPI,
47*833e5d42SEmmanuel Vadot      3 for SPI. LPI interrupts must not be described in the bindings since
48*833e5d42SEmmanuel Vadot      they are allocated dynamically by the software component managing them.
49*833e5d42SEmmanuel Vadot
50*833e5d42SEmmanuel Vadot      The 2nd cell contains the interrupt INTID.ID field.
51*833e5d42SEmmanuel Vadot
52*833e5d42SEmmanuel Vadot      The 3rd cell is the flags, encoded as follows:
53*833e5d42SEmmanuel Vadot      bits[3:0] trigger type and level flags.
54*833e5d42SEmmanuel Vadot
55*833e5d42SEmmanuel Vadot        1 = low-to-high edge triggered
56*833e5d42SEmmanuel Vadot        2 = high-to-low edge triggered
57*833e5d42SEmmanuel Vadot        4 = active high level-sensitive
58*833e5d42SEmmanuel Vadot        8 = active low level-sensitive
59*833e5d42SEmmanuel Vadot
60*833e5d42SEmmanuel Vadot    const: 3
61*833e5d42SEmmanuel Vadot
62*833e5d42SEmmanuel Vadot  interrupt-controller: true
63*833e5d42SEmmanuel Vadot
64*833e5d42SEmmanuel Vadot  interrupts:
65*833e5d42SEmmanuel Vadot    description:
66*833e5d42SEmmanuel Vadot      The VGIC maintenance interrupt.
67*833e5d42SEmmanuel Vadot    maxItems: 1
68*833e5d42SEmmanuel Vadot
69*833e5d42SEmmanuel Vadotrequired:
70*833e5d42SEmmanuel Vadot  - compatible
71*833e5d42SEmmanuel Vadot  - "#address-cells"
72*833e5d42SEmmanuel Vadot  - "#size-cells"
73*833e5d42SEmmanuel Vadot  - ranges
74*833e5d42SEmmanuel Vadot  - "#interrupt-cells"
75*833e5d42SEmmanuel Vadot  - interrupt-controller
76*833e5d42SEmmanuel Vadot
77*833e5d42SEmmanuel VadotpatternProperties:
78*833e5d42SEmmanuel Vadot  "^irs@[0-9a-f]+$":
79*833e5d42SEmmanuel Vadot    type: object
80*833e5d42SEmmanuel Vadot    description:
81*833e5d42SEmmanuel Vadot      GICv5 has one or more Interrupt Routing Services (IRS) that are
82*833e5d42SEmmanuel Vadot      responsible for handling IRQ state and routing.
83*833e5d42SEmmanuel Vadot
84*833e5d42SEmmanuel Vadot    additionalProperties: false
85*833e5d42SEmmanuel Vadot
86*833e5d42SEmmanuel Vadot    properties:
87*833e5d42SEmmanuel Vadot      compatible:
88*833e5d42SEmmanuel Vadot        const: arm,gic-v5-irs
89*833e5d42SEmmanuel Vadot
90*833e5d42SEmmanuel Vadot      reg:
91*833e5d42SEmmanuel Vadot        minItems: 1
92*833e5d42SEmmanuel Vadot        items:
93*833e5d42SEmmanuel Vadot          - description: IRS config frames
94*833e5d42SEmmanuel Vadot          - description: IRS setlpi frames
95*833e5d42SEmmanuel Vadot
96*833e5d42SEmmanuel Vadot      reg-names:
97*833e5d42SEmmanuel Vadot        description:
98*833e5d42SEmmanuel Vadot          Describe config and setlpi frames that are present.
99*833e5d42SEmmanuel Vadot          "ns-" stands for non-secure, "s-" for secure, "realm-" for realm
100*833e5d42SEmmanuel Vadot          and "el3-" for EL3.
101*833e5d42SEmmanuel Vadot        minItems: 1
102*833e5d42SEmmanuel Vadot        maxItems: 8
103*833e5d42SEmmanuel Vadot        items:
104*833e5d42SEmmanuel Vadot          enum: [ ns-config, s-config, realm-config, el3-config, ns-setlpi,
105*833e5d42SEmmanuel Vadot                  s-setlpi, realm-setlpi, el3-setlpi ]
106*833e5d42SEmmanuel Vadot
107*833e5d42SEmmanuel Vadot      "#address-cells":
108*833e5d42SEmmanuel Vadot        enum: [ 1, 2 ]
109*833e5d42SEmmanuel Vadot
110*833e5d42SEmmanuel Vadot      "#size-cells":
111*833e5d42SEmmanuel Vadot        enum: [ 1, 2 ]
112*833e5d42SEmmanuel Vadot
113*833e5d42SEmmanuel Vadot      ranges: true
114*833e5d42SEmmanuel Vadot
115*833e5d42SEmmanuel Vadot      dma-noncoherent:
116*833e5d42SEmmanuel Vadot        description:
117*833e5d42SEmmanuel Vadot          Present if the GIC IRS permits programming shareability and
118*833e5d42SEmmanuel Vadot          cacheability attributes but is connected to a non-coherent
119*833e5d42SEmmanuel Vadot          downstream interconnect.
120*833e5d42SEmmanuel Vadot
121*833e5d42SEmmanuel Vadot      cpus:
122*833e5d42SEmmanuel Vadot        description:
123*833e5d42SEmmanuel Vadot          CPUs managed by the IRS.
124*833e5d42SEmmanuel Vadot
125*833e5d42SEmmanuel Vadot      arm,iaffids:
126*833e5d42SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint16-array
127*833e5d42SEmmanuel Vadot        description:
128*833e5d42SEmmanuel Vadot          Interrupt AFFinity ID (IAFFID) associated with the CPU whose
129*833e5d42SEmmanuel Vadot          CPU node phandle is at the same index in the cpus array.
130*833e5d42SEmmanuel Vadot
131*833e5d42SEmmanuel Vadot    patternProperties:
132*833e5d42SEmmanuel Vadot      "^its@[0-9a-f]+$":
133*833e5d42SEmmanuel Vadot        type: object
134*833e5d42SEmmanuel Vadot        description:
135*833e5d42SEmmanuel Vadot          GICv5 has zero or more Interrupt Translation Services (ITS) that are
136*833e5d42SEmmanuel Vadot          used to route Message Signalled Interrupts (MSI) to the CPUs. Each
137*833e5d42SEmmanuel Vadot          ITS is connected to an IRS.
138*833e5d42SEmmanuel Vadot        additionalProperties: false
139*833e5d42SEmmanuel Vadot
140*833e5d42SEmmanuel Vadot        properties:
141*833e5d42SEmmanuel Vadot          compatible:
142*833e5d42SEmmanuel Vadot            const: arm,gic-v5-its
143*833e5d42SEmmanuel Vadot
144*833e5d42SEmmanuel Vadot          reg:
145*833e5d42SEmmanuel Vadot            items:
146*833e5d42SEmmanuel Vadot              - description: ITS config frames
147*833e5d42SEmmanuel Vadot
148*833e5d42SEmmanuel Vadot          reg-names:
149*833e5d42SEmmanuel Vadot            description:
150*833e5d42SEmmanuel Vadot              Describe config frames that are present.
151*833e5d42SEmmanuel Vadot              "ns-" stands for non-secure, "s-" for secure, "realm-" for realm
152*833e5d42SEmmanuel Vadot              and "el3-" for EL3.
153*833e5d42SEmmanuel Vadot            minItems: 1
154*833e5d42SEmmanuel Vadot            maxItems: 4
155*833e5d42SEmmanuel Vadot            items:
156*833e5d42SEmmanuel Vadot              enum: [ ns-config, s-config, realm-config, el3-config ]
157*833e5d42SEmmanuel Vadot
158*833e5d42SEmmanuel Vadot          "#address-cells":
159*833e5d42SEmmanuel Vadot            enum: [ 1, 2 ]
160*833e5d42SEmmanuel Vadot
161*833e5d42SEmmanuel Vadot          "#size-cells":
162*833e5d42SEmmanuel Vadot            enum: [ 1, 2 ]
163*833e5d42SEmmanuel Vadot
164*833e5d42SEmmanuel Vadot          ranges: true
165*833e5d42SEmmanuel Vadot
166*833e5d42SEmmanuel Vadot          dma-noncoherent:
167*833e5d42SEmmanuel Vadot            description:
168*833e5d42SEmmanuel Vadot              Present if the GIC ITS permits programming shareability and
169*833e5d42SEmmanuel Vadot              cacheability attributes but is connected to a non-coherent
170*833e5d42SEmmanuel Vadot              downstream interconnect.
171*833e5d42SEmmanuel Vadot
172*833e5d42SEmmanuel Vadot        patternProperties:
173*833e5d42SEmmanuel Vadot          "^msi-controller@[0-9a-f]+$":
174*833e5d42SEmmanuel Vadot            type: object
175*833e5d42SEmmanuel Vadot            description:
176*833e5d42SEmmanuel Vadot              GICv5 ITS has one or more translate register frames.
177*833e5d42SEmmanuel Vadot            additionalProperties: false
178*833e5d42SEmmanuel Vadot
179*833e5d42SEmmanuel Vadot            properties:
180*833e5d42SEmmanuel Vadot              reg:
181*833e5d42SEmmanuel Vadot                items:
182*833e5d42SEmmanuel Vadot                  - description: ITS translate frames
183*833e5d42SEmmanuel Vadot
184*833e5d42SEmmanuel Vadot              reg-names:
185*833e5d42SEmmanuel Vadot                description:
186*833e5d42SEmmanuel Vadot                  Describe translate frames that are present.
187*833e5d42SEmmanuel Vadot                  "ns-" stands for non-secure, "s-" for secure, "realm-" for realm
188*833e5d42SEmmanuel Vadot                  and "el3-" for EL3.
189*833e5d42SEmmanuel Vadot                minItems: 1
190*833e5d42SEmmanuel Vadot                maxItems: 4
191*833e5d42SEmmanuel Vadot                items:
192*833e5d42SEmmanuel Vadot                  enum: [ ns-translate, s-translate, realm-translate, el3-translate ]
193*833e5d42SEmmanuel Vadot
194*833e5d42SEmmanuel Vadot              "#msi-cells":
195*833e5d42SEmmanuel Vadot                description:
196*833e5d42SEmmanuel Vadot                  The single msi-cell is the DeviceID of the device which will
197*833e5d42SEmmanuel Vadot                  generate the MSI.
198*833e5d42SEmmanuel Vadot                const: 1
199*833e5d42SEmmanuel Vadot
200*833e5d42SEmmanuel Vadot              msi-controller: true
201*833e5d42SEmmanuel Vadot
202*833e5d42SEmmanuel Vadot            required:
203*833e5d42SEmmanuel Vadot              - reg
204*833e5d42SEmmanuel Vadot              - reg-names
205*833e5d42SEmmanuel Vadot              - "#msi-cells"
206*833e5d42SEmmanuel Vadot              - msi-controller
207*833e5d42SEmmanuel Vadot
208*833e5d42SEmmanuel Vadot        required:
209*833e5d42SEmmanuel Vadot          - compatible
210*833e5d42SEmmanuel Vadot          - reg
211*833e5d42SEmmanuel Vadot          - reg-names
212*833e5d42SEmmanuel Vadot
213*833e5d42SEmmanuel Vadot    required:
214*833e5d42SEmmanuel Vadot      - compatible
215*833e5d42SEmmanuel Vadot      - reg
216*833e5d42SEmmanuel Vadot      - reg-names
217*833e5d42SEmmanuel Vadot      - cpus
218*833e5d42SEmmanuel Vadot      - arm,iaffids
219*833e5d42SEmmanuel Vadot
220*833e5d42SEmmanuel VadotadditionalProperties: false
221*833e5d42SEmmanuel Vadot
222*833e5d42SEmmanuel Vadotexamples:
223*833e5d42SEmmanuel Vadot  - |
224*833e5d42SEmmanuel Vadot    interrupt-controller {
225*833e5d42SEmmanuel Vadot      compatible = "arm,gic-v5";
226*833e5d42SEmmanuel Vadot
227*833e5d42SEmmanuel Vadot      #interrupt-cells = <3>;
228*833e5d42SEmmanuel Vadot      interrupt-controller;
229*833e5d42SEmmanuel Vadot
230*833e5d42SEmmanuel Vadot      #address-cells = <1>;
231*833e5d42SEmmanuel Vadot      #size-cells = <1>;
232*833e5d42SEmmanuel Vadot      ranges;
233*833e5d42SEmmanuel Vadot
234*833e5d42SEmmanuel Vadot      interrupts = <1 25 4>;
235*833e5d42SEmmanuel Vadot
236*833e5d42SEmmanuel Vadot      irs@2f1a0000 {
237*833e5d42SEmmanuel Vadot        compatible = "arm,gic-v5-irs";
238*833e5d42SEmmanuel Vadot        reg = <0x2f1a0000 0x10000>;  // IRS_CONFIG_FRAME
239*833e5d42SEmmanuel Vadot        reg-names = "ns-config";
240*833e5d42SEmmanuel Vadot
241*833e5d42SEmmanuel Vadot        #address-cells = <1>;
242*833e5d42SEmmanuel Vadot        #size-cells = <1>;
243*833e5d42SEmmanuel Vadot        ranges;
244*833e5d42SEmmanuel Vadot
245*833e5d42SEmmanuel Vadot        cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>, <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
246*833e5d42SEmmanuel Vadot        arm,iaffids = /bits/ 16 <0 1 2 3 4 5 6 7>;
247*833e5d42SEmmanuel Vadot
248*833e5d42SEmmanuel Vadot        its@2f120000 {
249*833e5d42SEmmanuel Vadot          compatible = "arm,gic-v5-its";
250*833e5d42SEmmanuel Vadot          reg = <0x2f120000 0x10000>;   // ITS_CONFIG_FRAME
251*833e5d42SEmmanuel Vadot          reg-names = "ns-config";
252*833e5d42SEmmanuel Vadot
253*833e5d42SEmmanuel Vadot          #address-cells = <1>;
254*833e5d42SEmmanuel Vadot          #size-cells = <1>;
255*833e5d42SEmmanuel Vadot          ranges;
256*833e5d42SEmmanuel Vadot
257*833e5d42SEmmanuel Vadot          msi-controller@2f130000 {
258*833e5d42SEmmanuel Vadot            reg = <0x2f130000 0x10000>;   // ITS_TRANSLATE_FRAME
259*833e5d42SEmmanuel Vadot            reg-names = "ns-translate";
260*833e5d42SEmmanuel Vadot
261*833e5d42SEmmanuel Vadot            #msi-cells = <1>;
262*833e5d42SEmmanuel Vadot            msi-controller;
263*833e5d42SEmmanuel Vadot          };
264*833e5d42SEmmanuel Vadot        };
265*833e5d42SEmmanuel Vadot      };
266*833e5d42SEmmanuel Vadot    };
267*833e5d42SEmmanuel Vadot...
268