blob: 7635fe47785d6344cc9e0ffefa75865d728b2ddb [file] [log] [blame]
developerc54ce9d2023-01-03 13:30:49 +08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2021 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
5 */
6
7/dts-v1/;
8#include "mt7988.dtsi"
9
10/ {
developer3f9a06c2023-05-23 15:16:44 +080011 model = "MediaTek MT7988D DSA 10G SD RFB";
12 compatible = "mediatek,mt7988d-dsa-10g-sd",
developerc54ce9d2023-01-03 13:30:49 +080013 /* Reserve this for DVFS if creating new dts */
14 "mediatek,mt7988";
15 chosen {
16 bootargs = "console=ttyS0,115200n1 loglevel=8 \
17 earlycon=uart8250,mmio32,0x11000000 \
18 root=PARTLABEL=rootfs rootwait \
19 rootfstype=squashfs,f2fs pci=pcie_bus_perf";
20 };
21
22 memory {
23 reg = <0 0x40000000 0 0x10000000>;
24 };
25
26 wsys_adie: wsys_adie@0 {
27 // fpga cases need to manual change adie_id / sku_type for dvt only
28 compatible = "mediatek,rebb-mt7988-adie";
29 adie_id = <7976>;
30 sku_type = <3000>;
31 };
32
33 reg_3p3v: regulator-3p3v {
34 compatible = "regulator-fixed";
35 regulator-name = "fixed-3.3V";
36 regulator-min-microvolt = <3300000>;
37 regulator-max-microvolt = <3300000>;
38 regulator-boot-on;
39 regulator-always-on;
40 };
41};
42
43&fan {
44 pwms = <&pwm 0 50000 0>;
45 status = "okay";
46};
47
48&pwm {
49 status = "okay";
50};
51
52&uart0 {
53 status = "okay";
54};
55
56&spi1 {
57 pinctrl-names = "default";
58 /* pin shared with snfi */
59 pinctrl-0 = <&spic_pins>;
60 status = "disabled";
61};
62
63&pcie0 {
64 pinctrl-names = "default";
65 pinctrl-0 = <&pcie0_pins>;
66 status = "okay";
67};
68
69&pcie1 {
70 pinctrl-names = "default";
71 pinctrl-0 = <&pcie1_pins>;
72 status = "disabled";
73};
74
75&pcie2 {
76 pinctrl-names = "default";
77 pinctrl-0 = <&pcie2_pins>;
78 status = "disabled";
79};
80
81&pcie3 {
82 pinctrl-names = "default";
83 pinctrl-0 = <&pcie3_pins>;
84 status = "okay";
85};
86
87&pio {
88 mdio0_pins: mdio0-pins {
89 mux {
90 function = "mdio";
91 groups = "mdc_mdio0";
92 };
93
94 conf {
95 groups = "mdc_mdio0";
96 drive-strength = <MTK_DRIVE_8mA>;
97 };
98 };
99
developercaca1df2023-05-17 10:54:49 +0800100 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800101 mux {
102 function = "led";
developercaca1df2023-05-17 10:54:49 +0800103 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800104 };
105 };
106
developercaca1df2023-05-17 10:54:49 +0800107 gbe1_led0_pins: gbe1-pins {
108 mux {
109 function = "led";
110 groups = "gbe1_led0";
111 };
112 };
113
114 gbe2_led0_pins: gbe2-pins {
115 mux {
116 function = "led";
117 groups = "gbe2_led0";
118 };
119 };
120
121 gbe3_led0_pins: gbe3-pins {
122 mux {
123 function = "led";
124 groups = "gbe3_led0";
125 };
126 };
127
developerb4a8e1f2023-04-28 10:18:42 +0800128 i2p5gbe_led0_pins: 2p5gbe-pins {
129 mux {
130 function = "led";
131 groups = "2p5gbe_led0";
132 };
133 };
134
developerc54ce9d2023-01-03 13:30:49 +0800135 pcie0_pins: pcie0-pins {
136 mux {
137 function = "pcie";
138 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
139 "pcie_wake_n0_0";
140 };
141 };
142
143 pcie1_pins: pcie1-pins {
144 mux {
145 function = "pcie";
146 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
147 "pcie_wake_n1_0";
148 };
149 };
150
151 pcie2_pins: pcie2-pins {
152 mux {
153 function = "pcie";
154 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
155 "pcie_wake_n2_0";
156 };
157 };
158
159 pcie3_pins: pcie3-pins {
160 mux {
161 function = "pcie";
162 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
163 "pcie_wake_n3_0";
164 };
165 };
166
167 spic_pins: spi1-pins {
168 mux {
169 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800170 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800171 };
172 };
173
174 mmc0_pins_default: mmc0-pins-default {
175 mux {
176 function = "flash";
177 groups = "sdcard";
178 };
179 };
180
181 mmc0_pins_uhs: mmc0-pins-uhs {
182 mux {
183 function = "flash";
184 groups = "sdcard";
185 };
186 };
187};
188
189&watchdog {
190 status = "disabled";
191};
192
193&eth {
194 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800195 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800196 status = "okay";
197
198 gmac0: mac@0 {
199 compatible = "mediatek,eth-mac";
200 reg = <0>;
201 mac-type = "xgdm";
202 phy-mode = "10gbase-kr";
203
204 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800205 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800206 full-duplex;
207 pause;
208 };
209 };
210
211 gmac1: mac@1 {
212 compatible = "mediatek,eth-mac";
213 reg = <1>;
214 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800215 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800216 phy-handle = <&phy0>;
217 };
218
developerb4a8e1f2023-04-28 10:18:42 +0800219 gmac2: mac@2 {
220 compatible = "mediatek,eth-mac";
221 reg = <2>;
222 mac-type = "xgdm";
223 phy-mode = "usxgmii";
224 phy-handle = <&phy1>;
225 };
226
developerc54ce9d2023-01-03 13:30:49 +0800227 mdio: mdio-bus {
228 #address-cells = <1>;
229 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800230 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800231
232 phy0: ethernet-phy@0 {
developer813ffc42023-05-17 13:39:48 +0800233 pinctrl-names = "i2p5gbe-led";
developerb4a8e1f2023-04-28 10:18:42 +0800234 pinctrl-0 = <&i2p5gbe_led0_pins>;
235 reg = <15>;
236 compatible = "ethernet-phy-ieee802.3-c45";
237 phy-mode = "xgmii";
238 };
239
240 phy1: ethernet-phy@8 {
241 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800242 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800243 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800244 reset-assert-us = <100000>;
245 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800246 };
247
248 switch@0 {
249 compatible = "mediatek,mt7988";
250 reg = <31>;
251 ports {
252 #address-cells = <1>;
253 #size-cells = <0>;
254
255 port@0 {
256 reg = <0>;
257 label = "lan0";
258 phy-mode = "gmii";
259 phy-handle = <&sphy0>;
260 };
261
262 port@1 {
263 reg = <1>;
264 label = "lan1";
265 phy-mode = "gmii";
266 phy-handle = <&sphy1>;
267 };
268
269 port@2 {
270 reg = <2>;
271 label = "lan2";
272 phy-mode = "gmii";
273 phy-handle = <&sphy2>;
274 };
275
276 port@3 {
277 reg = <3>;
278 label = "lan3";
279 phy-mode = "gmii";
280 phy-handle = <&sphy3>;
281 };
282
283 port@6 {
284 reg = <6>;
285 label = "cpu";
286 ethernet = <&gmac0>;
287 phy-mode = "10gbase-kr";
288
289 fixed-link {
290 speed = <10000>;
291 full-duplex;
292 pause;
293 };
294 };
295 };
296
297 mdio {
298 compatible = "mediatek,dsa-slave-mdio";
299 #address-cells = <1>;
300 #size-cells = <0>;
developerc54ce9d2023-01-03 13:30:49 +0800301
302 sphy0: switch_phy0@0 {
303 compatible = "ethernet-phy-id03a2.9481";
304 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800305 pinctrl-names = "gbe-led";
306 pinctrl-0 = <&gbe0_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800307 nvmem-cells = <&phy_calibration_p0>;
308 nvmem-cell-names = "phy-cal-data";
309 };
310
311 sphy1: switch_phy1@1 {
312 compatible = "ethernet-phy-id03a2.9481";
313 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800314 pinctrl-names = "gbe-led";
315 pinctrl-0 = <&gbe1_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800316 nvmem-cells = <&phy_calibration_p1>;
317 nvmem-cell-names = "phy-cal-data";
318 };
319
320 sphy2: switch_phy2@2 {
321 compatible = "ethernet-phy-id03a2.9481";
322 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800323 pinctrl-names = "gbe-led";
324 pinctrl-0 = <&gbe2_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800325 nvmem-cells = <&phy_calibration_p2>;
326 nvmem-cell-names = "phy-cal-data";
327 };
328
329 sphy3: switch_phy3@3 {
330 compatible = "ethernet-phy-id03a2.9481";
331 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800332 pinctrl-names = "gbe-led";
333 pinctrl-0 = <&gbe3_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800334 nvmem-cells = <&phy_calibration_p3>;
335 nvmem-cell-names = "phy-cal-data";
336 };
337 };
338 };
339 };
340};
341
342&hnat {
343 mtketh-wan = "eth1";
344 mtketh-lan = "lan";
345 mtketh-lan2 = "eth2";
346 mtketh-max-gmac = <3>;
347 status = "okay";
348};
349
350&mmc0 {
351 pinctrl-names = "default", "state_uhs";
352 pinctrl-0 = <&mmc0_pins_default>;
353 pinctrl-1 = <&mmc0_pins_uhs>;
354 bus-width = <4>;
355 max-frequency = <52000000>;
356 cap-sd-highspeed;
357 vmmc-supply = <&reg_3p3v>;
358 vqmmc-supply = <&reg_3p3v>;
359 no-mmc;
360 no-sdio;
361 status = "okay";
362};