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