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",
21 led-boot = &led_green;
22 led-failsafe = &led_green;
23 led-running = &led_green;
24 led-upgrade = &led_green;
29 bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
30 rootdisk-spim-nand = <&ubi_rootfs>;
34 reg = <0x00 0x40000000 0x00 0x10000000>;
39 compatible = "sff,sfp";
40 i2c-bus = <&i2c_sfp1>;
41 los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
42 mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
43 tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
44 tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
45 rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
46 maximum-power-milliwatt = <3000>;
50 compatible = "gpio-keys";
54 linux,code = <KEY_RESTART>;
55 gpios = <&pio 14 GPIO_ACTIVE_LOW>;
60 compatible = "gpio-leds";
62 led_green: led-green {
63 function = LED_FUNCTION_STATUS;
64 color = <LED_COLOR_ID_GREEN>;
65 gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
70 function = LED_FUNCTION_WPS;
71 color = <LED_COLOR_ID_BLUE>;
72 gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
73 default-state = "off";
88 managed = "in-band-status";
98 pinctrl-names = "gbe-led";
99 pinctrl-0 = <&gbe0_led0_pins>;
108 color = <LED_COLOR_ID_GREEN>;
112 pinctrl-names = "gbe-led";
113 pinctrl-0 = <&gbe1_led0_pins>;
118 color = <LED_COLOR_ID_GREEN>;
122 pinctrl-names = "gbe-led";
123 pinctrl-0 = <&gbe2_led0_pins>;
128 color = <LED_COLOR_ID_GREEN>;
132 pinctrl-names = "gbe-led";
133 pinctrl-0 = <&gbe3_led0_pins>;
138 color = <LED_COLOR_ID_GREEN>;
142 proc-supply = <&rt5190_buck3>;
146 proc-supply = <&rt5190_buck3>;
150 proc-supply = <&rt5190_buck3>;
154 proc-supply = <&rt5190_buck3>;
158 proc-supply = <&rt5190_buck3>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&i2c0_pins>;
166 rt5190a_64: rt5190a@64 {
167 compatible = "richtek,rt5190a";
169 vin2-supply = <&rt5190_buck1>;
170 vin3-supply = <&rt5190_buck1>;
171 vin4-supply = <&rt5190_buck1>;
174 rt5190_buck1: buck1 {
175 regulator-name = "rt5190a-buck1";
176 regulator-min-microvolt = <5090000>;
177 regulator-max-microvolt = <5090000>;
178 regulator-allowed-modes =
179 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
184 regulator-name = "vcore";
185 regulator-min-microvolt = <600000>;
186 regulator-max-microvolt = <1400000>;
190 rt5190_buck3: buck3 {
191 regulator-name = "vproc";
192 regulator-min-microvolt = <600000>;
193 regulator-max-microvolt = <1400000>;
197 regulator-name = "rt5190a-buck4";
198 regulator-min-microvolt = <850000>;
199 regulator-max-microvolt = <850000>;
200 regulator-allowed-modes =
201 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
206 regulator-name = "rt5190a-ldo";
207 regulator-min-microvolt = <1200000>;
208 regulator-max-microvolt = <1200000>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&i2c2_1_pins>;
221 pca9545: i2c-switch@70 {
223 compatible = "nxp,pca9545";
224 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
225 #address-cells = <1>;
228 i2c_rtc: i2c@0 { //eeprom,rtc,ngff
229 #address-cells = <1>;
234 compatible = "atmel,24c02";
242 compatible = "atmel,24c02";
250 compatible = "nxp,pcf8563";
257 #address-cells = <1>;
263 #address-cells = <1>;
272 pinctrl-names = "default";
273 pinctrl-0 = <&pcie0_pins>;
279 pinctrl-names = "default";
280 pinctrl-0 = <&pcie1_pins>;
286 pinctrl-names = "default";
287 pinctrl-0 = <&pcie2_pins>;
293 pinctrl-names = "default";
294 pinctrl-0 = <&pcie3_pins>;
307 pinctrl-names = "default";
308 pinctrl-0 = <&spi0_flash_pins>;
311 spi_nand: spi_nand@0 {
312 compatible = "spi-nand";
314 spi-max-frequency = <52000000>;
315 spi-tx-buswidth = <4>;
316 spi-rx-buswidth = <4>;
322 compatible = "fixed-partitions";
323 #address-cells = <1>;
328 reg = <0x0 0x200000>;
334 reg = <0x200000 0x7e00000>;
335 compatible = "linux,ubi";
338 ubi-volume-ubootenv {
339 volname = "ubootenv";
341 compatible = "u-boot,env-redundant-bool-layout";
345 ubi-volume-ubootenv2 {
346 volname = "ubootenv2";
348 compatible = "u-boot,env-redundant-bool-layout";
352 ubi_rootfs: ubi-volume-fit {
366 pinctrl-names = "default";
367 pinctrl-0 = <&uart1_2_lite_pins>;
372 pinctrl-names = "default";
373 pinctrl-0 = <&uart2_3_pins>;