nvidia,tegra20-pcie.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. NVIDIA Tegra PCIe controller
  2. Required properties:
  3. - compatible: For Tegra20, must contain "nvidia,tegra20-pcie". For Tegra30,
  4. "nvidia,tegra30-pcie". For Tegra124, must contain "nvidia,tegra124-pcie".
  5. Otherwise, must contain "nvidia,<chip>-pcie", plus one of the above, where
  6. <chip> is tegra132 or tegra210.
  7. - device_type: Must be "pci"
  8. - reg: A list of physical base address and length for each set of controller
  9. registers. Must contain an entry for each entry in the reg-names property.
  10. - reg-names: Must include the following entries:
  11. "pads": PADS registers
  12. "afi": AFI registers
  13. "cs": configuration space region
  14. - interrupts: A list of interrupt outputs of the controller. Must contain an
  15. entry for each entry in the interrupt-names property.
  16. - interrupt-names: Must include the following entries:
  17. "intr": The Tegra interrupt that is asserted for controller interrupts
  18. "msi": The Tegra interrupt that is asserted when an MSI is received
  19. - bus-range: Range of bus numbers associated with this controller
  20. - #address-cells: Address representation for root ports (must be 3)
  21. - cell 0 specifies the bus and device numbers of the root port:
  22. [23:16]: bus number
  23. [15:11]: device number
  24. - cell 1 denotes the upper 32 address bits and should be 0
  25. - cell 2 contains the lower 32 address bits and is used to translate to the
  26. CPU address space
  27. - #size-cells: Size representation for root ports (must be 2)
  28. - ranges: Describes the translation of addresses for root ports and standard
  29. PCI regions. The entries must be 6 cells each, where the first three cells
  30. correspond to the address as described for the #address-cells property
  31. above, the fourth cell is the physical CPU address to translate to and the
  32. fifth and six cells are as described for the #size-cells property above.
  33. - The first two entries are expected to translate the addresses for the root
  34. port registers, which are referenced by the assigned-addresses property of
  35. the root port nodes (see below).
  36. - The remaining entries setup the mapping for the standard I/O, memory and
  37. prefetchable PCI regions. The first cell determines the type of region
  38. that is setup:
  39. - 0x81000000: I/O memory region
  40. - 0x82000000: non-prefetchable memory region
  41. - 0xc2000000: prefetchable memory region
  42. Please refer to the standard PCI bus binding document for a more detailed
  43. explanation.
  44. - #interrupt-cells: Size representation for interrupts (must be 1)
  45. - interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
  46. Please refer to the standard PCI bus binding document for a more detailed
  47. explanation.
  48. - clocks: Must contain an entry for each entry in clock-names.
  49. See ../clocks/clock-bindings.txt for details.
  50. - clock-names: Must include the following entries:
  51. - pex
  52. - afi
  53. - pll_e
  54. - cml (not required for Tegra20)
  55. - resets: Must contain an entry for each entry in reset-names.
  56. See ../reset/reset.txt for details.
  57. - reset-names: Must include the following entries:
  58. - pex
  59. - afi
  60. - pcie_x
  61. Required properties on Tegra124 and later (deprecated):
  62. - phys: Must contain an entry for each entry in phy-names.
  63. - phy-names: Must include the following entries:
  64. - pcie
  65. These properties are deprecated in favour of per-lane PHYs define in each of
  66. the root ports (see below).
  67. Power supplies for Tegra20:
  68. - avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  69. - vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  70. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  71. supply 1.05 V.
  72. - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
  73. supply 1.05 V.
  74. - vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.
  75. Power supplies for Tegra30:
  76. - Required:
  77. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  78. supply 1.05 V.
  79. - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
  80. supply 1.05 V.
  81. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
  82. supply 1.8 V.
  83. - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
  84. Must supply 3.3 V.
  85. - Optional:
  86. - If lanes 0 to 3 are used:
  87. - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  88. - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  89. - If lanes 4 or 5 are used:
  90. - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  91. - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  92. Power supplies for Tegra124:
  93. - Required:
  94. - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  95. - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  96. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  97. supply 1.05 V.
  98. - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
  99. Must supply 3.3 V.
  100. - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3).
  101. Must supply 3.3 V.
  102. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
  103. supply 2.8-3.3 V.
  104. - avdd-pll-erefe-supply: Power supply for PLLE (shared with USB3). Must
  105. supply 1.05 V.
  106. Root ports are defined as subnodes of the PCIe controller node.
  107. Required properties:
  108. - device_type: Must be "pci"
  109. - assigned-addresses: Address and size of the port configuration registers
  110. - reg: PCI bus address of the root port
  111. - #address-cells: Must be 3
  112. - #size-cells: Must be 2
  113. - ranges: Sub-ranges distributed from the PCIe controller node. An empty
  114. property is sufficient.
  115. - nvidia,num-lanes: Number of lanes to use for this port. Valid combinations
  116. are:
  117. - Root port 0 uses 4 lanes, root port 1 is unused.
  118. - Both root ports use 2 lanes.
  119. Required properties for Tegra124 and later:
  120. - phys: Must contain an phandle to a PHY for each entry in phy-names.
  121. - phy-names: Must include an entry for each active lane. Note that the number
  122. of entries does not have to (though usually will) be equal to the specified
  123. number of lanes in the nvidia,num-lanes property. Entries are of the form
  124. "pcie-N": where N ranges from 0 to the value specified in nvidia,num-lanes.
  125. Examples:
  126. =========
  127. Tegra20:
  128. --------
  129. SoC DTSI:
  130. pcie-controller@80003000 {
  131. compatible = "nvidia,tegra20-pcie";
  132. device_type = "pci";
  133. reg = <0x80003000 0x00000800 /* PADS registers */
  134. 0x80003800 0x00000200 /* AFI registers */
  135. 0x90000000 0x10000000>; /* configuration space */
  136. reg-names = "pads", "afi", "cs";
  137. interrupts = <0 98 0x04 /* controller interrupt */
  138. 0 99 0x04>; /* MSI interrupt */
  139. interrupt-names = "intr", "msi";
  140. #interrupt-cells = <1>;
  141. interrupt-map-mask = <0 0 0 0>;
  142. interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
  143. bus-range = <0x00 0xff>;
  144. #address-cells = <3>;
  145. #size-cells = <2>;
  146. ranges = <0x82000000 0 0x80000000 0x80000000 0 0x00001000 /* port 0 registers */
  147. 0x82000000 0 0x80001000 0x80001000 0 0x00001000 /* port 1 registers */
  148. 0x81000000 0 0 0x82000000 0 0x00010000 /* downstream I/O */
  149. 0x82000000 0 0xa0000000 0xa0000000 0 0x10000000 /* non-prefetchable memory */
  150. 0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */
  151. clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>;
  152. clock-names = "pex", "afi", "pll_e";
  153. resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>;
  154. reset-names = "pex", "afi", "pcie_x";
  155. status = "disabled";
  156. pci@1,0 {
  157. device_type = "pci";
  158. assigned-addresses = <0x82000800 0 0x80000000 0 0x1000>;
  159. reg = <0x000800 0 0 0 0>;
  160. status = "disabled";
  161. #address-cells = <3>;
  162. #size-cells = <2>;
  163. ranges;
  164. nvidia,num-lanes = <2>;
  165. };
  166. pci@2,0 {
  167. device_type = "pci";
  168. assigned-addresses = <0x82001000 0 0x80001000 0 0x1000>;
  169. reg = <0x001000 0 0 0 0>;
  170. status = "disabled";
  171. #address-cells = <3>;
  172. #size-cells = <2>;
  173. ranges;
  174. nvidia,num-lanes = <2>;
  175. };
  176. };
  177. Board DTS:
  178. pcie-controller@80003000 {
  179. status = "okay";
  180. vdd-supply = <&pci_vdd_reg>;
  181. pex-clk-supply = <&pci_clk_reg>;
  182. /* root port 00:01.0 */
  183. pci@1,0 {
  184. status = "okay";
  185. /* bridge 01:00.0 (optional) */
  186. pci@0,0 {
  187. reg = <0x010000 0 0 0 0>;
  188. #address-cells = <3>;
  189. #size-cells = <2>;
  190. device_type = "pci";
  191. /* endpoint 02:00.0 */
  192. pci@0,0 {
  193. reg = <0x020000 0 0 0 0>;
  194. };
  195. };
  196. };
  197. };
  198. Note that devices on the PCI bus are dynamically discovered using PCI's bus
  199. enumeration and therefore don't need corresponding device nodes in DT. However
  200. if a device on the PCI bus provides a non-probeable bus such as I2C or SPI,
  201. device nodes need to be added in order to allow the bus' children to be
  202. instantiated at the proper location in the operating system's device tree (as
  203. illustrated by the optional nodes in the example above).
  204. Tegra30:
  205. --------
  206. SoC DTSI:
  207. pcie-controller@00003000 {
  208. compatible = "nvidia,tegra30-pcie";
  209. device_type = "pci";
  210. reg = <0x00003000 0x00000800 /* PADS registers */
  211. 0x00003800 0x00000200 /* AFI registers */
  212. 0x10000000 0x10000000>; /* configuration space */
  213. reg-names = "pads", "afi", "cs";
  214. interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH /* controller interrupt */
  215. GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
  216. interrupt-names = "intr", "msi";
  217. #interrupt-cells = <1>;
  218. interrupt-map-mask = <0 0 0 0>;
  219. interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
  220. bus-range = <0x00 0xff>;
  221. #address-cells = <3>;
  222. #size-cells = <2>;
  223. ranges = <0x82000000 0 0x00000000 0x00000000 0 0x00001000 /* port 0 configuration space */
  224. 0x82000000 0 0x00001000 0x00001000 0 0x00001000 /* port 1 configuration space */
  225. 0x82000000 0 0x00004000 0x00004000 0 0x00001000 /* port 2 configuration space */
  226. 0x81000000 0 0 0x02000000 0 0x00010000 /* downstream I/O */
  227. 0x82000000 0 0x20000000 0x20000000 0 0x08000000 /* non-prefetchable memory */
  228. 0xc2000000 0 0x28000000 0x28000000 0 0x18000000>; /* prefetchable memory */
  229. clocks = <&tegra_car TEGRA30_CLK_PCIE>,
  230. <&tegra_car TEGRA30_CLK_AFI>,
  231. <&tegra_car TEGRA30_CLK_PLL_E>,
  232. <&tegra_car TEGRA30_CLK_CML0>;
  233. clock-names = "pex", "afi", "pll_e", "cml";
  234. resets = <&tegra_car 70>,
  235. <&tegra_car 72>,
  236. <&tegra_car 74>;
  237. reset-names = "pex", "afi", "pcie_x";
  238. status = "disabled";
  239. pci@1,0 {
  240. device_type = "pci";
  241. assigned-addresses = <0x82000800 0 0x00000000 0 0x1000>;
  242. reg = <0x000800 0 0 0 0>;
  243. status = "disabled";
  244. #address-cells = <3>;
  245. #size-cells = <2>;
  246. ranges;
  247. nvidia,num-lanes = <2>;
  248. };
  249. pci@2,0 {
  250. device_type = "pci";
  251. assigned-addresses = <0x82001000 0 0x00001000 0 0x1000>;
  252. reg = <0x001000 0 0 0 0>;
  253. status = "disabled";
  254. #address-cells = <3>;
  255. #size-cells = <2>;
  256. ranges;
  257. nvidia,num-lanes = <2>;
  258. };
  259. pci@3,0 {
  260. device_type = "pci";
  261. assigned-addresses = <0x82001800 0 0x00004000 0 0x1000>;
  262. reg = <0x001800 0 0 0 0>;
  263. status = "disabled";
  264. #address-cells = <3>;
  265. #size-cells = <2>;
  266. ranges;
  267. nvidia,num-lanes = <2>;
  268. };
  269. };
  270. Board DTS:
  271. pcie-controller@00003000 {
  272. status = "okay";
  273. avdd-pexa-supply = <&ldo1_reg>;
  274. vdd-pexa-supply = <&ldo1_reg>;
  275. avdd-pexb-supply = <&ldo1_reg>;
  276. vdd-pexb-supply = <&ldo1_reg>;
  277. avdd-pex-pll-supply = <&ldo1_reg>;
  278. avdd-plle-supply = <&ldo1_reg>;
  279. vddio-pex-ctl-supply = <&sys_3v3_reg>;
  280. hvdd-pex-supply = <&sys_3v3_pexs_reg>;
  281. pci@1,0 {
  282. status = "okay";
  283. };
  284. pci@3,0 {
  285. status = "okay";
  286. };
  287. };
  288. Tegra124:
  289. ---------
  290. SoC DTSI:
  291. pcie-controller@01003000 {
  292. compatible = "nvidia,tegra124-pcie";
  293. device_type = "pci";
  294. reg = <0x0 0x01003000 0x0 0x00000800 /* PADS registers */
  295. 0x0 0x01003800 0x0 0x00000800 /* AFI registers */
  296. 0x0 0x02000000 0x0 0x10000000>; /* configuration space */
  297. reg-names = "pads", "afi", "cs";
  298. interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
  299. <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
  300. interrupt-names = "intr", "msi";
  301. #interrupt-cells = <1>;
  302. interrupt-map-mask = <0 0 0 0>;
  303. interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
  304. bus-range = <0x00 0xff>;
  305. #address-cells = <3>;
  306. #size-cells = <2>;
  307. ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000 /* port 0 configuration space */
  308. 0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000 /* port 1 configuration space */
  309. 0x81000000 0 0x0 0x0 0x12000000 0 0x00010000 /* downstream I/O (64 KiB) */
  310. 0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000 /* non-prefetchable memory (208 MiB) */
  311. 0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */
  312. clocks = <&tegra_car TEGRA124_CLK_PCIE>,
  313. <&tegra_car TEGRA124_CLK_AFI>,
  314. <&tegra_car TEGRA124_CLK_PLL_E>,
  315. <&tegra_car TEGRA124_CLK_CML0>;
  316. clock-names = "pex", "afi", "pll_e", "cml";
  317. resets = <&tegra_car 70>,
  318. <&tegra_car 72>,
  319. <&tegra_car 74>;
  320. reset-names = "pex", "afi", "pcie_x";
  321. status = "disabled";
  322. pci@1,0 {
  323. device_type = "pci";
  324. assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>;
  325. reg = <0x000800 0 0 0 0>;
  326. status = "disabled";
  327. #address-cells = <3>;
  328. #size-cells = <2>;
  329. ranges;
  330. nvidia,num-lanes = <2>;
  331. };
  332. pci@2,0 {
  333. device_type = "pci";
  334. assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>;
  335. reg = <0x001000 0 0 0 0>;
  336. status = "disabled";
  337. #address-cells = <3>;
  338. #size-cells = <2>;
  339. ranges;
  340. nvidia,num-lanes = <1>;
  341. };
  342. };
  343. Board DTS:
  344. pcie-controller@01003000 {
  345. status = "okay";
  346. avddio-pex-supply = <&vdd_1v05_run>;
  347. dvddio-pex-supply = <&vdd_1v05_run>;
  348. avdd-pex-pll-supply = <&vdd_1v05_run>;
  349. hvdd-pex-supply = <&vdd_3v3_lp0>;
  350. hvdd-pex-pll-e-supply = <&vdd_3v3_lp0>;
  351. vddio-pex-ctl-supply = <&vdd_3v3_lp0>;
  352. avdd-pll-erefe-supply = <&avdd_1v05_run>;
  353. /* Mini PCIe */
  354. pci@1,0 {
  355. phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
  356. phy-names = "pcie-0";
  357. status = "okay";
  358. };
  359. /* Gigabit Ethernet */
  360. pci@2,0 {
  361. phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
  362. phy-names = "pcie-0";
  363. status = "okay";
  364. };
  365. };