mips-gic.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. MIPS Global Interrupt Controller (GIC)
  2. The MIPS GIC routes external interrupts to individual VPEs and IRQ pins.
  3. It also supports local (per-processor) interrupts and software-generated
  4. interrupts which can be used as IPIs. The GIC also includes a free-running
  5. global timer, per-CPU count/compare timers, and a watchdog.
  6. Required properties:
  7. - compatible : Should be "mti,gic".
  8. - interrupt-controller : Identifies the node as an interrupt controller
  9. - #interrupt-cells : Specifies the number of cells needed to encode an
  10. interrupt specifier. Should be 3.
  11. - The first cell is the type of interrupt, local or shared.
  12. See <include/dt-bindings/interrupt-controller/mips-gic.h>.
  13. - The second cell is the GIC interrupt number.
  14. - The third cell encodes the interrupt flags.
  15. See <include/dt-bindings/interrupt-controller/irq.h> for a list of valid
  16. flags.
  17. Optional properties:
  18. - reg : Base address and length of the GIC registers. If not present,
  19. the base address reported by the hardware GCR_GIC_BASE will be used.
  20. - mti,reserved-cpu-vectors : Specifies the list of CPU interrupt vectors
  21. to which the GIC may not route interrupts. Valid values are 2 - 7.
  22. This property is ignored if the CPU is started in EIC mode.
  23. - mti,reserved-ipi-vectors : Specifies the range of GIC interrupts that are
  24. reserved for IPIs.
  25. It accepts 2 values, the 1st is the starting interrupt and the 2nd is the size
  26. of the reserved range.
  27. If not specified, the driver will allocate the last 2 * number of VPEs in the
  28. system.
  29. Required properties for timer sub-node:
  30. - compatible : Should be "mti,gic-timer".
  31. - interrupts : Interrupt for the GIC local timer.
  32. Optional properties for timer sub-node:
  33. - clocks : GIC timer operating clock.
  34. - clock-frequency : Clock frequency at which the GIC timers operate.
  35. Note that one of clocks or clock-frequency must be specified.
  36. Example:
  37. gic: interrupt-controller@1bdc0000 {
  38. compatible = "mti,gic";
  39. reg = <0x1bdc0000 0x20000>;
  40. interrupt-controller;
  41. #interrupt-cells = <3>;
  42. mti,reserved-cpu-vectors = <7>;
  43. mti,reserved-ipi-vectors = <40 8>;
  44. timer {
  45. compatible = "mti,gic-timer";
  46. interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
  47. clock-frequency = <50000000>;
  48. };
  49. };
  50. uart@18101400 {
  51. ...
  52. interrupt-parent = <&gic>;
  53. interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
  54. ...
  55. };