112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. From 5b40516b2f5fb9b2a7d6d3e2e924f12ec9d183a8 Mon Sep 17 00:00:00 2001
  2. From: Mathieu Olivari <mathieu@codeaurora.org>
  3. Date: Tue, 21 Apr 2015 19:01:42 -0700
  4. Subject: [PATCH 8/9] ARM: dts: qcom: add pcie nodes to ipq806x platforms
  5. qcom-pcie driver now supports version 0 of the controller. This change
  6. adds the corresponding entries to the IPQ806x dtsi file and
  7. corresponding platform (AP148).
  8. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
  9. ---
  10. arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 30 ++++++++
  11. arch/arm/boot/dts/qcom-ipq8064.dtsi | 124 +++++++++++++++++++++++++++++++
  12. 2 files changed, 154 insertions(+)
  13. --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
  14. +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
  15. @@ -115,5 +115,15 @@
  16. usb30@1 {
  17. status = "ok";
  18. };
  19. +
  20. + pcie0: pci@1b500000 {
  21. + status = "ok";
  22. + phy-tx0-term-offset = <7>;
  23. + };
  24. +
  25. + pcie1: pci@1b700000 {
  26. + status = "ok";
  27. + phy-tx0-term-offset = <7>;
  28. + };
  29. };
  30. };
  31. --- a/arch/arm/boot/dts/qcom-ipq8064-db149.dts
  32. +++ b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
  33. @@ -128,5 +128,17 @@
  34. usb30@1 {
  35. status = "ok";
  36. };
  37. +
  38. + pcie0: pci@1b500000 {
  39. + status = "ok";
  40. + };
  41. +
  42. + pcie1: pci@1b700000 {
  43. + status = "ok";
  44. + };
  45. +
  46. + pcie2: pci@1b900000 {
  47. + status = "ok";
  48. + };
  49. };
  50. };
  51. --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
  52. +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
  53. @@ -3,6 +3,9 @@
  54. #include "skeleton.dtsi"
  55. #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
  56. #include <dt-bindings/soc/qcom,gsbi.h>
  57. +#include <dt-bindings/reset/qcom,gcc-ipq806x.h>
  58. +#include <dt-bindings/interrupt-controller/arm-gic.h>
  59. +#include <dt-bindings/gpio/gpio.h>
  60. / {
  61. model = "Qualcomm IPQ8064";
  62. @@ -83,6 +86,33 @@
  63. interrupt-controller;
  64. #interrupt-cells = <2>;
  65. interrupts = <0 32 0x4>;
  66. +
  67. + pcie0_pins: pcie0_pinmux {
  68. + mux {
  69. + pins = "gpio3";
  70. + function = "pcie1_rst";
  71. + drive-strength = <12>;
  72. + bias-disable;
  73. + };
  74. + };
  75. +
  76. + pcie1_pins: pcie1_pinmux {
  77. + mux {
  78. + pins = "gpio48";
  79. + function = "pcie2_rst";
  80. + drive-strength = <12>;
  81. + bias-disable;
  82. + };
  83. + };
  84. +
  85. + pcie2_pins: pcie2_pinmux {
  86. + mux {
  87. + pins = "gpio63";
  88. + function = "pcie3_rst";
  89. + drive-strength = <12>;
  90. + bias-disable;
  91. + };
  92. + };
  93. };
  94. intc: interrupt-controller@2000000 {
  95. @@ -311,6 +341,144 @@
  96. reg = <0x01200600 0x100>;
  97. };
  98. + pcie0: pci@1b500000 {
  99. + compatible = "qcom,pcie-v0";
  100. + reg = <0x1b500000 0x1000
  101. + 0x1b502000 0x80
  102. + 0x1b600000 0x100
  103. + 0x0ff00000 0x100000>;
  104. + reg-names = "dbi", "elbi", "parf", "config";
  105. + device_type = "pci";
  106. + linux,pci-domain = <0>;
  107. + bus-range = <0x00 0xff>;
  108. + num-lanes = <1>;
  109. + #address-cells = <3>;
  110. + #size-cells = <2>;
  111. +
  112. + ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
  113. + 0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
  114. +
  115. + interrupts = <GIC_SPI 35 IRQ_TYPE_NONE>;
  116. + interrupt-names = "msi";
  117. + #interrupt-cells = <1>;
  118. + interrupt-map-mask = <0 0 0 0x7>;
  119. + interrupt-map = <0 0 0 1 &intc 0 36 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  120. + <0 0 0 2 &intc 0 37 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  121. + <0 0 0 3 &intc 0 38 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  122. + <0 0 0 4 &intc 0 39 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  123. +
  124. + clocks = <&gcc PCIE_A_CLK>,
  125. + <&gcc PCIE_H_CLK>,
  126. + <&gcc PCIE_PHY_CLK>;
  127. + clock-names = "core", "iface", "phy";
  128. +
  129. + resets = <&gcc PCIE_ACLK_RESET>,
  130. + <&gcc PCIE_HCLK_RESET>,
  131. + <&gcc PCIE_POR_RESET>,
  132. + <&gcc PCIE_PCI_RESET>,
  133. + <&gcc PCIE_PHY_RESET>;
  134. + reset-names = "axi", "ahb", "por", "pci", "phy";
  135. +
  136. + pinctrl-0 = <&pcie0_pins>;
  137. + pinctrl-names = "default";
  138. +
  139. + perst-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
  140. +
  141. + status = "disabled";
  142. + };
  143. +
  144. + pcie1: pci@1b700000 {
  145. + compatible = "qcom,pcie-v0";
  146. + reg = <0x1b700000 0x1000
  147. + 0x1b702000 0x80
  148. + 0x1b800000 0x100
  149. + 0x31f00000 0x100000>;
  150. + reg-names = "dbi", "elbi", "parf", "config";
  151. + device_type = "pci";
  152. + linux,pci-domain = <1>;
  153. + bus-range = <0x00 0xff>;
  154. + num-lanes = <1>;
  155. + #address-cells = <3>;
  156. + #size-cells = <2>;
  157. +
  158. + ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
  159. + 0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
  160. +
  161. + interrupts = <GIC_SPI 57 IRQ_TYPE_NONE>;
  162. + interrupt-names = "msi";
  163. + #interrupt-cells = <1>;
  164. + interrupt-map-mask = <0 0 0 0x7>;
  165. + interrupt-map = <0 0 0 1 &intc 0 58 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  166. + <0 0 0 2 &intc 0 59 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  167. + <0 0 0 3 &intc 0 60 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  168. + <0 0 0 4 &intc 0 61 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  169. +
  170. + clocks = <&gcc PCIE_1_A_CLK>,
  171. + <&gcc PCIE_1_H_CLK>,
  172. + <&gcc PCIE_1_PHY_CLK>;
  173. + clock-names = "core", "iface", "phy";
  174. +
  175. + resets = <&gcc PCIE_1_ACLK_RESET>,
  176. + <&gcc PCIE_1_HCLK_RESET>,
  177. + <&gcc PCIE_1_POR_RESET>,
  178. + <&gcc PCIE_1_PCI_RESET>,
  179. + <&gcc PCIE_1_PHY_RESET>;
  180. + reset-names = "axi", "ahb", "por", "pci", "phy";
  181. +
  182. + pinctrl-0 = <&pcie1_pins>;
  183. + pinctrl-names = "default";
  184. +
  185. + perst-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
  186. +
  187. + status = "disabled";
  188. + };
  189. +
  190. + pcie2: pci@1b900000 {
  191. + compatible = "qcom,pcie-v0";
  192. + reg = <0x1b900000 0x1000
  193. + 0x1b902000 0x80
  194. + 0x1ba00000 0x100
  195. + 0x35f00000 0x100000>;
  196. + reg-names = "dbi", "elbi", "parf", "config";
  197. + device_type = "pci";
  198. + linux,pci-domain = <2>;
  199. + bus-range = <0x00 0xff>;
  200. + num-lanes = <1>;
  201. + #address-cells = <3>;
  202. + #size-cells = <2>;
  203. +
  204. + ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
  205. + 0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
  206. +
  207. + interrupts = <GIC_SPI 71 IRQ_TYPE_NONE>;
  208. + interrupt-names = "msi";
  209. + #interrupt-cells = <1>;
  210. + interrupt-map-mask = <0 0 0 0x7>;
  211. + interrupt-map = <0 0 0 1 &intc 0 72 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  212. + <0 0 0 2 &intc 0 73 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  213. + <0 0 0 3 &intc 0 74 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  214. + <0 0 0 4 &intc 0 75 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  215. +
  216. + clocks = <&gcc PCIE_2_A_CLK>,
  217. + <&gcc PCIE_2_H_CLK>,
  218. + <&gcc PCIE_2_PHY_CLK>;
  219. + clock-names = "core", "iface", "phy";
  220. +
  221. + resets = <&gcc PCIE_2_ACLK_RESET>,
  222. + <&gcc PCIE_2_HCLK_RESET>,
  223. + <&gcc PCIE_2_POR_RESET>,
  224. + <&gcc PCIE_2_PCI_RESET>,
  225. + <&gcc PCIE_2_PHY_RESET>;
  226. + reset-names = "axi", "ahb", "por", "pci", "phy";
  227. +
  228. + pinctrl-0 = <&pcie2_pins>;
  229. + pinctrl-names = "default";
  230. +
  231. + perst-gpio = <&qcom_pinmux 63 GPIO_ACTIVE_LOW>;
  232. +
  233. + status = "disabled";
  234. + };
  235. +
  236. hs_phy_1: phy@100f8800 {
  237. compatible = "qcom,dwc3-hs-usb-phy";
  238. reg = <0x100f8800 0x30>;