2 * Copyright (c) 2018 MediaTek Inc.
3 * Author: Ryder Lee <ryder.lee@mediatek.com>
5 * SPDX-License-Identifier: (GPL-2.0 OR MIT)
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/leds/common.h>
13 #include "mt7622.dtsi"
14 #include "mt6380.dtsi"
17 model = "Bananapi BPI-R64";
18 chassis-type = "embedded";
19 compatible = "bananapi,bpi-r64", "mediatek,mt7622";
26 stdout-path = "serial0:115200n8";
27 bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
32 proc-supply = <&mt6380_vcpu_reg>;
33 sram-supply = <&mt6380_vm_reg>;
37 proc-supply = <&mt6380_vcpu_reg>;
38 sram-supply = <&mt6380_vm_reg>;
43 compatible = "gpio-keys";
48 gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
53 linux,code = <KEY_WPS_BUTTON>;
54 gpios = <&pio 102 GPIO_ACTIVE_LOW>;
59 compatible = "gpio-leds";
62 label = "bpi-r64:pio:green";
63 color = <LED_COLOR_ID_GREEN>;
64 gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
65 default-state = "off";
69 label = "bpi-r64:pio:red";
70 color = <LED_COLOR_ID_RED>;
71 gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
72 default-state = "off";
77 reg = <0 0x40000000 0 0x40000000>;
78 device_type = "memory";
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>;
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>;
98 reg_5v: regulator-5v {
99 compatible = "regulator-fixed";
100 regulator-name = "fixed-5V";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
117 pinctrl-names = "default";
118 pinctrl-0 = <&irrx_pins>;
125 compatible = "mediatek,eth-mac";
127 phy-mode = "2500base-x";
137 compatible = "mediatek,eth-mac";
149 #address-cells = <1>;
153 compatible = "mediatek,mt7531";
155 interrupt-controller;
156 #interrupt-cells = <1>;
157 interrupts-extended = <&pio 53 IRQ_TYPE_LEVEL_HIGH>;
158 reset-gpios = <&pio 54 0>;
161 #address-cells = <1>;
205 phy-mode = "2500base-x";
220 pinctrl-names = "default";
221 pinctrl-0 = <&i2c1_pins>;
226 pinctrl-names = "default";
227 pinctrl-0 = <&i2c2_pins>;
232 pinctrl-names = "default", "state_uhs";
233 pinctrl-0 = <&emmc_pins_default>;
234 pinctrl-1 = <&emmc_pins_uhs>;
237 max-frequency = <50000000>;
240 vmmc-supply = <®_3p3v>;
241 vqmmc-supply = <®_1p8v>;
242 assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
243 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
248 pinctrl-names = "default", "state_uhs";
249 pinctrl-0 = <&sd0_pins_default>;
250 pinctrl-1 = <&sd0_pins_uhs>;
253 max-frequency = <50000000>;
255 cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
256 vmmc-supply = <®_3p3v>;
257 vqmmc-supply = <®_3p3v>;
258 assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
259 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
263 pinctrl-names = "default";
264 pinctrl-0 = <¶llel_nand_pins>;
273 pinctrl-names = "default";
274 pinctrl-0 = <&serial_nand_pins>;
277 compatible = "spi-nand";
279 spi-tx-bus-width = <4>;
280 spi-rx-bus-width = <4>;
281 nand-ecc-engine = <&snfi>;
283 compatible = "fixed-partitions";
284 #address-cells = <1>;
295 reg = <0x80000 0x200000>;
299 ubi: partition@280000 {
301 reg = <0x280000 0x7d80000>;
308 pinctrl-names = "default";
309 pinctrl-0 = <&pcie0_pins>;
314 pinctrl-names = "default";
315 pinctrl-0 = <&pcie1_pins>;
320 /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
321 * SATA functions. i.e. output-high: PCIe, output-low: SATA
325 gpios = <90 GPIO_ACTIVE_HIGH>;
329 /* eMMC is shared pin with parallel NAND */
330 emmc_pins_default: emmc-pins-default {
332 function = "emmc", "emmc_rst";
336 /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
337 * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
338 * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
341 pins = "NDL0", "NDL1", "NDL2",
342 "NDL3", "NDL4", "NDL5",
343 "NDL6", "NDL7", "NRB";
354 emmc_pins_uhs: emmc-pins-uhs {
361 pins = "NDL0", "NDL1", "NDL2",
362 "NDL3", "NDL4", "NDL5",
363 "NDL6", "NDL7", "NRB";
365 drive-strength = <4>;
371 drive-strength = <4>;
379 groups = "mdc_mdio", "rgmii_via_gmac2";
383 i2c1_pins: i2c1-pins {
390 i2c2_pins: i2c2-pins {
397 i2s1_pins: i2s1-pins {
400 groups = "i2s_out_mclk_bclk_ws",
406 pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
407 "I2S_WS", "I2S_MCLK";
408 drive-strength = <12>;
413 irrx_pins: irrx-pins {
420 irtx_pins: irtx-pins {
427 /* Parallel nand is shared pin with eMMC */
428 parallel_nand_pins: parallel-nand-pins {
435 pcie0_pins: pcie0-pins {
438 groups = "pcie0_pad_perst",
444 pcie1_pins: pcie1-pins {
447 groups = "pcie1_pad_perst",
453 pmic_bus_pins: pmic-bus-pins {
463 groups = "pwm_ch1_0", /* mt7622_pwm_ch1_0_pins[] = { 51, }; */
464 "pwm_ch2_0", /* mt7622_pwm_ch2_0_pins[] = { 52, }; */
465 "pwm_ch3_2", /* mt7622_pwm_ch3_2_pins[] = { 97, }; */
466 "pwm_ch4_1", /* mt7622_pwm_ch4_1_pins[] = { 67, }; */
467 "pwm_ch5_0", /* mt7622_pwm_ch5_0_pins[] = { 68, }; */
468 "pwm_ch6_0"; /* mt7622_pwm_ch6_0_pins[] = { 69, }; */
472 wled_pins: wled-pins {
479 sd0_pins_default: sd0-pins-default {
485 /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
486 * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
487 * DAT2, DAT3, CMD, CLK for SD respectively.
490 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
491 "I2S2_IN","I2S4_OUT";
493 drive-strength = <8>;
498 drive-strength = <12>;
507 sd0_pins_uhs: sd0-pins-uhs {
514 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
515 "I2S2_IN","I2S4_OUT";
526 /* Serial NAND is shared pin with SPI-NOR */
527 serial_nand_pins: serial-nand-pins {
534 spic0_pins: spic0-pins {
541 spic1_pins: spic1-pins {
548 /* SPI-NOR is shared pin with serial NAND */
549 spi_nor_pins: spi-nor-pins {
556 /* serial NAND is shared pin with SPI-NOR */
557 serial_nand_pins: serial-nand-pins {
564 uart0_pins: uart0-pins {
567 groups = "uart0_0_tx_rx" ;
571 uart2_pins: uart2-pins {
574 groups = "uart2_1_tx_rx" ;
578 watchdog_pins: watchdog-pins {
580 function = "watchdog";
587 pinctrl-names = "default";
588 pinctrl-0 = <&pwm_pins>;
593 pinctrl-names = "default";
594 pinctrl-0 = <&pmic_bus_pins>;
608 pinctrl-names = "default";
609 pinctrl-0 = <&spic0_pins>;
614 pinctrl-names = "default";
615 pinctrl-0 = <&spic1_pins>;
619 vusb33-supply = <®_3p3v>;
620 vbus-supply = <®_5v>;
629 pinctrl-names = "default";
630 pinctrl-0 = <&uart0_pins>;
635 pinctrl-names = "default";
636 pinctrl-0 = <&uart2_pins>;
640 pinctrl-names = "default";
641 pinctrl-0 = <&watchdog_pins>;