arm,gic-v3.txt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. * ARM Generic Interrupt Controller, version 3
  2. AArch64 SMP cores are often associated with a GICv3, providing Private
  3. Peripheral Interrupts (PPI), Shared Peripheral Interrupts (SPI),
  4. Software Generated Interrupts (SGI), and Locality-specific Peripheral
  5. Interrupts (LPI).
  6. Main node required properties:
  7. - compatible : should at least contain "arm,gic-v3".
  8. - interrupt-controller : Identifies the node as an interrupt controller
  9. - #interrupt-cells : Specifies the number of cells needed to encode an
  10. interrupt source. Must be a single cell with a value of at least 3.
  11. If the system requires describing PPI affinity, then the value must
  12. be at least 4.
  13. The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
  14. interrupts. Other values are reserved for future use.
  15. The 2nd cell contains the interrupt number for the interrupt type.
  16. SPI interrupts are in the range [0-987]. PPI interrupts are in the
  17. range [0-15].
  18. The 3rd cell is the flags, encoded as follows:
  19. bits[3:0] trigger type and level flags.
  20. 1 = edge triggered
  21. 4 = level triggered
  22. The 4th cell is a phandle to a node describing a set of CPUs this
  23. interrupt is affine to. The interrupt must be a PPI, and the node
  24. pointed must be a subnode of the "ppi-partitions" subnode. For
  25. interrupt types other than PPI or PPIs that are not partitionned,
  26. this cell must be zero. See the "ppi-partitions" node description
  27. below.
  28. Cells 5 and beyond are reserved for future use and must have a value
  29. of 0 if present.
  30. - reg : Specifies base physical address(s) and size of the GIC
  31. registers, in the following order:
  32. - GIC Distributor interface (GICD)
  33. - GIC Redistributors (GICR), one range per redistributor region
  34. - GIC CPU interface (GICC)
  35. - GIC Hypervisor interface (GICH)
  36. - GIC Virtual CPU interface (GICV)
  37. GICC, GICH and GICV are optional.
  38. - interrupts : Interrupt source of the VGIC maintenance interrupt.
  39. Optional
  40. - redistributor-stride : If using padding pages, specifies the stride
  41. of consecutive redistributors. Must be a multiple of 64kB.
  42. - #redistributor-regions: The number of independent contiguous regions
  43. occupied by the redistributors. Required if more than one such
  44. region is present.
  45. - msi-controller: Boolean property. Identifies the node as an MSI
  46. controller. Only present if the Message Based Interrupt
  47. functionnality is being exposed by the HW, and the mbi-ranges
  48. property present.
  49. - mbi-ranges: A list of pairs <intid span>, where "intid" is the first
  50. SPI of a range that can be used an MBI, and "span" the size of that
  51. range. Multiple ranges can be provided. Requires "msi-controller" to
  52. be set.
  53. - mbi-alias: Address property. Base address of an alias of the GICD
  54. region containing only the {SET,CLR}SPI registers to be used if
  55. isolation is required, and if supported by the HW.
  56. Sub-nodes:
  57. PPI affinity can be expressed as a single "ppi-partitions" node,
  58. containing a set of sub-nodes, each with the following property:
  59. - affinity: Should be a list of phandles to CPU nodes (as described in
  60. Documentation/devicetree/bindings/arm/cpus.txt).
  61. GICv3 has one or more Interrupt Translation Services (ITS) that are
  62. used to route Message Signalled Interrupts (MSI) to the CPUs.
  63. These nodes must have the following properties:
  64. - compatible : Should at least contain "arm,gic-v3-its".
  65. - msi-controller : Boolean property. Identifies the node as an MSI controller
  66. - #msi-cells: Must be <1>. The single msi-cell is the DeviceID of the device
  67. which will generate the MSI.
  68. - reg: Specifies the base physical address and size of the ITS
  69. registers.
  70. Optional:
  71. - socionext,synquacer-pre-its: (u32, u32) tuple describing the untranslated
  72. address and size of the pre-ITS window.
  73. The main GIC node must contain the appropriate #address-cells,
  74. #size-cells and ranges properties for the reg property of all ITS
  75. nodes.
  76. Examples:
  77. gic: interrupt-controller@2cf00000 {
  78. compatible = "arm,gic-v3";
  79. #interrupt-cells = <3>;
  80. #address-cells = <2>;
  81. #size-cells = <2>;
  82. ranges;
  83. interrupt-controller;
  84. reg = <0x0 0x2f000000 0 0x10000>, // GICD
  85. <0x0 0x2f100000 0 0x200000>, // GICR
  86. <0x0 0x2c000000 0 0x2000>, // GICC
  87. <0x0 0x2c010000 0 0x2000>, // GICH
  88. <0x0 0x2c020000 0 0x2000>; // GICV
  89. interrupts = <1 9 4>;
  90. msi-controller;
  91. mbi-ranges = <256 128>;
  92. gic-its@2c200000 {
  93. compatible = "arm,gic-v3-its";
  94. msi-controller;
  95. #msi-cells = <1>;
  96. reg = <0x0 0x2c200000 0 0x20000>;
  97. };
  98. };
  99. gic: interrupt-controller@2c010000 {
  100. compatible = "arm,gic-v3";
  101. #interrupt-cells = <4>;
  102. #address-cells = <2>;
  103. #size-cells = <2>;
  104. ranges;
  105. interrupt-controller;
  106. redistributor-stride = <0x0 0x40000>; // 256kB stride
  107. #redistributor-regions = <2>;
  108. reg = <0x0 0x2c010000 0 0x10000>, // GICD
  109. <0x0 0x2d000000 0 0x800000>, // GICR 1: CPUs 0-31
  110. <0x0 0x2e000000 0 0x800000>; // GICR 2: CPUs 32-63
  111. <0x0 0x2c040000 0 0x2000>, // GICC
  112. <0x0 0x2c060000 0 0x2000>, // GICH
  113. <0x0 0x2c080000 0 0x2000>; // GICV
  114. interrupts = <1 9 4>;
  115. gic-its@2c200000 {
  116. compatible = "arm,gic-v3-its";
  117. msi-controller;
  118. #msi-cells = <1>;
  119. reg = <0x0 0x2c200000 0 0x20000>;
  120. };
  121. gic-its@2c400000 {
  122. compatible = "arm,gic-v3-its";
  123. msi-controller;
  124. #msi-cells = <1>;
  125. reg = <0x0 0x2c400000 0 0x20000>;
  126. };
  127. ppi-partitions {
  128. part0: interrupt-partition-0 {
  129. affinity = <&cpu0 &cpu2>;
  130. };
  131. part1: interrupt-partition-1 {
  132. affinity = <&cpu1 &cpu3>;
  133. };
  134. };
  135. };
  136. device@0 {
  137. reg = <0 0 0 4>;
  138. interrupts = <1 1 4 &part0>;
  139. };