mpic.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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. INTERRUPT SPECIFIER DEFINITION
  58. Interrupt specifiers consists of 4 cells encoded as
  59. follows:
  60. <1st-cell> interrupt-number
  61. Identifies the interrupt source. The meaning
  62. depends on the type of interrupt.
  63. Note: If the interrupt-type cell is undefined
  64. (i.e. #interrupt-cells = 2), this cell
  65. should be interpreted the same as for
  66. interrupt-type 0-- i.e. an external or
  67. normal SoC device interrupt.
  68. <2nd-cell> level-sense information, encoded as follows:
  69. 0 = low-to-high edge triggered
  70. 1 = active low level-sensitive
  71. 2 = active high level-sensitive
  72. 3 = high-to-low edge triggered
  73. <3rd-cell> interrupt-type
  74. The following types are supported:
  75. 0 = external or normal SoC device interrupt
  76. The interrupt-number cell contains
  77. the SoC device interrupt number. The
  78. type-specific cell is undefined. The
  79. interrupt-number is derived from the
  80. MPIC a block of registers referred to as
  81. the "Interrupt Source Configuration Registers".
  82. Each source has 32-bytes of registers
  83. (vector/priority and destination) in this
  84. region. So interrupt 0 is at offset 0x0,
  85. interrupt 1 is at offset 0x20, and so on.
  86. 1 = error interrupt
  87. The interrupt-number cell contains
  88. the SoC device interrupt number for
  89. the error interrupt. The type-specific
  90. cell identifies the specific error
  91. interrupt number.
  92. 2 = MPIC inter-processor interrupt (IPI)
  93. The interrupt-number cell identifies
  94. the MPIC IPI number. The type-specific
  95. cell is undefined.
  96. 3 = MPIC timer interrupt
  97. The interrupt-number cell identifies
  98. the MPIC timer number. The type-specific
  99. cell is undefined.
  100. <4th-cell> type-specific information
  101. The type-specific cell is encoded as follows:
  102. - For interrupt-type 1 (error interrupt),
  103. the type-specific cell contains the
  104. bit number of the error interrupt in the
  105. Error Interrupt Summary Register.
  106. EXAMPLE 1
  107. /*
  108. * mpic interrupt controller with 4 cells per specifier
  109. */
  110. mpic: pic@40000 {
  111. compatible = "fsl,mpic";
  112. interrupt-controller;
  113. #interrupt-cells = <4>;
  114. #address-cells = <0>;
  115. reg = <0x40000 0x40000>;
  116. };
  117. EXAMPLE 2
  118. /*
  119. * The MPC8544 I2C controller node has an internal
  120. * interrupt number of 27. As per the reference manual
  121. * this corresponds to interrupt source configuration
  122. * registers at 0x5_0560.
  123. *
  124. * The interrupt source configuration registers begin
  125. * at 0x5_0000.
  126. *
  127. * To compute the interrupt specifier interrupt number
  128. *
  129. * 0x560 >> 5 = 43
  130. *
  131. * The interrupt source configuration registers begin
  132. * at 0x5_0000, and so the i2c vector/priority registers
  133. * are at 0x5_0560.
  134. */
  135. i2c@3000 {
  136. #address-cells = <1>;
  137. #size-cells = <0>;
  138. cell-index = <0>;
  139. compatible = "fsl-i2c";
  140. reg = <0x3000 0x100>;
  141. interrupts = <43 2>;
  142. interrupt-parent = <&mpic>;
  143. dfsrr;
  144. };
  145. EXAMPLE 3
  146. /*
  147. * Definition of a node defining the 4
  148. * MPIC IPI interrupts. Note the interrupt
  149. * type of 2.
  150. */
  151. ipi@410a0 {
  152. compatible = "fsl,mpic-ipi";
  153. reg = <0x40040 0x10>;
  154. interrupts = <0 0 2 0
  155. 1 0 2 0
  156. 2 0 2 0
  157. 3 0 2 0>;
  158. };
  159. EXAMPLE 4
  160. /*
  161. * Definition of a node defining the MPIC
  162. * global timers. Note the interrupt
  163. * type of 3.
  164. */
  165. timer0: timer@41100 {
  166. compatible = "fsl,mpic-global-timer";
  167. reg = <0x41100 0x100 0x41300 4>;
  168. interrupts = <0 0 3 0
  169. 1 0 3 0
  170. 2 0 3 0
  171. 3 0 3 0>;
  172. };
  173. EXAMPLE 5
  174. /*
  175. * Definition of an error interrupt (interrupt type 1).
  176. * SoC interrupt number is 16 and the specific error
  177. * interrupt bit in the error interrupt summary register
  178. * is 23.
  179. */
  180. memory-controller@8000 {
  181. compatible = "fsl,p4080-memory-controller";
  182. reg = <0x8000 0x1000>;
  183. interrupts = <16 2 1 23>;
  184. };