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 compatible = "bananapi,bpi-r64", "mediatek,mt7622";
25 stdout-path = "serial0:115200n8";
26 bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
31 proc-supply = <&mt6380_vcpu_reg>;
32 sram-supply = <&mt6380_vm_reg>;
36 proc-supply = <&mt6380_vcpu_reg>;
37 sram-supply = <&mt6380_vm_reg>;
42 compatible = "gpio-keys";
47 gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
52 linux,code = <KEY_WPS_BUTTON>;
53 gpios = <&pio 102 GPIO_ACTIVE_LOW>;
58 compatible = "gpio-leds";
61 label = "bpi-r64:pio:green";
62 color = <LED_COLOR_ID_GREEN>;
63 gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
64 default-state = "off";
68 label = "bpi-r64:pio:red";
69 color = <LED_COLOR_ID_RED>;
70 gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
71 default-state = "off";
76 reg = <0 0x40000000 0 0x40000000>;
77 device_type = "memory";
80 reg_1p8v: regulator-1p8v {
81 compatible = "regulator-fixed";
82 regulator-name = "fixed-1.8V";
83 regulator-min-microvolt = <1800000>;
84 regulator-max-microvolt = <1800000>;
88 reg_3p3v: regulator-3p3v {
89 compatible = "regulator-fixed";
90 regulator-name = "fixed-3.3V";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
97 reg_5v: regulator-5v {
98 compatible = "regulator-fixed";
99 regulator-name = "fixed-5V";
100 regulator-min-microvolt = <5000000>;
101 regulator-max-microvolt = <5000000>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&irrx_pins>;
124 compatible = "mediatek,eth-mac";
126 phy-mode = "2500base-x";
136 compatible = "mediatek,eth-mac";
148 #address-cells = <1>;
152 compatible = "mediatek,mt7531";
154 reset-gpios = <&pio 54 0>;
157 #address-cells = <1>;
189 phy-mode = "2500base-x";
204 pinctrl-names = "default";
205 pinctrl-0 = <&i2c1_pins>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&i2c2_pins>;
216 pinctrl-names = "default", "state_uhs";
217 pinctrl-0 = <&emmc_pins_default>;
218 pinctrl-1 = <&emmc_pins_uhs>;
221 max-frequency = <50000000>;
224 vmmc-supply = <®_3p3v>;
225 vqmmc-supply = <®_1p8v>;
226 assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
227 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
232 pinctrl-names = "default", "state_uhs";
233 pinctrl-0 = <&sd0_pins_default>;
234 pinctrl-1 = <&sd0_pins_uhs>;
237 max-frequency = <50000000>;
240 cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
241 vmmc-supply = <®_3p3v>;
242 vqmmc-supply = <®_3p3v>;
243 assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
244 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
248 pinctrl-names = "default";
249 pinctrl-0 = <¶llel_nand_pins>;
254 pinctrl-names = "default";
255 pinctrl-0 = <&spi_nor_pins>;
259 compatible = "jedec,spi-nor";
265 pinctrl-names = "default";
266 pinctrl-0 = <&pcie0_pins>;
271 pinctrl-names = "default";
272 pinctrl-0 = <&pcie1_pins>;
277 /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
278 * SATA functions. i.e. output-high: PCIe, output-low: SATA
282 gpios = <90 GPIO_ACTIVE_HIGH>;
286 /* eMMC is shared pin with parallel NAND */
287 emmc_pins_default: emmc-pins-default {
289 function = "emmc", "emmc_rst";
293 /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
294 * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
295 * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
298 pins = "NDL0", "NDL1", "NDL2",
299 "NDL3", "NDL4", "NDL5",
300 "NDL6", "NDL7", "NRB";
311 emmc_pins_uhs: emmc-pins-uhs {
318 pins = "NDL0", "NDL1", "NDL2",
319 "NDL3", "NDL4", "NDL5",
320 "NDL6", "NDL7", "NRB";
322 drive-strength = <4>;
328 drive-strength = <4>;
336 groups = "mdc_mdio", "rgmii_via_gmac2";
340 i2c1_pins: i2c1-pins {
347 i2c2_pins: i2c2-pins {
354 i2s1_pins: i2s1-pins {
357 groups = "i2s_out_mclk_bclk_ws",
363 pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
364 "I2S_WS", "I2S_MCLK";
365 drive-strength = <12>;
370 irrx_pins: irrx-pins {
377 irtx_pins: irtx-pins {
384 /* Parallel nand is shared pin with eMMC */
385 parallel_nand_pins: parallel-nand-pins {
392 pcie0_pins: pcie0-pins {
395 groups = "pcie0_pad_perst",
401 pcie1_pins: pcie1-pins {
404 groups = "pcie1_pad_perst",
410 pmic_bus_pins: pmic-bus-pins {
420 groups = "pwm_ch1_0", /* mt7622_pwm_ch1_0_pins[] = { 51, }; */
421 "pwm_ch2_0", /* mt7622_pwm_ch2_0_pins[] = { 52, }; */
422 "pwm_ch3_2", /* mt7622_pwm_ch3_2_pins[] = { 97, }; */
423 "pwm_ch4_1", /* mt7622_pwm_ch4_1_pins[] = { 67, }; */
424 "pwm_ch5_0", /* mt7622_pwm_ch5_0_pins[] = { 68, }; */
425 "pwm_ch6_0"; /* mt7622_pwm_ch6_0_pins[] = { 69, }; */
429 wled_pins: wled-pins {
436 sd0_pins_default: sd0-pins-default {
442 /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
443 * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
444 * DAT2, DAT3, CMD, CLK for SD respectively.
447 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
448 "I2S2_IN","I2S4_OUT";
450 drive-strength = <8>;
455 drive-strength = <12>;
464 sd0_pins_uhs: sd0-pins-uhs {
471 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
472 "I2S2_IN","I2S4_OUT";
483 /* Serial NAND is shared pin with SPI-NOR */
484 serial_nand_pins: serial-nand-pins {
491 spic0_pins: spic0-pins {
498 spic1_pins: spic1-pins {
505 /* SPI-NOR is shared pin with serial NAND */
506 spi_nor_pins: spi-nor-pins {
513 /* serial NAND is shared pin with SPI-NOR */
514 serial_nand_pins: serial-nand-pins {
521 uart0_pins: uart0-pins {
524 groups = "uart0_0_tx_rx" ;
528 uart2_pins: uart2-pins {
531 groups = "uart2_1_tx_rx" ;
535 watchdog_pins: watchdog-pins {
537 function = "watchdog";
544 pinctrl-names = "default";
545 pinctrl-0 = <&pwm_pins>;
550 pinctrl-names = "default";
551 pinctrl-0 = <&pmic_bus_pins>;
565 pinctrl-names = "default";
566 pinctrl-0 = <&spic0_pins>;
571 pinctrl-names = "default";
572 pinctrl-0 = <&spic1_pins>;
576 vusb33-supply = <®_3p3v>;
577 vbus-supply = <®_5v>;
586 pinctrl-names = "default";
587 pinctrl-0 = <&uart0_pins>;
592 pinctrl-names = "default";
593 pinctrl-0 = <&uart2_pins>;
597 pinctrl-names = "default";
598 pinctrl-0 = <&watchdog_pins>;