mti,gic.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/interrupt-controller/mti,gic.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MIPS Global Interrupt Controller
  7. maintainers:
  8. - Paul Burton <paulburton@kernel.org>
  9. - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  10. description: |
  11. The MIPS GIC routes external interrupts to individual VPEs and IRQ pins.
  12. It also supports local (per-processor) interrupts and software-generated
  13. interrupts which can be used as IPIs. The GIC also includes a free-running
  14. global timer, per-CPU count/compare timers, and a watchdog.
  15. properties:
  16. compatible:
  17. const: mti,gic
  18. "#interrupt-cells":
  19. const: 3
  20. description: |
  21. The 1st cell is the type of interrupt: local or shared defined in the
  22. file 'dt-bindings/interrupt-controller/mips-gic.h'. The 2nd cell is the
  23. GIC interrupt number. The 3d cell encodes the interrupt flags setting up
  24. the IRQ trigger modes, which are defined in the file
  25. 'dt-bindings/interrupt-controller/irq.h'.
  26. reg:
  27. description: |
  28. Base address and length of the GIC registers space. If not present,
  29. the base address reported by the hardware GCR_GIC_BASE will be used.
  30. maxItems: 1
  31. interrupt-controller: true
  32. mti,reserved-cpu-vectors:
  33. description: |
  34. Specifies the list of CPU interrupt vectors to which the GIC may not
  35. route interrupts. This property is ignored if the CPU is started in EIC
  36. mode.
  37. $ref: /schemas/types.yaml#/definitions/uint32-array
  38. minItems: 1
  39. maxItems: 6
  40. uniqueItems: true
  41. items:
  42. minimum: 2
  43. maximum: 7
  44. mti,reserved-ipi-vectors:
  45. description: |
  46. Specifies the range of GIC interrupts that are reserved for IPIs.
  47. It accepts two values: the 1st is the starting interrupt and the 2nd is
  48. the size of the reserved range. If not specified, the driver will
  49. allocate the last (2 * number of VPEs in the system).
  50. $ref: /schemas/types.yaml#/definitions/uint32-array
  51. items:
  52. - minimum: 0
  53. maximum: 254
  54. - minimum: 2
  55. maximum: 254
  56. timer:
  57. type: object
  58. description: |
  59. MIPS GIC includes a free-running global timer, per-CPU count/compare
  60. timers, and a watchdog. Currently only the GIC Timer is supported.
  61. properties:
  62. compatible:
  63. const: mti,gic-timer
  64. interrupts:
  65. description: |
  66. Interrupt for the GIC local timer, so normally it's suppose to be of
  67. <GIC_LOCAL X IRQ_TYPE_NONE> format.
  68. maxItems: 1
  69. clocks:
  70. maxItems: 1
  71. clock-frequency: true
  72. required:
  73. - compatible
  74. - interrupts
  75. oneOf:
  76. - required:
  77. - clocks
  78. - required:
  79. - clock-frequency
  80. additionalProperties: false
  81. additionalProperties: false
  82. required:
  83. - compatible
  84. - "#interrupt-cells"
  85. - interrupt-controller
  86. examples:
  87. - |
  88. #include <dt-bindings/interrupt-controller/mips-gic.h>
  89. #include <dt-bindings/interrupt-controller/irq.h>
  90. interrupt-controller@1bdc0000 {
  91. compatible = "mti,gic";
  92. reg = <0x1bdc0000 0x20000>;
  93. interrupt-controller;
  94. #interrupt-cells = <3>;
  95. mti,reserved-cpu-vectors = <7>;
  96. mti,reserved-ipi-vectors = <40 8>;
  97. timer {
  98. compatible = "mti,gic-timer";
  99. interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
  100. clock-frequency = <50000000>;
  101. };
  102. };
  103. - |
  104. #include <dt-bindings/interrupt-controller/mips-gic.h>
  105. #include <dt-bindings/interrupt-controller/irq.h>
  106. interrupt-controller@1bdc0000 {
  107. compatible = "mti,gic";
  108. reg = <0x1bdc0000 0x20000>;
  109. interrupt-controller;
  110. #interrupt-cells = <3>;
  111. timer {
  112. compatible = "mti,gic-timer";
  113. interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
  114. clocks = <&cpu_pll>;
  115. };
  116. };
  117. - |
  118. interrupt-controller {
  119. compatible = "mti,gic";
  120. interrupt-controller;
  121. #interrupt-cells = <3>;
  122. };
  123. ...