2
0

mt7622-netgear-wax206.dts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /* Copyright (c) 2022, Marcel Ziswiler <[email protected]> */
  3. /dts-v1/;
  4. #include "mt7622.dtsi"
  5. #include "mt6380.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. / {
  9. model = "Netgear WAX206";
  10. compatible = "netgear,wax206", "mediatek,mt7622";
  11. aliases {
  12. ethernet0 = &gmac0;
  13. led-boot = &led_power_r;
  14. led-failsafe = &led_power_r;
  15. led-running = &led_power_g;
  16. led-upgrade = &led_power_g;
  17. serial0 = &uart0;
  18. };
  19. chosen {
  20. stdout-path = "serial0:115200n8";
  21. bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
  22. };
  23. cpus {
  24. cpu@0 {
  25. proc-supply = <&mt6380_vcpu_reg>;
  26. sram-supply = <&mt6380_vm_reg>;
  27. };
  28. cpu@1 {
  29. proc-supply = <&mt6380_vcpu_reg>;
  30. sram-supply = <&mt6380_vm_reg>;
  31. };
  32. };
  33. gpio-keys {
  34. compatible = "gpio-keys";
  35. reset {
  36. gpios = <&pio 0 GPIO_ACTIVE_LOW>;
  37. label = "reset";
  38. linux,code = <KEY_RESTART>;
  39. };
  40. wps {
  41. gpios = <&pio 102 GPIO_ACTIVE_LOW>;
  42. label = "wps";
  43. linux,code = <KEY_WPS_BUTTON>;
  44. };
  45. };
  46. gpio-leds {
  47. compatible = "gpio-leds";
  48. led_power_r: power_red {
  49. default-state = "on";
  50. gpios = <&pio 3 GPIO_ACTIVE_LOW>;
  51. label = "power:red";
  52. };
  53. led_power_g: power_green {
  54. default-state = "off";
  55. gpios = <&pio 4 GPIO_ACTIVE_LOW>;
  56. label = "power:green";
  57. };
  58. inet_green {
  59. default-state = "off";
  60. gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
  61. label = "inet:green";
  62. };
  63. inet_blue {
  64. default-state = "off";
  65. gpios = <&pio 17 GPIO_ACTIVE_LOW>;
  66. label = "inet:blue";
  67. };
  68. wifin_green {
  69. default-state = "off";
  70. gpios = <&pio 85 GPIO_ACTIVE_LOW>;
  71. label = "wifin:green";
  72. };
  73. wifin_blue {
  74. default-state = "off";
  75. gpios = <&pio 86 GPIO_ACTIVE_LOW>;
  76. label = "wifin:blue";
  77. };
  78. wifia_green {
  79. default-state = "off";
  80. gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
  81. label = "wifia:green";
  82. };
  83. wifia_blue {
  84. default-state = "off";
  85. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  86. label = "wifia:blue";
  87. };
  88. };
  89. memory {
  90. reg = <0 0x40000000 0 0x40000000>;
  91. };
  92. };
  93. &bch {
  94. status = "okay";
  95. };
  96. &cir {
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&irrx_pins>;
  99. status = "okay";
  100. };
  101. &eth {
  102. pinctrl-names = "default";
  103. pinctrl-0 = <&eth_pins>;
  104. status = "okay";
  105. gmac0: mac@0 {
  106. compatible = "mediatek,eth-mac";
  107. nvmem-cells = <&macaddr_factory_7fff4>;
  108. nvmem-cell-names = "mac-address";
  109. phy-mode = "2500base-x";
  110. reg = <0>;
  111. fixed-link {
  112. full-duplex;
  113. pause;
  114. speed = <2500>;
  115. };
  116. };
  117. mdio-bus {
  118. #address-cells = <1>;
  119. #size-cells = <0>;
  120. switch@0 {
  121. compatible = "mediatek,mt7531";
  122. #interrupt-cells = <1>;
  123. interrupt-controller;
  124. interrupt-parent = <&pio>;
  125. interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
  126. reg = <0>;
  127. reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
  128. ports {
  129. #address-cells = <1>;
  130. #size-cells = <0>;
  131. port@1 {
  132. label = "lan1";
  133. reg = <1>;
  134. };
  135. port@2 {
  136. label = "lan2";
  137. reg = <2>;
  138. };
  139. port@3 {
  140. label = "lan3";
  141. reg = <3>;
  142. };
  143. port@4 {
  144. label = "lan4";
  145. reg = <4>;
  146. };
  147. wan: port@5 {
  148. label = "wan";
  149. nvmem-cells = <&macaddr_factory_7fffa>;
  150. nvmem-cell-names = "mac-address";
  151. phy-handle = <&rtl8221b_phy>;
  152. phy-mode = "2500base-x";
  153. reg = <5>;
  154. };
  155. port@6 {
  156. ethernet = <&gmac0>;
  157. phy-mode = "2500base-x";
  158. reg = <6>;
  159. fixed-link {
  160. full-duplex;
  161. pause;
  162. speed = <2500>;
  163. };
  164. };
  165. };
  166. };
  167. rtl8221b_phy: ethernet-phy@7 {
  168. compatible = "ethernet-phy-ieee802.3-c45";
  169. reg = <7>;
  170. reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>;
  171. interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
  172. reset-assert-us = <100000>;
  173. reset-deassert-us = <100000>;
  174. };
  175. };
  176. };
  177. &pcie0 {
  178. pinctrl-names = "default";
  179. pinctrl-0 = <&pcie0_pins>;
  180. status = "okay";
  181. };
  182. &pcie1 {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&pcie1_pins>;
  185. status = "okay";
  186. };
  187. &pio {
  188. eth_pins: eth-pins {
  189. mux {
  190. function = "eth";
  191. groups = "mdc_mdio", "rgmii_via_gmac2";
  192. };
  193. };
  194. irrx_pins: irrx-pins {
  195. mux {
  196. function = "ir";
  197. groups = "ir_1_rx";
  198. };
  199. };
  200. irtx_pins: irtx-pins {
  201. mux {
  202. function = "ir";
  203. groups = "ir_1_tx";
  204. };
  205. };
  206. pcie0_pins: pcie0-pins {
  207. mux {
  208. function = "pcie";
  209. groups = "pcie0_pad_perst",
  210. "pcie0_1_waken",
  211. "pcie0_1_clkreq";
  212. };
  213. };
  214. pcie1_pins: pcie1-pins {
  215. mux {
  216. function = "pcie";
  217. groups = "pcie1_pad_perst",
  218. "pcie1_0_waken",
  219. "pcie1_0_clkreq";
  220. };
  221. };
  222. pmic_bus_pins: pmic-bus-pins {
  223. mux {
  224. function = "pmic";
  225. groups = "pmic_bus";
  226. };
  227. };
  228. pwm7_pins: pwm1-2-pins {
  229. mux {
  230. function = "pwm";
  231. groups = "pwm_ch7_2";
  232. };
  233. };
  234. wled_pins: wled-pins {
  235. mux {
  236. function = "led";
  237. groups = "wled";
  238. };
  239. };
  240. /* Serial NAND is shared pin with SPI-NOR */
  241. serial_nand_pins: serial-nand-pins {
  242. mux {
  243. function = "flash";
  244. groups = "snfi";
  245. };
  246. };
  247. spic0_pins: spic0-pins {
  248. mux {
  249. function = "spi";
  250. groups = "spic0_0";
  251. };
  252. };
  253. spic1_pins: spic1-pins {
  254. mux {
  255. function = "spi";
  256. groups = "spic1_0";
  257. };
  258. };
  259. uart0_pins: uart0-pins {
  260. mux {
  261. function = "uart";
  262. groups = "uart0_0_tx_rx";
  263. };
  264. };
  265. uart2_pins: uart2-pins {
  266. mux {
  267. function = "uart";
  268. groups = "uart2_1_tx_rx";
  269. };
  270. };
  271. watchdog_pins: watchdog-pins {
  272. mux {
  273. function = "watchdog";
  274. groups = "watchdog";
  275. };
  276. };
  277. };
  278. &pwm {
  279. pinctrl-names = "default";
  280. pinctrl-0 = <&pwm7_pins>;
  281. status = "okay";
  282. };
  283. &pwrap {
  284. pinctrl-names = "default";
  285. pinctrl-0 = <&pmic_bus_pins>;
  286. status = "okay";
  287. };
  288. &rtc {
  289. status = "disabled";
  290. };
  291. &sata {
  292. status = "disabled";
  293. };
  294. &sata_phy {
  295. status = "disabled";
  296. };
  297. &slot0 {
  298. wmac1: mt7915@0,0 {
  299. reg = <0x0000 0 0 0 0>;
  300. ieee80211-freq-limit = <5000000 6000000>;
  301. };
  302. };
  303. &snfi {
  304. pinctrl-names = "default";
  305. pinctrl-0 = <&serial_nand_pins>;
  306. status = "okay";
  307. snand: flash@0 {
  308. compatible = "spi-nand";
  309. mediatek,bmt-table-size = <0x1000>;
  310. mediatek,bmt-v2;
  311. nand-ecc-engine = <&snfi>;
  312. reg = <0>;
  313. spi-rx-bus-width = <4>;
  314. spi-tx-bus-width = <4>;
  315. partitions {
  316. compatible = "fixed-partitions";
  317. #address-cells = <1>;
  318. #size-cells = <1>;
  319. partition@0 {
  320. label = "Preloader";
  321. reg = <0x00000 0x0080000>;
  322. read-only;
  323. };
  324. partition@80000 {
  325. label = "ATF";
  326. reg = <0x80000 0x0040000>;
  327. read-only;
  328. };
  329. partition@c0000 {
  330. label = "Bootloader";
  331. reg = <0xc0000 0x0080000>;
  332. read-only;
  333. };
  334. partition@140000 {
  335. label = "Config";
  336. reg = <0x140000 0x0080000>;
  337. };
  338. factory: partition@1c0000 {
  339. label = "Factory";
  340. reg = <0x1c0000 0x0100000>;
  341. read-only;
  342. nvmem-layout {
  343. compatible = "fixed-layout";
  344. #address-cells = <1>;
  345. #size-cells = <1>;
  346. macaddr_factory_7fff4: macaddr@7fff4 {
  347. reg = <0x7fff4 0x6>;
  348. };
  349. macaddr_factory_7fffa: macaddr@7fffa {
  350. reg = <0x7fffa 0x6>;
  351. };
  352. };
  353. };
  354. partition@2c0000 {
  355. label = "firmware";
  356. reg = <0x2c0000 0x2600000>;
  357. compatible = "fixed-partitions";
  358. #address-cells = <1>;
  359. #size-cells = <1>;
  360. partition@0 {
  361. label = "kernel";
  362. reg = <0x0 0x600000>;
  363. };
  364. partition@600000 {
  365. label = "ubi";
  366. reg = <0x600000 0x2000000>;
  367. };
  368. };
  369. partition@28c0000 {
  370. label = "firmware_backup";
  371. reg = <0x28c0000 0x2600000>;
  372. read-only;
  373. };
  374. partition@4ec0000 {
  375. label = "CFG";
  376. reg = <0x4ec0000 0x800000>;
  377. read-only;
  378. };
  379. partition@56c0000 {
  380. label = "RAE";
  381. reg = <0x56c0000 0x400000>;
  382. read-only;
  383. };
  384. partition@5ac0000 {
  385. label = "POT";
  386. reg = <0x5ac0000 0x100000>;
  387. read-only;
  388. };
  389. partition@5bc0000 {
  390. label = "Language";
  391. reg = <0x5bc0000 0x400000>;
  392. read-only;
  393. };
  394. partition@5fc0000 {
  395. label = "Traffic";
  396. reg = <0x5fc0000 0x200000>;
  397. read-only;
  398. };
  399. partition@61c0000 {
  400. label = "Cert";
  401. reg = <0x61c0000 0x100000>;
  402. read-only;
  403. };
  404. partition@62c0000 {
  405. label = "NTGRcryptK";
  406. reg = <0x62c0000 0x100000>;
  407. read-only;
  408. };
  409. partition@63c0000 {
  410. label = "NTGRcryptD";
  411. reg = <0x63c0000 0x500000>;
  412. read-only;
  413. };
  414. partition@68c0000 {
  415. label = "LOG";
  416. reg = <0x68c0000 0x100000>;
  417. read-only;
  418. };
  419. partition@69c0000 {
  420. label = "User_data";
  421. reg = <0x69c0000 0x640000>;
  422. read-only;
  423. };
  424. };
  425. };
  426. };
  427. &spi0 {
  428. pinctrl-names = "default";
  429. pinctrl-0 = <&spic0_pins>;
  430. status = "okay";
  431. };
  432. &spi1 {
  433. pinctrl-names = "default";
  434. pinctrl-0 = <&spic1_pins>;
  435. status = "okay";
  436. };
  437. &ssusb {
  438. status = "disabled";
  439. };
  440. &u3phy {
  441. status = "disabled";
  442. };
  443. &uart0 {
  444. pinctrl-names = "default";
  445. pinctrl-0 = <&uart0_pins>;
  446. status = "okay";
  447. };
  448. &uart2 {
  449. pinctrl-names = "default";
  450. pinctrl-0 = <&uart2_pins>;
  451. status = "okay";
  452. };
  453. &watchdog {
  454. pinctrl-names = "default";
  455. pinctrl-0 = <&watchdog_pins>;
  456. status = "okay";
  457. };
  458. &wmac {
  459. mediatek,mtd-eeprom = <&factory 0x0000>;
  460. status = "okay";
  461. };
  462. &wmac1 {
  463. mediatek,mtd-eeprom = <&factory 0x05000>;
  464. };