gic.txt 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. - interrupt-controller : Identifies the node as an interrupt controller
  17. - #interrupt-cells : Specifies the number of cells needed to encode an
  18. interrupt source. The type shall be a <u32> and the value shall be 3.
  19. The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
  20. interrupts.
  21. The 2nd cell contains the interrupt number for the interrupt type.
  22. SPI interrupts are in the range [0-987]. PPI interrupts are in the
  23. range [0-15].
  24. The 3rd cell is the flags, encoded as follows:
  25. bits[3:0] trigger type and level flags.
  26. 1 = low-to-high edge triggered
  27. 2 = high-to-low edge triggered
  28. 4 = active high level-sensitive
  29. 8 = active low level-sensitive
  30. bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of
  31. the 8 possible cpus attached to the GIC. A bit set to '1' indicated
  32. the interrupt is wired to that CPU. Only valid for PPI interrupts.
  33. - reg : Specifies base physical address(s) and size of the GIC registers. The
  34. first region is the GIC distributor register base and size. The 2nd region is
  35. the GIC cpu interface register base and size.
  36. Optional
  37. - interrupts : Interrupt source of the parent interrupt controller on
  38. secondary GICs, or VGIC maintenance interrupt on primary GIC (see
  39. below).
  40. - cpu-offset : per-cpu offset within the distributor and cpu interface
  41. regions, used when the GIC doesn't have banked registers. The offset is
  42. cpu-offset * cpu-nr.
  43. - arm,routable-irqs : Total number of gic irq inputs which are not directly
  44. connected from the peripherals, but are routed dynamically
  45. by a crossbar/multiplexer preceding the GIC. The GIC irq
  46. input line is assigned dynamically when the corresponding
  47. peripheral's crossbar line is mapped.
  48. Example:
  49. intc: interrupt-controller@fff11000 {
  50. compatible = "arm,cortex-a9-gic";
  51. #interrupt-cells = <3>;
  52. #address-cells = <1>;
  53. interrupt-controller;
  54. arm,routable-irqs = <160>;
  55. reg = <0xfff11000 0x1000>,
  56. <0xfff10100 0x100>;
  57. };
  58. * GIC virtualization extensions (VGIC)
  59. For ARM cores that support the virtualization extensions, additional
  60. properties must be described (they only exist if the GIC is the
  61. primary interrupt controller).
  62. Required properties:
  63. - reg : Additional regions specifying the base physical address and
  64. size of the VGIC registers. The first additional region is the GIC
  65. virtual interface control register base and size. The 2nd additional
  66. region is the GIC virtual cpu interface register base and size.
  67. - interrupts : VGIC maintenance interrupt.
  68. Example:
  69. interrupt-controller@2c001000 {
  70. compatible = "arm,cortex-a15-gic";
  71. #interrupt-cells = <3>;
  72. interrupt-controller;
  73. reg = <0x2c001000 0x1000>,
  74. <0x2c002000 0x1000>,
  75. <0x2c004000 0x2000>,
  76. <0x2c006000 0x2000>;
  77. interrupts = <1 9 0xf04>;
  78. };