nvidia,tegra20-pcie.txt 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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:
  62. - phys: Must contain an entry for each entry in phy-names.
  63. - phy-names: Must include the following entries:
  64. - pcie
  65. Power supplies for Tegra20:
  66. - avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  67. - vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  68. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  69. supply 1.05 V.
  70. - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
  71. supply 1.05 V.
  72. - vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.
  73. Power supplies for Tegra30:
  74. - Required:
  75. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  76. supply 1.05 V.
  77. - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
  78. supply 1.05 V.
  79. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
  80. supply 1.8 V.
  81. - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
  82. Must supply 3.3 V.
  83. - Optional:
  84. - If lanes 0 to 3 are used:
  85. - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  86. - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  87. - If lanes 4 or 5 are used:
  88. - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  89. - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  90. Power supplies for Tegra124:
  91. - Required:
  92. - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
  93. - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
  94. - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
  95. supply 1.05 V.
  96. - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
  97. Must supply 3.3 V.
  98. - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3).
  99. Must supply 3.3 V.
  100. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
  101. supply 2.8-3.3 V.
  102. - avdd-pll-erefe-supply: Power supply for PLLE (shared with USB3). Must
  103. supply 1.05 V.
  104. Root ports are defined as subnodes of the PCIe controller node.
  105. Required properties:
  106. - device_type: Must be "pci"
  107. - assigned-addresses: Address and size of the port configuration registers
  108. - reg: PCI bus address of the root port
  109. - #address-cells: Must be 3
  110. - #size-cells: Must be 2
  111. - ranges: Sub-ranges distributed from the PCIe controller node. An empty
  112. property is sufficient.
  113. - nvidia,num-lanes: Number of lanes to use for this port. Valid combinations
  114. are:
  115. - Root port 0 uses 4 lanes, root port 1 is unused.
  116. - Both root ports use 2 lanes.
  117. Example:
  118. SoC DTSI:
  119. pcie-controller {
  120. compatible = "nvidia,tegra20-pcie";
  121. device_type = "pci";
  122. reg = <0x80003000 0x00000800 /* PADS registers */
  123. 0x80003800 0x00000200 /* AFI registers */
  124. 0x90000000 0x10000000>; /* configuration space */
  125. reg-names = "pads", "afi", "cs";
  126. interrupts = <0 98 0x04 /* controller interrupt */
  127. 0 99 0x04>; /* MSI interrupt */
  128. interrupt-names = "intr", "msi";
  129. #interrupt-cells = <1>;
  130. interrupt-map-mask = <0 0 0 0>;
  131. interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
  132. bus-range = <0x00 0xff>;
  133. #address-cells = <3>;
  134. #size-cells = <2>;
  135. ranges = <0x82000000 0 0x80000000 0x80000000 0 0x00001000 /* port 0 registers */
  136. 0x82000000 0 0x80001000 0x80001000 0 0x00001000 /* port 1 registers */
  137. 0x81000000 0 0 0x82000000 0 0x00010000 /* downstream I/O */
  138. 0x82000000 0 0xa0000000 0xa0000000 0 0x10000000 /* non-prefetchable memory */
  139. 0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */
  140. clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>;
  141. clock-names = "pex", "afi", "pll_e";
  142. resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>;
  143. reset-names = "pex", "afi", "pcie_x";
  144. status = "disabled";
  145. pci@1,0 {
  146. device_type = "pci";
  147. assigned-addresses = <0x82000800 0 0x80000000 0 0x1000>;
  148. reg = <0x000800 0 0 0 0>;
  149. status = "disabled";
  150. #address-cells = <3>;
  151. #size-cells = <2>;
  152. ranges;
  153. nvidia,num-lanes = <2>;
  154. };
  155. pci@2,0 {
  156. device_type = "pci";
  157. assigned-addresses = <0x82001000 0 0x80001000 0 0x1000>;
  158. reg = <0x001000 0 0 0 0>;
  159. status = "disabled";
  160. #address-cells = <3>;
  161. #size-cells = <2>;
  162. ranges;
  163. nvidia,num-lanes = <2>;
  164. };
  165. };
  166. Board DTS:
  167. pcie-controller {
  168. status = "okay";
  169. vdd-supply = <&pci_vdd_reg>;
  170. pex-clk-supply = <&pci_clk_reg>;
  171. /* root port 00:01.0 */
  172. pci@1,0 {
  173. status = "okay";
  174. /* bridge 01:00.0 (optional) */
  175. pci@0,0 {
  176. reg = <0x010000 0 0 0 0>;
  177. #address-cells = <3>;
  178. #size-cells = <2>;
  179. device_type = "pci";
  180. /* endpoint 02:00.0 */
  181. pci@0,0 {
  182. reg = <0x020000 0 0 0 0>;
  183. };
  184. };
  185. };
  186. };
  187. Note that devices on the PCI bus are dynamically discovered using PCI's bus
  188. enumeration and therefore don't need corresponding device nodes in DT. However
  189. if a device on the PCI bus provides a non-probeable bus such as I2C or SPI,
  190. device nodes need to be added in order to allow the bus' children to be
  191. instantiated at the proper location in the operating system's device tree (as
  192. illustrated by the optional nodes in the example above).