blob: bf59b837a0256af182b9f7cec8ce1769e331e75e [file] [log] [blame]
developerfd40db22021-04-29 10:08:25 +08001/*
2 * Copyright (c) 2018 MediaTek Inc.
3 * Author: Ryder Lee <ryder.lee@mediatek.com>
4 *
5 * SPDX-License-Identifier: (GPL-2.0-only OR MIT)
6 */
7
8/dts-v1/;
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/gpio/gpio.h>
11
12#include "mt7622.dtsi"
13#include "mt6380.dtsi"
14
15/ {
16 model = "MT7622_MT7531 RFB";
17 compatible = "mediatek,mt7622,ubi";
18
19 aliases {
20 serial0 = &uart0;
21 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512";
26 };
27
28 cpus {
29 cpu@0 {
30 proc-supply = <&mt6380_vcpu_reg>;
31 sram-supply = <&mt6380_vm_reg>;
32 };
33
34 cpu@1 {
35 proc-supply = <&mt6380_vcpu_reg>;
36 sram-supply = <&mt6380_vm_reg>;
37 };
38 };
39
40 gpio-keys {
41 compatible = "gpio-keys";
42
43 factory {
44 label = "factory";
45 linux,code = <BTN_0>;
46 gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
47 };
48
49 wps {
50 label = "wps";
51 linux,code = <KEY_WPS_BUTTON>;
52 gpios = <&pio 102 GPIO_ACTIVE_HIGH>;
53 };
54 };
55
56 gsw: gsw@0 {
57 compatible = "mediatek,mt753x";
58 mediatek,ethsys = <&ethsys>;
59 #address-cells = <1>;
60 #size-cells = <0>;
61 };
62
63 leds {
64 compatible = "gpio-leds";
65
66 green {
67 label = "bpi-r64:pio:green";
68 gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
69 };
70
71 red {
72 label = "bpi-r64:pio:red";
73 gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
74 };
75 };
76
77 memory {
78 reg = <0 0x40000000 0 0x40000000>;
79 };
80
81 reg_1p8v: regulator-1p8v {
82 compatible = "regulator-fixed";
83 regulator-name = "fixed-1.8V";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
86 regulator-always-on;
87 };
88
89 reg_3p3v: regulator-3p3v {
90 compatible = "regulator-fixed";
91 regulator-name = "fixed-3.3V";
92 regulator-min-microvolt = <3300000>;
93 regulator-max-microvolt = <3300000>;
94 regulator-boot-on;
95 regulator-always-on;
96 };
97
98 reg_5v: regulator-5v {
99 compatible = "regulator-fixed";
100 regulator-name = "fixed-5V";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103 regulator-boot-on;
104 regulator-always-on;
105 };
106};
107
108&btif {
109 status = "okay";
110};
111
112&cir {
113 pinctrl-names = "default";
114 pinctrl-0 = <&irrx_pins>;
115 status = "okay";
116};
117
118&eth {
119 status = "okay";
120 gmac0: mac@0 {
121 compatible = "mediatek,eth-mac";
122 reg = <0>;
123 phy-mode = "2500base-x";
124
125 fixed-link {
126 speed = <2500>;
127 full-duplex;
128 pause;
129 };
130 };
131
132 gmac1: mac@1 {
133 compatible = "mediatek,eth-mac";
134 reg = <1>;
135 phy-mode = "rgmii";
136
137 fixed-link {
138 speed = <1000>;
139 full-duplex;
140 pause;
141 };
142 };
143
144 mdio: mdio-bus {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 };
148};
149
150&gsw {
151 mediatek,mdio = <&mdio>;
152 mediatek,portmap = "llllw";
153 mediatek,mdio_master_pinmux = <0>;
154 reset-gpios = <&pio 54 0>;
155 interrupt-parent = <&pio>;
156 interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
157 status = "okay";
158
159 port5: port@5 {
160 compatible = "mediatek,mt753x-port";
161 reg = <5>;
162 phy-mode = "rgmii";
163 fixed-link {
164 speed = <1000>;
165 full-duplex;
166 };
167 };
168
169 port6: port@6 {
170 compatible = "mediatek,mt753x-port";
171 reg = <6>;
172 phy-mode = "sgmii";
173 fixed-link {
174 speed = <2500>;
175 full-duplex;
176 };
177 };
178};
179
180&i2c1 {
181 pinctrl-names = "default";
182 pinctrl-0 = <&i2c1_pins>;
183 status = "okay";
184};
185
186&i2c2 {
187 pinctrl-names = "default";
188 pinctrl-0 = <&i2c2_pins>;
189 status = "okay";
190};
191
192&mmc0 {
193 pinctrl-names = "default", "state_uhs";
194 pinctrl-0 = <&emmc_pins_default>;
195 pinctrl-1 = <&emmc_pins_uhs>;
196 status = "okay";
197 bus-width = <8>;
198 max-frequency = <50000000>;
199 cap-mmc-highspeed;
200 mmc-hs200-1_8v;
201 vmmc-supply = <&reg_3p3v>;
202 vqmmc-supply = <&reg_1p8v>;
203 assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
204 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
205 non-removable;
206};
207
208&mmc1 {
209 pinctrl-names = "default", "state_uhs";
210 pinctrl-0 = <&sd0_pins_default>;
211 pinctrl-1 = <&sd0_pins_uhs>;
212 status = "okay";
213 bus-width = <4>;
214 max-frequency = <50000000>;
215 cap-sd-highspeed;
216 r_smpl = <1>;
217 cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
218 vmmc-supply = <&reg_3p3v>;
219 vqmmc-supply = <&reg_3p3v>;
220 assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
221 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
222};
223
224&nandc {
225 pinctrl-names = "default";
226 pinctrl-0 = <&parallel_nand_pins>;
227 status = "disabled";
228};
229
230&nor_flash {
231 pinctrl-names = "default";
232 pinctrl-0 = <&spi_nor_pins>;
233 status = "disabled";
234
235 flash@0 {
236 compatible = "jedec,spi-nor";
237 reg = <0>;
238 };
239};
240
241&pcie0 {
242 pinctrl-names = "default";
243 pinctrl-0 = <&pcie0_pins>;
244 status = "okay";
245};
246
247&pcie1 {
248 pinctrl-names = "default";
249 pinctrl-0 = <&pcie1_pins>;
250 status = "okay";
251};
252
253&pio {
254 /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
255 * SATA functions. i.e. output-high: PCIe, output-low: SATA
256 */
257 asm_sel {
258 gpio-hog;
259 gpios = <90 GPIO_ACTIVE_HIGH>;
260 output-high;
261 };
262
263 /* eMMC is shared pin with parallel NAND */
264 emmc_pins_default: emmc-pins-default {
265 mux {
266 function = "emmc", "emmc_rst";
267 groups = "emmc";
268 };
269
270 /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
271 * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
272 * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
273 */
274 conf-cmd-dat {
275 pins = "NDL0", "NDL1", "NDL2",
276 "NDL3", "NDL4", "NDL5",
277 "NDL6", "NDL7", "NRB";
278 input-enable;
279 bias-pull-up;
280 };
281
282 conf-clk {
283 pins = "NCLE";
284 bias-pull-down;
285 };
286 };
287
288 emmc_pins_uhs: emmc-pins-uhs {
289 mux {
290 function = "emmc";
291 groups = "emmc";
292 };
293
294 conf-cmd-dat {
295 pins = "NDL0", "NDL1", "NDL2",
296 "NDL3", "NDL4", "NDL5",
297 "NDL6", "NDL7", "NRB";
298 input-enable;
299 drive-strength = <4>;
300 bias-pull-up;
301 };
302
303 conf-clk {
304 pins = "NCLE";
305 drive-strength = <4>;
306 bias-pull-down;
307 };
308 };
309
310 eth_pins: eth-pins {
311 mux {
312 function = "eth";
313 groups = "mdc_mdio", "rgmii_via_gmac2";
314 };
315 };
316
317 i2c1_pins: i2c1-pins {
318 mux {
319 function = "i2c";
320 groups = "i2c1_0";
321 };
322 };
323
324 i2c2_pins: i2c2-pins {
325 mux {
326 function = "i2c";
327 groups = "i2c2_0";
328 };
329 };
330
331 i2s1_pins: i2s1-pins {
332 mux {
333 function = "i2s";
334 groups = "i2s_out_mclk_bclk_ws",
335 "i2s1_in_data",
336 "i2s1_out_data";
337 };
338
339 conf {
340 pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
341 "I2S_WS", "I2S_MCLK";
342 drive-strength = <12>;
343 bias-pull-down;
344 };
345 };
346
347 irrx_pins: irrx-pins {
348 mux {
349 function = "ir";
350 groups = "ir_1_rx";
351 };
352 };
353
354 irtx_pins: irtx-pins {
355 mux {
356 function = "ir";
357 groups = "ir_1_tx";
358 };
359 };
360
361 /* Parallel nand is shared pin with eMMC */
362 parallel_nand_pins: parallel-nand-pins {
363 mux {
364 function = "flash";
365 groups = "par_nand";
366 };
367 };
368
369 pcie0_pins: pcie0-pins {
370 mux {
371 function = "pcie";
372 groups = "pcie0_pad_perst",
373 "pcie0_1_waken",
374 "pcie0_1_clkreq";
375 };
376 };
377
378 pcie1_pins: pcie1-pins {
379 mux {
380 function = "pcie";
381 groups = "pcie1_pad_perst",
382 "pcie1_0_waken",
383 "pcie1_0_clkreq";
384 };
385 };
386
387 pmic_bus_pins: pmic-bus-pins {
388 mux {
389 function = "pmic";
390 groups = "pmic_bus";
391 };
392 };
393
394 pwm7_pins: pwm1-2-pins {
395 mux {
396 function = "pwm";
397 groups = "pwm_ch7_2";
398 };
399 };
400
401 wled_pins: wled-pins {
402 mux {
403 function = "led";
404 groups = "wled";
405 };
406 };
407
408 sd0_pins_default: sd0-pins-default {
409 mux {
410 function = "sd";
411 groups = "sd_0";
412 };
413
414 /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
415 * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
416 * DAT2, DAT3, CMD, CLK for SD respectively.
417 */
418 conf-cmd-data {
419 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
420 "I2S2_IN","I2S4_OUT";
421 input-enable;
422 drive-strength = <8>;
423 bias-pull-up;
424 };
425 conf-clk {
426 pins = "I2S3_OUT";
427 drive-strength = <12>;
428 bias-pull-down;
429 };
430 conf-cd {
431 pins = "TXD3";
432 bias-pull-up;
433 };
434 };
435
436 sd0_pins_uhs: sd0-pins-uhs {
437 mux {
438 function = "sd";
439 groups = "sd_0";
440 };
441
442 conf-cmd-data {
443 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
444 "I2S2_IN","I2S4_OUT";
445 input-enable;
446 bias-pull-up;
447 };
448
449 conf-clk {
450 pins = "I2S3_OUT";
451 bias-pull-down;
452 };
453 };
454
455 /* Serial NAND is shared pin with SPI-NOR */
456 serial_nand_pins: serial-nand-pins {
457 mux {
458 function = "flash";
459 groups = "snfi";
460 };
461 };
462
463 spic0_pins: spic0-pins {
464 mux {
465 function = "spi";
466 groups = "spic0_0";
467 };
468 };
469
470 spic1_pins: spic1-pins {
471 mux {
472 function = "spi";
473 groups = "spic1_0";
474 };
475 };
476
477 /* SPI-NOR is shared pin with serial NAND */
478 spi_nor_pins: spi-nor-pins {
479 mux {
480 function = "flash";
481 groups = "spi_nor";
482 };
483 };
484
485 /* serial NAND is shared pin with SPI-NOR */
486 serial_nand_pins: serial-nand-pins {
487 mux {
488 function = "flash";
489 groups = "snfi";
490 };
491 };
492
493 uart0_pins: uart0-pins {
494 mux {
495 function = "uart";
496 groups = "uart0_0_tx_rx" ;
497 };
498 };
499
500 uart2_pins: uart2-pins {
501 mux {
502 function = "uart";
503 groups = "uart2_1_tx_rx" ;
504 };
505 };
506
507 watchdog_pins: watchdog-pins {
508 mux {
509 function = "watchdog";
510 groups = "watchdog";
511 };
512 };
513};
514
515&pwm {
516 pinctrl-names = "default";
517 pinctrl-0 = <&pwm7_pins>;
518 status = "okay";
519};
520
521&pwrap {
522 pinctrl-names = "default";
523 pinctrl-0 = <&pmic_bus_pins>;
524
525 status = "okay";
526};
527
528&sata {
529 status = "disable";
530};
531
532&sata_phy {
533 status = "disable";
534};
535
536&snand {
537 pinctrl-names = "default";
538 pinctrl-0 = <&serial_nand_pins>;
539 status = "okay";
540 mediatek,quad-spi;
541
542 partitions {
543 compatible = "fixed-partitions";
544 #address-cells = <1>;
545 #size-cells = <1>;
546
547 partition@0 {
548 label = "BL2";
549 reg = <0x00000 0x0080000>;
550 read-only;
551 };
552
553 partition@80000 {
554 label = "FIP";
555 reg = <0x80000 0x0200000>;
556 };
557
558 partition@280000 {
559 label = "Config";
560 reg = <0x280000 0x0080000>;
561 };
562
563 factory: partition@300000 {
564 label = "Factory";
565 reg = <0x300000 0x0100000>;
566 };
567
568 partition@400000 {
569 label = "ubi";
570 reg = <0x400000 0x2400000>;
571 };
572 };
573};
574
575&spi0 {
576 pinctrl-names = "default";
577 pinctrl-0 = <&spic0_pins>;
578 status = "okay";
579};
580
581&spi1 {
582 pinctrl-names = "default";
583 pinctrl-0 = <&spic1_pins>;
584 status = "okay";
585};
586
587&ssusb {
588 vusb33-supply = <&reg_3p3v>;
589 vbus-supply = <&reg_5v>;
590 status = "okay";
591};
592
593&u3phy {
594 status = "okay";
595};
596
597&uart0 {
598 pinctrl-names = "default";
599 pinctrl-0 = <&uart0_pins>;
600 status = "okay";
601};
602
603&uart2 {
604 pinctrl-names = "default";
605 pinctrl-0 = <&uart2_pins>;
606 status = "okay";
607};
608
609&watchdog {
610 pinctrl-names = "default";
611 pinctrl-0 = <&watchdog_pins>;
612 status = "okay";
613};
614
615&wmac {
616 mediatek,mtd-eeprom = <&factory 0x0000>;
617 status = "okay";
618};