mpic.txt 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. =====================================================================
  2. Freescale MPIC Interrupt Controller Node
  3. Copyright (C) 2010,2011 Freescale Semiconductor Inc.
  4. =====================================================================
  5. The Freescale MPIC interrupt controller is found on all PowerQUICC
  6. and QorIQ processors and is compatible with the Open PIC. The
  7. notable difference from Open PIC binding is the addition of 2
  8. additional cells in the interrupt specifier defining interrupt type
  9. information.
  10. PROPERTIES
  11. - compatible
  12. Usage: required
  13. Value type: <string>
  14. Definition: Shall include "fsl,mpic". Freescale MPIC
  15. controllers compatible with this binding have Block
  16. Revision Registers BRR1 and BRR2 at offset 0x0 and
  17. 0x10 in the MPIC.
  18. - reg
  19. Usage: required
  20. Value type: <prop-encoded-array>
  21. Definition: A standard property. Specifies the physical
  22. offset and length of the device's registers within the
  23. CCSR address space.
  24. - interrupt-controller
  25. Usage: required
  26. Value type: <empty>
  27. Definition: Specifies that this node is an interrupt
  28. controller
  29. - #interrupt-cells
  30. Usage: required
  31. Value type: <u32>
  32. Definition: Shall be 2 or 4. A value of 2 means that interrupt
  33. specifiers do not contain the interrupt-type or type-specific
  34. information cells.
  35. - #address-cells
  36. Usage: required
  37. Value type: <u32>
  38. Definition: Shall be 0.
  39. - pic-no-reset
  40. Usage: optional
  41. Value type: <empty>
  42. Definition: The presence of this property specifies that the
  43. MPIC must not be reset by the client program, and that
  44. the boot program has initialized all interrupt source
  45. configuration registers to a sane state-- masked or
  46. directed at other cores. This ensures that the client
  47. program will not receive interrupts for sources not belonging
  48. to the client. The presence of this property also mandates
  49. that any initialization related to interrupt sources shall
  50. be limited to sources explicitly referenced in the device tree.
  51. - big-endian
  52. Usage: optional
  53. Value type: <empty>
  54. If present the MPIC will be assumed to be big-endian. Some
  55. device-trees omit this property on MPIC nodes even when the MPIC is
  56. in fact big-endian, so certain boards override this property.
  57. - single-cpu-affinity
  58. Usage: optional
  59. Value type: <empty>
  60. If present the MPIC will be assumed to only be able to route
  61. non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC).
  62. - last-interrupt-source
  63. Usage: optional
  64. Value type: <u32>
  65. Some MPICs do not correctly report the number of hardware sources
  66. in the global feature registers. If specified, this field will
  67. override the value read from MPIC_GREG_FEATURE_LAST_SRC.
  68. INTERRUPT SPECIFIER DEFINITION
  69. Interrupt specifiers consists of 4 cells encoded as
  70. follows:
  71. <1st-cell> interrupt-number
  72. Identifies the interrupt source. The meaning
  73. depends on the type of interrupt.
  74. Note: If the interrupt-type cell is undefined
  75. (i.e. #interrupt-cells = 2), this cell
  76. should be interpreted the same as for
  77. interrupt-type 0-- i.e. an external or
  78. normal SoC device interrupt.
  79. <2nd-cell> level-sense information, encoded as follows:
  80. 0 = low-to-high edge triggered
  81. 1 = active low level-sensitive
  82. 2 = active high level-sensitive
  83. 3 = high-to-low edge triggered
  84. <3rd-cell> interrupt-type
  85. The following types are supported:
  86. 0 = external or normal SoC device interrupt
  87. The interrupt-number cell contains
  88. the SoC device interrupt number. The
  89. type-specific cell is undefined. The
  90. interrupt-number is derived from the
  91. MPIC a block of registers referred to as
  92. the "Interrupt Source Configuration Registers".
  93. Each source has 32-bytes of registers
  94. (vector/priority and destination) in this
  95. region. So interrupt 0 is at offset 0x0,
  96. interrupt 1 is at offset 0x20, and so on.
  97. 1 = error interrupt
  98. The interrupt-number cell contains
  99. the SoC device interrupt number for
  100. the error interrupt. The type-specific
  101. cell identifies the specific error
  102. interrupt number.
  103. 2 = MPIC inter-processor interrupt (IPI)
  104. The interrupt-number cell identifies
  105. the MPIC IPI number. The type-specific
  106. cell is undefined.
  107. 3 = MPIC timer interrupt
  108. The interrupt-number cell identifies
  109. the MPIC timer number. The type-specific
  110. cell is undefined.
  111. <4th-cell> type-specific information
  112. The type-specific cell is encoded as follows:
  113. - For interrupt-type 1 (error interrupt),
  114. the type-specific cell contains the
  115. bit number of the error interrupt in the
  116. Error Interrupt Summary Register.
  117. EXAMPLE 1
  118. /*
  119. * mpic interrupt controller with 4 cells per specifier
  120. */
  121. mpic: pic@40000 {
  122. compatible = "fsl,mpic";
  123. interrupt-controller;
  124. #interrupt-cells = <4>;
  125. #address-cells = <0>;
  126. reg = <0x40000 0x40000>;
  127. };
  128. EXAMPLE 2
  129. /*
  130. * The MPC8544 I2C controller node has an internal
  131. * interrupt number of 27. As per the reference manual
  132. * this corresponds to interrupt source configuration
  133. * registers at 0x5_0560.
  134. *
  135. * The interrupt source configuration registers begin
  136. * at 0x5_0000.
  137. *
  138. * To compute the interrupt specifier interrupt number
  139. *
  140. * 0x560 >> 5 = 43
  141. *
  142. * The interrupt source configuration registers begin
  143. * at 0x5_0000, and so the i2c vector/priority registers
  144. * are at 0x5_0560.
  145. */
  146. i2c@3000 {
  147. #address-cells = <1>;
  148. #size-cells = <0>;
  149. cell-index = <0>;
  150. compatible = "fsl-i2c";
  151. reg = <0x3000 0x100>;
  152. interrupts = <43 2>;
  153. interrupt-parent = <&mpic>;
  154. dfsrr;
  155. };
  156. EXAMPLE 3
  157. /*
  158. * Definition of a node defining the 4
  159. * MPIC IPI interrupts. Note the interrupt
  160. * type of 2.
  161. */
  162. ipi@410a0 {
  163. compatible = "fsl,mpic-ipi";
  164. reg = <0x40040 0x10>;
  165. interrupts = <0 0 2 0
  166. 1 0 2 0
  167. 2 0 2 0
  168. 3 0 2 0>;
  169. };
  170. EXAMPLE 4
  171. /*
  172. * Definition of a node defining the MPIC
  173. * global timers. Note the interrupt
  174. * type of 3.
  175. */
  176. timer0: timer@41100 {
  177. compatible = "fsl,mpic-global-timer";
  178. reg = <0x41100 0x100 0x41300 4>;
  179. interrupts = <0 0 3 0
  180. 1 0 3 0
  181. 2 0 3 0
  182. 3 0 3 0>;
  183. };
  184. EXAMPLE 5
  185. /*
  186. * Definition of an error interrupt (interrupt type 1).
  187. * SoC interrupt number is 16 and the specific error
  188. * interrupt bit in the error interrupt summary register
  189. * is 23.
  190. */
  191. memory-controller@8000 {
  192. compatible = "fsl,p4080-memory-controller";
  193. reg = <0x8000 0x1000>;
  194. interrupts = <16 2 1 23>;
  195. };