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",
23 led-boot = &led_green;
24 led-failsafe = &led_green;
25 led-running = &led_green;
26 led-upgrade = &led_green;
31 bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0 rootwait";
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>;
53 compatible = "sff,sfp";
54 i2c-bus = <&i2c_sfp2>;
55 los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
56 mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
57 tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
58 tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
59 rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
60 maximum-power-milliwatt = <3000>;
64 compatible = "gpio-keys";
68 linux,code = <KEY_RESTART>;
69 gpios = <&pio 14 GPIO_ACTIVE_LOW>;
74 compatible = "gpio-leds";
76 led_green: led-green {
77 function = LED_FUNCTION_STATUS;
78 color = <LED_COLOR_ID_GREEN>;
79 gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
84 function = LED_FUNCTION_WPS;
85 color = <LED_COLOR_ID_BLUE>;
86 gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
87 default-state = "off";
102 managed = "in-band-status";
103 phy-mode = "usxgmii";
109 managed = "in-band-status";
110 phy-mode = "usxgmii";
119 pinctrl-names = "gbe-led";
120 pinctrl-0 = <&gbe0_led0_pins>;
129 color = <LED_COLOR_ID_GREEN>;
133 pinctrl-names = "gbe-led";
134 pinctrl-0 = <&gbe1_led0_pins>;
139 color = <LED_COLOR_ID_GREEN>;
143 pinctrl-names = "gbe-led";
144 pinctrl-0 = <&gbe2_led0_pins>;
149 color = <LED_COLOR_ID_GREEN>;
153 pinctrl-names = "gbe-led";
154 pinctrl-0 = <&gbe3_led0_pins>;
159 color = <LED_COLOR_ID_GREEN>;
163 proc-supply = <&rt5190_buck3>;
167 proc-supply = <&rt5190_buck3>;
171 proc-supply = <&rt5190_buck3>;
175 proc-supply = <&rt5190_buck3>;
179 proc-supply = <&rt5190_buck3>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&i2c0_pins>;
187 rt5190a_64: rt5190a@64 {
188 compatible = "richtek,rt5190a";
190 vin2-supply = <&rt5190_buck1>;
191 vin3-supply = <&rt5190_buck1>;
192 vin4-supply = <&rt5190_buck1>;
195 rt5190_buck1: buck1 {
196 regulator-name = "rt5190a-buck1";
197 regulator-min-microvolt = <5090000>;
198 regulator-max-microvolt = <5090000>;
199 regulator-allowed-modes =
200 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
205 regulator-name = "vcore";
206 regulator-min-microvolt = <600000>;
207 regulator-max-microvolt = <1400000>;
211 rt5190_buck3: buck3 {
212 regulator-name = "vproc";
213 regulator-min-microvolt = <600000>;
214 regulator-max-microvolt = <1400000>;
218 regulator-name = "rt5190a-buck4";
219 regulator-min-microvolt = <850000>;
220 regulator-max-microvolt = <850000>;
221 regulator-allowed-modes =
222 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
227 regulator-name = "rt5190a-ldo";
228 regulator-min-microvolt = <1200000>;
229 regulator-max-microvolt = <1200000>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&i2c2_1_pins>;
242 pca9545: i2c-switch@70 {
244 compatible = "nxp,pca9545";
245 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
246 #address-cells = <1>;
249 i2c_rtc: i2c@0 { //eeprom,rtc,ngff
250 #address-cells = <1>;
255 compatible = "atmel,24c02";
263 compatible = "atmel,24c02";
271 compatible = "nxp,pcf8563";
278 #address-cells = <1>;
284 #address-cells = <1>;
290 #address-cells = <1>;
299 pinctrl-names = "default";
300 pinctrl-0 = <&pcie0_pins>;
306 pinctrl-names = "default";
307 pinctrl-0 = <&pcie1_pins>;
313 pinctrl-names = "default";
314 pinctrl-0 = <&pcie2_pins>;
320 pinctrl-names = "default";
321 pinctrl-0 = <&pcie3_pins>;
334 pinctrl-names = "default";
335 pinctrl-0 = <&spi0_flash_pins>;
338 spi_nand: spi_nand@0 {
339 compatible = "spi-nand";
341 spi-max-frequency = <52000000>;
342 spi-tx-buswidth = <4>;
343 spi-rx-buswidth = <4>;
349 compatible = "fixed-partitions";
350 #address-cells = <1>;
355 reg = <0x0 0x200000>;
361 reg = <0x200000 0x7e00000>;
362 compatible = "linux,ubi";
365 ubi-volume-ubootenv {
366 volname = "ubootenv";
368 compatible = "u-boot,env-redundant-bool-layout";
372 ubi-volume-ubootenv2 {
373 volname = "ubootenv2";
375 compatible = "u-boot,env-redundant-bool-layout";
379 ubi_rootfs: ubi-volume-fit {
393 pinctrl-names = "default";
394 pinctrl-0 = <&uart1_2_lite_pins>;
399 pinctrl-names = "default";
400 pinctrl-0 = <&uart2_3_pins>;