mt7986a-asus-tuf-ax6000.dts 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include "mt7986a.dtsi"
  7. / {
  8. model = "ASUS TUF-AX6000";
  9. compatible = "asus,tuf-ax6000", "mediatek,mt7986a";
  10. aliases {
  11. serial0 = &uart0;
  12. label-mac-device = &gmac0;
  13. led-boot = &led_system;
  14. led-failsafe = &led_system;
  15. led-running = &led_system;
  16. led-upgrade = &led_system;
  17. };
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. bootargs-override = "";
  21. };
  22. memory {
  23. reg = <0 0x40000000 0 0x20000000>;
  24. };
  25. keys {
  26. compatible = "gpio-keys";
  27. reset {
  28. label = "reset";
  29. gpios = <&pio 9 GPIO_ACTIVE_LOW>;
  30. linux,code = <KEY_RESTART>;
  31. };
  32. mesh {
  33. label = "wps";
  34. gpios = <&pio 10 GPIO_ACTIVE_LOW>;
  35. linux,code = <KEY_WPS_BUTTON>;
  36. };
  37. };
  38. leds {
  39. compatible = "gpio-leds";
  40. wlan {
  41. function = LED_FUNCTION_WLAN;
  42. color = <LED_COLOR_ID_WHITE>;
  43. gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
  44. linux,default-trigger = "phy1tpt";
  45. };
  46. led_system: system {
  47. label = "white:system";
  48. gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
  49. };
  50. wan-red {
  51. function = LED_FUNCTION_WAN;
  52. color = <LED_COLOR_ID_RED>;
  53. gpios = <&pio 12 GPIO_ACTIVE_LOW>;
  54. };
  55. cover-blue {
  56. label = "blue:cover";
  57. gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
  58. };
  59. };
  60. reg_3p3v: regulator-3p3v {
  61. compatible = "regulator-fixed";
  62. regulator-name = "fixed-3.3V";
  63. regulator-min-microvolt = <3300000>;
  64. regulator-max-microvolt = <3300000>;
  65. regulator-boot-on;
  66. regulator-always-on;
  67. };
  68. reg_5v: regulator-5v {
  69. compatible = "regulator-fixed";
  70. regulator-name = "fixed-5V";
  71. regulator-min-microvolt = <5000000>;
  72. regulator-max-microvolt = <5000000>;
  73. regulator-boot-on;
  74. regulator-always-on;
  75. };
  76. };
  77. &crypto {
  78. status = "okay";
  79. };
  80. &eth {
  81. status = "okay";
  82. gmac0: mac@0 {
  83. /* LAN */
  84. compatible = "mediatek,eth-mac";
  85. reg = <0>;
  86. nvmem-cells = <&macaddr_factory_4>;
  87. nvmem-cell-names = "mac-address";
  88. phy-mode = "2500base-x";
  89. fixed-link {
  90. speed = <2500>;
  91. full-duplex;
  92. pause;
  93. };
  94. };
  95. gmac1: mac@1 {
  96. /* WAN */
  97. compatible = "mediatek,eth-mac";
  98. reg = <1>;
  99. phy-mode = "2500base-x";
  100. phy-handle = <&phy6>;
  101. };
  102. mdio: mdio-bus {
  103. #address-cells = <1>;
  104. #size-cells = <0>;
  105. };
  106. };
  107. &mdio {
  108. reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
  109. reset-delay-us = <50000>;
  110. reset-post-delay-us = <20000>;
  111. phy5: phy@5 {
  112. compatible = "ethernet-phy-ieee802.3-c45";
  113. reg = <5>;
  114. mxl,led-drive-vdd;
  115. mxl,led-config = <0x03f0 0x0 0x0 0x0>;
  116. };
  117. phy6: phy@6 {
  118. compatible = "ethernet-phy-ieee802.3-c45";
  119. reg = <6>;
  120. /* LED0: CONN (WAN white) */
  121. mxl,led-config = <0x03f0 0x0 0x0 0x0>;
  122. };
  123. switch: switch@1f {
  124. compatible = "mediatek,mt7531";
  125. reg = <31>;
  126. reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
  127. reset-assert-us = <10000>;
  128. reset-deassert-us = <10000>;
  129. };
  130. };
  131. &pio {
  132. spi_flash_pins: spi-flash-pins-33-to-38 {
  133. mux {
  134. function = "spi";
  135. groups = "spi0", "spi0_wp_hold";
  136. };
  137. conf-pu {
  138. pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
  139. drive-strength = <8>;
  140. mediatek,pull-up-adv = <0>; /* bias-disable */
  141. };
  142. conf-pd {
  143. pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
  144. drive-strength = <8>;
  145. mediatek,pull-down-adv = <0>; /* bias-disable */
  146. };
  147. };
  148. wf_2g_5g_pins: wf_2g_5g-pins {
  149. mux {
  150. function = "wifi";
  151. groups = "wf_2g", "wf_5g";
  152. };
  153. conf {
  154. pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
  155. "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
  156. "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
  157. "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
  158. "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
  159. "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
  160. "WF1_TOP_CLK", "WF1_TOP_DATA";
  161. drive-strength = <4>;
  162. };
  163. };
  164. wf_dbdc_pins: wf-dbdc-pins {
  165. mux {
  166. function = "wifi";
  167. groups = "wf_dbdc";
  168. };
  169. conf {
  170. pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
  171. "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
  172. "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
  173. "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
  174. "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
  175. "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
  176. "WF1_TOP_CLK", "WF1_TOP_DATA";
  177. drive-strength = <4>;
  178. };
  179. };
  180. };
  181. &pcie_phy {
  182. status = "okay";
  183. };
  184. &spi0 {
  185. pinctrl-names = "default";
  186. pinctrl-0 = <&spi_flash_pins>;
  187. status = "okay";
  188. spi_nand_flash: flash@0 {
  189. compatible = "spi-nand";
  190. reg = <0>;
  191. #address-cells = <1>;
  192. #size-cells = <1>;
  193. spi-max-frequency = <20000000>;
  194. spi-tx-bus-width = <4>;
  195. spi-rx-bus-width = <4>;
  196. /*
  197. * ASUS bootloader tries to replace the partitions defined in
  198. * Device Tree and by that also deletes all additional properties
  199. * needed for UBI and NVMEM-on-UBI.
  200. * Prevent this from happening by tricking the loader to delete and
  201. * replace a bait node instead.
  202. */
  203. partitions: dummy {
  204. compatible = "u-boot-dummy-partitions";
  205. #address-cells = <1>;
  206. #size-cells = <1>;
  207. partition@0 {
  208. reg = <0x0 0x0>;
  209. label = "remove_me";
  210. };
  211. };
  212. partitions {
  213. compatible = "fixed-partitions";
  214. #address-cells = <1>;
  215. #size-cells = <1>;
  216. partition@0 {
  217. reg = <0x0 0x400000>;
  218. label = "bootloader";
  219. read-only;
  220. };
  221. partition@400000 {
  222. compatible = "linux,ubi";
  223. reg = <0x400000 0xfc00000>;
  224. label = "UBI_DEV";
  225. volumes {
  226. ubi_factory: ubi-volume-factory {
  227. volname = "Factory";
  228. };
  229. };
  230. };
  231. };
  232. };
  233. };
  234. &ubi_factory {
  235. nvmem-layout {
  236. compatible = "fixed-layout";
  237. #address-cells = <1>;
  238. #size-cells = <1>;
  239. eeprom_factory_0: eeprom@0 {
  240. reg = <0x0 0x1000>;
  241. };
  242. macaddr_factory_4: macaddr@4 {
  243. reg = <0x4 0x6>;
  244. };
  245. };
  246. };
  247. &switch {
  248. ports {
  249. #address-cells = <1>;
  250. #size-cells = <0>;
  251. port@1 {
  252. reg = <4>;
  253. label = "lan1";
  254. };
  255. port@2 {
  256. reg = <3>;
  257. label = "lan2";
  258. };
  259. port@3 {
  260. reg = <2>;
  261. label = "lan3";
  262. };
  263. port@4 {
  264. reg = <1>;
  265. label = "lan4";
  266. };
  267. port@5 {
  268. reg = <5>;
  269. label = "lan5";
  270. phy-mode = "2500base-x";
  271. phy-handle = <&phy5>;
  272. };
  273. port@6 {
  274. reg = <6>;
  275. label = "cpu";
  276. ethernet = <&gmac0>;
  277. phy-mode = "2500base-x";
  278. fixed-link {
  279. speed = <2500>;
  280. full-duplex;
  281. pause;
  282. };
  283. };
  284. };
  285. mdio {
  286. #address-cells = <1>;
  287. #size-cells = <0>;
  288. phy@1 {
  289. reg = <1>;
  290. mediatek,led-config = <
  291. 0x21 0x8009 /* BASIC_CTRL */
  292. 0x22 0x0c00 /* ON_DURATION */
  293. 0x23 0x1400 /* BLINK_DURATION */
  294. 0x24 0x8000 /* LED0_ON_CTRL */
  295. 0x25 0x0000 /* LED0_BLINK_CTRL */
  296. 0x26 0xc007 /* LED1_ON_CTRL */
  297. 0x27 0x003f /* LED1_BLINK_CTRL */
  298. >;
  299. };
  300. phy@2 {
  301. reg = <2>;
  302. mediatek,led-config = <
  303. 0x21 0x8009 /* BASIC_CTRL */
  304. 0x22 0x0c00 /* ON_DURATION */
  305. 0x23 0x1400 /* BLINK_DURATION */
  306. 0x24 0x8000 /* LED0_ON_CTRL */
  307. 0x25 0x0000 /* LED0_BLINK_CTRL */
  308. 0x26 0xc007 /* LED1_ON_CTRL */
  309. 0x27 0x003f /* LED1_BLINK_CTRL */
  310. >;
  311. };
  312. phy@3 {
  313. reg = <3>;
  314. mediatek,led-config = <
  315. 0x21 0x8009 /* BASIC_CTRL */
  316. 0x22 0x0c00 /* ON_DURATION */
  317. 0x23 0x1400 /* BLINK_DURATION */
  318. 0x24 0x8000 /* LED0_ON_CTRL */
  319. 0x25 0x0000 /* LED0_BLINK_CTRL */
  320. 0x26 0xc007 /* LED1_ON_CTRL */
  321. 0x27 0x003f /* LED1_BLINK_CTRL */
  322. >;
  323. };
  324. phy@4 {
  325. reg = <4>;
  326. mediatek,led-config = <
  327. 0x21 0x8009 /* BASIC_CTRL */
  328. 0x22 0x0c00 /* ON_DURATION */
  329. 0x23 0x1400 /* BLINK_DURATION */
  330. 0x24 0x8000 /* LED0_ON_CTRL */
  331. 0x25 0x0000 /* LED0_BLINK_CTRL */
  332. 0x26 0xc007 /* LED1_ON_CTRL */
  333. 0x27 0x003f /* LED1_BLINK_CTRL */
  334. >;
  335. };
  336. };
  337. };
  338. &watchdog {
  339. status = "okay";
  340. };
  341. &wifi {
  342. nvmem-cells = <&eeprom_factory_0>;
  343. nvmem-cell-names = "eeprom";
  344. pinctrl-names = "default", "dbdc";
  345. pinctrl-0 = <&wf_2g_5g_pins>;
  346. pinctrl-1 = <&wf_dbdc_pins>;
  347. status = "okay";
  348. };
  349. &trng {
  350. status = "okay";
  351. };
  352. &uart0 {
  353. status = "okay";
  354. };
  355. &ssusb {
  356. vusb33-supply = <&reg_3p3v>;
  357. vbus-supply = <&reg_5v>;
  358. status = "okay";
  359. };
  360. &usb_phy {
  361. status = "okay";
  362. };