qcom-ipq8064-wpq864.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  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. serial0 = &gsbi4_serial;
  42. ethernet0 = &gmac1;
  43. ethernet1 = &gmac0;
  44. led-boot = &led_pass;
  45. led-failsafe = &led_fail;
  46. led-running = &led_pass;
  47. led-upgrade = &led_pass;
  48. };
  49. chosen {
  50. linux,stdout-path = "serial0:115200n8";
  51. };
  52. soc {
  53. rpm@108000 {
  54. pinctrl-0 = <&rpm_pins>;
  55. pinctrl-names = "default";
  56. };
  57. nand@1ac00000 {
  58. status = "okay";
  59. pinctrl-0 = <&nand_pins>;
  60. pinctrl-names = "default";
  61. mt29f2g08abbeah4@0 {
  62. compatible = "qcom,nandcs";
  63. reg = <0>;
  64. nand-ecc-strength = <4>;
  65. nand-bus-width = <8>;
  66. nand-ecc-step-size = <512>;
  67. partitions {
  68. compatible = "fixed-partitions";
  69. #address-cells = <1>;
  70. #size-cells = <1>;
  71. SBL1@0 {
  72. label = "SBL1";
  73. reg = <0x0000000 0x0040000>;
  74. read-only;
  75. };
  76. MIBIB@40000 {
  77. label = "MIBIB";
  78. reg = <0x0040000 0x0140000>;
  79. read-only;
  80. };
  81. SBL2@180000 {
  82. label = "SBL2";
  83. reg = <0x0180000 0x0140000>;
  84. read-only;
  85. };
  86. SBL3@2c0000 {
  87. label = "SBL3";
  88. reg = <0x02c0000 0x0280000>;
  89. read-only;
  90. };
  91. DDRCONFIG@540000 {
  92. label = "DDRCONFIG";
  93. reg = <0x0540000 0x0120000>;
  94. read-only;
  95. };
  96. SSD@660000 {
  97. label = "SSD";
  98. reg = <0x0660000 0x0120000>;
  99. read-only;
  100. };
  101. TZ@780000 {
  102. label = "TZ";
  103. reg = <0x0780000 0x0280000>;
  104. read-only;
  105. };
  106. RPM@a00000 {
  107. label = "RPM";
  108. reg = <0x0a00000 0x0280000>;
  109. read-only;
  110. };
  111. APPSBL@c80000 {
  112. label = "APPSBL";
  113. reg = <0x0c80000 0x0500000>;
  114. read-only;
  115. };
  116. APPSBLENV@1180000 {
  117. label = "APPSBLENV";
  118. reg = <0x1180000 0x0080000>;
  119. };
  120. ART@1200000 {
  121. label = "ART";
  122. reg = <0x1200000 0x0140000>;
  123. };
  124. ubi@1340000 {
  125. label = "ubi";
  126. reg = <0x1340000 0x4000000>;
  127. };
  128. BOOTCONFIG@1340000 {
  129. label = "BOOTCONFIG";
  130. reg = <0x5340000 0x0060000>;
  131. };
  132. SBL2-1@53a0000- {
  133. label = "SBL2_1";
  134. reg = <0x53a0000 0x0140000>;
  135. read-only;
  136. };
  137. SBL3-1@54e0000 {
  138. label = "SBL3_1";
  139. reg = <0x54e0000 0x0280000>;
  140. read-only;
  141. };
  142. DDRCONFIG-1@5760000 {
  143. label = "DDRCONFIG_1";
  144. reg = <0x5760000 0x0120000>;
  145. read-only;
  146. };
  147. SSD-1@5880000 {
  148. label = "SSD_1";
  149. reg = <0x5880000 0x0120000>;
  150. read-only;
  151. };
  152. TZ-1@59a0000 {
  153. label = "TZ_1";
  154. reg = <0x59a0000 0x0280000>;
  155. read-only;
  156. };
  157. RPM-1@5c20000 {
  158. label = "RPM_1";
  159. reg = <0x5c20000 0x0280000>;
  160. read-only;
  161. };
  162. BOOTCONFIG1@5ea0000 {
  163. label = "BOOTCONFIG1";
  164. reg = <0x5ea0000 0x0060000>;
  165. };
  166. APPSBL-1@5f00000 {
  167. label = "APPSBL_1";
  168. reg = <0x5f00000 0x0500000>;
  169. read-only;
  170. };
  171. ubi-1@6400000 {
  172. label = "ubi_1";
  173. reg = <0x6400000 0x4000000>;
  174. };
  175. unused@a400000 {
  176. label = "unused";
  177. reg = <0xa400000 0x5c00000>;
  178. };
  179. };
  180. };
  181. };
  182. };
  183. mdio0: mdio {
  184. #address-cells = <1>;
  185. #size-cells = <0>;
  186. compatible = "virtual,mdio-gpio";
  187. pinctrl-0 = <&mdio0_pins>;
  188. pinctrl-names = "default";
  189. gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  190. ethernet-phy@0 {
  191. reg = <0>;
  192. qca,ar8327-initvals = <
  193. 0x00004 0x7600000 /* PAD0_MODE */
  194. 0x00008 0x1000000 /* PAD5_MODE */
  195. 0x0000c 0x80 /* PAD6_MODE */
  196. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  197. 0x000e0 0xc74164de /* SGMII_CTRL */
  198. 0x0007c 0x4e /* PORT0_STATUS */
  199. 0x00094 0x4e /* PORT6_STATUS */
  200. >;
  201. };
  202. ethernet-phy@4 {
  203. reg = <4>;
  204. };
  205. };
  206. gpio-leds {
  207. compatible = "gpio-leds";
  208. pinctrl-0 = <&led_pins>;
  209. pinctrl-names = "default";
  210. rss4 {
  211. label = "wpq864:green:rss4";
  212. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  213. };
  214. rss3 {
  215. label = "wpq864:green:rss3";
  216. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  217. default-state = "keep";
  218. };
  219. rss2 {
  220. label = "wpq864:orange:rss2";
  221. gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
  222. };
  223. rss1 {
  224. label = "wpq864:red:rss1";
  225. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  226. };
  227. led_pass: pass {
  228. label = "wpq864:green:pass";
  229. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  230. };
  231. led_fail: fail {
  232. label = "wpq864:green:fail";
  233. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  234. };
  235. usb {
  236. label = "wpq864:green:usb";
  237. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  238. };
  239. usb-pcie {
  240. label = "wpq864:green:usb-pcie";
  241. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  242. };
  243. };
  244. gpio-keys {
  245. compatible = "gpio-keys";
  246. pinctrl-0 = <&button_pins>;
  247. pinctrl-names = "default";
  248. reset {
  249. label = "reset";
  250. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  251. linux,code = <KEY_RESTART>;
  252. };
  253. };
  254. beeper {
  255. compatible = "gpio-beeper";
  256. pinctrl-0 = <&beeper_pins>;
  257. pinctrl-names = "default";
  258. gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
  259. };
  260. };
  261. &adm_dma {
  262. status = "okay";
  263. };
  264. &gmac1 {
  265. status = "okay";
  266. pinctrl-0 = <&rgmii2_pins>;
  267. pinctrl-names = "default";
  268. phy-mode = "rgmii";
  269. qcom,id = <1>;
  270. fixed-link {
  271. speed = <1000>;
  272. full-duplex;
  273. };
  274. };
  275. &gmac2 {
  276. status = "okay";
  277. phy-mode = "sgmii";
  278. qcom,id = <2>;
  279. fixed-link {
  280. speed = <1000>;
  281. full-duplex;
  282. };
  283. };
  284. &gsbi4 {
  285. status = "okay";
  286. qcom,mode = <GSBI_PROT_I2C_UART>;
  287. };
  288. &gsbi4_serial {
  289. status = "okay";
  290. pinctrl-0 = <&uart0_pins>;
  291. pinctrl-names = "default";
  292. };
  293. &gsbi5 {
  294. status = "okay";
  295. qcom,mode = <GSBI_PROT_SPI>;
  296. spi@1a280000 {
  297. status = "okay";
  298. pinctrl-0 = <&spi_pins>;
  299. pinctrl-names = "default";
  300. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  301. s25fl256s1@0 {
  302. compatible = "jedec,spi-nor";
  303. #address-cells = <1>;
  304. #size-cells = <1>;
  305. reg = <0>;
  306. spi-max-frequency = <50000000>;
  307. };
  308. };
  309. };
  310. &hs_phy_0 { /* USB3 port 0 HS phy */
  311. status = "okay";
  312. };
  313. &hs_phy_1 { /* USB3 port 1 HS phy */
  314. status = "okay";
  315. };
  316. &ss_phy_0 { /* USB3 port 0 SS phy */
  317. status = "okay";
  318. rx_eq = <2>;
  319. tx_deamp_3_5db = <32>;
  320. mpll = <160>;
  321. };
  322. &ss_phy_1 { /* USB3 port 1 SS phy */
  323. status = "okay";
  324. rx_eq = <2>;
  325. tx_deamp_3_5db = <32>;
  326. mpll = <160>;
  327. };
  328. &pcie0 {
  329. status = "okay";
  330. /delete-property/ pinctrl-0;
  331. /delete-property/ pinctrl-names;
  332. /delete-property/ perst-gpios;
  333. };
  334. &pcie1 {
  335. status = "okay";
  336. };
  337. &pcie2 {
  338. status = "okay";
  339. /delete-property/ pinctrl-0;
  340. /delete-property/ pinctrl-names;
  341. /delete-property/ perst-gpios;
  342. };
  343. &qcom_pinmux {
  344. pinctrl-names = "default";
  345. pinctrl-0 = <&state_default>;
  346. state_default: pinctrl0 {
  347. pcie0_pcie2_perst {
  348. pins = "gpio3";
  349. function = "gpio";
  350. drive-strength = <2>;
  351. bias-disable;
  352. output-high;
  353. };
  354. };
  355. led_pins: led_pins {
  356. mux {
  357. pins = "gpio7", "gpio8", "gpio9", "gpio22",
  358. "gpio23", "gpio24", "gpio25", "gpio53";
  359. function = "gpio";
  360. drive-strength = <2>;
  361. bias-pull-up;
  362. };
  363. };
  364. button_pins: button_pins {
  365. mux {
  366. pins = "gpio54";
  367. function = "gpio";
  368. drive-strength = <2>;
  369. bias-pull-up;
  370. };
  371. };
  372. beeper_pins: beeper_pins {
  373. mux {
  374. pins = "gpio55";
  375. function = "gpio";
  376. drive-strength = <2>;
  377. bias-pull-up;
  378. };
  379. };
  380. rpm_pins: rpm_pins {
  381. mux {
  382. pins = "gpio12", "gpio13";
  383. function = "gsbi4";
  384. drive-strength = <10>;
  385. bias-disable;
  386. };
  387. };
  388. uart0_pins: uart0_pins {
  389. mux {
  390. pins = "gpio10", "gpio11";
  391. function = "gsbi4";
  392. drive-strength = <10>;
  393. bias-disable;
  394. };
  395. };
  396. spi_pins: spi_pins {
  397. mux {
  398. pins = "gpio18", "gpio19";
  399. function = "gsbi5";
  400. drive-strength = <10>;
  401. bias-pull-down;
  402. };
  403. clk {
  404. pins = "gpio21";
  405. function = "gsbi5";
  406. drive-strength = <12>;
  407. bias-pull-down;
  408. };
  409. cs {
  410. pins = "gpio20";
  411. function = "gpio";
  412. drive-strength = <10>;
  413. bias-pull-up;
  414. };
  415. };
  416. nand_pins: nand_pins {
  417. mux {
  418. pins = "gpio34", "gpio35", "gpio36", "gpio37",
  419. "gpio38", "gpio39", "gpio40", "gpio41",
  420. "gpio42", "gpio43", "gpio44", "gpio45",
  421. "gpio46", "gpio47";
  422. function = "nand";
  423. drive-strength = <10>;
  424. bias-disable;
  425. };
  426. pullups {
  427. pins = "gpio39";
  428. bias-pull-up;
  429. };
  430. hold {
  431. pins = "gpio40", "gpio41", "gpio42", "gpio43",
  432. "gpio44", "gpio45", "gpio46", "gpio47";
  433. bias-bus-hold;
  434. };
  435. };
  436. mdio0_pins: mdio0_pins {
  437. mux {
  438. pins = "gpio0", "gpio1";
  439. function = "gpio";
  440. drive-strength = <8>;
  441. bias-disable;
  442. };
  443. };
  444. rgmii2_pins: rgmii2_pins {
  445. mux {
  446. pins = "gpio27", "gpio28", "gpio29", "gpio30",
  447. "gpio31", "gpio32", "gpio51", "gpio52",
  448. "gpio59", "gpio60", "gpio61", "gpio62";
  449. function = "rgmii2";
  450. drive-strength = <8>;
  451. bias-disable;
  452. };
  453. };
  454. };
  455. &usb3_0 {
  456. status = "okay";
  457. };
  458. &usb3_1 {
  459. status = "okay";
  460. };
  461. &tcsr {
  462. qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
  463. };