ramips: sercomm s1500: enable wlan LEDs activity blinking
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_chj.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &gmac0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "green:usb";
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
31 linux,default-trigger = "usbport";
32 };
33
34 internet {
35 label = "green:wan";
36 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi {
40 label = "green:wifi";
41 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy0tpt";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 wps {
50 label = "wps";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_WPS_BUTTON>;
53 };
54
55 reset {
56 label = "reset";
57 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60 };
61
62 reg_usb_vbus: regulator {
63 compatible = "regulator-fixed";
64 regulator-name = "usb_vbus";
65 regulator-min-microvolt = <5000000>;
66 regulator-max-microvolt = <5000000>;
67 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
68 enable-active-high;
69 };
70 };
71
72 &xhci {
73 vbus-supply = <&reg_usb_vbus>;
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0 0 0 0 0>;
84 mediatek,mtd-eeprom = <&factory 0x8000>;
85 ieee80211-freq-limit = <5000000 6000000>;
86 };
87 };
88
89 &pcie1 {
90 wifi@0,0 {
91 compatible = "mediatek,mt76";
92 reg = <0x0 0 0 0 0>;
93 mediatek,mtd-eeprom = <&factory 0x0>;
94 ieee80211-freq-limit = <2400000 2500000>;
95 };
96 };
97
98 &gmac0 {
99 nvmem-cells = <&macaddr_factory_4 0>;
100 nvmem-cell-names = "mac-address";
101 };
102
103 &gmac1 {
104 status = "okay";
105 label = "wan";
106 phy-handle = <&ethphy4>;
107
108 nvmem-cells = <&macaddr_factory_4 2>;
109 nvmem-cell-names = "mac-address";
110 };
111
112 &mdio {
113 ethphy4: ethernet-phy@4 {
114 reg = <4>;
115 };
116 };
117
118 &switch0 {
119 ports {
120 port@0 {
121 status = "okay";
122 label = "lan4";
123 };
124
125 port@1 {
126 status = "okay";
127 label = "lan3";
128 };
129
130 port@2 {
131 status = "okay";
132 label = "lan2";
133 };
134
135 port@3 {
136 status = "okay";
137 label = "lan1";
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "uart3", "uart2", "jtag", "wdt";
145 function = "gpio";
146 };
147 };
148
149 &nand {
150 status = "okay";
151
152 partitions {
153 compatible = "sercomm,sc-partitions", "fixed-partitions";
154 #address-cells = <1>;
155 #size-cells = <1>;
156
157 partition@0 {
158 label = "u-boot";
159 reg = <0x0 0x100000>;
160 sercomm,scpart-id = <0>;
161 read-only;
162 };
163
164 partition@100000 {
165 label = "SC PART_MAP";
166 reg = <0x100000 0x100000>;
167 sercomm,scpart-id = <1>;
168 read-only;
169 };
170
171 partition@200000 {
172 label = "kernel";
173 reg = <0x200000 0x400000>;
174 sercomm,scpart-id = <2>;
175 };
176
177 partition@600000 {
178 label = "ubi";
179 reg = <0x600000 0x2800000>;
180 sercomm,scpart-id = <3>;
181 };
182
183 partition@2e00000 {
184 label = "English UI";
185 reg = <0x2e00000 0x200000>;
186 sercomm,scpart-id = <4>;
187 read-only;
188 };
189
190 partition@3000000 {
191 label = "ML1";
192 reg = <0x3000000 0x200000>;
193 sercomm,scpart-id = <5>;
194 read-only;
195 };
196
197 partition@3200000 {
198 label = "ML2";
199 reg = <0x3200000 0x200000>;
200 sercomm,scpart-id = <6>;
201 read-only;
202 };
203
204 partition@3400000 {
205 label = "ML3";
206 reg = <0x3400000 0x200000>;
207 sercomm,scpart-id = <7>;
208 read-only;
209 };
210
211 partition@3600000 {
212 label = "ML4";
213 reg = <0x3600000 0x200000>;
214 sercomm,scpart-id = <8>;
215 read-only;
216 };
217
218 partition@3800000 {
219 label = "ML5";
220 reg = <0x3800000 0x200000>;
221 sercomm,scpart-id = <9>;
222 read-only;
223 };
224
225 partition@3a00000 {
226 label = "ML6";
227 reg = <0x3a00000 0x200000>;
228 sercomm,scpart-id = <10>;
229 read-only;
230 };
231
232 partition@3c00000 {
233 label = "ML7";
234 reg = <0x3c00000 0x200000>;
235 sercomm,scpart-id = <11>;
236 read-only;
237 };
238
239 partition@3e00000 {
240 label = "ML8";
241 reg = <0x3e00000 0x200000>;
242 sercomm,scpart-id = <12>;
243 read-only;
244 };
245
246 partition@4000000 {
247 label = "ML9";
248 reg = <0x4000000 0x200000>;
249 sercomm,scpart-id = <13>;
250 read-only;
251 };
252
253 partition@4200000 {
254 label = "ML10";
255 reg = <0x4200000 0x200000>;
256 sercomm,scpart-id = <14>;
257 read-only;
258 };
259
260 partition@4400000 {
261 label = "ML11";
262 reg = <0x4400000 0x200000>;
263 sercomm,scpart-id = <15>;
264 read-only;
265 };
266
267 factory: partition@4600000 {
268 label = "factory";
269 reg = <0x4600000 0x200000>;
270 sercomm,scpart-id = <16>;
271 read-only;
272
273 nvmem-layout {
274 compatible = "fixed-layout";
275 #address-cells = <1>;
276 #size-cells = <1>;
277
278 macaddr_factory_4: macaddr@4 {
279 compatible = "mac-base";
280 reg = <0x4 0x6>;
281 #nvmem-cell-cells = <1>;
282 };
283 };
284 };
285
286 partition@4800000 {
287 label = "SC Private Data";
288 reg = <0x4800000 0x200000>;
289 sercomm,scpart-id = <17>;
290 read-only;
291 };
292
293 partition@4a00000 {
294 label = "POT";
295 reg = <0x4a00000 0x200000>;
296 sercomm,scpart-id = <18>;
297 read-only;
298 };
299
300 partition@4c00000 {
301 label = "Traffic Meter";
302 reg = <0x4c00000 0x200000>;
303 sercomm,scpart-id = <19>;
304 read-only;
305 };
306
307 partition@4e00000 {
308 label = "SC PID";
309 reg = <0x4e00000 0x200000>;
310 sercomm,scpart-id = <20>;
311 read-only;
312 };
313
314 partition@5000000 {
315 label = "SC Nvram";
316 reg = <0x5000000 0x200000>;
317 sercomm,scpart-id = <21>;
318 read-only;
319 };
320
321 partition@5200000 {
322 label = "Ralink Nvram";
323 reg = <0x5200000 0x200000>;
324 sercomm,scpart-id = <22>;
325 read-only;
326 };
327
328 partition@5400000 {
329 label = "reserved0";
330 reg = <0x5400000 0x200000>;
331 sercomm,scpart-id = <23>;
332 read-only;
333 };
334
335 partition@5600000 {
336 label = "reserved1";
337 reg = <0x5600000 0x200000>;
338 sercomm,scpart-id = <24>;
339 read-only;
340 };
341
342 partition@5800000 {
343 label = "reserved2";
344 reg = <0x5800000 0x200000>;
345 sercomm,scpart-id = <25>;
346 read-only;
347 };
348
349 partition@5a00000 {
350 label = "reserved3";
351 reg = <0x5a00000 0x200000>;
352 sercomm,scpart-id = <26>;
353 read-only;
354 };
355
356 partition@5c00000 {
357 label = "reserved4";
358 reg = <0x5c00000 0x200000>;
359 sercomm,scpart-id = <27>;
360 read-only;
361 };
362
363 partition@5e00000 {
364 label = "reserved5";
365 reg = <0x5e00000 0x2180000>;
366 sercomm,scpart-id = <28>;
367 read-only;
368 };
369 };
370 };