aec8a0494d12433927fd72577cf32e02bb6aa417
[openwrt/staging/dedeckeh.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 mediatek,disable-radar-background;
122 };
123 };
124
125 &gmac0 {
126 nvmem-cells = <&macaddr_factory_4>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &gmac1 {
131 status = "okay";
132 label = "wan";
133 phy-handle = <&ethphy0>;
134
135 nvmem-cells = <&macaddr_factory_4>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &mdio {
140 ethphy0: ethernet-phy@0 {
141 reg = <0>;
142 };
143 };
144
145 &switch0 {
146 ports {
147 port@1 {
148 status = "okay";
149 label = "lan1";
150 };
151
152 port@2 {
153 status = "okay";
154 label = "lan2";
155 };
156
157 port@3 {
158 status = "okay";
159 label = "lan3";
160 };
161 };
162 };
163
164 &state_default {
165 gpio {
166 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
167 function = "gpio";
168 };
169 };
170