136c79bc7SRob Herring# SPDX-License-Identifier: GPL-2.0 236c79bc7SRob Herring%YAML 1.2 336c79bc7SRob Herring--- 436c79bc7SRob Herring$id: http://devicetree.org/schemas/interrupt-controller/arm,gic-v3.yaml# 536c79bc7SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml# 636c79bc7SRob Herring 736c79bc7SRob Herringtitle: ARM Generic Interrupt Controller, version 3 836c79bc7SRob Herring 936c79bc7SRob Herringmaintainers: 1036c79bc7SRob Herring - Marc Zyngier <marc.zyngier@arm.com> 1136c79bc7SRob Herring 1236c79bc7SRob Herringdescription: | 1336c79bc7SRob Herring AArch64 SMP cores are often associated with a GICv3, providing Private 1436c79bc7SRob Herring Peripheral Interrupts (PPI), Shared Peripheral Interrupts (SPI), 1536c79bc7SRob Herring Software Generated Interrupts (SGI), and Locality-specific Peripheral 1636c79bc7SRob Herring Interrupts (LPI). 1736c79bc7SRob Herring 1836c79bc7SRob HerringallOf: 1936c79bc7SRob Herring - $ref: /schemas/interrupt-controller.yaml# 2036c79bc7SRob Herring 2136c79bc7SRob Herringproperties: 2236c79bc7SRob Herring compatible: 2336c79bc7SRob Herring oneOf: 2436c79bc7SRob Herring - items: 2536c79bc7SRob Herring - enum: 2636c79bc7SRob Herring - qcom,msm8996-gic-v3 2736c79bc7SRob Herring - const: arm,gic-v3 2836c79bc7SRob Herring - const: arm,gic-v3 2936c79bc7SRob Herring 3036c79bc7SRob Herring interrupt-controller: true 3136c79bc7SRob Herring 3236c79bc7SRob Herring "#address-cells": 3336c79bc7SRob Herring enum: [ 0, 1, 2 ] 3436c79bc7SRob Herring "#size-cells": 3536c79bc7SRob Herring enum: [ 1, 2 ] 3636c79bc7SRob Herring 3736c79bc7SRob Herring ranges: true 3836c79bc7SRob Herring 3936c79bc7SRob Herring "#interrupt-cells": 4036c79bc7SRob Herring description: | 4136c79bc7SRob Herring Specifies the number of cells needed to encode an interrupt source. 4236c79bc7SRob Herring Must be a single cell with a value of at least 3. 4336c79bc7SRob Herring If the system requires describing PPI affinity, then the value must 4436c79bc7SRob Herring be at least 4. 4536c79bc7SRob Herring 4636c79bc7SRob Herring The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI 474b049063SMarc Zyngier interrupts, 2 for interrupts in the Extended SPI range, 3 for the 484b049063SMarc Zyngier Extended PPI range. Other values are reserved for future use. 4936c79bc7SRob Herring 5036c79bc7SRob Herring The 2nd cell contains the interrupt number for the interrupt type. 5136c79bc7SRob Herring SPI interrupts are in the range [0-987]. PPI interrupts are in the 5286624653SMarc Zyngier range [0-15]. Extented SPI interrupts are in the range [0-1023]. 534b049063SMarc Zyngier Extended PPI interrupts are in the range [0-127]. 5436c79bc7SRob Herring 5536c79bc7SRob Herring The 3rd cell is the flags, encoded as follows: 5636c79bc7SRob Herring bits[3:0] trigger type and level flags. 5736c79bc7SRob Herring 1 = edge triggered 5836c79bc7SRob Herring 4 = level triggered 5936c79bc7SRob Herring 6036c79bc7SRob Herring The 4th cell is a phandle to a node describing a set of CPUs this 6136c79bc7SRob Herring interrupt is affine to. The interrupt must be a PPI, and the node 6236c79bc7SRob Herring pointed must be a subnode of the "ppi-partitions" subnode. For 6336c79bc7SRob Herring interrupt types other than PPI or PPIs that are not partitionned, 6436c79bc7SRob Herring this cell must be zero. See the "ppi-partitions" node description 6536c79bc7SRob Herring below. 6636c79bc7SRob Herring 6736c79bc7SRob Herring Cells 5 and beyond are reserved for future use and must have a value 6836c79bc7SRob Herring of 0 if present. 6936c79bc7SRob Herring enum: [ 3, 4 ] 7036c79bc7SRob Herring 7136c79bc7SRob Herring reg: 7236c79bc7SRob Herring description: | 7336c79bc7SRob Herring Specifies base physical address(s) and size of the GIC 7436c79bc7SRob Herring registers, in the following order: 7536c79bc7SRob Herring - GIC Distributor interface (GICD) 7636c79bc7SRob Herring - GIC Redistributors (GICR), one range per redistributor region 7736c79bc7SRob Herring - GIC CPU interface (GICC) 7836c79bc7SRob Herring - GIC Hypervisor interface (GICH) 7936c79bc7SRob Herring - GIC Virtual CPU interface (GICV) 8036c79bc7SRob Herring 8136c79bc7SRob Herring GICC, GICH and GICV are optional. 8236c79bc7SRob Herring minItems: 2 8336c79bc7SRob Herring maxItems: 4096 # Should be enough? 8436c79bc7SRob Herring 8536c79bc7SRob Herring interrupts: 8636c79bc7SRob Herring description: 8736c79bc7SRob Herring Interrupt source of the VGIC maintenance interrupt. 8836c79bc7SRob Herring maxItems: 1 8936c79bc7SRob Herring 9036c79bc7SRob Herring redistributor-stride: 9136c79bc7SRob Herring description: 9236c79bc7SRob Herring If using padding pages, specifies the stride of consecutive 9336c79bc7SRob Herring redistributors. Must be a multiple of 64kB. 94*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint64 95*3d21a460SRob Herring multipleOf: 0x10000 9636c79bc7SRob Herring exclusiveMinimum: 0 9736c79bc7SRob Herring 9836c79bc7SRob Herring "#redistributor-regions": 9936c79bc7SRob Herring description: 10036c79bc7SRob Herring The number of independent contiguous regions occupied by the 10136c79bc7SRob Herring redistributors. Required if more than one such region is present. 102*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 103*3d21a460SRob Herring maximum: 4096 10436c79bc7SRob Herring 10536c79bc7SRob Herring msi-controller: 10636c79bc7SRob Herring description: 10736c79bc7SRob Herring Only present if the Message Based Interrupt functionnality is 10836c79bc7SRob Herring being exposed by the HW, and the mbi-ranges property present. 10936c79bc7SRob Herring 11036c79bc7SRob Herring mbi-ranges: 11136c79bc7SRob Herring description: 11236c79bc7SRob Herring A list of pairs <intid span>, where "intid" is the first SPI of a range 11336c79bc7SRob Herring that can be used an MBI, and "span" the size of that range. Multiple 11436c79bc7SRob Herring ranges can be provided. 115*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-matrix 116*3d21a460SRob Herring items: 11736c79bc7SRob Herring minItems: 2 11836c79bc7SRob Herring maxItems: 2 11936c79bc7SRob Herring 12036c79bc7SRob Herring mbi-alias: 12136c79bc7SRob Herring description: 12236c79bc7SRob Herring Address property. Base address of an alias of the GICD region containing 12336c79bc7SRob Herring only the {SET,CLR}SPI registers to be used if isolation is required, 12436c79bc7SRob Herring and if supported by the HW. 125*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-array 126*3d21a460SRob Herring items: 12736c79bc7SRob Herring minItems: 1 12836c79bc7SRob Herring maxItems: 2 12936c79bc7SRob Herring 13036c79bc7SRob Herring ppi-partitions: 13136c79bc7SRob Herring type: object 13236c79bc7SRob Herring description: 13336c79bc7SRob Herring PPI affinity can be expressed as a single "ppi-partitions" node, 13436c79bc7SRob Herring containing a set of sub-nodes. 13536c79bc7SRob Herring patternProperties: 13636c79bc7SRob Herring "^interrupt-partition-[0-9]+$": 137cf7d88fbSRob Herring type: object 13836c79bc7SRob Herring properties: 13936c79bc7SRob Herring affinity: 14036c79bc7SRob Herring $ref: /schemas/types.yaml#/definitions/phandle-array 14136c79bc7SRob Herring description: 14236c79bc7SRob Herring Should be a list of phandles to CPU nodes (as described in 14336c79bc7SRob Herring Documentation/devicetree/bindings/arm/cpus.yaml). 14436c79bc7SRob Herring 14536c79bc7SRob Herring required: 14636c79bc7SRob Herring - affinity 14736c79bc7SRob Herring 14836c79bc7SRob Herringdependencies: 14936c79bc7SRob Herring mbi-ranges: [ msi-controller ] 15036c79bc7SRob Herring msi-controller: [ mbi-ranges ] 15136c79bc7SRob Herring 15236c79bc7SRob Herringrequired: 15336c79bc7SRob Herring - compatible 15436c79bc7SRob Herring - interrupts 15536c79bc7SRob Herring - reg 15636c79bc7SRob Herring 15736c79bc7SRob HerringpatternProperties: 15836c79bc7SRob Herring "^gic-its@": false 15936c79bc7SRob Herring "^interrupt-controller@[0-9a-f]+$": false 16036c79bc7SRob Herring # msi-controller is preferred, but allow other names 16136c79bc7SRob Herring "^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$": 16236c79bc7SRob Herring type: object 16336c79bc7SRob Herring description: 16436c79bc7SRob Herring GICv3 has one or more Interrupt Translation Services (ITS) that are 16536c79bc7SRob Herring used to route Message Signalled Interrupts (MSI) to the CPUs. 16636c79bc7SRob Herring properties: 16736c79bc7SRob Herring compatible: 16836c79bc7SRob Herring const: arm,gic-v3-its 16936c79bc7SRob Herring 17036c79bc7SRob Herring msi-controller: true 17136c79bc7SRob Herring 17236c79bc7SRob Herring "#msi-cells": 17336c79bc7SRob Herring description: 17436c79bc7SRob Herring The single msi-cell is the DeviceID of the device which will generate 17536c79bc7SRob Herring the MSI. 17636c79bc7SRob Herring const: 1 17736c79bc7SRob Herring 17836c79bc7SRob Herring reg: 17936c79bc7SRob Herring description: 18036c79bc7SRob Herring Specifies the base physical address and size of the ITS registers. 18136c79bc7SRob Herring maxItems: 1 18236c79bc7SRob Herring 18336c79bc7SRob Herring socionext,synquacer-pre-its: 18436c79bc7SRob Herring description: 18536c79bc7SRob Herring (u32, u32) tuple describing the untranslated 18636c79bc7SRob Herring address and size of the pre-ITS window. 187*3d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-array 188*3d21a460SRob Herring items: 18936c79bc7SRob Herring minItems: 2 19036c79bc7SRob Herring maxItems: 2 19136c79bc7SRob Herring 19236c79bc7SRob Herring required: 19336c79bc7SRob Herring - compatible 19436c79bc7SRob Herring - msi-controller 19536c79bc7SRob Herring - "#msi-cells" 19636c79bc7SRob Herring - reg 19736c79bc7SRob Herring 19836c79bc7SRob Herring additionalProperties: false 19936c79bc7SRob Herring 20036c79bc7SRob HerringadditionalProperties: false 20136c79bc7SRob Herring 20236c79bc7SRob Herringexamples: 20336c79bc7SRob Herring - | 20436c79bc7SRob Herring gic: interrupt-controller@2cf00000 { 20536c79bc7SRob Herring compatible = "arm,gic-v3"; 20636c79bc7SRob Herring #interrupt-cells = <3>; 20736c79bc7SRob Herring #address-cells = <1>; 20836c79bc7SRob Herring #size-cells = <1>; 20936c79bc7SRob Herring ranges; 21036c79bc7SRob Herring interrupt-controller; 21136c79bc7SRob Herring reg = <0x2f000000 0x10000>, // GICD 21236c79bc7SRob Herring <0x2f100000 0x200000>, // GICR 21336c79bc7SRob Herring <0x2c000000 0x2000>, // GICC 21436c79bc7SRob Herring <0x2c010000 0x2000>, // GICH 21536c79bc7SRob Herring <0x2c020000 0x2000>; // GICV 21636c79bc7SRob Herring interrupts = <1 9 4>; 21736c79bc7SRob Herring 21836c79bc7SRob Herring msi-controller; 21936c79bc7SRob Herring mbi-ranges = <256 128>; 22036c79bc7SRob Herring 22136c79bc7SRob Herring msi-controller@2c200000 { 22236c79bc7SRob Herring compatible = "arm,gic-v3-its"; 22336c79bc7SRob Herring msi-controller; 22436c79bc7SRob Herring #msi-cells = <1>; 22536c79bc7SRob Herring reg = <0x2c200000 0x20000>; 22636c79bc7SRob Herring }; 22736c79bc7SRob Herring }; 22836c79bc7SRob Herring 22936c79bc7SRob Herring interrupt-controller@2c010000 { 23036c79bc7SRob Herring compatible = "arm,gic-v3"; 23136c79bc7SRob Herring #interrupt-cells = <4>; 23236c79bc7SRob Herring #address-cells = <1>; 23336c79bc7SRob Herring #size-cells = <1>; 23436c79bc7SRob Herring ranges; 23536c79bc7SRob Herring interrupt-controller; 23636c79bc7SRob Herring redistributor-stride = <0x0 0x40000>; // 256kB stride 23736c79bc7SRob Herring #redistributor-regions = <2>; 23836c79bc7SRob Herring reg = <0x2c010000 0x10000>, // GICD 23936c79bc7SRob Herring <0x2d000000 0x800000>, // GICR 1: CPUs 0-31 24036c79bc7SRob Herring <0x2e000000 0x800000>, // GICR 2: CPUs 32-63 24136c79bc7SRob Herring <0x2c040000 0x2000>, // GICC 24236c79bc7SRob Herring <0x2c060000 0x2000>, // GICH 24336c79bc7SRob Herring <0x2c080000 0x2000>; // GICV 24436c79bc7SRob Herring interrupts = <1 9 4>; 24536c79bc7SRob Herring 24636c79bc7SRob Herring msi-controller@2c200000 { 24736c79bc7SRob Herring compatible = "arm,gic-v3-its"; 24836c79bc7SRob Herring msi-controller; 24936c79bc7SRob Herring #msi-cells = <1>; 25036c79bc7SRob Herring reg = <0x2c200000 0x20000>; 25136c79bc7SRob Herring }; 25236c79bc7SRob Herring 25336c79bc7SRob Herring msi-controller@2c400000 { 25436c79bc7SRob Herring compatible = "arm,gic-v3-its"; 25536c79bc7SRob Herring msi-controller; 25636c79bc7SRob Herring #msi-cells = <1>; 25736c79bc7SRob Herring reg = <0x2c400000 0x20000>; 25836c79bc7SRob Herring }; 25936c79bc7SRob Herring 26036c79bc7SRob Herring ppi-partitions { 26136c79bc7SRob Herring part0: interrupt-partition-0 { 26236c79bc7SRob Herring affinity = <&cpu0 &cpu2>; 26336c79bc7SRob Herring }; 26436c79bc7SRob Herring 26536c79bc7SRob Herring part1: interrupt-partition-1 { 26636c79bc7SRob Herring affinity = <&cpu1 &cpu3>; 26736c79bc7SRob Herring }; 26836c79bc7SRob Herring }; 26936c79bc7SRob Herring }; 27036c79bc7SRob Herring 27136c79bc7SRob Herring 27236c79bc7SRob Herring device@0 { 27336c79bc7SRob Herring reg = <0 4>; 27436c79bc7SRob Herring interrupts = <1 1 4 &part0>; 27536c79bc7SRob Herring }; 27636c79bc7SRob Herring 27736c79bc7SRob Herring... 278