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

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