ipq807x: fix wrong define for LAN and WAN ess mask
[openwrt/staging/hauke.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8074-rax120v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074.dtsi"
6 #include "ipq8074-ess.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "Netgear RAX120v2";
14 compatible = "netgear,rax120v2", "qcom,ipq8074";
15
16 aliases {
17 serial0 = &blsp1_uart5;
18
19 led-running = &led_system_white;
20 led-upgrade = &led_system_white;
21 led-internet = &led_wan_white;
22 label-mac-device = &dp1;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 bootargs-append = " ubi.mtd=rootfs root=/dev/ubiblock0_0";
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 rfkill {
34 label = "rfkill";
35 gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RFKILL>;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51
52 led_spi {
53 compatible = "spi-gpio";
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 sck-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
58 mosi-gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
59
60 led_gpio: led_gpio@0 {
61 compatible = "fairchild,74hc595";
62 reg = <0>;
63 gpio-controller;
64 #gpio-cells = <2>;
65 registers-number = <2>;
66 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
67 spi-max-frequency = <1000000>;
68 };
69 };
70
71 leds {
72 compatible = "gpio-leds";
73
74 led_system_white: system-white {
75 label = "white:system";
76 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
77 color = <LED_COLOR_ID_WHITE>;
78 };
79
80 led_24g_white {
81 label = "white:24g";
82 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
83 color = <LED_COLOR_ID_WHITE>;
84 linux,default-trigger = "phy1radio";
85 };
86
87 led_5g_white {
88 label = "white:5g";
89 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
90 color = <LED_COLOR_ID_WHITE>;
91 linux,default-trigger = "phy0radio";
92 };
93
94 led_usb1_white {
95 label = "white:usb1";
96 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
97 color = <LED_COLOR_ID_WHITE>;
98 };
99
100 led_usb2_white {
101 label = "white:usb2";
102 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
103 color = <LED_COLOR_ID_WHITE>;
104 };
105
106 led_wan_white: wan-white {
107 label = "white:wan";
108 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
109 color = <LED_COLOR_ID_WHITE>;
110 };
111
112 led_aqr_green {
113 label = "green:aqr";
114 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
115 color = <LED_COLOR_ID_GREEN>;
116 };
117
118 led_aqr_red {
119 label = "red:aqr";
120 gpios = <&led_gpio 10 GPIO_ACTIVE_LOW>;
121 color = <LED_COLOR_ID_RED>;
122 };
123
124 led_aqr_white {
125 label = "white:aqr";
126 gpios = <&led_gpio 11 GPIO_ACTIVE_LOW>;
127 color = <LED_COLOR_ID_WHITE>;
128 };
129
130 led_wps_white {
131 label = "white:wps";
132 gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
133 color = <LED_COLOR_ID_WHITE>;
134 };
135 };
136 };
137
138 &tlmm {
139 mdio_pins: mdio-pins {
140 mdc {
141 pins = "gpio68";
142 function = "mdc";
143 drive-strength = <8>;
144 bias-pull-up;
145 };
146
147 mdio {
148 pins = "gpio69";
149 function = "mdio";
150 drive-strength = <8>;
151 bias-pull-up;
152 };
153 };
154 };
155
156 &mdio {
157 status = "okay";
158
159 pinctrl-0 = <&mdio_pins>;
160 pinctrl-names = "default";
161 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
162
163 qca8075_0: ethernet-phy@0 {
164 compatible = "ethernet-phy-ieee802.3-c22";
165 reg = <0>;
166 };
167
168 qca8075_1: ethernet-phy@1 {
169 compatible = "ethernet-phy-ieee802.3-c22";
170 reg = <1>;
171 };
172
173 qca8075_2: ethernet-phy@2 {
174 compatible = "ethernet-phy-ieee802.3-c22";
175 reg = <2>;
176 };
177
178 qca8075_3: ethernet-phy@3 {
179 compatible = "ethernet-phy-ieee802.3-c22";
180 reg = <3>;
181 };
182
183 qca8075_4: ethernet-phy@4 {
184 compatible = "ethernet-phy-ieee802.3-c22";
185 reg = <4>;
186 };
187
188 aqr111b0: ethernet-phy@7 {
189 compatible ="ethernet-phy-ieee802.3-c45";
190 reg = <7>;
191 reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
192 };
193 };
194
195 &switch {
196 status = "okay";
197
198 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
199 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
200 switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
201 switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
202 switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
203 bm_tick_mode = <0>; /* bm tick mode */
204 tm_tick_mode = <0>; /* tm tick mode */
205
206 qcom,port_phyinfo {
207 port@1 {
208 port_id = <1>;
209 phy_address = <0>;
210 };
211 port@2 {
212 port_id = <2>;
213 phy_address = <1>;
214 };
215 port@3 {
216 port_id = <3>;
217 phy_address = <2>;
218 };
219 port@4 {
220 port_id = <4>;
221 phy_address = <3>;
222 };
223 port@5 {
224 port_id = <5>;
225 phy_address = <4>;
226 };
227 port@6 {
228 port_id = <6>;
229 phy_address = <7>;
230 compatible = "ethernet-phy-ieee802.3-c45";
231 ethernet-phy-ieee802.3-c45;
232 };
233 };
234 };
235
236 &edma {
237 status = "okay";
238 };
239
240 &dp1 {
241 status = "okay";
242 phy-handle = <&qca8075_0>;
243 label = "lan4";
244 nvmem-cells = <&macaddr_dp1>;
245 nvmem-cell-names = "mac-address";
246 };
247
248 &dp2 {
249 status = "okay";
250 phy-handle = <&qca8075_1>;
251 label = "lan3";
252 nvmem-cells = <&macaddr_dp2>;
253 nvmem-cell-names = "mac-address";
254 };
255
256 &dp3 {
257 status = "okay";
258 phy-handle = <&qca8075_2>;
259 label = "lan2";
260 nvmem-cells = <&macaddr_dp3>;
261 nvmem-cell-names = "mac-address";
262 };
263
264 &dp4 {
265 status = "okay";
266 phy-handle = <&qca8075_3>;
267 label = "lan1";
268 nvmem-cells = <&macaddr_dp4>;
269 nvmem-cell-names = "mac-address";
270 };
271
272 &dp5 {
273 status = "okay";
274 phy-handle = <&qca8075_4>;
275 label = "wan";
276 nvmem-cells = <&macaddr_dp5>;
277 nvmem-cell-names = "mac-address";
278 };
279
280 &dp6_syn {
281 status = "okay";
282 phy-handle = <&aqr111b0>;
283 label = "lan5";
284 nvmem-cells = <&macaddr_dp6_syn>;
285 nvmem-cell-names = "mac-address";
286 };
287
288 &blsp1_uart5 {
289 status = "okay";
290 };
291
292 &blsp1_i2c2 {
293 status = "okay";
294
295 g761@3e {
296 compatible = "gmt,g763";
297 reg = <0x3e>;
298 clocks =<&sleep_clk>;
299 fan_gear_mode = <0>;
300 fan_start = <1>;
301 pwm_polarity = <0>;
302 };
303 };
304
305 &qpic_bam {
306 status = "okay";
307 };
308
309 &qpic_nand {
310 status = "okay";
311
312 nand@0 {
313 reg = <0>;
314 nand-ecc-strength = <4>;
315 nand-ecc-step-size = <512>;
316 nand-bus-width = <8>;
317
318 partitions {
319 compatible = "fixed-partitions";
320 #address-cells = <1>;
321 #size-cells = <1>;
322
323 partition@0 {
324 label = "0:sbl1";
325 reg = <0x00 0x100000>;
326 read-only;
327 };
328
329 partition@100000 {
330 label = "0:mibib";
331 reg = <0x100000 0x100000>;
332 read-only;
333 };
334
335 partition@200000 {
336 label = "0:bootconfig";
337 reg = <0x200000 0x80000>;
338 read-only;
339 };
340
341 partition@280000 {
342 label = "0:bootconfig_1";
343 reg = <0x280000 0x80000>;
344 read-only;
345 };
346
347 partition@300000 {
348 label = "0:qsee";
349 reg = <0x300000 0x300000>;
350 read-only;
351 };
352
353 partition@600000 {
354 label = "0:qsee_1";
355 reg = <0x600000 0x300000>;
356 read-only;
357 };
358
359 partition@900000 {
360 label = "0:devcfg";
361 reg = <0x900000 0x80000>;
362 read-only;
363 };
364
365 partition@980000 {
366 label = "0:devcfg_1";
367 reg = <0x980000 0x80000>;
368 read-only;
369 };
370
371 partition@a00000 {
372 label = "0:apdp";
373 reg = <0xa00000 0x80000>;
374 read-only;
375 };
376
377 partition@a80000 {
378 label = "0:apdp_1";
379 reg = <0xa80000 0x80000>;
380 read-only;
381 };
382
383 partition@b00000 {
384 label = "0:rpm";
385 reg = <0xb00000 0x80000>;
386 read-only;
387 };
388
389 partition@b80000 {
390 label = "0:rpm_1";
391 reg = <0xb80000 0x80000>;
392 read-only;
393 };
394
395 partition@c00000 {
396 label = "0:cdt";
397 reg = <0xc00000 0x80000>;
398 read-only;
399 };
400
401 partition@c80000 {
402 label = "0:cdt_1";
403 reg = <0xc80000 0x80000>;
404 read-only;
405 };
406
407 partition@d00000 {
408 label = "0:appsblenv";
409 reg = <0xd00000 0x80000>;
410 };
411
412 partition@d80000 {
413 label = "0:appsbl";
414 reg = <0xd80000 0x100000>;
415 read-only;
416 };
417
418 partition@e80000 {
419 label = "0:appsbl_1";
420 reg = <0xe80000 0x100000>;
421 read-only;
422 };
423
424 partition@f80000 {
425 label = "0:art";
426 reg = <0xf80000 0x80000>;
427 read-only;
428 };
429
430 partition@1000000 {
431 label = "0:art.bak";
432 reg = <0x1000000 0x0080000>;
433 read-only;
434 };
435
436 partition@1080000 {
437 label = "config";
438 reg = <0x1080000 0x0100000>;
439 read-only;
440 };
441
442 partition@1180000 {
443 label = "boarddata1";
444 reg = <0x1180000 0x0100000>;
445 read-only;
446
447 compatible = "nvmem-cells";
448 #address-cells = <1>;
449 #size-cells = <1>;
450
451 macaddr_dp1: macaddr@0 {
452 reg = <0x0 0x6>;
453 };
454
455 macaddr_dp2: macaddr@1 {
456 reg = <0x6 0x6>;
457 };
458
459 macaddr_dp3: macaddr@2 {
460 reg = <0xc 0x6>;
461 };
462
463 macaddr_dp4: macaddr@3 {
464 reg = <0x12 0x6>;
465 };
466
467 macaddr_dp5: macaddr@4 {
468 reg = <0x18 0x6>;
469 };
470
471 macaddr_dp6_syn: macaddr@5 {
472 reg = <0x1e 0x6>;
473 };
474
475 };
476
477 partition@1280000 {
478 label = "boarddata2";
479 reg = <0x1280000 0x0100000>;
480 read-only;
481 };
482
483 partition@1380000 {
484 label = "pot";
485 reg = <0x1380000 0x0100000>;
486 read-only;
487 };
488
489 partition@1480000 {
490 label = "dnidata";
491 reg = <0x1480000 0x0500000>;
492 read-only;
493 };
494
495 partition@1980000 {
496 label = "kernel";
497 reg = <0x1980000 0x1d00000>;
498 };
499
500 partition@7e00000 {
501 label = "ethphyfw";
502 reg = <0x7e00000 0x80000>;
503 };
504
505 partition@e8800000 {
506 label = "rootfs";
507 reg = <0xe880000 0x11780000>;
508 };
509 };
510 };
511 };
512
513 &qusb_phy_0 {
514 status = "okay";
515 };
516
517 &qusb_phy_1 {
518 status = "okay";
519 };
520
521 &ssphy_0 {
522 status = "okay";
523 };
524
525 &ssphy_1 {
526 status = "okay";
527 };
528
529 &usb_0 {
530 status = "okay";
531 };
532
533 &usb_1 {
534 status = "okay";
535 };
536
537 &wifi{
538 status = "okay";
539
540 qcom,ath11k-calibration-variant = "Netgear-RAX120v2";
541 };
542
543 &cryptobam {
544 status = "okay";
545 };
546
547 &crypto {
548 status = "okay";
549 };
550
551 &prng {
552 status = "okay";
553 };