d740d00c6dffd72677e5f7913c367758bf08be1c
[openwrt/staging/hauke.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: power {
30 label = "blue:power";
31 color = <LED_COLOR_ID_BLUE>;
32 function = LED_FUNCTION_POWER;
33 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
34 };
35
36 led_usb {
37 label = "blue:usb";
38 color = <LED_COLOR_ID_BLUE>;
39 function = LED_FUNCTION_USB;
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 trigger-sources = <&ehci_port2>;
42 linux,default-trigger = "usbport";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 key-restart {
50 label = "reset";
51 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 key-wps {
56 label = "wps";
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60 };
61 };
62
63 &nand {
64 status = "okay";
65
66 mediatek,nmbm;
67 mediatek,bmt-remap-range =
68 <0x000000 0x7e0000>,
69 <0x35e0000 0x7800000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x80000>;
79 read-only;
80 };
81
82 /*
83 * u-boot gets split here while keeping u-boot read-only,
84 * which allows safe usage of fw_setenv
85 */
86 partition@80000 {
87 label = "u-boot-env";
88 reg = <0x80000 0x60000>;
89 };
90
91 partition@e0000 {
92 label = "nvram";
93 reg = <0xe0000 0x100000>;
94 read-only;
95 };
96
97 factory: partition@1e0000 {
98 label = "factory";
99 reg = <0x1e0000 0x100000>;
100 read-only;
101
102 compatible = "nvmem-cells";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_factory_4: macaddr@4 {
107 reg = <0x4 0x6>;
108 };
109 };
110
111 factory2: partition@2e0000 {
112 label = "factory2";
113 reg = <0x2e0000 0x100000>;
114 read-only;
115 };
116
117 partition@3e0000 {
118 label = "firmware";
119 reg = <0x3e0000 0x3200000>;
120
121 compatible = "fixed-partitions";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 partition@0 {
126 label = "kernel";
127 reg = <0x0 0x400000>;
128 };
129
130 partition@400000 {
131 label = "ubi";
132 reg = <0x400000 0x2e00000>;
133 };
134 };
135
136 partition@35e0000 {
137 label = "firmware2";
138 reg = <0x35e0000 0x3200000>;
139 };
140
141 partition@67e0000 {
142 label = "jffs2";
143 reg = <0x67e0000 0x1020000>;
144 };
145
146 /* Last 8M are reserved for NMBM management (bad blocks) */
147 };
148 };
149
150 &pcie {
151 status = "okay";
152 };
153
154 &pcie1 {
155 wifi@0,0 {
156 compatible = "mediatek,mt76";
157 reg = <0x0000 0 0 0 0>;
158 mediatek,mtd-eeprom = <&factory 0x0000>;
159 mediatek,disable-radar-background;
160 };
161 };
162
163 &gmac0 {
164 nvmem-cells = <&macaddr_factory_4>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &gmac1 {
169 status = "okay";
170 label = "wan";
171 phy-handle = <&ethphy0>;
172
173 nvmem-cells = <&macaddr_factory_4>;
174 nvmem-cell-names = "mac-address";
175 };
176
177 &mdio {
178 ethphy0: ethernet-phy@0 {
179 reg = <0>;
180 };
181 };
182
183 &switch0 {
184 ports {
185 port@1 {
186 status = "okay";
187 label = "lan1";
188 };
189
190 port@2 {
191 status = "okay";
192 label = "lan2";
193 };
194
195 port@3 {
196 status = "okay";
197 label = "lan3";
198 };
199 };
200 };
201
202 &state_default {
203 gpio {
204 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
205 function = "gpio";
206 };
207 };
208