1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/interrupt-controller/arm,gic-v3.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: ARM Generic Interrupt Controller, version 3 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Marc Zyngier <marc.zyngier@arm.com> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: | 13*4882a593Smuzhiyun AArch64 SMP cores are often associated with a GICv3, providing Private 14*4882a593Smuzhiyun Peripheral Interrupts (PPI), Shared Peripheral Interrupts (SPI), 15*4882a593Smuzhiyun Software Generated Interrupts (SGI), and Locality-specific Peripheral 16*4882a593Smuzhiyun Interrupts (LPI). 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunallOf: 19*4882a593Smuzhiyun - $ref: /schemas/interrupt-controller.yaml# 20*4882a593Smuzhiyun 21*4882a593Smuzhiyunproperties: 22*4882a593Smuzhiyun compatible: 23*4882a593Smuzhiyun oneOf: 24*4882a593Smuzhiyun - items: 25*4882a593Smuzhiyun - enum: 26*4882a593Smuzhiyun - qcom,msm8996-gic-v3 27*4882a593Smuzhiyun - const: arm,gic-v3 28*4882a593Smuzhiyun - const: arm,gic-v3 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun interrupt-controller: true 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun "#address-cells": 33*4882a593Smuzhiyun enum: [ 0, 1, 2 ] 34*4882a593Smuzhiyun "#size-cells": 35*4882a593Smuzhiyun enum: [ 1, 2 ] 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun ranges: true 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun "#interrupt-cells": 40*4882a593Smuzhiyun description: | 41*4882a593Smuzhiyun Specifies the number of cells needed to encode an interrupt source. 42*4882a593Smuzhiyun Must be a single cell with a value of at least 3. 43*4882a593Smuzhiyun If the system requires describing PPI affinity, then the value must 44*4882a593Smuzhiyun be at least 4. 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI 47*4882a593Smuzhiyun interrupts, 2 for interrupts in the Extended SPI range, 3 for the 48*4882a593Smuzhiyun Extended PPI range. Other values are reserved for future use. 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun The 2nd cell contains the interrupt number for the interrupt type. 51*4882a593Smuzhiyun SPI interrupts are in the range [0-987]. PPI interrupts are in the 52*4882a593Smuzhiyun range [0-15]. Extented SPI interrupts are in the range [0-1023]. 53*4882a593Smuzhiyun Extended PPI interrupts are in the range [0-127]. 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun The 3rd cell is the flags, encoded as follows: 56*4882a593Smuzhiyun bits[3:0] trigger type and level flags. 57*4882a593Smuzhiyun 1 = edge triggered 58*4882a593Smuzhiyun 4 = level triggered 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun The 4th cell is a phandle to a node describing a set of CPUs this 61*4882a593Smuzhiyun interrupt is affine to. The interrupt must be a PPI, and the node 62*4882a593Smuzhiyun pointed must be a subnode of the "ppi-partitions" subnode. For 63*4882a593Smuzhiyun interrupt types other than PPI or PPIs that are not partitionned, 64*4882a593Smuzhiyun this cell must be zero. See the "ppi-partitions" node description 65*4882a593Smuzhiyun below. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun Cells 5 and beyond are reserved for future use and must have a value 68*4882a593Smuzhiyun of 0 if present. 69*4882a593Smuzhiyun enum: [ 3, 4 ] 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun reg: 72*4882a593Smuzhiyun description: | 73*4882a593Smuzhiyun Specifies base physical address(s) and size of the GIC 74*4882a593Smuzhiyun registers, in the following order: 75*4882a593Smuzhiyun - GIC Distributor interface (GICD) 76*4882a593Smuzhiyun - GIC Redistributors (GICR), one range per redistributor region 77*4882a593Smuzhiyun - GIC CPU interface (GICC) 78*4882a593Smuzhiyun - GIC Hypervisor interface (GICH) 79*4882a593Smuzhiyun - GIC Virtual CPU interface (GICV) 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun GICC, GICH and GICV are optional. 82*4882a593Smuzhiyun minItems: 2 83*4882a593Smuzhiyun maxItems: 4096 # Should be enough? 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun interrupts: 86*4882a593Smuzhiyun description: 87*4882a593Smuzhiyun Interrupt source of the VGIC maintenance interrupt. 88*4882a593Smuzhiyun maxItems: 1 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun redistributor-stride: 91*4882a593Smuzhiyun description: 92*4882a593Smuzhiyun If using padding pages, specifies the stride of consecutive 93*4882a593Smuzhiyun redistributors. Must be a multiple of 64kB. 94*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint64 95*4882a593Smuzhiyun multipleOf: 0x10000 96*4882a593Smuzhiyun exclusiveMinimum: 0 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun "#redistributor-regions": 99*4882a593Smuzhiyun description: 100*4882a593Smuzhiyun The number of independent contiguous regions occupied by the 101*4882a593Smuzhiyun redistributors. Required if more than one such region is present. 102*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 103*4882a593Smuzhiyun maximum: 4096 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun msi-controller: 106*4882a593Smuzhiyun description: 107*4882a593Smuzhiyun Only present if the Message Based Interrupt functionnality is 108*4882a593Smuzhiyun being exposed by the HW, and the mbi-ranges property present. 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun mbi-ranges: 111*4882a593Smuzhiyun description: 112*4882a593Smuzhiyun A list of pairs <intid span>, where "intid" is the first SPI of a range 113*4882a593Smuzhiyun that can be used an MBI, and "span" the size of that range. Multiple 114*4882a593Smuzhiyun ranges can be provided. 115*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-matrix 116*4882a593Smuzhiyun items: 117*4882a593Smuzhiyun minItems: 2 118*4882a593Smuzhiyun maxItems: 2 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun mbi-alias: 121*4882a593Smuzhiyun description: 122*4882a593Smuzhiyun Address property. Base address of an alias of the GICD region containing 123*4882a593Smuzhiyun only the {SET,CLR}SPI registers to be used if isolation is required, 124*4882a593Smuzhiyun and if supported by the HW. 125*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 126*4882a593Smuzhiyun items: 127*4882a593Smuzhiyun minItems: 1 128*4882a593Smuzhiyun maxItems: 2 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun ppi-partitions: 131*4882a593Smuzhiyun type: object 132*4882a593Smuzhiyun description: 133*4882a593Smuzhiyun PPI affinity can be expressed as a single "ppi-partitions" node, 134*4882a593Smuzhiyun containing a set of sub-nodes. 135*4882a593Smuzhiyun patternProperties: 136*4882a593Smuzhiyun "^interrupt-partition-[0-9]+$": 137*4882a593Smuzhiyun type: object 138*4882a593Smuzhiyun properties: 139*4882a593Smuzhiyun affinity: 140*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/phandle-array 141*4882a593Smuzhiyun description: 142*4882a593Smuzhiyun Should be a list of phandles to CPU nodes (as described in 143*4882a593Smuzhiyun Documentation/devicetree/bindings/arm/cpus.yaml). 144*4882a593Smuzhiyun 145*4882a593Smuzhiyun required: 146*4882a593Smuzhiyun - affinity 147*4882a593Smuzhiyun 148*4882a593Smuzhiyundependencies: 149*4882a593Smuzhiyun mbi-ranges: [ msi-controller ] 150*4882a593Smuzhiyun msi-controller: [ mbi-ranges ] 151*4882a593Smuzhiyun 152*4882a593Smuzhiyunrequired: 153*4882a593Smuzhiyun - compatible 154*4882a593Smuzhiyun - interrupts 155*4882a593Smuzhiyun - reg 156*4882a593Smuzhiyun 157*4882a593SmuzhiyunpatternProperties: 158*4882a593Smuzhiyun "^gic-its@": false 159*4882a593Smuzhiyun "^interrupt-controller@[0-9a-f]+$": false 160*4882a593Smuzhiyun # msi-controller is preferred, but allow other names 161*4882a593Smuzhiyun "^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$": 162*4882a593Smuzhiyun type: object 163*4882a593Smuzhiyun description: 164*4882a593Smuzhiyun GICv3 has one or more Interrupt Translation Services (ITS) that are 165*4882a593Smuzhiyun used to route Message Signalled Interrupts (MSI) to the CPUs. 166*4882a593Smuzhiyun properties: 167*4882a593Smuzhiyun compatible: 168*4882a593Smuzhiyun const: arm,gic-v3-its 169*4882a593Smuzhiyun 170*4882a593Smuzhiyun msi-controller: true 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun "#msi-cells": 173*4882a593Smuzhiyun description: 174*4882a593Smuzhiyun The single msi-cell is the DeviceID of the device which will generate 175*4882a593Smuzhiyun the MSI. 176*4882a593Smuzhiyun const: 1 177*4882a593Smuzhiyun 178*4882a593Smuzhiyun reg: 179*4882a593Smuzhiyun description: 180*4882a593Smuzhiyun Specifies the base physical address and size of the ITS registers. 181*4882a593Smuzhiyun maxItems: 1 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun socionext,synquacer-pre-its: 184*4882a593Smuzhiyun description: 185*4882a593Smuzhiyun (u32, u32) tuple describing the untranslated 186*4882a593Smuzhiyun address and size of the pre-ITS window. 187*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 188*4882a593Smuzhiyun items: 189*4882a593Smuzhiyun minItems: 2 190*4882a593Smuzhiyun maxItems: 2 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun required: 193*4882a593Smuzhiyun - compatible 194*4882a593Smuzhiyun - msi-controller 195*4882a593Smuzhiyun - "#msi-cells" 196*4882a593Smuzhiyun - reg 197*4882a593Smuzhiyun 198*4882a593Smuzhiyun additionalProperties: false 199*4882a593Smuzhiyun 200*4882a593SmuzhiyunadditionalProperties: false 201*4882a593Smuzhiyun 202*4882a593Smuzhiyunexamples: 203*4882a593Smuzhiyun - | 204*4882a593Smuzhiyun gic: interrupt-controller@2cf00000 { 205*4882a593Smuzhiyun compatible = "arm,gic-v3"; 206*4882a593Smuzhiyun #interrupt-cells = <3>; 207*4882a593Smuzhiyun #address-cells = <1>; 208*4882a593Smuzhiyun #size-cells = <1>; 209*4882a593Smuzhiyun ranges; 210*4882a593Smuzhiyun interrupt-controller; 211*4882a593Smuzhiyun reg = <0x2f000000 0x10000>, // GICD 212*4882a593Smuzhiyun <0x2f100000 0x200000>, // GICR 213*4882a593Smuzhiyun <0x2c000000 0x2000>, // GICC 214*4882a593Smuzhiyun <0x2c010000 0x2000>, // GICH 215*4882a593Smuzhiyun <0x2c020000 0x2000>; // GICV 216*4882a593Smuzhiyun interrupts = <1 9 4>; 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun msi-controller; 219*4882a593Smuzhiyun mbi-ranges = <256 128>; 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun msi-controller@2c200000 { 222*4882a593Smuzhiyun compatible = "arm,gic-v3-its"; 223*4882a593Smuzhiyun msi-controller; 224*4882a593Smuzhiyun #msi-cells = <1>; 225*4882a593Smuzhiyun reg = <0x2c200000 0x20000>; 226*4882a593Smuzhiyun }; 227*4882a593Smuzhiyun }; 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun interrupt-controller@2c010000 { 230*4882a593Smuzhiyun compatible = "arm,gic-v3"; 231*4882a593Smuzhiyun #interrupt-cells = <4>; 232*4882a593Smuzhiyun #address-cells = <1>; 233*4882a593Smuzhiyun #size-cells = <1>; 234*4882a593Smuzhiyun ranges; 235*4882a593Smuzhiyun interrupt-controller; 236*4882a593Smuzhiyun redistributor-stride = <0x0 0x40000>; // 256kB stride 237*4882a593Smuzhiyun #redistributor-regions = <2>; 238*4882a593Smuzhiyun reg = <0x2c010000 0x10000>, // GICD 239*4882a593Smuzhiyun <0x2d000000 0x800000>, // GICR 1: CPUs 0-31 240*4882a593Smuzhiyun <0x2e000000 0x800000>, // GICR 2: CPUs 32-63 241*4882a593Smuzhiyun <0x2c040000 0x2000>, // GICC 242*4882a593Smuzhiyun <0x2c060000 0x2000>, // GICH 243*4882a593Smuzhiyun <0x2c080000 0x2000>; // GICV 244*4882a593Smuzhiyun interrupts = <1 9 4>; 245*4882a593Smuzhiyun 246*4882a593Smuzhiyun msi-controller@2c200000 { 247*4882a593Smuzhiyun compatible = "arm,gic-v3-its"; 248*4882a593Smuzhiyun msi-controller; 249*4882a593Smuzhiyun #msi-cells = <1>; 250*4882a593Smuzhiyun reg = <0x2c200000 0x20000>; 251*4882a593Smuzhiyun }; 252*4882a593Smuzhiyun 253*4882a593Smuzhiyun msi-controller@2c400000 { 254*4882a593Smuzhiyun compatible = "arm,gic-v3-its"; 255*4882a593Smuzhiyun msi-controller; 256*4882a593Smuzhiyun #msi-cells = <1>; 257*4882a593Smuzhiyun reg = <0x2c400000 0x20000>; 258*4882a593Smuzhiyun }; 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun ppi-partitions { 261*4882a593Smuzhiyun part0: interrupt-partition-0 { 262*4882a593Smuzhiyun affinity = <&cpu0 &cpu2>; 263*4882a593Smuzhiyun }; 264*4882a593Smuzhiyun 265*4882a593Smuzhiyun part1: interrupt-partition-1 { 266*4882a593Smuzhiyun affinity = <&cpu1 &cpu3>; 267*4882a593Smuzhiyun }; 268*4882a593Smuzhiyun }; 269*4882a593Smuzhiyun }; 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun 272*4882a593Smuzhiyun device@0 { 273*4882a593Smuzhiyun reg = <0 4>; 274*4882a593Smuzhiyun interrupts = <1 1 4 &part0>; 275*4882a593Smuzhiyun }; 276*4882a593Smuzhiyun 277*4882a593Smuzhiyun... 278