mvebu-pci.txt 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. * Marvell EBU PCIe interfaces
  2. Mandatory properties:
  3. - compatible: one of the following values:
  4. marvell,armada-370-pcie
  5. marvell,armada-xp-pcie
  6. marvell,kirkwood-pcie
  7. - #address-cells, set to <3>
  8. - #size-cells, set to <2>
  9. - #interrupt-cells, set to <1>
  10. - bus-range: PCI bus numbers covered
  11. - device_type, set to "pci"
  12. - ranges: ranges describing the MMIO registers to control the PCIe
  13. interfaces, and ranges describing the MBus windows needed to access
  14. the memory and I/O regions of each PCIe interface.
  15. The ranges describing the MMIO registers have the following layout:
  16. 0x82000000 0 r MBUS_ID(0xf0, 0x01) r 0 s
  17. where:
  18. * r is a 32-bits value that gives the offset of the MMIO
  19. registers of this PCIe interface, from the base of the internal
  20. registers.
  21. * s is a 32-bits value that give the size of this MMIO
  22. registers area. This range entry translates the '0x82000000 0 r' PCI
  23. address into the 'MBUS_ID(0xf0, 0x01) r' CPU address, which is part
  24. of the internal register window (as identified by MBUS_ID(0xf0,
  25. 0x01)).
  26. The ranges describing the MBus windows have the following layout:
  27. 0x8t000000 s 0 MBUS_ID(w, a) 0 1 0
  28. where:
  29. * t is the type of the MBus window (as defined by the standard PCI DT
  30. bindings), 1 for I/O and 2 for memory.
  31. * s is the PCI slot that corresponds to this PCIe interface
  32. * w is the 'target ID' value for the MBus window
  33. * a the 'attribute' value for the MBus window.
  34. Since the location and size of the different MBus windows is not fixed in
  35. hardware, and only determined in runtime, those ranges cover the full first
  36. 4 GB of the physical address space, and do not translate into a valid CPU
  37. address.
  38. In addition, the device tree node must have sub-nodes describing each
  39. PCIe interface, having the following mandatory properties:
  40. - reg: used only for interrupt mapping, so only the first four bytes
  41. are used to refer to the correct bus number and device number.
  42. - assigned-addresses: reference to the MMIO registers used to control
  43. this PCIe interface.
  44. - clocks: the clock associated to this PCIe interface
  45. - marvell,pcie-port: the physical PCIe port number
  46. - status: either "disabled" or "okay"
  47. - device_type, set to "pci"
  48. - #address-cells, set to <3>
  49. - #size-cells, set to <2>
  50. - #interrupt-cells, set to <1>
  51. - ranges, translating the MBus windows ranges of the parent node into
  52. standard PCI addresses.
  53. - interrupt-map-mask and interrupt-map, standard PCI properties to
  54. define the mapping of the PCIe interface to interrupt numbers.
  55. and the following optional properties:
  56. - marvell,pcie-lane: the physical PCIe lane number, for ports having
  57. multiple lanes. If this property is not found, we assume that the
  58. value is 0.
  59. Example:
  60. pcie-controller {
  61. compatible = "marvell,armada-xp-pcie";
  62. status = "disabled";
  63. device_type = "pci";
  64. #address-cells = <3>;
  65. #size-cells = <2>;
  66. bus-range = <0x00 0xff>;
  67. ranges =
  68. <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */
  69. 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */
  70. 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */
  71. 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */
  72. 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */
  73. 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */
  74. 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */
  75. 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */
  76. 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */
  77. 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */
  78. 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
  79. 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */
  80. 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
  81. 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO */
  82. 0x82000000 0x3 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */
  83. 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */
  84. 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
  85. 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */
  86. 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
  87. 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */
  88. 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */
  89. 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */
  90. 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */
  91. 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */
  92. 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */
  93. 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */
  94. 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
  95. 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */
  96. 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */
  97. 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>;
  98. pcie@1,0 {
  99. device_type = "pci";
  100. assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
  101. reg = <0x0800 0 0 0 0>;
  102. #address-cells = <3>;
  103. #size-cells = <2>;
  104. #interrupt-cells = <1>;
  105. ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
  106. 0x81000000 0 0 0x81000000 0x1 0 1 0>;
  107. interrupt-map-mask = <0 0 0 0>;
  108. interrupt-map = <0 0 0 0 &mpic 58>;
  109. marvell,pcie-port = <0>;
  110. marvell,pcie-lane = <0>;
  111. clocks = <&gateclk 5>;
  112. status = "disabled";
  113. };
  114. pcie@2,0 {
  115. device_type = "pci";
  116. assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
  117. reg = <0x1000 0 0 0 0>;
  118. #address-cells = <3>;
  119. #size-cells = <2>;
  120. #interrupt-cells = <1>;
  121. ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
  122. 0x81000000 0 0 0x81000000 0x2 0 1 0>;
  123. interrupt-map-mask = <0 0 0 0>;
  124. interrupt-map = <0 0 0 0 &mpic 59>;
  125. marvell,pcie-port = <0>;
  126. marvell,pcie-lane = <1>;
  127. clocks = <&gateclk 6>;
  128. status = "disabled";
  129. };
  130. pcie@3,0 {
  131. device_type = "pci";
  132. assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
  133. reg = <0x1800 0 0 0 0>;
  134. #address-cells = <3>;
  135. #size-cells = <2>;
  136. #interrupt-cells = <1>;
  137. ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
  138. 0x81000000 0 0 0x81000000 0x3 0 1 0>;
  139. interrupt-map-mask = <0 0 0 0>;
  140. interrupt-map = <0 0 0 0 &mpic 60>;
  141. marvell,pcie-port = <0>;
  142. marvell,pcie-lane = <2>;
  143. clocks = <&gateclk 7>;
  144. status = "disabled";
  145. };
  146. pcie@4,0 {
  147. device_type = "pci";
  148. assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
  149. reg = <0x2000 0 0 0 0>;
  150. #address-cells = <3>;
  151. #size-cells = <2>;
  152. #interrupt-cells = <1>;
  153. ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
  154. 0x81000000 0 0 0x81000000 0x4 0 1 0>;
  155. interrupt-map-mask = <0 0 0 0>;
  156. interrupt-map = <0 0 0 0 &mpic 61>;
  157. marvell,pcie-port = <0>;
  158. marvell,pcie-lane = <3>;
  159. clocks = <&gateclk 8>;
  160. status = "disabled";
  161. };
  162. pcie@5,0 {
  163. device_type = "pci";
  164. assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
  165. reg = <0x2800 0 0 0 0>;
  166. #address-cells = <3>;
  167. #size-cells = <2>;
  168. #interrupt-cells = <1>;
  169. ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
  170. 0x81000000 0 0 0x81000000 0x5 0 1 0>;
  171. interrupt-map-mask = <0 0 0 0>;
  172. interrupt-map = <0 0 0 0 &mpic 62>;
  173. marvell,pcie-port = <1>;
  174. marvell,pcie-lane = <0>;
  175. clocks = <&gateclk 9>;
  176. status = "disabled";
  177. };
  178. pcie@6,0 {
  179. device_type = "pci";
  180. assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
  181. reg = <0x3000 0 0 0 0>;
  182. #address-cells = <3>;
  183. #size-cells = <2>;
  184. #interrupt-cells = <1>;
  185. ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0
  186. 0x81000000 0 0 0x81000000 0x6 0 1 0>;
  187. interrupt-map-mask = <0 0 0 0>;
  188. interrupt-map = <0 0 0 0 &mpic 63>;
  189. marvell,pcie-port = <1>;
  190. marvell,pcie-lane = <1>;
  191. clocks = <&gateclk 10>;
  192. status = "disabled";
  193. };
  194. pcie@7,0 {
  195. device_type = "pci";
  196. assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
  197. reg = <0x3800 0 0 0 0>;
  198. #address-cells = <3>;
  199. #size-cells = <2>;
  200. #interrupt-cells = <1>;
  201. ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0
  202. 0x81000000 0 0 0x81000000 0x7 0 1 0>;
  203. interrupt-map-mask = <0 0 0 0>;
  204. interrupt-map = <0 0 0 0 &mpic 64>;
  205. marvell,pcie-port = <1>;
  206. marvell,pcie-lane = <2>;
  207. clocks = <&gateclk 11>;
  208. status = "disabled";
  209. };
  210. pcie@8,0 {
  211. device_type = "pci";
  212. assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
  213. reg = <0x4000 0 0 0 0>;
  214. #address-cells = <3>;
  215. #size-cells = <2>;
  216. #interrupt-cells = <1>;
  217. ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0
  218. 0x81000000 0 0 0x81000000 0x8 0 1 0>;
  219. interrupt-map-mask = <0 0 0 0>;
  220. interrupt-map = <0 0 0 0 &mpic 65>;
  221. marvell,pcie-port = <1>;
  222. marvell,pcie-lane = <3>;
  223. clocks = <&gateclk 12>;
  224. status = "disabled";
  225. };
  226. pcie@9,0 {
  227. device_type = "pci";
  228. assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
  229. reg = <0x4800 0 0 0 0>;
  230. #address-cells = <3>;
  231. #size-cells = <2>;
  232. #interrupt-cells = <1>;
  233. ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
  234. 0x81000000 0 0 0x81000000 0x9 0 1 0>;
  235. interrupt-map-mask = <0 0 0 0>;
  236. interrupt-map = <0 0 0 0 &mpic 99>;
  237. marvell,pcie-port = <2>;
  238. marvell,pcie-lane = <0>;
  239. clocks = <&gateclk 26>;
  240. status = "disabled";
  241. };
  242. pcie@10,0 {
  243. device_type = "pci";
  244. assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
  245. reg = <0x5000 0 0 0 0>;
  246. #address-cells = <3>;
  247. #size-cells = <2>;
  248. #interrupt-cells = <1>;
  249. ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0
  250. 0x81000000 0 0 0x81000000 0xa 0 1 0>;
  251. interrupt-map-mask = <0 0 0 0>;
  252. interrupt-map = <0 0 0 0 &mpic 103>;
  253. marvell,pcie-port = <3>;
  254. marvell,pcie-lane = <0>;
  255. clocks = <&gateclk 27>;
  256. status = "disabled";
  257. };
  258. };