qcom-ipq8065-rt4230w-rev6.dts 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. #include "qcom-ipq8065-smb208.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/leds/common.h>
  5. / {
  6. model = "Askey RT4230W REV6";
  7. compatible = "askey,rt4230w-rev6", "qcom,ipq8065", "qcom,ipq8064";
  8. memory@0 {
  9. reg = <0x42000000 0x3e000000>;
  10. device_type = "memory";
  11. };
  12. aliases {
  13. led-boot = &ledctrl3;
  14. led-failsafe = &ledctrl1;
  15. led-running = &ledctrl2;
  16. led-upgrade = &ledctrl3;
  17. };
  18. chosen {
  19. bootargs = "rootfstype=squashfs noinitrd";
  20. };
  21. keys {
  22. compatible = "gpio-keys";
  23. pinctrl-0 = <&button_pins>;
  24. pinctrl-names = "default";
  25. reset {
  26. label = "reset";
  27. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  28. linux,code = <KEY_RESTART>;
  29. };
  30. wps {
  31. label = "wps";
  32. gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
  33. linux,code = <KEY_WPS_BUTTON>;
  34. };
  35. };
  36. leds {
  37. compatible = "gpio-leds";
  38. pinctrl-0 = <&led_pins>;
  39. pinctrl-names = "default";
  40. ledctrl1: ledctrl1 {
  41. label = "ledctrl1";
  42. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  43. };
  44. ledctrl2: ledctrl2 {
  45. label = "ledctrl2";
  46. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  47. };
  48. ledctrl3: ledctrl3 {
  49. label = "ledctrl3";
  50. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  51. };
  52. };
  53. };
  54. &qcom_pinmux {
  55. button_pins: button_pins {
  56. mux {
  57. pins = "gpio54", "gpio68";
  58. function = "gpio";
  59. drive-strength = <2>;
  60. bias-pull-up;
  61. };
  62. };
  63. led_pins: led_pins {
  64. mux {
  65. pins = "gpio22", "gpio23", "gpio24";
  66. function = "gpio";
  67. drive-strength = <2>;
  68. bias-pull-down;
  69. };
  70. };
  71. rgmii2_pins: rgmii2-pins {
  72. mux {
  73. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31",
  74. "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62";
  75. function = "rgmii2";
  76. drive-strength = <8>;
  77. bias-disable;
  78. };
  79. tx {
  80. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32";
  81. input-disable;
  82. };
  83. };
  84. spi_pins: spi_pins {
  85. cs {
  86. pins = "gpio20";
  87. drive-strength = <12>;
  88. };
  89. };
  90. };
  91. &gsbi5 {
  92. qcom,mode = <GSBI_PROT_SPI>;
  93. status = "okay";
  94. spi@1a280000 {
  95. status = "okay";
  96. pinctrl-0 = <&spi_pins>;
  97. pinctrl-names = "default";
  98. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  99. flash@0 {
  100. compatible = "everspin,mr25h256";
  101. #address-cells = <1>;
  102. #size-cells = <1>;
  103. spi-max-frequency = <40000000>;
  104. reg = <0>;
  105. };
  106. };
  107. };
  108. &nand {
  109. status = "okay";
  110. nand@0 {
  111. reg = <0>;
  112. compatible = "qcom,nandcs";
  113. nand-ecc-strength = <4>;
  114. nand-bus-width = <8>;
  115. nand-ecc-step-size = <512>;
  116. qcom,boot-partitions = <0x0 0x1180000 0x1340000 0x10c0000>;
  117. partitions {
  118. compatible = "fixed-partitions";
  119. #address-cells = <1>;
  120. #size-cells = <1>;
  121. partition@0 {
  122. label = "0:SBL1";
  123. reg = <0x0000000 0x0040000>;
  124. read-only;
  125. };
  126. partition@40000 {
  127. label = "0:MIBIB";
  128. reg = <0x0040000 0x0140000>;
  129. read-only;
  130. };
  131. partition@180000 {
  132. label = "0:SBL2";
  133. reg = <0x0180000 0x0140000>;
  134. read-only;
  135. };
  136. partition@2c0000 {
  137. label = "0:SBL3";
  138. reg = <0x02c0000 0x0280000>;
  139. read-only;
  140. };
  141. partition@540000 {
  142. label = "0:DDRCONFIG";
  143. reg = <0x0540000 0x0120000>;
  144. read-only;
  145. };
  146. partition@660000 {
  147. label = "0:SSD";
  148. reg = <0x0660000 0x0120000>;
  149. read-only;
  150. };
  151. partition@780000 {
  152. label = "0:TZ";
  153. reg = <0x0780000 0x0280000>;
  154. read-only;
  155. };
  156. partition@a00000 {
  157. label = "0:RPM";
  158. reg = <0x0a00000 0x0280000>;
  159. read-only;
  160. };
  161. partition@c80000 {
  162. label = "0:APPSBL";
  163. reg = <0x0c80000 0x0500000>;
  164. read-only;
  165. };
  166. partition@1180000 {
  167. label = "0:APPSBLENV";
  168. reg = <0x1180000 0x0080000>;
  169. };
  170. partition@1200000 {
  171. label = "0:ART";
  172. reg = <0x1200000 0x0140000>;
  173. read-only;
  174. nvmem-layout {
  175. compatible = "fixed-layout";
  176. #address-cells = <1>;
  177. #size-cells = <1>;
  178. macaddr_ART_0: macaddr@0 {
  179. reg = <0x0 0x6>;
  180. };
  181. macaddr_ART_6: macaddr@6 {
  182. reg = <0x6 0x6>;
  183. };
  184. precal_ART_1000: precal@1000 {
  185. reg = <0x1000 0x2f20>;
  186. };
  187. precal_ART_5000: precal@5000 {
  188. reg = <0x5000 0x2f20>;
  189. };
  190. };
  191. };
  192. partition@1340000 {
  193. label = "0:BOOTCONFIG";
  194. reg = <0x1340000 0x0060000>;
  195. read-only;
  196. };
  197. partition@13a0000 {
  198. label = "0:SBL2_1";
  199. reg = <0x13a0000 0x0140000>;
  200. read-only;
  201. };
  202. partition@14e0000 {
  203. label = "0:SBL3_1";
  204. reg = <0x14e0000 0x0280000>;
  205. read-only;
  206. };
  207. partition@1760000 {
  208. label = "0:DDRCONFIG_1";
  209. reg = <0x1760000 0x0120000>;
  210. read-only;
  211. };
  212. partition@1880000 {
  213. label = "0:SSD_1";
  214. reg = <0x1880000 0x0120000>;
  215. read-only;
  216. };
  217. partition@19a0000 {
  218. label = "0:TZ_1";
  219. reg = <0x19a0000 0x0280000>;
  220. read-only;
  221. };
  222. partition@1c20000 {
  223. label = "0:RPM_1";
  224. reg = <0x1c20000 0x0280000>;
  225. read-only;
  226. };
  227. partition@1ea0000 {
  228. label = "0:BOOTCONFIG1";
  229. reg = <0x1ea0000 0x0060000>;
  230. read-only;
  231. };
  232. partition@1f00000 {
  233. label = "0:APPSBL_1";
  234. reg = <0x1f00000 0x0500000>;
  235. read-only;
  236. };
  237. partition@2400000 {
  238. label = "ubi";
  239. reg = <0x2400000 0x1a000000>;
  240. };
  241. };
  242. };
  243. };
  244. &mdio0 {
  245. status = "okay";
  246. pinctrl-0 = <&mdio0_pins>;
  247. pinctrl-names = "default";
  248. switch@10 {
  249. compatible = "qca,qca8337";
  250. #address-cells = <1>;
  251. #size-cells = <0>;
  252. reg = <0x10>;
  253. ports {
  254. #address-cells = <1>;
  255. #size-cells = <0>;
  256. port@0 {
  257. reg = <0>;
  258. label = "cpu";
  259. ethernet = <&gmac0>;
  260. phy-mode = "rgmii";
  261. tx-internal-delay-ps = <1000>;
  262. rx-internal-delay-ps = <1000>;
  263. fixed-link {
  264. speed = <1000>;
  265. full-duplex;
  266. };
  267. };
  268. port@1 {
  269. reg = <1>;
  270. label = "wan";
  271. phy-mode = "internal";
  272. phy-handle = <&phy_port1>;
  273. leds {
  274. #address-cells = <1>;
  275. #size-cells = <0>;
  276. led@0 {
  277. reg = <0>;
  278. color = <LED_COLOR_ID_GREEN>;
  279. function = LED_FUNCTION_WAN;
  280. default-state = "keep";
  281. };
  282. led@1 {
  283. reg = <1>;
  284. color = <LED_COLOR_ID_AMBER>;
  285. function = LED_FUNCTION_WAN;
  286. default-state = "keep";
  287. };
  288. };
  289. };
  290. port@2 {
  291. reg = <2>;
  292. label = "lan1";
  293. phy-mode = "internal";
  294. phy-handle = <&phy_port2>;
  295. leds {
  296. #address-cells = <1>;
  297. #size-cells = <0>;
  298. led@0 {
  299. reg = <0>;
  300. color = <LED_COLOR_ID_GREEN>;
  301. function = LED_FUNCTION_LAN;
  302. default-state = "keep";
  303. };
  304. led@1 {
  305. reg = <1>;
  306. color = <LED_COLOR_ID_AMBER>;
  307. function = LED_FUNCTION_LAN;
  308. default-state = "keep";
  309. };
  310. };
  311. };
  312. port@3 {
  313. reg = <3>;
  314. label = "lan2";
  315. phy-mode = "internal";
  316. phy-handle = <&phy_port3>;
  317. leds {
  318. #address-cells = <1>;
  319. #size-cells = <0>;
  320. led@0 {
  321. reg = <0>;
  322. color = <LED_COLOR_ID_GREEN>;
  323. function = LED_FUNCTION_LAN;
  324. default-state = "keep";
  325. };
  326. led@1 {
  327. reg = <1>;
  328. color = <LED_COLOR_ID_AMBER>;
  329. function = LED_FUNCTION_LAN;
  330. default-state = "keep";
  331. };
  332. };
  333. };
  334. port@4 {
  335. reg = <4>;
  336. label = "lan3";
  337. phy-mode = "internal";
  338. phy-handle = <&phy_port4>;
  339. leds {
  340. #address-cells = <1>;
  341. #size-cells = <0>;
  342. led@0 {
  343. reg = <0>;
  344. color = <LED_COLOR_ID_GREEN>;
  345. function = LED_FUNCTION_LAN;
  346. default-state = "keep";
  347. };
  348. led@1 {
  349. reg = <1>;
  350. color = <LED_COLOR_ID_AMBER>;
  351. function = LED_FUNCTION_LAN;
  352. default-state = "keep";
  353. };
  354. };
  355. };
  356. port@5 {
  357. reg = <5>;
  358. label = "lan4";
  359. phy-mode = "internal";
  360. phy-handle = <&phy_port5>;
  361. leds {
  362. #address-cells = <1>;
  363. #size-cells = <0>;
  364. led@0 {
  365. reg = <0>;
  366. color = <LED_COLOR_ID_GREEN>;
  367. function = LED_FUNCTION_LAN;
  368. default-state = "keep";
  369. };
  370. led@1 {
  371. reg = <1>;
  372. color = <LED_COLOR_ID_AMBER>;
  373. function = LED_FUNCTION_LAN;
  374. default-state = "keep";
  375. };
  376. };
  377. };
  378. port@6 {
  379. reg = <6>;
  380. label = "cpu";
  381. ethernet = <&gmac1>;
  382. phy-mode = "sgmii";
  383. qca,sgmii-enable-pll;
  384. fixed-link {
  385. speed = <1000>;
  386. full-duplex;
  387. };
  388. };
  389. };
  390. mdio {
  391. #address-cells = <1>;
  392. #size-cells = <0>;
  393. phy_port1: phy@0 {
  394. reg = <0>;
  395. };
  396. phy_port2: phy@1 {
  397. reg = <1>;
  398. };
  399. phy_port3: phy@2 {
  400. reg = <2>;
  401. };
  402. phy_port4: phy@3 {
  403. reg = <3>;
  404. };
  405. phy_port5: phy@4 {
  406. reg = <4>;
  407. };
  408. };
  409. };
  410. };
  411. &gmac0 {
  412. status = "okay";
  413. phy-mode = "rgmii";
  414. qcom,id = <0>;
  415. nvmem-cells = <&macaddr_ART_0>;
  416. nvmem-cell-names = "mac-address";
  417. pinctrl-0 = <&rgmii2_pins>;
  418. pinctrl-names = "default";
  419. fixed-link {
  420. speed = <1000>;
  421. full-duplex;
  422. };
  423. };
  424. &gmac1 {
  425. status = "okay";
  426. phy-mode = "sgmii";
  427. qcom,id = <1>;
  428. nvmem-cells = <&macaddr_ART_6>;
  429. nvmem-cell-names = "mac-address";
  430. fixed-link {
  431. speed = <1000>;
  432. full-duplex;
  433. };
  434. };
  435. &adm_dma {
  436. status = "okay";
  437. };
  438. &hs_phy_0 {
  439. status = "okay";
  440. };
  441. &ss_phy_0 {
  442. status = "okay";
  443. };
  444. &usb3_0 {
  445. status = "okay";
  446. };
  447. &hs_phy_1 {
  448. status = "okay";
  449. };
  450. &ss_phy_1 {
  451. status = "okay";
  452. };
  453. &usb3_1 {
  454. status = "okay";
  455. };
  456. &pcie0 {
  457. status = "okay";
  458. reset-gpios = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
  459. pinctrl-0 = <&pcie0_pins>;
  460. pinctrl-names = "default";
  461. bridge@0,0 {
  462. reg = <0x00000000 0 0 0 0>;
  463. #address-cells = <3>;
  464. #size-cells = <2>;
  465. ranges;
  466. wifi0: wifi@1,0 {
  467. compatible = "pci168c,0046";
  468. reg = <0x00010000 0 0 0 0>;
  469. nvmem-cells = <&precal_ART_1000>;
  470. nvmem-cell-names = "pre-calibration";
  471. };
  472. };
  473. };
  474. &pcie1 {
  475. status = "okay";
  476. reset-gpios = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
  477. pinctrl-0 = <&pcie1_pins>;
  478. pinctrl-names = "default";
  479. max-link-speed = <1>;
  480. bridge@0,0 {
  481. reg = <0x00000000 0 0 0 0>;
  482. #address-cells = <3>;
  483. #size-cells = <2>;
  484. ranges;
  485. wifi1: wifi@1,0 {
  486. compatible = "pci168c,0046";
  487. reg = <0x00010000 0 0 0 0>;
  488. nvmem-cells = <&precal_ART_5000>;
  489. nvmem-cell-names = "pre-calibration";
  490. };
  491. };
  492. };