Skip to content

Commit 6ac17b4

Browse files
committed
arm64: dts: update bpi-r4.dtsi to actual state
squashed: arm64: dts: mt7988: add pinctrl dropped from dtsi to r4 board dts amr64: dts: mt7988: bpi-r4: move some nodes to be ordered alphanumerical WIP: dts: r4: fix some compile errors arm64: dts: mt7988: move sfp related nodes to bpi-r4.dts arm64: dts: mt7988-bpi-r4: enable cci arm64: dts: mt7988-bpi-r4: enable switch nodes
1 parent ea060f1 commit 6ac17b4

File tree

2 files changed

+230
-1
lines changed

2 files changed

+230
-1
lines changed

arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts

+42
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,45 @@
33
/dts-v1/;
44

55
#include "mt7988a-bananapi-bpi-r4.dtsi"
6+
7+
/ {
8+
/* SFP1 cage (WAN) */
9+
sfp1: sfp1 {
10+
compatible = "sff,sfp";
11+
i2c-bus = <&i2c_sfp1>;
12+
los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
13+
mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
14+
tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
15+
tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
16+
rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
17+
maximum-power-milliwatt = <3000>;
18+
};
19+
20+
/* SFP2 cage (LAN) */
21+
sfp2: sfp2 {
22+
compatible = "sff,sfp";
23+
i2c-bus = <&i2c_sfp2>;
24+
los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
25+
mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
26+
tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
27+
tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
28+
rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
29+
maximum-power-milliwatt = <3000>;
30+
};
31+
};
32+
33+
&gmac1 {
34+
sfp = <&sfp2>;
35+
managed = "in-band-status";
36+
phy-mode = "usxgmii";
37+
status = "okay";
38+
};
39+
40+
&gmac2 {
41+
sfp = <&sfp1>;
42+
managed = "in-band-status";
43+
phy-mode = "usxgmii";
44+
status = "okay";
45+
};
46+
47+

arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi

+188-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/dts-v1/;
44

55
#include <dt-bindings/gpio/gpio.h>
6+
#include <dt-bindings/input/input.h>
7+
#include <dt-bindings/leds/common.h>
68
#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
79

810
#include "mt7988a.dtsi"
@@ -12,8 +14,24 @@
1214
model = "Banana Pi BPI-R4";
1315
chassis-type = "embedded";
1416

17+
aliases {
18+
ethernet0 = &gmac0;
19+
ethernet1 = &gmac1;
20+
ethernet2 = &gmac2;
21+
led-boot = &led_green;
22+
led-failsafe = &led_green;
23+
led-running = &led_green;
24+
led-upgrade = &led_green;
25+
};
26+
1527
chosen {
1628
stdout-path = "serial0:115200n8";
29+
bootargs = "loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
30+
rootdisk-spim-nand = <&ubi_rootfs>;
31+
};
32+
33+
memory {
34+
reg = <0x00 0x40000000 0x00 0x10000000>;
1735
};
1836

1937
reg_1p8v: regulator-1p8v {
@@ -33,6 +51,38 @@
3351
regulator-boot-on;
3452
regulator-always-on;
3553
};
54+
55+
gpio-keys {
56+
compatible = "gpio-keys";
57+
58+
wps {
59+
label = "WPS";
60+
linux,code = <KEY_RESTART>;
61+
gpios = <&pio 14 GPIO_ACTIVE_LOW>;
62+
};
63+
};
64+
65+
gpio-leds {
66+
compatible = "gpio-leds";
67+
68+
led_green: led-green {
69+
function = LED_FUNCTION_STATUS;
70+
color = <LED_COLOR_ID_GREEN>;
71+
gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
72+
default-state = "on";
73+
};
74+
75+
led_blue: led-blue {
76+
function = LED_FUNCTION_WPS;
77+
color = <LED_COLOR_ID_BLUE>;
78+
gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
79+
default-state = "off";
80+
};
81+
};
82+
};
83+
84+
&cci {
85+
proc-supply = <&rt5190_buck3>;
3686
};
3787

3888
&cpu0 {
@@ -79,6 +129,62 @@
79129
};
80130
};
81131

132+
&eth {
133+
status = "okay";
134+
};
135+
136+
&gmac0 {
137+
status = "okay";
138+
};
139+
140+
&switch {
141+
status = "okay";
142+
};
143+
144+
&gsw_phy0 {
145+
pinctrl-names = "gbe-led";
146+
pinctrl-0 = <&gbe0_led0_pins>;
147+
};
148+
149+
&gsw_port0 {
150+
label = "wan";
151+
};
152+
153+
&gsw_phy0_led0 {
154+
status = "okay";
155+
color = <LED_COLOR_ID_GREEN>;
156+
};
157+
158+
&gsw_phy1 {
159+
pinctrl-names = "gbe-led";
160+
pinctrl-0 = <&gbe1_led0_pins>;
161+
};
162+
163+
&gsw_phy1_led0 {
164+
status = "okay";
165+
color = <LED_COLOR_ID_GREEN>;
166+
};
167+
168+
&gsw_phy2 {
169+
pinctrl-names = "gbe-led";
170+
pinctrl-0 = <&gbe2_led0_pins>;
171+
};
172+
173+
&gsw_phy2_led0 {
174+
status = "okay";
175+
color = <LED_COLOR_ID_GREEN>;
176+
};
177+
178+
&gsw_phy3 {
179+
pinctrl-names = "gbe-led";
180+
pinctrl-0 = <&gbe3_led0_pins>;
181+
};
182+
183+
&gsw_phy3_led0 {
184+
status = "okay";
185+
color = <LED_COLOR_ID_GREEN>;
186+
};
187+
82188
&i2c0 {
83189
pinctrl-names = "default";
84190
pinctrl-0 = <&i2c0_pins>;
@@ -146,20 +252,24 @@
146252
#address-cells = <1>;
147253
#size-cells = <0>;
148254

149-
i2c@0 {
255+
i2c@0 { //eeprom,rtc,ngff
150256
#address-cells = <1>;
151257
#size-cells = <0>;
152258
reg = <0>;
153259

154260
pcf8563: rtc@51 {
155261
compatible = "nxp,pcf8563";
156262
reg = <0x51>;
263+
//interrupts = <&pio 6 IRQ_TYPE_LEVEL_LOW>;
157264
#clock-cells = <0>;
265+
//status = "disabled";
158266
};
159267

160268
eeprom@57 {
161269
compatible = "atmel,24c02";
162270
reg = <0x57>;
271+
address-bits = <8>;
272+
page-size = <8>;
163273
size = <256>;
164274
};
165275

@@ -176,6 +286,14 @@
176286
#size-cells = <0>;
177287
reg = <2>;
178288
};
289+
290+
i2c_wifi: i2c@3 {
291+
#address-cells = <1>;
292+
#size-cells = <0>;
293+
reg = <3>;
294+
295+
status = "disabled";
296+
};
179297
};
180298
};
181299

@@ -392,10 +510,75 @@
392510
status = "okay";
393511
};
394512

513+
/*&fan {
514+
pwms = <&pwm 0 50000>;
515+
status = "okay";
516+
};*/
517+
395518
&serial0 {
396519
status = "okay";
397520
};
398521

522+
&spi0 {
523+
pinctrl-names = "default";
524+
pinctrl-0 = <&spi0_flash_pins>;
525+
status = "okay";
526+
527+
spi_nand: spi_nand@0 {
528+
compatible = "spi-nand";
529+
reg = <0>;
530+
spi-max-frequency = <52000000>;
531+
spi-tx-buswidth = <4>;
532+
spi-rx-buswidth = <4>;
533+
};
534+
};
535+
536+
&spi1 {
537+
pinctrl-names = "default";
538+
pinctrl-0 = <&spi1_pins>;
539+
status = "okay";
540+
};
541+
542+
&spi_nand {
543+
partitions {
544+
compatible = "fixed-partitions";
545+
#address-cells = <1>;
546+
#size-cells = <1>;
547+
548+
partition@0 {
549+
label = "bl2";
550+
reg = <0x0 0x200000>;
551+
read-only;
552+
};
553+
554+
partition@200000 {
555+
label = "ubi";
556+
reg = <0x200000 0x7e00000>;
557+
compatible = "linux,ubi";
558+
559+
volumes {
560+
ubi-volume-ubootenv {
561+
volname = "ubootenv";
562+
nvmem-layout {
563+
compatible = "u-boot,env-redundant-bool-layout";
564+
};
565+
};
566+
567+
ubi-volume-ubootenv2 {
568+
volname = "ubootenv2";
569+
nvmem-layout {
570+
compatible = "u-boot,env-redundant-bool-layout";
571+
};
572+
};
573+
574+
ubi_rootfs: ubi-volume-fit {
575+
volname = "fit";
576+
};
577+
};
578+
};
579+
};
580+
};
581+
399582
&ssusb1 {
400583
status = "okay";
401584
};
@@ -407,3 +590,7 @@
407590
&watchdog {
408591
status = "okay";
409592
};
593+
594+
/*&xphy {
595+
status = "okay";
596+
};*/

0 commit comments

Comments
 (0)