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>;
51 compatible = "sff,sfp";
52 i2c-bus = <&i2c_sfp2>;
53 los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
54 mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
55 tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
56 tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
57 rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
58 maximum-power-milliwatt = <3000>;
62 compatible = "gpio-keys";
66 linux,code = <KEY_RESTART>;
67 gpios = <&pio 14 GPIO_ACTIVE_LOW>;
72 compatible = "gpio-leds";
74 led_green: led-green {
75 function = LED_FUNCTION_STATUS;
76 color = <LED_COLOR_ID_GREEN>;
77 gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
82 function = LED_FUNCTION_WPS;
83 color = <LED_COLOR_ID_BLUE>;
84 gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
85 default-state = "off";
100 managed = "in-band-status";
101 phy-mode = "usxgmii";
107 managed = "in-band-status";
108 phy-mode = "usxgmii";
117 pinctrl-names = "gbe-led";
118 pinctrl-0 = <&gbe0_led0_pins>;
127 color = <LED_COLOR_ID_GREEN>;
131 pinctrl-names = "gbe-led";
132 pinctrl-0 = <&gbe1_led0_pins>;
137 color = <LED_COLOR_ID_GREEN>;
141 pinctrl-names = "gbe-led";
142 pinctrl-0 = <&gbe2_led0_pins>;
147 color = <LED_COLOR_ID_GREEN>;
151 pinctrl-names = "gbe-led";
152 pinctrl-0 = <&gbe3_led0_pins>;
157 color = <LED_COLOR_ID_GREEN>;
161 proc-supply = <&rt5190_buck3>;
165 proc-supply = <&rt5190_buck3>;
169 proc-supply = <&rt5190_buck3>;
173 proc-supply = <&rt5190_buck3>;
177 proc-supply = <&rt5190_buck3>;
181 pinctrl-names = "default";
182 pinctrl-0 = <&i2c0_pins>;
185 rt5190a_64: rt5190a@64 {
186 compatible = "richtek,rt5190a";
188 vin2-supply = <&rt5190_buck1>;
189 vin3-supply = <&rt5190_buck1>;
190 vin4-supply = <&rt5190_buck1>;
193 rt5190_buck1: buck1 {
194 regulator-name = "rt5190a-buck1";
195 regulator-min-microvolt = <5090000>;
196 regulator-max-microvolt = <5090000>;
197 regulator-allowed-modes =
198 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
203 regulator-name = "vcore";
204 regulator-min-microvolt = <600000>;
205 regulator-max-microvolt = <1400000>;
209 rt5190_buck3: buck3 {
210 regulator-name = "vproc";
211 regulator-min-microvolt = <600000>;
212 regulator-max-microvolt = <1400000>;
216 regulator-name = "rt5190a-buck4";
217 regulator-min-microvolt = <850000>;
218 regulator-max-microvolt = <850000>;
219 regulator-allowed-modes =
220 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
225 regulator-name = "rt5190a-ldo";
226 regulator-min-microvolt = <1200000>;
227 regulator-max-microvolt = <1200000>;
236 pinctrl-names = "default";
237 pinctrl-0 = <&i2c2_1_pins>;
240 pca9545: i2c-switch@70 {
242 compatible = "nxp,pca9545";
243 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
244 #address-cells = <1>;
247 i2c_rtc: i2c@0 { //eeprom,rtc,ngff
248 #address-cells = <1>;
253 compatible = "atmel,24c02";
261 compatible = "atmel,24c02";
269 compatible = "nxp,pcf8563";
276 #address-cells = <1>;
282 #address-cells = <1>;
288 #address-cells = <1>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&pcie0_pins>;
304 pinctrl-names = "default";
305 pinctrl-0 = <&pcie1_pins>;
311 pinctrl-names = "default";
312 pinctrl-0 = <&pcie2_pins>;
318 pinctrl-names = "default";
319 pinctrl-0 = <&pcie3_pins>;
332 pinctrl-names = "default";
333 pinctrl-0 = <&spi0_flash_pins>;
336 spi_nand: spi_nand@0 {
337 compatible = "spi-nand";
339 spi-max-frequency = <52000000>;
340 spi-tx-buswidth = <4>;
341 spi-rx-buswidth = <4>;
347 compatible = "fixed-partitions";
348 #address-cells = <1>;
353 reg = <0x0 0x200000>;
359 reg = <0x200000 0x7e00000>;
360 compatible = "linux,ubi";
363 ubi-volume-ubootenv {
364 volname = "ubootenv";
366 compatible = "u-boot,env-redundant-bool-layout";
370 ubi-volume-ubootenv2 {
371 volname = "ubootenv2";
373 compatible = "u-boot,env-redundant-bool-layout";
377 ubi_rootfs: ubi-volume-fit {
391 pinctrl-names = "default";
392 pinctrl-0 = <&uart1_2_lite_pins>;
397 pinctrl-names = "default";
398 pinctrl-0 = <&uart2_3_pins>;