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.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: ARM Generic Interrupt Controller v1 and v2 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Marc Zyngier <marc.zyngier@arm.com> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: |+ 13*4882a593Smuzhiyun ARM SMP cores are often associated with a GIC, providing per processor 14*4882a593Smuzhiyun interrupts (PPI), shared processor interrupts (SPI) and software 15*4882a593Smuzhiyun generated interrupts (SGI). 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun Primary GIC is attached directly to the CPU and typically has PPIs and SGIs. 18*4882a593Smuzhiyun Secondary GICs are cascaded into the upward interrupt controller and do not 19*4882a593Smuzhiyun have PPIs or SGIs. 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunallOf: 22*4882a593Smuzhiyun - $ref: /schemas/interrupt-controller.yaml# 23*4882a593Smuzhiyun 24*4882a593Smuzhiyunproperties: 25*4882a593Smuzhiyun compatible: 26*4882a593Smuzhiyun oneOf: 27*4882a593Smuzhiyun - items: 28*4882a593Smuzhiyun - enum: 29*4882a593Smuzhiyun - arm,arm11mp-gic 30*4882a593Smuzhiyun - arm,cortex-a15-gic 31*4882a593Smuzhiyun - arm,cortex-a7-gic 32*4882a593Smuzhiyun - arm,cortex-a5-gic 33*4882a593Smuzhiyun - arm,cortex-a9-gic 34*4882a593Smuzhiyun - arm,eb11mp-gic 35*4882a593Smuzhiyun - arm,gic-400 36*4882a593Smuzhiyun - arm,pl390 37*4882a593Smuzhiyun - arm,tc11mp-gic 38*4882a593Smuzhiyun - nvidia,tegra210-agic 39*4882a593Smuzhiyun - qcom,msm-8660-qgic 40*4882a593Smuzhiyun - qcom,msm-qgic2 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun - items: 43*4882a593Smuzhiyun - const: arm,gic-400 44*4882a593Smuzhiyun - enum: 45*4882a593Smuzhiyun - arm,cortex-a15-gic 46*4882a593Smuzhiyun - arm,cortex-a7-gic 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun - items: 49*4882a593Smuzhiyun - const: arm,arm1176jzf-devchip-gic 50*4882a593Smuzhiyun - const: arm,arm11mp-gic 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun - items: 53*4882a593Smuzhiyun - const: brcm,brahma-b15-gic 54*4882a593Smuzhiyun - const: arm,cortex-a15-gic 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun interrupt-controller: true 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun "#address-cells": 59*4882a593Smuzhiyun enum: [ 0, 1 ] 60*4882a593Smuzhiyun "#size-cells": 61*4882a593Smuzhiyun const: 1 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun "#interrupt-cells": 64*4882a593Smuzhiyun const: 3 65*4882a593Smuzhiyun description: | 66*4882a593Smuzhiyun The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI 67*4882a593Smuzhiyun interrupts. 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun The 2nd cell contains the interrupt number for the interrupt type. 70*4882a593Smuzhiyun SPI interrupts are in the range [0-987]. PPI interrupts are in the 71*4882a593Smuzhiyun range [0-15]. 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun The 3rd cell is the flags, encoded as follows: 74*4882a593Smuzhiyun bits[3:0] trigger type and level flags. 75*4882a593Smuzhiyun 1 = low-to-high edge triggered 76*4882a593Smuzhiyun 2 = high-to-low edge triggered (invalid for SPIs) 77*4882a593Smuzhiyun 4 = active high level-sensitive 78*4882a593Smuzhiyun 8 = active low level-sensitive (invalid for SPIs). 79*4882a593Smuzhiyun bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of 80*4882a593Smuzhiyun the 8 possible cpus attached to the GIC. A bit set to '1' indicated 81*4882a593Smuzhiyun the interrupt is wired to that CPU. Only valid for PPI interrupts. 82*4882a593Smuzhiyun Also note that the configurability of PPI interrupts is IMPLEMENTATION 83*4882a593Smuzhiyun DEFINED and as such not guaranteed to be present (most SoC available 84*4882a593Smuzhiyun in 2014 seem to ignore the setting of this flag and use the hardware 85*4882a593Smuzhiyun default value). 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun reg: 88*4882a593Smuzhiyun description: | 89*4882a593Smuzhiyun Specifies base physical address(s) and size of the GIC registers. The 90*4882a593Smuzhiyun first region is the GIC distributor register base and size. The 2nd region 91*4882a593Smuzhiyun is the GIC cpu interface register base and size. 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun For GICv2 with virtualization extensions, additional regions are 94*4882a593Smuzhiyun required for specifying the base physical address and size of the VGIC 95*4882a593Smuzhiyun registers. The first additional region is the GIC virtual interface 96*4882a593Smuzhiyun control register base and size. The 2nd additional region is the GIC 97*4882a593Smuzhiyun virtual cpu interface register base and size. 98*4882a593Smuzhiyun minItems: 2 99*4882a593Smuzhiyun maxItems: 4 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun ranges: true 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun interrupts: 104*4882a593Smuzhiyun description: Interrupt source of the parent interrupt controller on 105*4882a593Smuzhiyun secondary GICs, or VGIC maintenance interrupt on primary GIC (see 106*4882a593Smuzhiyun below). 107*4882a593Smuzhiyun maxItems: 1 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun cpu-offset: 110*4882a593Smuzhiyun description: per-cpu offset within the distributor and cpu interface 111*4882a593Smuzhiyun regions, used when the GIC doesn't have banked registers. The offset 112*4882a593Smuzhiyun is cpu-offset * cpu-nr. 113*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun clocks: 116*4882a593Smuzhiyun minItems: 1 117*4882a593Smuzhiyun maxItems: 2 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun clock-names: 120*4882a593Smuzhiyun description: List of names for the GIC clock input(s). Valid clock names 121*4882a593Smuzhiyun depend on the GIC variant. 122*4882a593Smuzhiyun oneOf: 123*4882a593Smuzhiyun - const: ic_clk # for "arm,arm11mp-gic" 124*4882a593Smuzhiyun - const: PERIPHCLKEN # for "arm,cortex-a15-gic" 125*4882a593Smuzhiyun - items: # for "arm,cortex-a9-gic" 126*4882a593Smuzhiyun - const: PERIPHCLK 127*4882a593Smuzhiyun - const: PERIPHCLKEN 128*4882a593Smuzhiyun - const: clk # for "arm,gic-400" and "nvidia,tegra210" 129*4882a593Smuzhiyun - const: gclk #for "arm,pl390" 130*4882a593Smuzhiyun 131*4882a593Smuzhiyun power-domains: 132*4882a593Smuzhiyun maxItems: 1 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun resets: 135*4882a593Smuzhiyun maxItems: 1 136*4882a593Smuzhiyun 137*4882a593Smuzhiyunrequired: 138*4882a593Smuzhiyun - compatible 139*4882a593Smuzhiyun - reg 140*4882a593Smuzhiyun 141*4882a593SmuzhiyunpatternProperties: 142*4882a593Smuzhiyun "^v2m@[0-9a-f]+$": 143*4882a593Smuzhiyun type: object 144*4882a593Smuzhiyun description: | 145*4882a593Smuzhiyun * GICv2m extension for MSI/MSI-x support (Optional) 146*4882a593Smuzhiyun 147*4882a593Smuzhiyun Certain revisions of GIC-400 supports MSI/MSI-x via V2M register frame(s). 148*4882a593Smuzhiyun This is enabled by specifying v2m sub-node(s). 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun properties: 151*4882a593Smuzhiyun compatible: 152*4882a593Smuzhiyun const: arm,gic-v2m-frame 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun msi-controller: true 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun reg: 157*4882a593Smuzhiyun maxItems: 1 158*4882a593Smuzhiyun description: GICv2m MSI interface register base and size 159*4882a593Smuzhiyun 160*4882a593Smuzhiyun arm,msi-base-spi: 161*4882a593Smuzhiyun description: When the MSI_TYPER register contains an incorrect value, 162*4882a593Smuzhiyun this property should contain the SPI base of the MSI frame, overriding 163*4882a593Smuzhiyun the HW value. 164*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun arm,msi-num-spis: 167*4882a593Smuzhiyun description: When the MSI_TYPER register contains an incorrect value, 168*4882a593Smuzhiyun this property should contain the number of SPIs assigned to the 169*4882a593Smuzhiyun frame, overriding the HW value. 170*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun required: 173*4882a593Smuzhiyun - compatible 174*4882a593Smuzhiyun - msi-controller 175*4882a593Smuzhiyun - reg 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun additionalProperties: false 178*4882a593Smuzhiyun 179*4882a593SmuzhiyunadditionalProperties: false 180*4882a593Smuzhiyun 181*4882a593Smuzhiyunexamples: 182*4882a593Smuzhiyun - | 183*4882a593Smuzhiyun // GICv1 184*4882a593Smuzhiyun intc: interrupt-controller@fff11000 { 185*4882a593Smuzhiyun compatible = "arm,cortex-a9-gic"; 186*4882a593Smuzhiyun #interrupt-cells = <3>; 187*4882a593Smuzhiyun #address-cells = <1>; 188*4882a593Smuzhiyun interrupt-controller; 189*4882a593Smuzhiyun reg = <0xfff11000 0x1000>, 190*4882a593Smuzhiyun <0xfff10100 0x100>; 191*4882a593Smuzhiyun }; 192*4882a593Smuzhiyun 193*4882a593Smuzhiyun - | 194*4882a593Smuzhiyun // GICv2 195*4882a593Smuzhiyun interrupt-controller@2c001000 { 196*4882a593Smuzhiyun compatible = "arm,cortex-a15-gic"; 197*4882a593Smuzhiyun #interrupt-cells = <3>; 198*4882a593Smuzhiyun interrupt-controller; 199*4882a593Smuzhiyun reg = <0x2c001000 0x1000>, 200*4882a593Smuzhiyun <0x2c002000 0x2000>, 201*4882a593Smuzhiyun <0x2c004000 0x2000>, 202*4882a593Smuzhiyun <0x2c006000 0x2000>; 203*4882a593Smuzhiyun interrupts = <1 9 0xf04>; 204*4882a593Smuzhiyun }; 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun - | 207*4882a593Smuzhiyun // GICv2m extension for MSI/MSI-x support 208*4882a593Smuzhiyun interrupt-controller@e1101000 { 209*4882a593Smuzhiyun compatible = "arm,gic-400"; 210*4882a593Smuzhiyun #interrupt-cells = <3>; 211*4882a593Smuzhiyun #address-cells = <1>; 212*4882a593Smuzhiyun #size-cells = <1>; 213*4882a593Smuzhiyun interrupt-controller; 214*4882a593Smuzhiyun interrupts = <1 8 0xf04>; 215*4882a593Smuzhiyun ranges = <0 0xe1100000 0x100000>; 216*4882a593Smuzhiyun reg = <0xe1110000 0x01000>, 217*4882a593Smuzhiyun <0xe112f000 0x02000>, 218*4882a593Smuzhiyun <0xe1140000 0x10000>, 219*4882a593Smuzhiyun <0xe1160000 0x10000>; 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun v2m0: v2m@80000 { 222*4882a593Smuzhiyun compatible = "arm,gic-v2m-frame"; 223*4882a593Smuzhiyun msi-controller; 224*4882a593Smuzhiyun reg = <0x80000 0x1000>; 225*4882a593Smuzhiyun }; 226*4882a593Smuzhiyun 227*4882a593Smuzhiyun //... 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun v2mN: v2m@90000 { 230*4882a593Smuzhiyun compatible = "arm,gic-v2m-frame"; 231*4882a593Smuzhiyun msi-controller; 232*4882a593Smuzhiyun reg = <0x90000 0x1000>; 233*4882a593Smuzhiyun }; 234*4882a593Smuzhiyun }; 235*4882a593Smuzhiyun... 236