arm,gic.txt 5.2 KB

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