blob: dd15a85ab70b8e6a9bda1a8969a2e24f85549976 [file] [log] [blame]
developerfd40db22021-04-29 10:08:25 +08001/dts-v1/;
2#include "mt7986a.dtsi"
3/ {
4 model = "MediaTek MT7986a RFB";
5 compatible = "mediatek,mt7986a-rfb";
6 chosen {
7 bootargs = "console=ttyS0,115200n1 loglevel=8 \
8 earlycon=uart8250,mmio32,0x11002000";
9 };
10
11 memory {
developerfd40db22021-04-29 10:08:25 +080012 reg = <0 0x40000000 0 0x10000000>;
13 };
developerc20f3452021-05-26 17:27:35 +080014
15 nmbm_snfi {
16 compatible = "generic,nmbm";
17
18 #address-cells = <1>;
19 #size-cells = <1>;
20
21 lower-mtd-device = <&snand>;
22 forced-create;
developerc9faf4a2021-06-17 09:22:21 +080023 empty-page-ecc-protected;
developerc20f3452021-05-26 17:27:35 +080024
25 partitions {
26 compatible = "fixed-partitions";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "BL2";
32 reg = <0x00000 0x0100000>;
33 read-only;
34 };
35
36 partition@100000 {
37 label = "u-boot-env";
38 reg = <0x0100000 0x0080000>;
39 };
40
41 partition@180000 {
42 label = "Factory";
43 reg = <0x180000 0x0200000>;
44 };
45
46 partition@380000 {
47 label = "FIP";
48 reg = <0x380000 0x0200000>;
49 };
50
51 partition@580000 {
52 label = "ubi";
53 reg = <0x580000 0x4000000>;
54 };
55 };
56 };
developerfeac91e2021-06-02 09:46:12 +080057
developer86fc2a72021-06-23 17:30:23 +080058 nmbm_spim_nand {
59 compatible = "generic,nmbm";
60
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 lower-mtd-device = <&spi_nand>;
65 forced-create;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "BL2";
74 reg = <0x00000 0x0100000>;
75 read-only;
76 };
77
78 partition@100000 {
79 label = "u-boot-env";
80 reg = <0x0100000 0x0080000>;
81 };
82
83 partition@180000 {
84 label = "Factory";
85 reg = <0x180000 0x0200000>;
86 };
87
88 partition@380000 {
89 label = "FIP";
90 reg = <0x380000 0x0200000>;
91 };
92
93 partition@580000 {
94 label = "ubi";
95 reg = <0x580000 0x4000000>;
96 };
97 };
98 };
99
developerfeac91e2021-06-02 09:46:12 +0800100 reg_1p8v: regulator-1p8v {
101 compatible = "regulator-fixed";
102 regulator-name = "fixed-1.8V";
103 regulator-min-microvolt = <1800000>;
104 regulator-max-microvolt = <1800000>;
105 regulator-boot-on;
106 regulator-always-on;
107 };
108
109 reg_3p3v: regulator-3p3v {
110 compatible = "regulator-fixed";
111 regulator-name = "fixed-3.3V";
112 regulator-min-microvolt = <3300000>;
113 regulator-max-microvolt = <3300000>;
114 regulator-boot-on;
115 regulator-always-on;
116 };
developere1993bd2021-07-06 13:48:40 +0800117
118 sound {
119 compatible = "mediatek,mt7986-wm8960-machine";
120 mediatek,platform = <&afe>;
121 audio-routing = "Headphone", "HP_L",
122 "Headphone", "HP_R",
123 "LINPUT1", "AMIC",
124 "RINPUT1", "AMIC";
125 mediatek,audio-codec = <&wm8960>;
126 status = "okay";
127 };
developerfd40db22021-04-29 10:08:25 +0800128};
129
developer8b9f2852021-06-03 21:53:08 +0800130&pwm {
131 pinctrl-names = "default";
132 pinctrl-0 = <&pwm0_pin &pwm1_pin_g1>;
133 status = "okay";
134};
135
developerfd40db22021-04-29 10:08:25 +0800136&uart0 {
137 status = "okay";
138};
139
developer8b9f2852021-06-03 21:53:08 +0800140&uart1 {
141 pinctrl-names = "default";
142 pinctrl-0 = <&uart1_pins>;
143 status = "okay";
144};
145
146&uart2 {
147 pinctrl-names = "default";
148 pinctrl-0 = <&uart2_pins>;
149 status = "okay";
150};
151
152&i2c0 {
153 pinctrl-names = "default";
154 pinctrl-0 = <&i2c_pins>;
155 status = "okay";
developere1993bd2021-07-06 13:48:40 +0800156
157 wm8960: wm8960@1a {
158 compatible = "wlf,wm8960";
159 reg = <0x1a>;
160 };
developer8b9f2852021-06-03 21:53:08 +0800161};
162
163&auxadc {
164 status = "okay";
165};
166
developerfd40db22021-04-29 10:08:25 +0800167&watchdog {
168 status = "okay";
169};
170
171&eth {
172 status = "okay";
173
174 gmac0: mac@0 {
175 compatible = "mediatek,eth-mac";
176 reg = <0>;
177 phy-mode = "2500base-x";
178
179 fixed-link {
180 speed = <2500>;
181 full-duplex;
182 pause;
183 };
184 };
185
186 gmac1: mac@1 {
187 compatible = "mediatek,eth-mac";
188 reg = <1>;
189 phy-mode = "2500base-x";
190
191 fixed-link {
192 speed = <2500>;
193 full-duplex;
194 pause;
195 };
196 };
197
198 mdio: mdio-bus {
199 #address-cells = <1>;
200 #size-cells = <0>;
201
developerc0f3c7f2021-05-17 11:48:36 +0800202 phy5: phy@5 {
203 compatible = "ethernet-phy-id67c9.de0a";
204 reg = <5>;
205 reset-gpios = <&pio 6 1>;
206 reset-deassert-us = <20000>;
207 phy-mode = "2500base-x";
208 };
209
210 phy6: phy@6 {
211 compatible = "ethernet-phy-id67c9.de0a";
212 reg = <6>;
213 phy-mode = "2500base-x";
214 };
215
developerfd40db22021-04-29 10:08:25 +0800216 switch@0 {
217 compatible = "mediatek,mt7531";
developerc0f3c7f2021-05-17 11:48:36 +0800218 reg = <31>;
developer51059432021-05-03 16:01:06 +0800219 reset-gpios = <&pio 5 0>;
developerfd40db22021-04-29 10:08:25 +0800220
221 ports {
222 #address-cells = <1>;
223 #size-cells = <0>;
224
225 port@0 {
226 reg = <0>;
developerc0f3c7f2021-05-17 11:48:36 +0800227 label = "lan0";
developerfd40db22021-04-29 10:08:25 +0800228 };
229
230 port@1 {
231 reg = <1>;
developerc0f3c7f2021-05-17 11:48:36 +0800232 label = "lan1";
developerfd40db22021-04-29 10:08:25 +0800233 };
234
235 port@2 {
236 reg = <2>;
developerc0f3c7f2021-05-17 11:48:36 +0800237 label = "lan2";
developerfd40db22021-04-29 10:08:25 +0800238 };
239
240 port@3 {
241 reg = <3>;
developerc0f3c7f2021-05-17 11:48:36 +0800242 label = "lan3";
developerfd40db22021-04-29 10:08:25 +0800243 };
244
developerfd40db22021-04-29 10:08:25 +0800245 port@6 {
246 reg = <6>;
247 label = "cpu";
248 ethernet = <&gmac0>;
249 phy-mode = "2500base-x";
250
251 fixed-link {
252 speed = <2500>;
253 full-duplex;
254 pause;
255 };
256 };
257 };
258 };
259 };
260};
261
262&hnat {
developere5763512021-05-21 01:04:58 +0800263 mtketh-wan = "eth1";
developerd7edc132021-05-06 13:49:50 +0800264 mtketh-lan = "lan";
developerfd40db22021-04-29 10:08:25 +0800265 mtketh-max-gmac = <2>;
266 status = "okay";
267};
268
269&spi0 {
270 pinctrl-names = "default";
271 pinctrl-0 = <&spi_flash_pins>;
272 cs-gpios = <0>, <0>;
273 status = "okay";
274 spi_nor@0 {
275 #address-cells = <1>;
276 #size-cells = <1>;
277 compatible = "jedec,spi-nor";
278 reg = <0>;
279 spi-max-frequency = <20000000>;
280 spi-tx-buswidth = <4>;
281 spi-rx-buswidth = <4>;
282
283 partition@00000 {
284 label = "BL2";
285 reg = <0x00000 0x0040000>;
286 };
287 partition@40000 {
288 label = "u-boot-env";
289 reg = <0x40000 0x0010000>;
290 };
developer298705c2021-06-05 18:48:19 +0800291 factory: partition@50000 {
developerfd40db22021-04-29 10:08:25 +0800292 label = "Factory";
293 reg = <0x50000 0x00B0000>;
294 };
295 partition@100000 {
296 label = "FIP";
297 reg = <0x100000 0x0080000>;
298 };
299 partition@180000 {
300 label = "firmware";
301 reg = <0x180000 0xE00000>;
302 };
303 };
developer86fc2a72021-06-23 17:30:23 +0800304 spi_nand: spi_nand@1 {
developerfd40db22021-04-29 10:08:25 +0800305 #address-cells = <1>;
306 #size-cells = <1>;
307 compatible = "spi-nand";
308 reg = <1>;
309 spi-max-frequency = <20000000>;
310 spi-tx-buswidth = <4>;
311 spi-rx-buswidth = <4>;
developerfd40db22021-04-29 10:08:25 +0800312 };
313};
314
315&snand {
316 pinctrl-names = "default";
developerfd40db22021-04-29 10:08:25 +0800317 pinctrl-0 = <&snfi_pins>;
318 status = "okay";
319 mediatek,quad-spi;
320
321 partitions {
322 compatible = "fixed-partitions";
323 #address-cells = <1>;
324 #size-cells = <1>;
developerfd40db22021-04-29 10:08:25 +0800325 };
326};
327
328&spi1 {
329 pinctrl-names = "default";
developer8b9f2852021-06-03 21:53:08 +0800330 pinctrl-0 = <&spic_pins_g2>;
developerfd40db22021-04-29 10:08:25 +0800331 status = "okay";
332};
333
developer637f5552021-05-27 17:45:27 +0800334&mmc0 {
335 pinctrl-names = "default", "state_uhs";
336 pinctrl-0 = <&mmc0_pins_default>;
337 pinctrl-1 = <&mmc0_pins_uhs>;
338 bus-width = <8>;
developerf089cc02021-09-11 17:23:41 +0800339 max-frequency = <200000000>;
developer637f5552021-05-27 17:45:27 +0800340 cap-mmc-highspeed;
341 mmc-hs200-1_8v;
developerf089cc02021-09-11 17:23:41 +0800342 mmc-hs400-1_8v;
343 hs400-ds-delay = <0x14014>;
developer637f5552021-05-27 17:45:27 +0800344 vmmc-supply = <&reg_3p3v>;
345 vqmmc-supply = <&reg_1p8v>;
346 non-removable;
developerf089cc02021-09-11 17:23:41 +0800347 no-sd;
348 no-sdio;
developer637f5552021-05-27 17:45:27 +0800349 status = "okay";
350};
351
developere2ed4342021-07-02 16:04:23 +0800352&pcie0 {
353 pinctrl-names = "default";
354 pinctrl-0 = <&pcie0_pins>;
355 status = "okay";
356};
357
developerfd40db22021-04-29 10:08:25 +0800358&pio {
developer8b9f2852021-06-03 21:53:08 +0800359 wifi_led_pins: wifi_led-pins-1-2 {
developerfd40db22021-04-29 10:08:25 +0800360 mux {
developer8b9f2852021-06-03 21:53:08 +0800361 function = "led";
362 groups = "wifi_led";
363 };
364 };
365
366 i2c_pins: i2c-pins-3-4 {
367 mux {
368 function = "i2c";
369 groups = "i2c";
370 };
371 };
372
373 uart1_pins_g0: uart1-pins-7-to-10 {
374 mux {
375 function = "uart";
376 groups = "uart1_0";
377 };
378 };
379
developere2ed4342021-07-02 16:04:23 +0800380 pcie0_pins: pcie0-pins-9-10-41 {
381 mux {
382 function = "pcie";
383 groups = "pcie_clk", "pcie_wake", "pcie_pereset";
384 };
385 };
386
developer8b9f2852021-06-03 21:53:08 +0800387 jtag_pins: jtag-pins-11-to-14 {
388 mux {
389 function = "jtag";
390 groups = "jtag";
391 };
392 };
393
394 spic_pins_g0: spic-pins-11-to-14 {
395 mux {
396 function = "spi";
397 groups = "spi1_0";
398 };
399 };
400
401 pwm1_pin_g0: pwm1-pin-20 {
402 mux {
403 function = "pwm";
404 groups = "pwm1_1";
405 };
406 };
407
408 pwm0_pin: pwm0-pin-21 {
409 mux {
410 function = "pwm";
411 groups = "pwm0";
412 };
413 };
414
415 pwm1_pin_g1: pwm1-pin-22 {
416 mux {
417 function = "pwm";
418 groups = "pwm1_0";
419 };
420 };
421
422 spic_pins_g1: spic-pins-23-to-26 {
423 mux {
424 function = "spi";
425 groups = "spi1_1";
426 };
427 };
428
429 uart1_pins_g1: uart1-pins-23-to-26 {
430 mux {
431 function = "uart";
432 groups = "uart1_1";
developerfd40db22021-04-29 10:08:25 +0800433 };
434 };
435
developer8b9f2852021-06-03 21:53:08 +0800436 snfi_pins: snfi-pins-23-to-28 {
developerfd40db22021-04-29 10:08:25 +0800437 mux {
438 function = "flash";
439 groups = "snfi";
440 };
developer7f4cdcd2021-08-03 19:29:43 +0800441 conf-clk {
442 pins = "SPI0_CLK";
443 drive-strength = <MTK_DRIVE_8mA>;
444 mediatek,pull-down-adv = <0>; /* bias-disable */
445 };
446 conf-pu {
447 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
448 drive-strength = <MTK_DRIVE_6mA>;
449 mediatek,pull-up-adv = <0>; /* bias-disable */
450 };
451 conf-pd {
452 pins = "SPI0_MOSI", "SPI0_MISO";
453 drive-strength = <MTK_DRIVE_6mA>;
454 mediatek,pull-down-adv = <0>; /* bias-disable */
455 };
developerfd40db22021-04-29 10:08:25 +0800456 };
457
developer8b9f2852021-06-03 21:53:08 +0800458 spic_pins_g2: spic-pins-29-to-32 {
developerfd40db22021-04-29 10:08:25 +0800459 mux {
460 function = "spi";
developer19d22f62021-05-27 17:36:23 +0800461 groups = "spi1_2";
developerfd40db22021-04-29 10:08:25 +0800462 };
463 };
developer637f5552021-05-27 17:45:27 +0800464
developer8b9f2852021-06-03 21:53:08 +0800465 uart1_pins_g2: uart1-pins-29-to-32 {
466 mux {
467 function = "uart";
468 groups = "uart1_2";
469 };
470 };
471
472 uart2_pins_g0: uart1-pins-29-to-32 {
473 mux {
474 function = "uart";
475 groups = "uart1_2";
476 };
477 };
478
479 uart2_pins_g1: uart1-pins-23-to-36 {
480 mux {
481 function = "uart";
482 groups = "uart2_1";
483 };
484 };
485
486 spic_pins_g3: spic-pins-33-to-36 {
487 mux {
488 function = "spi";
489 groups = "spi1_3";
490 };
491 };
492
493 uart1_pins_g3: uart1-pins-35-to-38 {
494 mux {
495 function = "uart";
496 groups = "uart1_3_rx_tx", "uart1_3_cts_rts";
497 };
498 };
499
500 spi_flash_pins: spi-flash-pins-33-to-38 {
developer637f5552021-05-27 17:45:27 +0800501 mux {
502 function = "flash";
developer8b9f2852021-06-03 21:53:08 +0800503 groups = "spi0", "spi0_wp_hold";
504 };
developer7f4cdcd2021-08-03 19:29:43 +0800505 conf-pu {
506 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
507 drive-strength = <MTK_DRIVE_8mA>;
508 mediatek,pull-up-adv = <0>; /* bias-disable */
509 };
510 conf-pd {
511 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
512 drive-strength = <MTK_DRIVE_8mA>;
513 mediatek,pull-down-adv = <0>; /* bias-disable */
514 };
developer8b9f2852021-06-03 21:53:08 +0800515 };
516
517 uart1_pins: uart1-pins-42-to-45 {
518 mux {
519 function = "uart";
520 groups = "uart1";
521 };
522 };
523
524 uart2_pins: uart1-pins-46-to-49 {
525 mux {
526 function = "uart";
527 groups = "uart2";
528 };
529 };
530
531 mmc0_pins_default: mmc0-pins-50-to-61-default {
532 mux {
533 function = "flash";
developer637f5552021-05-27 17:45:27 +0800534 groups = "emmc_51";
535 };
developer7f4cdcd2021-08-03 19:29:43 +0800536 conf-cmd-dat {
537 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
538 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
developerf089cc02021-09-11 17:23:41 +0800539 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
developer7f4cdcd2021-08-03 19:29:43 +0800540 input-enable;
developerf089cc02021-09-11 17:23:41 +0800541 drive-strength = <MTK_DRIVE_4mA>;
developer7f4cdcd2021-08-03 19:29:43 +0800542 mediatek,pull-up-adv = <1>; /* pull-up 10K */
543 };
544 conf-clk {
545 pins = "EMMC_CK";
546 drive-strength = <MTK_DRIVE_6mA>;
547 mediatek,pull-down-adv = <2>; /* pull-down 50K */
548 };
developerf089cc02021-09-11 17:23:41 +0800549 conf-ds {
550 pins = "EMMC_DSL";
551 mediatek,pull-down-adv = <2>; /* pull-down 50K */
552 };
developer7f4cdcd2021-08-03 19:29:43 +0800553 conf-rst {
554 pins = "EMMC_RSTB";
developerf089cc02021-09-11 17:23:41 +0800555 drive-strength = <MTK_DRIVE_4mA>;
developer7f4cdcd2021-08-03 19:29:43 +0800556 mediatek,pull-up-adv = <1>; /* pull-up 10K */
557 };
developer637f5552021-05-27 17:45:27 +0800558 };
559
developer8b9f2852021-06-03 21:53:08 +0800560 mmc0_pins_uhs: mmc0-pins-50-to-61-uhs {
developer637f5552021-05-27 17:45:27 +0800561 mux {
562 function = "flash";
563 groups = "emmc_51";
564 };
developer7f4cdcd2021-08-03 19:29:43 +0800565 conf-cmd-dat {
566 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
567 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
developerf089cc02021-09-11 17:23:41 +0800568 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
developer7f4cdcd2021-08-03 19:29:43 +0800569 input-enable;
developerf089cc02021-09-11 17:23:41 +0800570 drive-strength = <MTK_DRIVE_4mA>;
developer7f4cdcd2021-08-03 19:29:43 +0800571 mediatek,pull-up-adv = <1>; /* pull-up 10K */
572 };
573 conf-clk {
574 pins = "EMMC_CK";
575 drive-strength = <MTK_DRIVE_6mA>;
576 mediatek,pull-down-adv = <2>; /* pull-down 50K */
577 };
developerf089cc02021-09-11 17:23:41 +0800578 conf-ds {
579 pins = "EMMC_DSL";
580 mediatek,pull-down-adv = <2>; /* pull-down 50K */
581 };
developer7f4cdcd2021-08-03 19:29:43 +0800582 conf-rst {
583 pins = "EMMC_RSTB";
developerf089cc02021-09-11 17:23:41 +0800584 drive-strength = <MTK_DRIVE_4mA>;
developer7f4cdcd2021-08-03 19:29:43 +0800585 mediatek,pull-up-adv = <1>; /* pull-up 10K */
586 };
developer637f5552021-05-27 17:45:27 +0800587 };
developer8b9f2852021-06-03 21:53:08 +0800588
589 pcm_pins: pcm-pins-62-to-65 {
590 mux {
591 function = "pcm";
592 groups = "pcm";
593 };
594 };
developerfd40db22021-04-29 10:08:25 +0800595};