blob: 0714bff13f12c598e9f7b19d8efe1d558311621e [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/ {
11 model = "MediaTek MT7988C DSA 10G SD RFB";
12 compatible = "mediatek,mt7988c-dsa-10g-sd",
13 /* 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
developer447cb002023-04-06 17:54:54 +0800100 gbe_led0_pins: gbe-pins {
101 mux {
102 function = "led";
103 groups = "gbe_led0";
104 };
105 };
106
developerb4a8e1f2023-04-28 10:18:42 +0800107 i2p5gbe_led0_pins: 2p5gbe-pins {
108 mux {
109 function = "led";
110 groups = "2p5gbe_led0";
111 };
112 };
113
developerc54ce9d2023-01-03 13:30:49 +0800114 pcie0_pins: pcie0-pins {
115 mux {
116 function = "pcie";
117 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
118 "pcie_wake_n0_0";
119 };
120 };
121
122 pcie1_pins: pcie1-pins {
123 mux {
124 function = "pcie";
125 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
126 "pcie_wake_n1_0";
127 };
128 };
129
130 pcie2_pins: pcie2-pins {
131 mux {
132 function = "pcie";
133 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
134 "pcie_wake_n2_0";
135 };
136 };
137
138 pcie3_pins: pcie3-pins {
139 mux {
140 function = "pcie";
141 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
142 "pcie_wake_n3_0";
143 };
144 };
145
146 spic_pins: spi1-pins {
147 mux {
148 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800149 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800150 };
151 };
152
153 mmc0_pins_default: mmc0-pins-default {
154 mux {
155 function = "flash";
156 groups = "sdcard";
157 };
158 };
159
160 mmc0_pins_uhs: mmc0-pins-uhs {
161 mux {
162 function = "flash";
163 groups = "sdcard";
164 };
165 };
166};
167
168&watchdog {
169 status = "disabled";
170};
171
172&eth {
173 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800174 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800175 status = "okay";
176
177 gmac0: mac@0 {
178 compatible = "mediatek,eth-mac";
179 reg = <0>;
180 mac-type = "xgdm";
181 phy-mode = "10gbase-kr";
182
183 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800184 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800185 full-duplex;
186 pause;
187 };
188 };
189
190 gmac1: mac@1 {
191 compatible = "mediatek,eth-mac";
192 reg = <1>;
193 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800194 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800195 phy-handle = <&phy0>;
196 };
197
developerb4a8e1f2023-04-28 10:18:42 +0800198 gmac2: mac@2 {
199 compatible = "mediatek,eth-mac";
200 reg = <2>;
201 mac-type = "xgdm";
202 phy-mode = "usxgmii";
203 phy-handle = <&phy1>;
204 };
205
developerc54ce9d2023-01-03 13:30:49 +0800206 mdio: mdio-bus {
207 #address-cells = <1>;
208 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800209 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800210
211 phy0: ethernet-phy@0 {
developerb4a8e1f2023-04-28 10:18:42 +0800212 pinctrl-names = "default";
213 pinctrl-0 = <&i2p5gbe_led0_pins>;
214 reg = <15>;
215 compatible = "ethernet-phy-ieee802.3-c45";
216 phy-mode = "xgmii";
217 };
218
219 phy1: ethernet-phy@8 {
220 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800221 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800222 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800223 reset-assert-us = <100000>;
224 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800225 };
226
227 switch@0 {
228 compatible = "mediatek,mt7988";
229 reg = <31>;
230 ports {
231 #address-cells = <1>;
232 #size-cells = <0>;
233
234 port@0 {
235 reg = <0>;
236 label = "lan0";
237 phy-mode = "gmii";
238 phy-handle = <&sphy0>;
239 };
240
241 port@1 {
242 reg = <1>;
243 label = "lan1";
244 phy-mode = "gmii";
245 phy-handle = <&sphy1>;
246 };
247
248 port@2 {
249 reg = <2>;
250 label = "lan2";
251 phy-mode = "gmii";
252 phy-handle = <&sphy2>;
253 };
254
255 port@3 {
256 reg = <3>;
257 label = "lan3";
258 phy-mode = "gmii";
259 phy-handle = <&sphy3>;
260 };
261
262 port@6 {
263 reg = <6>;
264 label = "cpu";
265 ethernet = <&gmac0>;
266 phy-mode = "10gbase-kr";
267
268 fixed-link {
269 speed = <10000>;
270 full-duplex;
271 pause;
272 };
273 };
274 };
275
276 mdio {
277 compatible = "mediatek,dsa-slave-mdio";
278 #address-cells = <1>;
279 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800280 pinctrl-names = "default";
281 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800282
283 sphy0: switch_phy0@0 {
284 compatible = "ethernet-phy-id03a2.9481";
285 reg = <0>;
286 phy-mode = "gmii";
287 rext = "efuse";
288 tx_r50 = "efuse";
289 nvmem-cells = <&phy_calibration_p0>;
290 nvmem-cell-names = "phy-cal-data";
291 };
292
293 sphy1: switch_phy1@1 {
294 compatible = "ethernet-phy-id03a2.9481";
295 reg = <1>;
296 phy-mode = "gmii";
297 rext = "efuse";
298 tx_r50 = "efuse";
299 nvmem-cells = <&phy_calibration_p1>;
300 nvmem-cell-names = "phy-cal-data";
301 };
302
303 sphy2: switch_phy2@2 {
304 compatible = "ethernet-phy-id03a2.9481";
305 reg = <2>;
306 phy-mode = "gmii";
307 rext = "efuse";
308 tx_r50 = "efuse";
309 nvmem-cells = <&phy_calibration_p2>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312
313 sphy3: switch_phy3@3 {
314 compatible = "ethernet-phy-id03a2.9481";
315 reg = <3>;
316 phy-mode = "gmii";
317 rext = "efuse";
318 tx_r50 = "efuse";
319 nvmem-cells = <&phy_calibration_p3>;
320 nvmem-cell-names = "phy-cal-data";
321 };
322 };
323 };
324 };
325};
326
327&hnat {
328 mtketh-wan = "eth1";
329 mtketh-lan = "lan";
330 mtketh-lan2 = "eth2";
331 mtketh-max-gmac = <3>;
332 status = "okay";
333};
334
335&mmc0 {
336 pinctrl-names = "default", "state_uhs";
337 pinctrl-0 = <&mmc0_pins_default>;
338 pinctrl-1 = <&mmc0_pins_uhs>;
339 bus-width = <4>;
340 max-frequency = <52000000>;
341 cap-sd-highspeed;
342 vmmc-supply = <&reg_3p3v>;
343 vqmmc-supply = <&reg_3p3v>;
344 no-mmc;
345 no-sdio;
346 status = "okay";
347};