1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (C) 2021 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
11 #include "mt7986a.dtsi"
14 model = "Bananapi BPI-R3";
15 compatible = "bananapi,bpi-r3", "mediatek,mt7986a";
21 led-boot = &led_status_green;
22 led-failsafe = &led_status_green;
23 led-running = &led_status_green;
24 led-upgrade = &led_status_blue;
28 stdout-path = "serial0:115200n8";
32 device_type = "memory";
33 reg = <0 0x40000000 0 0x40000000>;
36 reg_1p8v: regulator-1p8v {
37 compatible = "regulator-fixed";
38 regulator-name = "fixed-1.8V";
39 regulator-min-microvolt = <1800000>;
40 regulator-max-microvolt = <1800000>;
45 reg_3p3v: regulator-3p3v {
46 compatible = "regulator-fixed";
47 regulator-name = "fixed-3.3V";
48 regulator-min-microvolt = <3300000>;
49 regulator-max-microvolt = <3300000>;
54 reg_5v: regulator-5v {
55 compatible = "regulator-fixed";
56 regulator-name = "fixed-5V";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
64 compatible = "gpio-keys";
67 * RST button is also PCIe-CLKREQ signal, use WPS button as reset
68 * instead as RST button doesn't make sense and cannot be used.
73 linux,code = <KEY_RESTART>;
74 gpios = <&pio 9 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_RESTART>;
87 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
92 compatible = "gpio-leds";
94 led_status_green: green {
95 label = "green:status";
96 gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
100 led_status_blue: blue {
101 label = "blue:status";
102 gpios = <&pio 86 GPIO_ACTIVE_HIGH>;
106 /* SFP1 cage (WAN) */
107 i2c_sfp1: i2c-gpio-0 {
108 compatible = "i2c-gpio";
109 sda-gpios = <&pio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
110 scl-gpios = <&pio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
111 i2c-gpio,delay-us = <2>;
112 #address-cells = <1>;
117 compatible = "sff,sfp";
118 i2c-bus = <&i2c_sfp1>;
119 los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>;
120 mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>;
121 tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
122 tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
125 /* SFP2 cage (LAN) */
126 i2c_sfp2: i2c-gpio-1 {
127 compatible = "i2c-gpio";
128 sda-gpios = <&pio 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
129 scl-gpios = <&pio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
130 i2c-gpio,delay-us = <2>;
131 #address-cells = <1>;
136 compatible = "sff,sfp";
137 i2c-bus = <&i2c_sfp2>;
138 los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>;
139 mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>;
140 tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
141 tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>;
149 compatible = "mediatek,eth-mac";
151 phy-mode = "2500base-x";
161 compatible = "mediatek,eth-mac";
163 phy-mode = "2500base-x";
165 managed = "in-band-status";
169 #address-cells = <1>;
176 compatible = "mediatek,mt7531";
178 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
179 interrupt-controller;
180 #interrupt-cells = <1>;
181 interrupt-parent = <&pio>;
182 interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
188 #address-cells = <1>;
219 phy-mode = "2500base-x";
221 managed = "in-band-status";
227 phy-mode = "2500base-x";
244 pinctrl-names = "default", "state_uhs";
245 pinctrl-0 = <&mmc0_pins_default>;
246 pinctrl-1 = <&mmc0_pins_uhs>;
248 max-frequency = <52000000>;
250 vmmc-supply = <®_3p3v>;
251 vqmmc-supply = <®_1p8v>;
256 pinctrl-names = "default";
257 pinctrl-0 = <&pcie_pins>;
267 pinctrl-names = "default", "dbdc";
268 pinctrl-0 = <&wf_2g_5g_pins>, <&wf_led_pins>;
269 pinctrl-1 = <&wf_dbdc_pins>, <&wf_led_pins>;
273 /* don't mess around with GPIO 419, 450, 451, 498, 510 in sysfs system will freeze. */
274 mmc0_pins_default: mmc0-pins {
280 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
281 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
282 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
284 drive-strength = <4>;
285 mediatek,pull-up-adv = <1>; /* pull-up 10K */
289 drive-strength = <6>;
290 mediatek,pull-down-adv = <2>; /* pull-down 50K */
294 mediatek,pull-down-adv = <2>; /* pull-down 50K */
298 drive-strength = <4>;
299 mediatek,pull-up-adv = <1>; /* pull-up 10K */
303 mmc0_pins_uhs: mmc0-uhs-pins {
309 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
310 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
311 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
313 drive-strength = <4>;
314 mediatek,pull-up-adv = <1>; /* pull-up 10K */
318 drive-strength = <6>;
319 mediatek,pull-down-adv = <2>; /* pull-down 50K */
323 mediatek,pull-down-adv = <2>; /* pull-down 50K */
327 drive-strength = <4>;
328 mediatek,pull-up-adv = <1>; /* pull-up 10K */
332 pcie_pins: pcie-pins {
335 groups = "pcie_clk", "pcie_pereset"; //"pcie_wake" is unused
339 spi_flash_pins: spi-flash-pins {
342 groups = "spi0", "spi0_wp_hold";
346 uart1_pins: uart1-pins {
353 i2c0_pins: i2c0-pins {
363 groups = "pwm0", "pwm1_0";
367 wf_led_pins: wf-led-pins {
374 wf_2g_5g_pins: wf-2g-5g-pins {
377 groups = "wf_2g", "wf_5g";
380 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
381 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
382 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
383 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
384 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
385 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
386 "WF1_TOP_CLK", "WF1_TOP_DATA";
387 drive-strength = <4>;
391 wf_dbdc_pins: wf-dbdc-pins {
397 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
398 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
399 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
400 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
401 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
402 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
403 "WF1_TOP_CLK", "WF1_TOP_DATA";
404 drive-strength = <4>;
410 pinctrl-names = "default";
411 pinctrl-0 = <&spi_flash_pins>;
417 vusb33-supply = <®_3p3v>;
418 vbus-supply = <®_5v>;
427 pinctrl-names = "default";
428 pinctrl-0 = <&uart1_pins>;
437 pinctrl-names = "default";
438 pinctrl-0 = <&i2c0_pins>;
443 pinctrl-names = "default";
444 pinctrl-0 = <&pwm_pins>;
449 pwms = <&pwm 0 10000 0>;
450 cooling-levels = <255 96 52 0>;
455 mediatek,eeprom-data = <0x86790900 0xc4326 0x60000000 0x00 0x00 0x00 0x00 0x00
456 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
457 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1000000
458 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
459 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
460 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
461 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
462 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
463 0x00 0x800 0x00 0x00 0x00 0x00 0x00 0x00
464 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
465 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
466 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
467 0x00 0x00 0x00 0x00 0x24649090 0x280000 0x5100000 0x00
468 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
469 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
470 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
471 0x21e00 0x21e0002 0x1e00021e 0x22800 0x2280002 0x28000228 0x00 0x00
472 0x00 0x00 0x00 0x00 0x00 0x00 0x8080 0x8080fdf7
473 0x903150d 0x80808080 0x80808080 0x5050d0d 0x1313c6c6 0xc3c3c200 0xc200c2 0x8182
474 0x8585c2c2 0x82828282 0x858500c2 0xc2000081 0x82858587 0x87c2c200 0x81818285 0x858787c2
475 0xc2000081 0x82858587 0x87c2c200 0x818285 0x858787c2 0xc2000081 0x82858587 0x87c4c4c2
476 0xc100c300 0xc3c3c100 0x818383c3 0xc3c3c100 0x81838300 0xc2c2c2c0 0x81828484 0xc3
477 0xc3c3c100 0x81838386 0x86c3c3c3 0xc1008183 0x838686c2 0xc2c2c081 0x82848486 0x86c3c3c3
478 0xc1008183 0x838686c3 0xc3c3c100 0x81838386 0x86c3c3c3 0xc1008183 0x83868622 0x28002228
479 0x222800 0x22280000 0xdddddddd 0xdddddddd 0xddbbbbbb 0xccccccdd 0xdddddddd 0xdddddddd
480 0xeeeeeecc 0xccccdddd 0xdddddddd 0x4a5662 0x4a 0x56620000 0x4a5662 0x4a
481 0x56620000 0x88888888 0x33333326 0x26262626 0x26262600 0x33333326 0x26262626 0x26262600
482 0x33333326 0x26262626 0x26262600 0x33333326 0x26262626 0x26262600 0x00 0xf0f0cc00
483 0x00 0xaaaa 0xaabbbbbb 0xcccccccc 0xccccbbbb 0xbbbbbbbb 0xbbbbbbaa 0xaaaabbbb
484 0xbbaaaaaa 0x999999aa 0xaaaabbbb 0xbbcccccc 0x00 0xaaaa 0xaa000000 0xbbbbbbbb
485 0xbbbbaaaa 0xaa999999 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaabbbb 0xbbbbbbbb
486 0x00 0x00 0x00 0x99999999 0x9999aaaa 0xaaaaaaaa 0x999999aa 0xaaaaaaaa
487 0xaaaaaaaa 0xaaaaaaaa 0xaaaabbbb 0xbbbbbbbb 0x00 0xeeee 0xeeffffff 0xcccccccc
488 0xccccdddd 0xddbbbbbb 0xccccccbb 0xbbbbbbbb 0xbbbbbbbb 0xbbbbbbbb 0xbbbbcccc 0xccdddddd
489 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051
490 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200
491 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e
492 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051
493 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200
494 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e 0x516200 0x686e0051 0x6200686e
495 0x88888888 0x88888888 0x88888888 0x88888888 0x88888888 0x88888888 0x88888888 0x88888888
496 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
497 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
498 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
499 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
500 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
501 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
502 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
503 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
504 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
505 0x00 0x00 0x00 0x00 0x01 0x6000100 0x1050002 0xff0300
506 0xf900fe03 0x00 0x00 0x9b 0x6e370000 0x00 0xfc0009 0xa00fe00
507 0x60700fe 0x70800 0x5000b0a 0x00 0x00 0xe2 0x96460000 0x00
508 0x400f7 0xf8000300 0xfcfe0003 0xfbfc00 0xee00e3f2 0x00 0x00 0x11
509 0xbb550000 0x00 0x600f6 0xfc000300 0xfbfe0004 0xfafe00 0xf600ecf2 0x00
510 0x00 0x1f 0xbf580000 0x00 0x600f5 0xf6000400 0xf8f90004 0xf7f800
511 0xf700f0f4 0x00 0x00 0x24 0xbe570000 0x00 0x800f8 0xfe000600
512 0xf8fd0007 0xf9fe00 0xf500f0f4 0x00 0x00 0x2d 0xd6610000 0x00
513 0x400f7 0xfc000500 0xf7fc0005 0xf7fc00 0xf900f5f8 0x00 0x00 0x26
514 0xd96e0000 0x00 0x400f7 0xf9000600 0xf5f70005 0xf5f800 0xf900f4f7 0x00
515 0x00 0x1b 0xce690000 0x00 0x300f8 0xf8000600 0xf6f60004 0xf6f700
516 0xf900f4f7 0x00 0x00 0x18 0xd8720000 0x00 0x00 0x2404002
517 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
518 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
519 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
520 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
521 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
522 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
523 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
524 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
525 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
526 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
527 0xc1c2c1c2 0x41c341c3 0x3fc13fc1 0x40c13fc2 0x3fc240c1 0x41c040c0 0x3fc23fc2 0x40c13fc2
528 0x3fc140c0 0x41c040c0 0x3fc33fc3 0x40c23fc2 0x3fc240c1 0x41c040c0 0x3fc23fc2 0x40c23fc2
529 0x3fc140c1 0x41c040c0 0x00 0x00 0x41c741c7 0xc1c7c1c7 0x00 0x00
530 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0
531 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0 0x3fc03fc0
532 0xa0ce00 0x00 0xb6840000 0x00 0x00 0x00 0x18181818 0x18181818
533 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
534 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
535 0x4b5763 0x4b 0x57630000 0x4b5763 0x4b 0x57630000 0x88888888 0x8474759
536 0x69780849 0x49596d7a 0x849495a 0x6d790848 0x48596c78 0x8484858 0x6a780848 0x48586a78
537 0x8484858 0x6c78084a 0x4a5b6d79 0x8474759 0x697a0848 0x48596b79 0x8484859 0x6c7a0848
538 0x48586c79 0x8484857 0x68770848 0x48576877 0x8484857 0x6a77084a 0x4a5a6a77 0x8464659
539 0x69790848 0x48586b79 0x8484858 0x6c7a0848 0x48596c79 0x8484857 0x68770848 0x48576877
540 0x8494958 0x6d7a084b 0x4b5c6c77 0x847475a 0x6a7b0849 0x495a6e7c 0x849495a 0x6e7c0849
541 0x495b6e7c 0x8494959 0x6a7a0849 0x49596a7a 0x84a4a5a 0x6f7d084b 0x4b5c6e7b 0x00
542 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x85848484
543 0xc3c4c4c5 0xc4c3c33f 0xc3c3c2c2 0xc2c2c03f 0xc3c3c3c4 0xc4c4c33f 0xc2c2c2c2 0xc1c3c1c1
544 0xc0c08282 0x83848686 0x88880000 0x00 0x00 0x00 0x00 0x00
545 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
546 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
547 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
548 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
549 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
550 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
551 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
552 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
553 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
554 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
555 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
556 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
557 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
558 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
559 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
560 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
561 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
562 0x00 0x00 0x00 0x00 0x00 0x00 0x1111 0x00
563 0x8080f703 0x10808080 0x80050d13 0x00 0x00 0x00 0x00 0x00
564 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
565 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
566 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
567 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
568 0x00 0x00 0x00 0xa4 0xce000000 0xb684 0x00 0x00
569 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
570 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
571 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
572 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
573 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
574 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
575 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
576 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
577 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
578 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
579 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
580 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
581 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
582 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;