arm,gic.yaml 6.9 KB

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