322a96b700aea7a70f51c2fb659107f2074bd458
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 #address-cells = <1>;
93 #size-cells = <1>;
94 read-only;
95
96 eeprom_factory_0: eeprom@0 {
97 reg = <0x0 0x400>;
98 };
99
100 eeprom_factory_8000: eeprom@8000 {
101 reg = <0x8000 0x200>;
102 };
103
104 macaddr_factory_e000: macaddr@e000 {
105 reg = <0xe000 0x6>;
106 };
107
108 macaddr_factory_e006: macaddr@e006 {
109 reg = <0xe006 0x6>;
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0xfb0000>;
117 };
118 };
119 };
120 };
121
122 &pcie {
123 status = "okay";
124 };
125
126 &pcie0 {
127 wifi@0,0 {
128 compatible = "mediatek,mt76";
129 reg = <0x0000 0 0 0 0>;
130 nvmem-cells = <&eeprom_factory_8000>;
131 nvmem-cell-names = "eeprom";
132
133 led {
134 led-sources = <2>;
135 led-active-low;
136 };
137 };
138 };
139
140 &pcie1 {
141 wifi@0,0 {
142 compatible = "mediatek,mt76";
143 reg = <0x0000 0 0 0 0>;
144 nvmem-cells = <&eeprom_factory_0>;
145 nvmem-cell-names = "eeprom";
146
147 led {
148 led-active-low;
149 };
150 };
151 };
152
153 &gmac0 {
154 nvmem-cells = <&macaddr_factory_e000>;
155 nvmem-cell-names = "mac-address";
156 };
157
158 &gmac1 {
159 status = "okay";
160 label = "wan";
161 phy-handle = <&ethphy0>;
162
163 nvmem-cells = <&macaddr_factory_e006>;
164 nvmem-cell-names = "mac-address";
165 };
166
167 &mdio {
168 ethphy0: ethernet-phy@0 {
169 reg = <0>;
170 };
171 };
172
173 &switch0 {
174 ports {
175 port@1 {
176 status = "okay";
177 label = "lan1";
178 };
179
180 port@2 {
181 status = "okay";
182 label = "lan2";
183 };
184
185 port@3 {
186 status = "okay";
187 label = "lan3";
188 };
189
190 port@4 {
191 status = "okay";
192 label = "lan4";
193 };
194 };
195 };
196
197 &state_default {
198 gpio {
199 groups = "sdhci";
200 function = "gpio";
201 };
202 };