ramips: add support for ASUS RT-AX53U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-ax53u.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "asus,rt-ax53u", "mediatek,mt7621-soc";
11 model = "ASUS RT-AX53U";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 bootargs-override = "console=ttyS0,115200";
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_power: led-0 {
30 color = <LED_COLOR_ID_BLUE>;
31 function = LED_FUNCTION_POWER;
32 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 key-restart {
40 label = "reset";
41 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 key-wps {
46 label = "wps";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51 };
52
53 &nand {
54 status = "okay";
55
56 partitions {
57 compatible = "fixed-partitions";
58 #address-cells = <1>;
59 #size-cells = <1>;
60
61 partition@0 {
62 label = "u-boot";
63 reg = <0x0 0xe0000>;
64 read-only;
65 };
66
67 partition@e0000 {
68 label = "u-boot-env";
69 reg = <0xe0000 0x100000>;
70 read-only;
71 };
72
73 factory: partition@1e0000 {
74 label = "factory";
75 reg = <0x1e0000 0x100000>;
76 read-only;
77
78 compatible = "nvmem-cells";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr_factory_4: macaddr@4 {
83 reg = <0x4 0x6>;
84 };
85 };
86
87 factory2: partition@2e0000 {
88 label = "factory2";
89 reg = <0x2e0000 0x100000>;
90 read-only;
91 };
92
93 partition@3e0000 {
94 label = "kernel";
95 reg = <0x3e0000 0x400000>;
96 };
97
98 partition@7e0000 {
99 label = "ubi";
100 reg = <0x7e0000 0x2e00000>;
101 };
102
103 partition@35e0000 {
104 label = "firmware2";
105 reg = <0x35e0000 0x3200000>;
106 };
107
108 /* Last 8M possibly store the bad block table */
109 };
110 };
111
112 &pcie {
113 status = "okay";
114 };
115
116 &pcie1 {
117 wifi@0,0 {
118 compatible = "mediatek,mt76";
119 reg = <0x0000 0 0 0 0>;
120 mediatek,mtd-eeprom = <&factory 0x0000>;
121 };
122 };
123
124 &gmac0 {
125 nvmem-cells = <&macaddr_factory_4>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &switch0 {
130 ports {
131 port@0 {
132 status = "okay";
133 label = "wan";
134 };
135
136 port@1 {
137 status = "okay";
138 label = "lan1";
139 };
140
141 port@2 {
142 status = "okay";
143 label = "lan2";
144 };
145
146 port@3 {
147 status = "okay";
148 label = "lan3";
149 };
150
151 port@4 {
152 status = "okay";
153 label = "lan4";
154 };
155 };
156 };
157
158 &state_default {
159 gpio {
160 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
161 function = "gpio";
162 };
163 };
164