mvebu-pci.txt 10.0 KB

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