gic.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. * ARM Generic Interrupt Controller
  2. ARM SMP cores are often associated with a GIC, providing per processor
  3. interrupts (PPI), shared processor interrupts (SPI) and software
  4. generated interrupts (SGI).
  5. Primary GIC is attached directly to the CPU and typically has PPIs and SGIs.
  6. Secondary GICs are cascaded into the upward interrupt controller and do not
  7. have PPIs or SGIs.
  8. Main node required properties:
  9. - compatible : should be one of:
  10. "arm,gic-400"
  11. "arm,cortex-a15-gic"
  12. "arm,cortex-a9-gic"
  13. "arm,cortex-a7-gic"
  14. "arm,arm11mp-gic"
  15. "brcm,brahma-b15-gic"
  16. "arm,arm1176jzf-devchip-gic"
  17. "qcom,msm-8660-qgic"
  18. "qcom,msm-qgic2"
  19. - interrupt-controller : Identifies the node as an interrupt controller
  20. - #interrupt-cells : Specifies the number of cells needed to encode an
  21. interrupt source. The type shall be a <u32> and the value shall be 3.
  22. The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
  23. interrupts.
  24. The 2nd cell contains the interrupt number for the interrupt type.
  25. SPI interrupts are in the range [0-987]. PPI interrupts are in the
  26. range [0-15].
  27. The 3rd cell is the flags, encoded as follows:
  28. bits[3:0] trigger type and level flags.
  29. 1 = low-to-high edge triggered
  30. 2 = high-to-low edge triggered (invalid for SPIs)
  31. 4 = active high level-sensitive
  32. 8 = active low level-sensitive (invalid for SPIs).
  33. bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of
  34. the 8 possible cpus attached to the GIC. A bit set to '1' indicated
  35. the interrupt is wired to that CPU. Only valid for PPI interrupts.
  36. Also note that the configurability of PPI interrupts is IMPLEMENTATION
  37. DEFINED and as such not guaranteed to be present (most SoC available
  38. in 2014 seem to ignore the setting of this flag and use the hardware
  39. default value).
  40. - reg : Specifies base physical address(s) and size of the GIC registers. The
  41. first region is the GIC distributor register base and size. The 2nd region is
  42. the GIC cpu interface register base and size.
  43. Optional
  44. - interrupts : Interrupt source of the parent interrupt controller on
  45. secondary GICs, or VGIC maintenance interrupt on primary GIC (see
  46. below).
  47. - cpu-offset : per-cpu offset within the distributor and cpu interface
  48. regions, used when the GIC doesn't have banked registers. The offset is
  49. cpu-offset * cpu-nr.
  50. Example:
  51. intc: interrupt-controller@fff11000 {
  52. compatible = "arm,cortex-a9-gic";
  53. #interrupt-cells = <3>;
  54. #address-cells = <1>;
  55. interrupt-controller;
  56. reg = <0xfff11000 0x1000>,
  57. <0xfff10100 0x100>;
  58. };
  59. * GIC virtualization extensions (VGIC)
  60. For ARM cores that support the virtualization extensions, additional
  61. properties must be described (they only exist if the GIC is the
  62. primary interrupt controller).
  63. Required properties:
  64. - reg : Additional regions specifying the base physical address and
  65. size of the VGIC registers. The first additional region is the GIC
  66. virtual interface control register base and size. The 2nd additional
  67. region is the GIC virtual cpu interface register base and size.
  68. - interrupts : VGIC maintenance interrupt.
  69. Example:
  70. interrupt-controller@2c001000 {
  71. compatible = "arm,cortex-a15-gic";
  72. #interrupt-cells = <3>;
  73. interrupt-controller;
  74. reg = <0x2c001000 0x1000>,
  75. <0x2c002000 0x1000>,
  76. <0x2c004000 0x2000>,
  77. <0x2c006000 0x2000>;
  78. interrupts = <1 9 0xf04>;
  79. };
  80. * GICv2m extension for MSI/MSI-x support (Optional)
  81. Certain revisions of GIC-400 supports MSI/MSI-x via V2M register frame(s).
  82. This is enabled by specifying v2m sub-node(s).
  83. Required properties:
  84. - compatible : The value here should contain "arm,gic-v2m-frame".
  85. - msi-controller : Identifies the node as an MSI controller.
  86. - reg : GICv2m MSI interface register base and size
  87. Optional properties:
  88. - arm,msi-base-spi : When the MSI_TYPER register contains an incorrect
  89. value, this property should contain the SPI base of
  90. the MSI frame, overriding the HW value.
  91. - arm,msi-num-spis : When the MSI_TYPER register contains an incorrect
  92. value, this property should contain the number of
  93. SPIs assigned to the frame, overriding the HW value.
  94. Example:
  95. interrupt-controller@e1101000 {
  96. compatible = "arm,gic-400";
  97. #interrupt-cells = <3>;
  98. #address-cells = <2>;
  99. #size-cells = <2>;
  100. interrupt-controller;
  101. interrupts = <1 8 0xf04>;
  102. ranges = <0 0 0 0xe1100000 0 0x100000>;
  103. reg = <0x0 0xe1110000 0 0x01000>,
  104. <0x0 0xe112f000 0 0x02000>,
  105. <0x0 0xe1140000 0 0x10000>,
  106. <0x0 0xe1160000 0 0x10000>;
  107. v2m0: v2m@0x8000 {
  108. compatible = "arm,gic-v2m-frame";
  109. msi-controller;
  110. reg = <0x0 0x80000 0 0x1000>;
  111. };
  112. ....
  113. v2mN: v2m@0x9000 {
  114. compatible = "arm,gic-v2m-frame";
  115. msi-controller;
  116. reg = <0x0 0x90000 0 0x1000>;
  117. };
  118. };