ramips: add support for I-O DATA WN-DEAX1800GR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_sercomm_s1500.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
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 aliases {
11 led-boot = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_wps;
14 led-failsafe = &led_wps;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led-0 {
37 label = "amber:lan4";
38 color = <LED_COLOR_ID_AMBER>;
39 function = LED_FUNCTION_LAN;
40 function-enumerator = <0>;
41 linux,default-trigger = "mt7530-0:00:1Gbps";
42 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
43 };
44
45 led-1 {
46 label = "green:lan4";
47 color = <LED_COLOR_ID_GREEN>;
48 function = LED_FUNCTION_LAN;
49 function-enumerator = <1>;
50 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
51 };
52
53 led-2 {
54 label = "amber:lan3";
55 color = <LED_COLOR_ID_AMBER>;
56 function = LED_FUNCTION_LAN;
57 function-enumerator = <2>;
58 linux,default-trigger = "mt7530-0:01:1Gbps";
59 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
60 };
61
62 led-3 {
63 label = "green:lan3";
64 color = <LED_COLOR_ID_GREEN>;
65 function = LED_FUNCTION_LAN;
66 function-enumerator = <3>;
67 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
68 };
69
70 led-4 {
71 label = "amber:lan2";
72 color = <LED_COLOR_ID_AMBER>;
73 function = LED_FUNCTION_LAN;
74 function-enumerator = <4>;
75 linux,default-trigger = "mt7530-0:02:1Gbps";
76 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
77 };
78
79 led-5 {
80 label = "amber:lan1";
81 color = <LED_COLOR_ID_AMBER>;
82 function = LED_FUNCTION_LAN;
83 function-enumerator = <5>;
84 linux,default-trigger = "mt7530-0:03:1Gbps";
85 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
86 };
87
88 led-6 {
89 label = "green:lan1";
90 color = <LED_COLOR_ID_GREEN>;
91 function = LED_FUNCTION_LAN;
92 function-enumerator = <6>;
93 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
94 };
95
96 led-7 {
97 label = "amber:wan";
98 color = <LED_COLOR_ID_AMBER>;
99 function = LED_FUNCTION_WAN;
100 function-enumerator = <0>;
101 linux,default-trigger = "mt7530-0:04:1Gbps";
102 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
103 };
104
105 led-8 {
106 label = "green:wan";
107 color = <LED_COLOR_ID_GREEN>;
108 function = LED_FUNCTION_WAN;
109 function-enumerator = <1>;
110 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
111 };
112
113 led-9 {
114 label = "green:lan2";
115 color = <LED_COLOR_ID_GREEN>;
116 function = LED_FUNCTION_LAN;
117 function-enumerator = <7>;
118 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
119 };
120
121 led-10 {
122 label = "white:wlan2g";
123 color = <LED_COLOR_ID_WHITE>;
124 function = LED_FUNCTION_WLAN;
125 function-enumerator = <0>;
126 linux,default-trigger = "phy1radio";
127 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
128 };
129
130 led_wps: led-11 {
131 function = LED_FUNCTION_WPS;
132 function-enumerator = <0>;
133 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
134 panic-indicator;
135 };
136
137 led_status: led-12 {
138 label = "white:status";
139 color = <LED_COLOR_ID_WHITE>;
140 function = LED_FUNCTION_STATUS;
141 function-enumerator = <0>;
142 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
143 };
144
145 led-13 {
146 label = "white:wlan5g";
147 color = <LED_COLOR_ID_WHITE>;
148 function = LED_FUNCTION_WLAN;
149 function-enumerator = <1>;
150 linux,default-trigger = "phy0radio";
151 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
152 };
153 };
154 };
155
156 &ethernet {
157 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
158 };
159
160 &gmac0 {
161 nvmem-cells = <&macaddr_factory_1000>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &nand {
166 status = "okay";
167
168 partitions: partitions {
169 compatible = "fixed-partitions";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 partition@0 {
174 label = "u-boot";
175 reg = <0x0 0x100000>;
176 read-only;
177 };
178
179 factory: partition@100000 {
180 label = "Factory";
181 reg = <0x100000 0x100000>;
182 read-only;
183
184 compatible = "nvmem-cells";
185 #address-cells = <1>;
186 #size-cells = <1>;
187
188 macaddr_factory_1000: macaddr@1000 {
189 reg = <0x1000 0x6>;
190 };
191 };
192
193 partition@1600000 {
194 label = "boot_flag";
195 reg = <0x1600000 0x100000>;
196 };
197
198 partition@1700000 {
199 label = "kernel";
200 reg = <0x1700000 0x400000>;
201 };
202
203 partition@1b00000 {
204 label = "Kernel_2";
205 reg = <0x1b00000 0x400000>;
206 read-only;
207 };
208 };
209 };
210
211 &pcie {
212 status = "okay";
213
214 reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>,
215 <&gpio 19 GPIO_ACTIVE_LOW>;
216 };
217
218 &pcie0 {
219 wifi@0,0 {
220 compatible = "mediatek,mt76";
221 reg = <0x0000 0 0 0 0>;
222 ieee80211-freq-limit = <5000000 6000000>;
223 mediatek,mtd-eeprom = <&factory 0x8000>;
224
225 nvmem-cells = <&macaddr_factory_1000>;
226 nvmem-cell-names = "mac-address";
227 mac-address-increment = <2>;
228 };
229 };
230
231 &pcie1 {
232 wlan_2g: wifi@0,0 {
233 compatible = "mediatek,mt76";
234 reg = <0x0000 0 0 0 0>;
235 ieee80211-freq-limit = <2400000 2500000>;
236 mediatek,mtd-eeprom = <&factory 0x0>;
237
238 nvmem-cells = <&macaddr_factory_1000>;
239 nvmem-cell-names = "mac-address";
240 };
241 };
242
243 &state_default {
244 gpio {
245 groups = "wdt", "uart3", "jtag", "uart2", "i2c", "rgmii2";
246 function = "gpio";
247 };
248 };
249
250 &switch0 {
251 ports {
252 port@0 {
253 status = "okay";
254 label = "lan4";
255 };
256
257 port@1 {
258 status = "okay";
259 label = "lan3";
260 };
261
262 port@2 {
263 status = "okay";
264 label = "lan2";
265 };
266
267 port@3 {
268 status = "okay";
269 label = "lan1";
270 };
271
272 wan: port@4 {
273 status = "okay";
274 label = "wan";
275
276 nvmem-cells = <&macaddr_factory_1000>;
277 nvmem-cell-names = "mac-address";
278 mac-address-increment = <1>;
279 };
280 };
281 };