arm,gic-v3.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. Sub-nodes:
  46. PPI affinity can be expressed as a single "ppi-partitions" node,
  47. containing a set of sub-nodes, each with the following property:
  48. - affinity: Should be a list of phandles to CPU nodes (as described in
  49. Documentation/devicetree/bindings/arm/cpus.txt).
  50. GICv3 has one or more Interrupt Translation Services (ITS) that are
  51. used to route Message Signalled Interrupts (MSI) to the CPUs.
  52. These nodes must have the following properties:
  53. - compatible : Should at least contain "arm,gic-v3-its".
  54. - msi-controller : Boolean property. Identifies the node as an MSI controller
  55. - #msi-cells: Must be <1>. The single msi-cell is the DeviceID of the device
  56. which will generate the MSI.
  57. - reg: Specifies the base physical address and size of the ITS
  58. registers.
  59. The main GIC node must contain the appropriate #address-cells,
  60. #size-cells and ranges properties for the reg property of all ITS
  61. nodes.
  62. Examples:
  63. gic: interrupt-controller@2cf00000 {
  64. compatible = "arm,gic-v3";
  65. #interrupt-cells = <3>;
  66. #address-cells = <2>;
  67. #size-cells = <2>;
  68. ranges;
  69. interrupt-controller;
  70. reg = <0x0 0x2f000000 0 0x10000>, // GICD
  71. <0x0 0x2f100000 0 0x200000>, // GICR
  72. <0x0 0x2c000000 0 0x2000>, // GICC
  73. <0x0 0x2c010000 0 0x2000>, // GICH
  74. <0x0 0x2c020000 0 0x2000>; // GICV
  75. interrupts = <1 9 4>;
  76. gic-its@2c200000 {
  77. compatible = "arm,gic-v3-its";
  78. msi-controller;
  79. #msi-cells = <1>;
  80. reg = <0x0 0x2c200000 0 0x200000>;
  81. };
  82. };
  83. gic: interrupt-controller@2c010000 {
  84. compatible = "arm,gic-v3";
  85. #interrupt-cells = <4>;
  86. #address-cells = <2>;
  87. #size-cells = <2>;
  88. ranges;
  89. interrupt-controller;
  90. redistributor-stride = <0x0 0x40000>; // 256kB stride
  91. #redistributor-regions = <2>;
  92. reg = <0x0 0x2c010000 0 0x10000>, // GICD
  93. <0x0 0x2d000000 0 0x800000>, // GICR 1: CPUs 0-31
  94. <0x0 0x2e000000 0 0x800000>; // GICR 2: CPUs 32-63
  95. <0x0 0x2c040000 0 0x2000>, // GICC
  96. <0x0 0x2c060000 0 0x2000>, // GICH
  97. <0x0 0x2c080000 0 0x2000>; // GICV
  98. interrupts = <1 9 4>;
  99. gic-its@2c200000 {
  100. compatible = "arm,gic-v3-its";
  101. msi-controller;
  102. #msi-cells = <1>;
  103. reg = <0x0 0x2c200000 0 0x200000>;
  104. };
  105. gic-its@2c400000 {
  106. compatible = "arm,gic-v3-its";
  107. msi-controller;
  108. #msi-cells = <1>;
  109. reg = <0x0 0x2c400000 0 0x200000>;
  110. };
  111. ppi-partitions {
  112. part0: interrupt-partition-0 {
  113. affinity = <&cpu0 &cpu2>;
  114. };
  115. part1: interrupt-partition-1 {
  116. affinity = <&cpu1 &cpu3>;
  117. };
  118. };
  119. };
  120. device@0 {
  121. reg = <0 0 0 4>;
  122. interrupts = <1 1 4 &part0>;
  123. };