1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (C) 2022 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
8 #include "mt7988a.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
15 model = "Bananapi BPI-R4";
16 compatible = "bananapi,bpi-r4",
22 led-boot = &led_green;
23 led-failsafe = &led_green;
24 led-running = &led_green;
25 led-upgrade = &led_green;
31 bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
32 rootdisk-spim-nand = <&ubi_rootfs>;
36 reg = <0x00 0x40000000 0x00 0x10000000>;
41 compatible = "sff,sfp";
42 i2c-bus = <&i2c_sfp1>;
43 los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
44 mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
45 tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
46 tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
47 rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
48 maximum-power-milliwatt = <3000>;
52 compatible = "gpio-keys";
56 linux,code = <KEY_RESTART>;
57 gpios = <&pio 14 GPIO_ACTIVE_LOW>;
62 compatible = "gpio-leds";
64 led_green: led-green {
65 function = LED_FUNCTION_STATUS;
66 color = <LED_COLOR_ID_GREEN>;
67 gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
72 function = LED_FUNCTION_WPS;
73 color = <LED_COLOR_ID_BLUE>;
74 gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
75 default-state = "off";
90 managed = "in-band-status";
100 pinctrl-names = "gbe-led";
101 pinctrl-0 = <&gbe0_led0_pins>;
110 color = <LED_COLOR_ID_GREEN>;
114 pinctrl-names = "gbe-led";
115 pinctrl-0 = <&gbe1_led0_pins>;
120 color = <LED_COLOR_ID_GREEN>;
124 pinctrl-names = "gbe-led";
125 pinctrl-0 = <&gbe2_led0_pins>;
130 color = <LED_COLOR_ID_GREEN>;
134 pinctrl-names = "gbe-led";
135 pinctrl-0 = <&gbe3_led0_pins>;
140 color = <LED_COLOR_ID_GREEN>;
144 proc-supply = <&rt5190_buck3>;
148 proc-supply = <&rt5190_buck3>;
152 proc-supply = <&rt5190_buck3>;
156 proc-supply = <&rt5190_buck3>;
160 proc-supply = <&rt5190_buck3>;
164 pinctrl-names = "default";
165 pinctrl-0 = <&i2c0_pins>;
168 rt5190a_64: rt5190a@64 {
169 compatible = "richtek,rt5190a";
171 vin2-supply = <&rt5190_buck1>;
172 vin3-supply = <&rt5190_buck1>;
173 vin4-supply = <&rt5190_buck1>;
176 rt5190_buck1: buck1 {
177 regulator-name = "rt5190a-buck1";
178 regulator-min-microvolt = <5090000>;
179 regulator-max-microvolt = <5090000>;
180 regulator-allowed-modes =
181 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
186 regulator-name = "vcore";
187 regulator-min-microvolt = <600000>;
188 regulator-max-microvolt = <1400000>;
192 rt5190_buck3: buck3 {
193 regulator-name = "vproc";
194 regulator-min-microvolt = <600000>;
195 regulator-max-microvolt = <1400000>;
199 regulator-name = "rt5190a-buck4";
200 regulator-min-microvolt = <850000>;
201 regulator-max-microvolt = <850000>;
202 regulator-allowed-modes =
203 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
208 regulator-name = "rt5190a-ldo";
209 regulator-min-microvolt = <1200000>;
210 regulator-max-microvolt = <1200000>;
219 pinctrl-names = "default";
220 pinctrl-0 = <&i2c2_1_pins>;
223 pca9545: i2c-switch@70 {
225 compatible = "nxp,pca9545";
226 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
227 #address-cells = <1>;
230 i2c_rtc: i2c@0 { //eeprom,rtc,ngff
231 #address-cells = <1>;
236 compatible = "atmel,24c02";
244 compatible = "atmel,24c02";
252 compatible = "nxp,pcf8563";
259 #address-cells = <1>;
265 #address-cells = <1>;
274 pinctrl-names = "default";
275 pinctrl-0 = <&pcie0_pins>;
281 pinctrl-names = "default";
282 pinctrl-0 = <&pcie1_pins>;
288 pinctrl-names = "default";
289 pinctrl-0 = <&pcie2_pins>;
295 pinctrl-names = "default";
296 pinctrl-0 = <&pcie3_pins>;
309 pinctrl-names = "default";
310 pinctrl-0 = <&spi0_flash_pins>;
313 spi_nand: spi_nand@0 {
314 compatible = "spi-nand";
316 spi-max-frequency = <52000000>;
317 spi-tx-buswidth = <4>;
318 spi-rx-buswidth = <4>;
324 compatible = "fixed-partitions";
325 #address-cells = <1>;
330 reg = <0x0 0x200000>;
336 reg = <0x200000 0x7e00000>;
337 compatible = "linux,ubi";
340 ubi-volume-ubootenv {
341 volname = "ubootenv";
343 compatible = "u-boot,env-redundant-bool-layout";
347 ubi-volume-ubootenv2 {
348 volname = "ubootenv2";
350 compatible = "u-boot,env-redundant-bool-layout";
354 ubi_rootfs: ubi-volume-fit {
368 pinctrl-names = "default";
369 pinctrl-0 = <&uart1_2_lite_pins>;
374 pinctrl-names = "default";
375 pinctrl-0 = <&uart2_3_pins>;