6790b37d1aefa7f1af9774e8fc019dd8c84a36c2
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-ac57u-v1.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
8 / {
9 compatible = "asus,rt-ac57u-v1", "mediatek,mt7621-soc";
10 model = "ASUS RT-AC57U v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "blue:power";
24 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "blue:usb";
29 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&ehci_port2>;
31 linux,default-trigger = "usbport";
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 wps {
39 label = "wps";
40 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WPS_BUTTON>;
42 debounce-interval = <60>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 debounce-interval = <60>;
50 };
51 };
52
53 led-regulator {
54 compatible = "regulator-fixed";
55 regulator-name = "LED-Power";
56 gpio = <&gpio 46 GPIO_ACTIVE_LOW>;
57 regulator-min-microvolt = <3300000>;
58 regulator-max-microvolt = <3300000>;
59 regulator-always-on;
60 };
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
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 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "config";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x400>;
100 };
101
102 eeprom_factory_8000: eeprom@8000 {
103 reg = <0x8000 0x200>;
104 };
105
106 macaddr_factory_e000: macaddr@e000 {
107 reg = <0xe000 0x6>;
108 };
109
110 macaddr_factory_e006: macaddr@e006 {
111 reg = <0xe006 0x6>;
112 };
113 };
114 };
115
116 partition@50000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x50000 0xfb0000>;
120 };
121 };
122 };
123 };
124
125 &pcie {
126 status = "okay";
127 };
128
129 &pcie0 {
130 wifi@0,0 {
131 compatible = "mediatek,mt76";
132 reg = <0x0000 0 0 0 0>;
133 nvmem-cells = <&eeprom_factory_8000>;
134 nvmem-cell-names = "eeprom";
135
136 led {
137 led-sources = <2>;
138 led-active-low;
139 };
140 };
141 };
142
143 &pcie1 {
144 wifi@0,0 {
145 compatible = "mediatek,mt76";
146 reg = <0x0000 0 0 0 0>;
147 nvmem-cells = <&eeprom_factory_0>;
148 nvmem-cell-names = "eeprom";
149
150 led {
151 led-active-low;
152 };
153 };
154 };
155
156 &gmac0 {
157 nvmem-cells = <&macaddr_factory_e000>;
158 nvmem-cell-names = "mac-address";
159 };
160
161 &gmac1 {
162 status = "okay";
163 label = "wan";
164 phy-handle = <&ethphy0>;
165
166 nvmem-cells = <&macaddr_factory_e006>;
167 nvmem-cell-names = "mac-address";
168 };
169
170 &mdio {
171 ethphy0: ethernet-phy@0 {
172 reg = <0>;
173 };
174 };
175
176 &switch0 {
177 ports {
178 port@1 {
179 status = "okay";
180 label = "lan1";
181 };
182
183 port@2 {
184 status = "okay";
185 label = "lan2";
186 };
187
188 port@3 {
189 status = "okay";
190 label = "lan3";
191 };
192
193 port@4 {
194 status = "okay";
195 label = "lan4";
196 };
197 };
198 };
199
200 &state_default {
201 gpio {
202 groups = "sdhci";
203 function = "gpio";
204 };
205 };