qcom-ipq8064-wpq864.dts 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. /*
  2. * BSD LICENSE
  3. *
  4. * Copyright (C) 2017 Christian Mehlis <[email protected]>
  5. * Copyright (C) 2018 Mathias Kresin <[email protected]>
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the names of the copyright holders nor the names of any
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. #include "qcom-ipq8064-v1.0.dtsi"
  34. #include <dt-bindings/input/input.h>
  35. #include <dt-bindings/soc/qcom,tcsr.h>
  36. / {
  37. compatible = "compex,wpq864", "qcom,ipq8064";
  38. model = "Compex WPQ864";
  39. aliases {
  40. mdio-gpio0 = &mdio0;
  41. ethernet0 = &gmac1;
  42. ethernet1 = &gmac0;
  43. led-boot = &led_pass;
  44. led-failsafe = &led_fail;
  45. led-running = &led_pass;
  46. led-upgrade = &led_pass;
  47. };
  48. leds {
  49. compatible = "gpio-leds";
  50. pinctrl-0 = <&led_pins>;
  51. pinctrl-names = "default";
  52. rss4 {
  53. label = "green:rss4";
  54. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  55. };
  56. rss3 {
  57. label = "green:rss3";
  58. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  59. default-state = "keep";
  60. };
  61. rss2 {
  62. label = "orange:rss2";
  63. gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
  64. };
  65. rss1 {
  66. label = "red:rss1";
  67. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  68. };
  69. led_pass: pass {
  70. label = "green:pass";
  71. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  72. };
  73. led_fail: fail {
  74. label = "green:fail";
  75. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  76. };
  77. usb {
  78. label = "green:usb";
  79. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  80. };
  81. usb-pcie {
  82. label = "green:usb-pcie";
  83. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  84. };
  85. };
  86. keys {
  87. compatible = "gpio-keys";
  88. pinctrl-0 = <&button_pins>;
  89. pinctrl-names = "default";
  90. reset {
  91. label = "reset";
  92. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  93. linux,code = <KEY_RESTART>;
  94. };
  95. };
  96. beeper {
  97. compatible = "gpio-beeper";
  98. pinctrl-0 = <&beeper_pins>;
  99. pinctrl-names = "default";
  100. gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
  101. };
  102. };
  103. &rpm {
  104. pinctrl-0 = <&rpm_pins>;
  105. pinctrl-names = "default";
  106. };
  107. &nand_controller {
  108. status = "okay";
  109. pinctrl-0 = <&nand_pins>;
  110. pinctrl-names = "default";
  111. mt29f2g08abbeah4@0 {
  112. compatible = "qcom,nandcs";
  113. reg = <0>;
  114. nand-ecc-strength = <4>;
  115. nand-bus-width = <8>;
  116. nand-ecc-step-size = <512>;
  117. partitions {
  118. compatible = "fixed-partitions";
  119. #address-cells = <1>;
  120. #size-cells = <1>;
  121. SBL1@0 {
  122. label = "SBL1";
  123. reg = <0x0000000 0x0040000>;
  124. read-only;
  125. };
  126. MIBIB@40000 {
  127. label = "MIBIB";
  128. reg = <0x0040000 0x0140000>;
  129. read-only;
  130. };
  131. SBL2@180000 {
  132. label = "SBL2";
  133. reg = <0x0180000 0x0140000>;
  134. read-only;
  135. };
  136. SBL3@2c0000 {
  137. label = "SBL3";
  138. reg = <0x02c0000 0x0280000>;
  139. read-only;
  140. };
  141. DDRCONFIG@540000 {
  142. label = "DDRCONFIG";
  143. reg = <0x0540000 0x0120000>;
  144. read-only;
  145. };
  146. SSD@660000 {
  147. label = "SSD";
  148. reg = <0x0660000 0x0120000>;
  149. read-only;
  150. };
  151. TZ@780000 {
  152. label = "TZ";
  153. reg = <0x0780000 0x0280000>;
  154. read-only;
  155. };
  156. RPM@a00000 {
  157. label = "RPM";
  158. reg = <0x0a00000 0x0280000>;
  159. read-only;
  160. };
  161. APPSBL@c80000 {
  162. label = "APPSBL";
  163. reg = <0x0c80000 0x0500000>;
  164. read-only;
  165. };
  166. APPSBLENV@1180000 {
  167. label = "APPSBLENV";
  168. reg = <0x1180000 0x0080000>;
  169. };
  170. ART@1200000 {
  171. label = "ART";
  172. reg = <0x1200000 0x0140000>;
  173. };
  174. ubi@1340000 {
  175. label = "ubi";
  176. reg = <0x1340000 0x4000000>;
  177. };
  178. BOOTCONFIG@5340000 {
  179. label = "BOOTCONFIG";
  180. reg = <0x5340000 0x0060000>;
  181. };
  182. SBL2-1@53a0000- {
  183. label = "SBL2_1";
  184. reg = <0x53a0000 0x0140000>;
  185. read-only;
  186. };
  187. SBL3-1@54e0000 {
  188. label = "SBL3_1";
  189. reg = <0x54e0000 0x0280000>;
  190. read-only;
  191. };
  192. DDRCONFIG-1@5760000 {
  193. label = "DDRCONFIG_1";
  194. reg = <0x5760000 0x0120000>;
  195. read-only;
  196. };
  197. SSD-1@5880000 {
  198. label = "SSD_1";
  199. reg = <0x5880000 0x0120000>;
  200. read-only;
  201. };
  202. TZ-1@59a0000 {
  203. label = "TZ_1";
  204. reg = <0x59a0000 0x0280000>;
  205. read-only;
  206. };
  207. RPM-1@5c20000 {
  208. label = "RPM_1";
  209. reg = <0x5c20000 0x0280000>;
  210. read-only;
  211. };
  212. BOOTCONFIG1@5ea0000 {
  213. label = "BOOTCONFIG1";
  214. reg = <0x5ea0000 0x0060000>;
  215. };
  216. APPSBL-1@5f00000 {
  217. label = "APPSBL_1";
  218. reg = <0x5f00000 0x0500000>;
  219. read-only;
  220. };
  221. ubi-1@6400000 {
  222. label = "ubi_1";
  223. reg = <0x6400000 0x4000000>;
  224. };
  225. unused@a400000 {
  226. label = "unused";
  227. reg = <0xa400000 0x5c00000>;
  228. };
  229. };
  230. };
  231. };
  232. &adm_dma {
  233. status = "okay";
  234. };
  235. &mdio0 {
  236. status = "okay";
  237. pinctrl-0 = <&mdio0_pins>;
  238. pinctrl-names = "default";
  239. ethernet-phy@0 {
  240. reg = <0>;
  241. qca,ar8327-initvals = <
  242. 0x00004 0x7600000 /* PAD0_MODE */
  243. 0x00008 0x1000000 /* PAD5_MODE */
  244. 0x0000c 0x80 /* PAD6_MODE */
  245. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  246. 0x000e0 0xc74164de /* SGMII_CTRL */
  247. 0x0007c 0x4e /* PORT0_STATUS */
  248. 0x00094 0x4e /* PORT6_STATUS */
  249. >;
  250. };
  251. ethernet-phy@4 {
  252. reg = <4>;
  253. };
  254. };
  255. &gmac1 {
  256. status = "okay";
  257. pinctrl-0 = <&rgmii2_pins>;
  258. pinctrl-names = "default";
  259. phy-mode = "rgmii";
  260. qcom,id = <1>;
  261. fixed-link {
  262. speed = <1000>;
  263. full-duplex;
  264. };
  265. };
  266. &gmac2 {
  267. status = "okay";
  268. phy-mode = "sgmii";
  269. qcom,id = <2>;
  270. fixed-link {
  271. speed = <1000>;
  272. full-duplex;
  273. };
  274. };
  275. &gsbi4_serial {
  276. pinctrl-0 = <&uart0_pins>;
  277. pinctrl-names = "default";
  278. };
  279. &flash {
  280. compatible = "jedec,spi-nor";
  281. };
  282. &sata_phy {
  283. status = "disabled";
  284. };
  285. &sata {
  286. status = "disabled";
  287. };
  288. &ss_phy_0 { /* USB3 port 0 SS phy */
  289. status = "okay";
  290. rx_eq = <2>;
  291. tx_deamp_3_5db = <32>;
  292. mpll = <160>;
  293. };
  294. &ss_phy_1 { /* USB3 port 1 SS phy */
  295. status = "okay";
  296. rx_eq = <2>;
  297. tx_deamp_3_5db = <32>;
  298. mpll = <160>;
  299. };
  300. &pcie0 {
  301. status = "okay";
  302. /delete-property/ pinctrl-0;
  303. /delete-property/ pinctrl-names;
  304. /delete-property/ perst-gpios;
  305. };
  306. &pcie1 {
  307. status = "okay";
  308. };
  309. &pcie2 {
  310. status = "okay";
  311. /delete-property/ pinctrl-0;
  312. /delete-property/ pinctrl-names;
  313. /delete-property/ perst-gpios;
  314. };
  315. &qcom_pinmux {
  316. pinctrl-names = "default";
  317. pinctrl-0 = <&state_default>;
  318. state_default: pinctrl0 {
  319. pcie0_pcie2_perst {
  320. pins = "gpio3";
  321. function = "gpio";
  322. drive-strength = <2>;
  323. bias-disable;
  324. output-high;
  325. };
  326. };
  327. led_pins: led_pins {
  328. mux {
  329. pins = "gpio7", "gpio8", "gpio9", "gpio22",
  330. "gpio23", "gpio24", "gpio25", "gpio53";
  331. function = "gpio";
  332. drive-strength = <2>;
  333. bias-pull-up;
  334. };
  335. };
  336. button_pins: button_pins {
  337. mux {
  338. pins = "gpio54";
  339. function = "gpio";
  340. drive-strength = <2>;
  341. bias-pull-up;
  342. };
  343. };
  344. beeper_pins: beeper_pins {
  345. mux {
  346. pins = "gpio55";
  347. function = "gpio";
  348. drive-strength = <2>;
  349. bias-pull-up;
  350. };
  351. };
  352. rpm_pins: rpm_pins {
  353. mux {
  354. pins = "gpio12", "gpio13";
  355. function = "gsbi4";
  356. drive-strength = <10>;
  357. bias-disable;
  358. };
  359. };
  360. uart0_pins: uart0_pins {
  361. mux {
  362. pins = "gpio10", "gpio11";
  363. function = "gsbi4";
  364. drive-strength = <10>;
  365. bias-disable;
  366. };
  367. };
  368. spi_pins: spi_pins {
  369. mux {
  370. pins = "gpio18", "gpio19";
  371. function = "gsbi5";
  372. drive-strength = <10>;
  373. bias-pull-down;
  374. };
  375. clk {
  376. pins = "gpio21";
  377. function = "gsbi5";
  378. drive-strength = <12>;
  379. bias-pull-down;
  380. };
  381. cs {
  382. pins = "gpio20";
  383. function = "gpio";
  384. drive-strength = <10>;
  385. bias-pull-up;
  386. };
  387. };
  388. };
  389. &usb3_0 {
  390. status = "okay";
  391. };
  392. &usb3_1 {
  393. status = "okay";
  394. };
  395. &tcsr {
  396. qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
  397. };