blob: d40cbfb853ff9b100c3421211c4ec88fefd5e765 [file] [log] [blame]
developerec4ebe42022-04-12 11:17:45 +08001--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
2+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
3@@ -53,6 +53,13 @@
4 };
5 };
6
7+ gsw: gsw@0 {
8+ compatible = "mediatek,mt753x";
9+ mediatek,ethsys = <&ethsys>;
10+ #address-cells = <1>;
11+ #size-cells = <0>;
12+ };
13+
14 leds {
15 compatible = "gpio-leds";
16
17@@ -146,6 +153,36 @@
18 };
19 };
20
21+&gsw {
22+ mediatek,mdio = <&mdio>;
23+ mediatek,portmap = "wllll";
24+ mediatek,mdio_master_pinmux = <0>;
25+ reset-gpios = <&pio 54 0>;
26+ interrupt-parent = <&pio>;
27+ interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
28+ status = "okay";
29+
30+ port5: port@5 {
31+ compatible = "mediatek,mt753x-port";
32+ reg = <5>;
33+ phy-mode = "rgmii";
34+ fixed-link {
35+ speed = <1000>;
36+ full-duplex;
37+ };
38+ };
39+
40+ port6: port@6 {
41+ compatible = "mediatek,mt753x-port";
42+ reg = <6>;
43+ phy-mode = "sgmii";
44+ fixed-link {
45+ speed = <2500>;
46+ full-duplex;
47+ };
48+ };
49+};
50+
51 &i2c1 {
52 pinctrl-names = "default";
53 pinctrl-0 = <&i2c1_pins>;
54--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
55+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
56@@ -1,7 +1,6 @@
57 /*
58- * Copyright (c) 2017 MediaTek Inc.
59- * Author: Ming Huang <ming.huang@mediatek.com>
60- * Sean Wang <sean.wang@mediatek.com>
61+ * Copyright (c) 2018 MediaTek Inc.
62+ * Author: Ryder Lee <ryder.lee@mediatek.com>
63 *
64 * SPDX-License-Identifier: (GPL-2.0 OR MIT)
65 */
66@@ -14,7 +13,7 @@
67 #include "mt6380.dtsi"
68
69 / {
70- model = "MediaTek MT7622 RFB1 board";
71+ model = "MT7622_MT7531 RFB";
72 compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622";
73
74 aliases {
75@@ -23,7 +22,7 @@
76
77 chosen {
78 stdout-path = "serial0:115200n8";
79- bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
80+ bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512";
81 };
82
83 cpus {
84@@ -40,23 +39,36 @@
85
86 gpio-keys {
87 compatible = "gpio-keys";
88- poll-interval = <100>;
89
90 factory {
91 label = "factory";
92 linux,code = <BTN_0>;
93- gpios = <&pio 0 0>;
94+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
95 };
96
97 wps {
98 label = "wps";
99 linux,code = <KEY_WPS_BUTTON>;
100- gpios = <&pio 102 0>;
101+ gpios = <&pio 102 GPIO_ACTIVE_LOW>;
102+ };
103+ };
104+
105+ leds {
106+ compatible = "gpio-leds";
107+
108+ green {
109+ label = "bpi-r64:pio:green";
110+ gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
111+ };
112+
113+ red {
114+ label = "bpi-r64:pio:red";
115+ gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
116 };
117 };
118
119 memory {
120- reg = <0 0x40000000 0 0x20000000>;
121+ reg = <0 0x40000000 0 0x40000000>;
122 };
123
124 reg_1p8v: regulator-1p8v {
125@@ -101,23 +113,82 @@
126 };
127
128 &eth {
129- pinctrl-names = "default";
130- pinctrl-0 = <&eth_pins>;
131 status = "okay";
132+ gmac0: mac@0 {
133+ compatible = "mediatek,eth-mac";
134+ reg = <0>;
135+ phy-mode = "2500base-x";
136+
137+ fixed-link {
138+ speed = <2500>;
139+ full-duplex;
140+ pause;
141+ };
142+ };
143
144 gmac1: mac@1 {
145 compatible = "mediatek,eth-mac";
146 reg = <1>;
147- phy-handle = <&phy5>;
148+ phy-mode = "rgmii";
149+
150+ fixed-link {
151+ speed = <1000>;
152+ full-duplex;
153+ pause;
154+ };
155 };
156
157- mdio-bus {
158+ mdio: mdio-bus {
159 #address-cells = <1>;
160 #size-cells = <0>;
161
162- phy5: ethernet-phy@5 {
163- reg = <5>;
164- phy-mode = "sgmii";
165+ switch@0 {
166+ compatible = "mediatek,mt7531";
167+ reg = <0>;
168+ reset-gpios = <&pio 54 0>;
169+
170+ ports {
171+ #address-cells = <1>;
172+ #size-cells = <0>;
173+
174+ port@0 {
175+ reg = <0>;
176+ label = "lan1";
177+ };
178+
179+ port@1 {
180+ reg = <1>;
181+ label = "lan2";
182+ };
183+
184+ port@2 {
185+ reg = <2>;
186+ label = "lan3";
187+ };
188+
189+ port@3 {
190+ reg = <3>;
191+ label = "lan4";
192+ };
193+
194+ port@4 {
195+ reg = <4>;
196+ label = "wan";
197+ };
198+
199+ port@6 {
200+ reg = <6>;
201+ label = "cpu";
202+ ethernet = <&gmac0>;
203+ phy-mode = "2500base-x";
204+
205+ fixed-link {
206+ speed = <2500>;
207+ full-duplex;
208+ pause;
209+ };
210+ };
211+ };
212 };
213 };
214 };
215@@ -185,15 +256,28 @@
216
217 &pcie {
218 pinctrl-names = "default";
219- pinctrl-0 = <&pcie0_pins>;
220+ pinctrl-0 = <&pcie0_pins>, <&pcie1_pins>;
221 status = "okay";
222
223 pcie@0,0 {
224 status = "okay";
225 };
226+
227+ pcie@1,0 {
228+ status = "okay";
229+ };
230 };
231
232 &pio {
233+ /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
234+ * SATA functions. i.e. output-high: PCIe, output-low: SATA
235+ */
236+ asm_sel {
237+ gpio-hog;
238+ gpios = <90 GPIO_ACTIVE_HIGH>;
239+ output-high;
240+ };
241+
242 /* eMMC is shared pin with parallel NAND */
243 emmc_pins_default: emmc-pins-default {
244 mux {
245@@ -460,11 +544,11 @@
246 };
247
248 &sata {
249- status = "okay";
250+ status = "disable";
251 };
252
253 &sata_phy {
254- status = "okay";
255+ status = "disable";
256 };
257
258 &spi0 {