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