mpic.txt 6.6 KB

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