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. @@ -116,5 +116,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. @@ -4,6 +4,9 @@
  54. #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
  55. #include <dt-bindings/clock/qcom,lcc-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. @@ -99,6 +102,33 @@
  63. interrupt-controller;
  64. #interrupt-cells = <2>;
  65. interrupts = <0 16 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. @@ -417,6 +447,144 @@
  96. dr_mode = "host";
  97. };
  98. };
  99. +
  100. + pcie0: pci@1b500000 {
  101. + compatible = "qcom,pcie-v0";
  102. + reg = <0x1b500000 0x1000
  103. + 0x1b502000 0x80
  104. + 0x1b600000 0x100
  105. + 0x0ff00000 0x100000>;
  106. + reg-names = "dbi", "elbi", "parf", "config";
  107. + device_type = "pci";
  108. + linux,pci-domain = <0>;
  109. + bus-range = <0x00 0xff>;
  110. + num-lanes = <1>;
  111. + #address-cells = <3>;
  112. + #size-cells = <2>;
  113. +
  114. + ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
  115. + 0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
  116. +
  117. + interrupts = <GIC_SPI 35 IRQ_TYPE_NONE>;
  118. + interrupt-names = "msi";
  119. + #interrupt-cells = <1>;
  120. + interrupt-map-mask = <0 0 0 0x7>;
  121. + interrupt-map = <0 0 0 1 &intc 0 36 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  122. + <0 0 0 2 &intc 0 37 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  123. + <0 0 0 3 &intc 0 38 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  124. + <0 0 0 4 &intc 0 39 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  125. +
  126. + clocks = <&gcc PCIE_A_CLK>,
  127. + <&gcc PCIE_H_CLK>,
  128. + <&gcc PCIE_PHY_CLK>;
  129. + clock-names = "core", "iface", "phy";
  130. +
  131. + resets = <&gcc PCIE_ACLK_RESET>,
  132. + <&gcc PCIE_HCLK_RESET>,
  133. + <&gcc PCIE_POR_RESET>,
  134. + <&gcc PCIE_PCI_RESET>,
  135. + <&gcc PCIE_PHY_RESET>;
  136. + reset-names = "axi", "ahb", "por", "pci", "phy";
  137. +
  138. + pinctrl-0 = <&pcie0_pins>;
  139. + pinctrl-names = "default";
  140. +
  141. + perst-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
  142. +
  143. + status = "disabled";
  144. + };
  145. +
  146. + pcie1: pci@1b700000 {
  147. + compatible = "qcom,pcie-v0";
  148. + reg = <0x1b700000 0x1000
  149. + 0x1b702000 0x80
  150. + 0x1b800000 0x100
  151. + 0x31f00000 0x100000>;
  152. + reg-names = "dbi", "elbi", "parf", "config";
  153. + device_type = "pci";
  154. + linux,pci-domain = <1>;
  155. + bus-range = <0x00 0xff>;
  156. + num-lanes = <1>;
  157. + #address-cells = <3>;
  158. + #size-cells = <2>;
  159. +
  160. + ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
  161. + 0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
  162. +
  163. + interrupts = <GIC_SPI 57 IRQ_TYPE_NONE>;
  164. + interrupt-names = "msi";
  165. + #interrupt-cells = <1>;
  166. + interrupt-map-mask = <0 0 0 0x7>;
  167. + interrupt-map = <0 0 0 1 &intc 0 58 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  168. + <0 0 0 2 &intc 0 59 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  169. + <0 0 0 3 &intc 0 60 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  170. + <0 0 0 4 &intc 0 61 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  171. +
  172. + clocks = <&gcc PCIE_1_A_CLK>,
  173. + <&gcc PCIE_1_H_CLK>,
  174. + <&gcc PCIE_1_PHY_CLK>;
  175. + clock-names = "core", "iface", "phy";
  176. +
  177. + resets = <&gcc PCIE_1_ACLK_RESET>,
  178. + <&gcc PCIE_1_HCLK_RESET>,
  179. + <&gcc PCIE_1_POR_RESET>,
  180. + <&gcc PCIE_1_PCI_RESET>,
  181. + <&gcc PCIE_1_PHY_RESET>;
  182. + reset-names = "axi", "ahb", "por", "pci", "phy";
  183. +
  184. + pinctrl-0 = <&pcie1_pins>;
  185. + pinctrl-names = "default";
  186. +
  187. + perst-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
  188. +
  189. + status = "disabled";
  190. + };
  191. +
  192. + pcie2: pci@1b900000 {
  193. + compatible = "qcom,pcie-v0";
  194. + reg = <0x1b900000 0x1000
  195. + 0x1b902000 0x80
  196. + 0x1ba00000 0x100
  197. + 0x35f00000 0x100000>;
  198. + reg-names = "dbi", "elbi", "parf", "config";
  199. + device_type = "pci";
  200. + linux,pci-domain = <2>;
  201. + bus-range = <0x00 0xff>;
  202. + num-lanes = <1>;
  203. + #address-cells = <3>;
  204. + #size-cells = <2>;
  205. +
  206. + ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
  207. + 0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
  208. +
  209. + interrupts = <GIC_SPI 71 IRQ_TYPE_NONE>;
  210. + interrupt-names = "msi";
  211. + #interrupt-cells = <1>;
  212. + interrupt-map-mask = <0 0 0 0x7>;
  213. + interrupt-map = <0 0 0 1 &intc 0 72 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
  214. + <0 0 0 2 &intc 0 73 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
  215. + <0 0 0 3 &intc 0 74 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
  216. + <0 0 0 4 &intc 0 75 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
  217. +
  218. + clocks = <&gcc PCIE_2_A_CLK>,
  219. + <&gcc PCIE_2_H_CLK>,
  220. + <&gcc PCIE_2_PHY_CLK>;
  221. + clock-names = "core", "iface", "phy";
  222. +
  223. + resets = <&gcc PCIE_2_ACLK_RESET>,
  224. + <&gcc PCIE_2_HCLK_RESET>,
  225. + <&gcc PCIE_2_POR_RESET>,
  226. + <&gcc PCIE_2_PCI_RESET>,
  227. + <&gcc PCIE_2_PHY_RESET>;
  228. + reset-names = "axi", "ahb", "por", "pci", "phy";
  229. +
  230. + pinctrl-0 = <&pcie2_pins>;
  231. + pinctrl-names = "default";
  232. +
  233. + perst-gpio = <&qcom_pinmux 63 GPIO_ACTIVE_LOW>;
  234. +
  235. + status = "disabled";
  236. + };
  237. };
  238. sfpb_mutex: sfpb-mutex {