Guest User

Untitled

a guest
Aug 16th, 2026
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0
  2.  
  3. /dts-v1/;
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include "mt7629.dtsi"
  7.  
  8. / {
  9. compatible = "asus,rt-ac67p", "mediatek,mt7629";
  10. model = "ASUS RT-AC67P";
  11.  
  12. aliases {
  13. led-boot = &led_cpu;
  14. led-failsafe = &led_cpu;
  15. led-running = &led_cpu;
  16. led-upgrade = &led_cpu;
  17. serial0 = &uart0;
  18. };
  19.  
  20. chosen {
  21. stdout-path = "serial0:115200n1";
  22. bootargs-override = "console=ttyS0,115200n1";
  23. };
  24.  
  25.  
  26. memory@40000000 {
  27. device_type = "memory";
  28. reg = <0x40000000 0x10000000>;
  29. };
  30.  
  31. reg_3p3v: regulator-3p3v {
  32. compatible = "regulator-fixed";
  33. regulator-name = "fixed-3.3V";
  34. regulator-min-microvolt = <3300000>;
  35. regulator-max-microvolt = <3300000>;
  36. regulator-boot-on;
  37. regulator-always-on;
  38. };
  39.  
  40. reg_5v: regulator-5v {
  41. compatible = "regulator-fixed";
  42. regulator-name = "fixed-5V";
  43. regulator-min-microvolt = <5000000>;
  44. regulator-max-microvolt = <5000000>;
  45. regulator-boot-on;
  46. regulator-always-on;
  47. };
  48. };
  49.  
  50. &eth {
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&eth_pins>;
  53. pinctrl-1 = <&ephy_leds_pins>;
  54. status = "okay";
  55.  
  56. gmac0: mac@0 {
  57. compatible = "mediatek,eth-mac";
  58. reg = <0>;
  59. phy-mode = "2500base-x";
  60. nvmem-cells = <&macaddr_factory_4 3>;
  61. nvmem-cell-names = "mac-address";
  62.  
  63. fixed-link {
  64. speed = <2500>;
  65. full-duplex;
  66. pause;
  67. };
  68. };
  69.  
  70. gmac1: mac@1 {
  71. compatible = "mediatek,eth-mac";
  72. reg = <1>;
  73. phy-mode = "gmii";
  74. phy-handle = <&phy0>;
  75. nvmem-cells = <&macaddr_factory_4 1>;
  76. nvmem-cell-names = "mac-address";
  77. };
  78.  
  79. mdio: mdio-bus {
  80. #address-cells = <1>;
  81. #size-cells = <0>;
  82.  
  83. phy0: ethernet-phy@0 {
  84. reg = <0>;
  85. };
  86.  
  87. switch@1f {
  88. compatible = "mediatek,mt7531";
  89. reg = <31>;
  90. reset-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
  91. interrupt-controller;
  92. #interrupt-cells = <1>;
  93. interrupt-parent = <&pio>;
  94. interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
  95.  
  96. ports {
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99.  
  100. port@0 {
  101. reg = <0>;
  102. label = "lan1";
  103. };
  104.  
  105. port@1 {
  106. reg = <1>;
  107. label = "lan2";
  108. };
  109.  
  110. port@2 {
  111. reg = <2>;
  112. label = "lan3";
  113. };
  114.  
  115. port@3 {
  116. reg = <3>;
  117. label = "lan4";
  118. };
  119. port@4 {
  120. reg = <4>;
  121. label = "wan";
  122. };
  123. port@6 {
  124. reg = <6>;
  125. ethernet = <&gmac0>;
  126. phy-mode = "2500base-x";
  127.  
  128. fixed-link {
  129. speed = <2500>;
  130. full-duplex;
  131. pause;
  132. };
  133. };
  134. };
  135. };
  136. };
  137. };
  138.  
  139. &bch {
  140. status = "okay";
  141. };
  142.  
  143. &snfi {
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&serial_nand_pins>;
  146. status = "okay";
  147.  
  148. spi_nand_flash: flash@0 {
  149. compatible = "u-boot-dont-touch-spi-nand";
  150. #address-cells = <1>;
  151. #size-cells = <1>;
  152. reg = <0>;
  153.  
  154. spi-max-frequency = <52000000>;
  155. spi-tx-bus-width = <4>;
  156. spi-rx-bus-width = <4>;
  157.  
  158. /*
  159. * ASUS bootloader tries to replace the partitions defined in
  160. * Device Tree and by that also deletes all additional properties
  161. * needed for UBI and NVMEM-on-UBI.
  162. * Prevent this from happening by tricking the loader to delete and
  163. * replace a bait node instead (works with older bootloaders).
  164. */
  165. partitions: dummy {
  166. compatible = "u-boot-dummy-partitions";
  167. #address-cells = <1>;
  168. #size-cells = <1>;
  169.  
  170. partition@0 {
  171. reg = <0x0 0x0>;
  172. label = "remove_me";
  173. };
  174. };
  175.  
  176. partitions {
  177. compatible = "fixed-partitions";
  178. #address-cells = <1>;
  179. #size-cells = <1>;
  180.  
  181. partition@0 {
  182. label = "Bootloader";
  183. reg = <0x0 0xe0000>;
  184. read-only;
  185. };
  186.  
  187. partition@e0000 {
  188. label = "Config";
  189. reg = <0xe0000 0x100000>;
  190. };
  191.  
  192. partition@1e0000 {
  193. label = "factory";
  194. reg = <0x1e0000 0x100000>;
  195. read-only;
  196.  
  197. nvmem-layout {
  198. compatible = "fixed-layout";
  199. #address-cells = <1>;
  200. #size-cells = <1>;
  201.  
  202. macaddr_factory_4: macaddr@4 {
  203. compatible = "mac-base";
  204. reg = <0x4 0x6>;
  205. #nvmem-cell-cells = <1>;
  206. };
  207. };
  208. };
  209.  
  210. partition@2e0000 {
  211. label = "Factory2";
  212. reg = <0x2e0000 0x100000>;
  213. read-only;
  214. };
  215.  
  216. partition@3e0000 {
  217. label = "firmware";
  218. reg = <0x3e0000 0x3200000>;
  219. compatible = "fixed-partitions";
  220. #address-cells = <1>;
  221. #size-cells = <1>;
  222. partition@0 {
  223. label = "kernel";
  224. reg = <0x0 0x400000>;
  225. };
  226.  
  227. partition@400000 {
  228. label = "ubi";
  229. reg = <0x400000 0x2e00000>;
  230. };
  231. };
  232.  
  233. partition@35e0000 {
  234. label = "firmware2";
  235. reg = <0x35e0000 0x3200000>;
  236. };
  237.  
  238. partition@67e0000 {
  239. label = "jffs2";
  240. reg = <0x67e0000 0x1020000>;
  241. };
  242. };
  243. };
  244. };
  245.  
  246. &pio {
  247. eth_pins: eth-pins {
  248. mux {
  249. function = "eth";
  250. groups = "mdc_mdio";
  251. };
  252. };
  253.  
  254. ephy_leds_pins: ephy-leds-pins {
  255. mux {
  256. function = "led";
  257. groups = "ephy_leds";
  258. };
  259. };
  260.  
  261. /* Serial NAND is shared pin with SPI-NOR */
  262. serial_nand_pins: serial-nand-pins {
  263. mux {
  264. function = "flash";
  265. groups = "snfi";
  266. };
  267. };
  268.  
  269. uart0_pins: uart0-pins {
  270. mux {
  271. function = "uart";
  272. groups = "uart0_txd_rxd" ;
  273. };
  274. };
  275.  
  276. watchdog_pins: watchdog-pins {
  277. mux {
  278. function = "watchdog";
  279. groups = "watchdog";
  280. };
  281. };
  282. };
  283.  
  284. &ssusb {
  285. vusb33-supply = <&reg_3p3v>;
  286. vbus-supply = <&reg_5v>;
  287. status = "okay";
  288. };
  289.  
  290. &uart0 {
  291. pinctrl-names = "default";
  292. pinctrl-0 = <&uart0_pins>;
  293. status = "okay";
  294. };
  295.  
  296. &watchdog {
  297. pinctrl-names = "default";
  298. pinctrl-0 = <&watchdog_pins>;
  299. status = "okay";
  300.  
  301. interrupt-controller;
  302. #interrupt-cells = <1>;
  303. interrupt-parent = <&pio>;
  304. interrupts = <GIC_SPI 0x80 IRQ_TYPE_EDGE_FALLING>;
  305. };
  306.  
Advertisement
Add Comment
Please, Sign In to add comment