110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. Content-Type: text/plain; charset="utf-8"
  2. MIME-Version: 1.0
  3. Content-Transfer-Encoding: 7bit
  4. Subject: [v2,3/5] DT: PCI: qcom: Document PCIe devicetree bindings
  5. From: Stanimir Varbanov <svarbanov@mm-sol.com>
  6. X-Patchwork-Id: 6326181
  7. Message-Id: <1430743338-10441-4-git-send-email-svarbanov@mm-sol.com>
  8. To: Rob Herring <robh+dt@kernel.org>, Kumar Gala <galak@codeaurora.org>,
  9. Mark Rutland <mark.rutland@arm.com>,
  10. Grant Likely <grant.likely@linaro.org>,
  11. Bjorn Helgaas <bhelgaas@google.com>,
  12. Kishon Vijay Abraham I <kishon@ti.com>,
  13. Russell King <linux@arm.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>
  14. Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
  15. linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
  16. linux-pci@vger.kernel.org, Mathieu Olivari <mathieu@codeaurora.org>,
  17. Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
  18. Stanimir Varbanov <svarbanov@mm-sol.com>
  19. Date: Mon, 4 May 2015 15:42:16 +0300
  20. Document Qualcomm PCIe driver devicetree bindings.
  21. Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
  22. ---
  23. .../devicetree/bindings/pci/qcom,pcie.txt | 231 ++++++++++++++++++++
  24. 1 files changed, 231 insertions(+), 0 deletions(-)
  25. create mode 100644 Documentation/devicetree/bindings/pci/qcom,pcie.txt
  26. --- /dev/null
  27. +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.txt
  28. @@ -0,0 +1,231 @@
  29. +* Qualcomm PCI express root complex
  30. +
  31. +- compatible:
  32. + Usage: required
  33. + Value type: <stringlist>
  34. + Definition: Value shall include
  35. + - "qcom,pcie-v0" for apq/ipq8064
  36. + - "qcom,pcie-v1" for apq8084
  37. +
  38. +- reg:
  39. + Usage: required
  40. + Value type: <prop-encoded-array>
  41. + Definition: Register ranges as listed in the reg-names property
  42. +
  43. +- reg-names:
  44. + Usage: required
  45. + Value type: <stringlist>
  46. + Definition: Must include the following entries
  47. + - "parf" Qualcomm specific registers
  48. + - "dbi" Designware PCIe registers
  49. + - "elbi" External local bus interface registers
  50. + - "config" PCIe configuration space
  51. +
  52. +- device_type:
  53. + Usage: required
  54. + Value type: <string>
  55. + Definition: Should be "pci". As specified in designware-pcie.txt
  56. +
  57. +- #address-cells:
  58. + Usage: required
  59. + Value type: <u32>
  60. + Definition: Should be set to 3. As specified in designware-pcie.txt
  61. +
  62. +- #size-cells:
  63. + Usage: required
  64. + Value type: <u32>
  65. + Definition: Should be set 2. As specified in designware-pcie.txt
  66. +
  67. +- ranges:
  68. + Usage: required
  69. + Value type: <prop-encoded-array>
  70. + Definition: As specified in designware-pcie.txt
  71. +
  72. +- interrupts:
  73. + Usage: required
  74. + Value type: <prop-encoded-array>
  75. + Definition: MSI interrupt
  76. +
  77. +- interrupt-names:
  78. + Usage: required
  79. + Value type: <stringlist>
  80. + Definition: Should contain "msi"
  81. +
  82. +- #interrupt-cells:
  83. + Usage: required
  84. + Value type: <u32>
  85. + Definition: Should be 1. As specified in designware-pcie.txt
  86. +
  87. +- interrupt-map-mask:
  88. + Usage: required
  89. + Value type: <prop-encoded-array>
  90. + Definition: As specified in designware-pcie.txt
  91. +
  92. +- interrupt-map:
  93. + Usage: required
  94. + Value type: <prop-encoded-array>
  95. + Definition: As specified in designware-pcie.txt
  96. +
  97. +- clocks:
  98. + Usage: required
  99. + Value type: <prop-encoded-array>
  100. + Definition: List of phandle and clock specifier pairs as listed
  101. + in clock-names property
  102. +
  103. +- clock-names:
  104. + Usage: required
  105. + Value type: <stringlist>
  106. + Definition: Should contain the following entries
  107. + * should be populated for v0 and v1
  108. + - "iface" Configuration AHB clock
  109. +
  110. + * should be populated for v0
  111. + - "core" Clocks the pcie hw block
  112. + - "phy" Clocks the pcie PHY block
  113. +
  114. + * should be populated for v1
  115. + - "aux" Auxiliary (AUX) clock
  116. + - "bus_master" Master AXI clock
  117. + - "bus_slave" Slave AXI clock
  118. +
  119. +- resets:
  120. + Usage: required
  121. + Value type: <prop-encoded-array>
  122. + Definition: List of phandle and reset specifier pairs as listed
  123. + in reset-names property
  124. +
  125. +- reset-names:
  126. + Usage: required
  127. + Value type: <stringlist>
  128. + Definition: Should contain the following entries
  129. + * should be populated for v0
  130. + - "axi" AXI reset
  131. + - "ahb" AHB reset
  132. + - "por" POR reset
  133. + - "pci" PCI reset
  134. + - "phy" PHY reset
  135. +
  136. + * should be populated for v1
  137. + - "core" Core reset
  138. +
  139. +- power-domains:
  140. + Usage: required (for v1 only)
  141. + Value type: <prop-encoded-array>
  142. + Definition: A phandle and power domain specifier pair to the
  143. + power domain which is responsible for collapsing
  144. + and restoring power to the peripheral
  145. +
  146. +- <name>-supply:
  147. + Usage: required
  148. + Value type: <phandle>
  149. + Definition: List of phandles to the power supply regulator(s)
  150. + * should be populated for v0 and v1
  151. + - "vdda" core analog power supply
  152. +
  153. + * should be populated for v0
  154. + - "vdda_phy" analog power supply for PHY
  155. + - "vdda_refclk" analog power supply for IC which generate
  156. + reference clock
  157. +
  158. +- phys:
  159. + Usage: required (for v1 only)
  160. + Value type: <phandle>
  161. + Definition: List of phandle(s) as listed in phy-names property
  162. +
  163. +- phy-names:
  164. + Usage: required (for v1 only)
  165. + Value type: <stringlist>
  166. + Definition: Should contain "pciephy"
  167. +
  168. +- <name>-gpio:
  169. + Usage: optional
  170. + Value type: <prop-encoded-array>
  171. + Definition: List of phandle and gpio specifier pairs. Should contain
  172. + - "perst" PCIe endpoint reset signal line
  173. + - "pewake" PCIe endpoint wake signal line
  174. +
  175. +- pinctrl-0:
  176. + Usage: required
  177. + Value type: <phandle>
  178. + Definition: List of phandles pointing at a pin(s) configuration
  179. +
  180. +- pinctrl-names
  181. + Usage: required
  182. + Value type: <stringlist>
  183. + Definition: List of names of pinctrl-0 state
  184. +
  185. +* Example for v0
  186. + pcie0: pci@1b500000 {
  187. + compatible = "qcom,pcie-v0";
  188. + reg = <0x1b500000 0x1000
  189. + 0x1b502000 0x80
  190. + 0x1b600000 0x100
  191. + 0x0ff00000 0x100000>;
  192. + reg-names = "dbi", "elbi", "parf", "config";
  193. + device_type = "pci";
  194. + linux,pci-domain = <0>;
  195. + bus-range = <0x00 0xff>;
  196. + num-lanes = <1>;
  197. + #address-cells = <3>;
  198. + #size-cells = <2>;
  199. + ranges = <0x81000000 0 0 0x0fe00000 0 0x00100000 /* I/O */
  200. + 0x82000000 0 0x00000000 0x08000000 0 0x07e00000>; /* memory */
  201. + interrupts = <GIC_SPI 35 IRQ_TYPE_NONE>;
  202. + interrupt-names = "msi";
  203. + #interrupt-cells = <1>;
  204. + interrupt-map-mask = <0 0 0 0x7>;
  205. + interrupt-map = <0 0 0 1 &intc 0 36 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  206. + <0 0 0 2 &intc 0 37 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  207. + <0 0 0 3 &intc 0 38 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  208. + <0 0 0 4 &intc 0 39 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  209. + clocks = <&gcc PCIE_A_CLK>,
  210. + <&gcc PCIE_H_CLK>,
  211. + <&gcc PCIE_PHY_CLK>;
  212. + clock-names = "core", "iface", "phy";
  213. + resets = <&gcc PCIE_ACLK_RESET>,
  214. + <&gcc PCIE_HCLK_RESET>,
  215. + <&gcc PCIE_POR_RESET>,
  216. + <&gcc PCIE_PCI_RESET>,
  217. + <&gcc PCIE_PHY_RESET>;
  218. + reset-names = "axi", "ahb", "por", "pci", "phy";
  219. + };
  220. +
  221. +* Example for v1
  222. + pcie0@fc520000 {
  223. + compatible = "qcom,pcie-v1";
  224. + reg = <0xfc520000 0x2000>,
  225. + <0xff000000 0x1000>,
  226. + <0xff001000 0x1000>,
  227. + <0xff002000 0x2000>;
  228. + reg-names = "parf", "dbi", "elbi", "config";
  229. + device_type = "pci";
  230. + linux,pci-domain = <0>;
  231. + bus-range = <0x00 0xff>;
  232. + num-lanes = <1>;
  233. + #address-cells = <3>;
  234. + #size-cells = <2>;
  235. + ranges = <0x81000000 0 0 0xff200000 0 0x00100000 /* I/O */
  236. + 0x82000000 0 0x00300000 0xff300000 0 0x00d00000>; /* memory */
  237. + interrupts = <GIC_SPI 243 IRQ_TYPE_NONE>;
  238. + interrupt-names = "msi";
  239. + #interrupt-cells = <1>;
  240. + interrupt-map-mask = <0 0 0 0x7>;
  241. + interrupt-map = <0 0 0 1 &intc 0 244 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  242. + <0 0 0 2 &intc 0 245 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  243. + <0 0 0 3 &intc 0 247 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  244. + <0 0 0 4 &intc 0 248 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  245. + clocks = <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
  246. + <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
  247. + <&gcc GCC_PCIE_0_SLV_AXI_CLK>,
  248. + <&gcc GCC_PCIE_0_AUX_CLK>;
  249. + clock-names = "iface", "master_bus", "slave_bus", "aux";
  250. + resets = <&gcc GCC_PCIE_0_BCR>;
  251. + reset-names = "core";
  252. + power-domains = <&gcc PCIE0_GDSC>;
  253. + vdda-supply = <&pma8084_l3>;
  254. + phys = <&pciephy0>;
  255. + phy-names = "pciephy";
  256. + perst-gpio = <&tlmm 70 GPIO_ACTIVE_LOW>;
  257. + pinctrl-0 = <&pcie0_pins_default>;
  258. + pinctrl-names = "default";
  259. + };