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