blob: afd03bf770355654475e0493a6f8c0e8b33defff [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 eMMC RFB";
12 compatible = "mediatek,mt7988c-dsa-10g-emmc",
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_1p8v: regulator-1p8v {
34 compatible = "regulator-fixed";
35 regulator-name = "fixed-1.8V";
36 regulator-min-microvolt = <1800000>;
37 regulator-max-microvolt = <1800000>;
38 regulator-boot-on;
39 regulator-always-on;
40 };
41
42 reg_3p3v: regulator-3p3v {
43 compatible = "regulator-fixed";
44 regulator-name = "fixed-3.3V";
45 regulator-min-microvolt = <3300000>;
46 regulator-max-microvolt = <3300000>;
47 regulator-boot-on;
48 regulator-always-on;
49 };
50};
51
52&fan {
53 pwms = <&pwm 0 50000 0>;
54 status = "okay";
55};
56
57&pwm {
58 status = "okay";
59};
60
61&uart0 {
62 status = "okay";
63};
64
65&spi1 {
66 pinctrl-names = "default";
67 /* pin shared with snfi */
68 pinctrl-0 = <&spic_pins>;
69 status = "disabled";
70};
71
72&pcie0 {
73 pinctrl-names = "default";
74 pinctrl-0 = <&pcie0_pins>;
75 status = "okay";
76};
77
78&pcie1 {
79 pinctrl-names = "default";
80 pinctrl-0 = <&pcie1_pins>;
81 status = "disabled";
82};
83
84&pcie2 {
85 pinctrl-names = "default";
86 pinctrl-0 = <&pcie2_pins>;
87 status = "disabled";
88};
89
90&pcie3 {
91 pinctrl-names = "default";
92 pinctrl-0 = <&pcie3_pins>;
93 status = "okay";
94};
95
96&pio {
97 mdio0_pins: mdio0-pins {
98 mux {
99 function = "mdio";
100 groups = "mdc_mdio0";
101 };
102
103 conf {
104 groups = "mdc_mdio0";
105 drive-strength = <MTK_DRIVE_8mA>;
106 };
107 };
108
developer447cb002023-04-06 17:54:54 +0800109 gbe_led0_pins: gbe-pins {
110 mux {
111 function = "led";
112 groups = "gbe_led0";
113 };
114 };
115
developerb4a8e1f2023-04-28 10:18:42 +0800116 i2p5gbe_led0_pins: 2p5gbe-pins {
117 mux {
118 function = "led";
119 groups = "2p5gbe_led0";
120 };
121 };
122
developerc54ce9d2023-01-03 13:30:49 +0800123 pcie0_pins: pcie0-pins {
124 mux {
125 function = "pcie";
126 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
127 "pcie_wake_n0_0";
128 };
129 };
130
131 pcie1_pins: pcie1-pins {
132 mux {
133 function = "pcie";
134 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
135 "pcie_wake_n1_0";
136 };
137 };
138
139 pcie2_pins: pcie2-pins {
140 mux {
141 function = "pcie";
142 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
143 "pcie_wake_n2_0";
144 };
145 };
146
147 pcie3_pins: pcie3-pins {
148 mux {
149 function = "pcie";
150 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
151 "pcie_wake_n3_0";
152 };
153 };
154
155 spic_pins: spi1-pins {
156 mux {
157 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800158 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800159 };
160 };
161
162 mmc0_pins_default: mmc0-pins-default {
163 mux {
164 function = "flash";
165 groups = "emmc_51";
166 };
167 };
168
169 mmc0_pins_uhs: mmc0-pins-uhs {
170 mux {
171 function = "flash";
172 groups = "emmc_51";
173 };
174 };
175};
176
177&watchdog {
178 status = "disabled";
179};
180
181&eth {
182 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800183 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800184 status = "okay";
185
186 gmac0: mac@0 {
187 compatible = "mediatek,eth-mac";
188 reg = <0>;
189 mac-type = "xgdm";
190 phy-mode = "10gbase-kr";
191
192 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800193 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800194 full-duplex;
195 pause;
196 };
197 };
198
199 gmac1: mac@1 {
200 compatible = "mediatek,eth-mac";
201 reg = <1>;
202 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800203 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800204 phy-handle = <&phy0>;
205 };
206
developerb4a8e1f2023-04-28 10:18:42 +0800207 gmac2: mac@2 {
208 compatible = "mediatek,eth-mac";
209 reg = <2>;
210 mac-type = "xgdm";
211 phy-mode = "usxgmii";
212 phy-handle = <&phy1>;
213 };
214
developerc54ce9d2023-01-03 13:30:49 +0800215 mdio: mdio-bus {
216 #address-cells = <1>;
217 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800218 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800219
220 phy0: ethernet-phy@0 {
developerb4a8e1f2023-04-28 10:18:42 +0800221 pinctrl-names = "default";
222 pinctrl-0 = <&i2p5gbe_led0_pins>;
223 reg = <15>;
224 compatible = "ethernet-phy-ieee802.3-c45";
225 phy-mode = "xgmii";
226 };
227
228 phy1: ethernet-phy@8 {
229 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800230 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800231 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800232 reset-assert-us = <100000>;
233 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800234 };
235
236 switch@0 {
237 compatible = "mediatek,mt7988";
238 reg = <31>;
239 ports {
240 #address-cells = <1>;
241 #size-cells = <0>;
242
243 port@0 {
244 reg = <0>;
245 label = "lan0";
246 phy-mode = "gmii";
247 phy-handle = <&sphy0>;
248 };
249
250 port@1 {
251 reg = <1>;
252 label = "lan1";
253 phy-mode = "gmii";
254 phy-handle = <&sphy1>;
255 };
256
257 port@2 {
258 reg = <2>;
259 label = "lan2";
260 phy-mode = "gmii";
261 phy-handle = <&sphy2>;
262 };
263
264 port@3 {
265 reg = <3>;
266 label = "lan3";
267 phy-mode = "gmii";
268 phy-handle = <&sphy3>;
269 };
270
271 port@6 {
272 reg = <6>;
273 label = "cpu";
274 ethernet = <&gmac0>;
275 phy-mode = "10gbase-kr";
276
277 fixed-link {
278 speed = <10000>;
279 full-duplex;
280 pause;
281 };
282 };
283 };
284
285 mdio {
286 compatible = "mediatek,dsa-slave-mdio";
287 #address-cells = <1>;
288 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800289 pinctrl-names = "default";
290 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800291
292 sphy0: switch_phy0@0 {
293 compatible = "ethernet-phy-id03a2.9481";
294 reg = <0>;
295 phy-mode = "gmii";
296 rext = "efuse";
297 tx_r50 = "efuse";
298 nvmem-cells = <&phy_calibration_p0>;
299 nvmem-cell-names = "phy-cal-data";
300 };
301
302 sphy1: switch_phy1@1 {
303 compatible = "ethernet-phy-id03a2.9481";
304 reg = <1>;
305 phy-mode = "gmii";
306 rext = "efuse";
307 tx_r50 = "efuse";
308 nvmem-cells = <&phy_calibration_p1>;
309 nvmem-cell-names = "phy-cal-data";
310 };
311
312 sphy2: switch_phy2@2 {
313 compatible = "ethernet-phy-id03a2.9481";
314 reg = <2>;
315 phy-mode = "gmii";
316 rext = "efuse";
317 tx_r50 = "efuse";
318 nvmem-cells = <&phy_calibration_p2>;
319 nvmem-cell-names = "phy-cal-data";
320 };
321
322 sphy3: switch_phy3@3 {
323 compatible = "ethernet-phy-id03a2.9481";
324 reg = <3>;
325 phy-mode = "gmii";
326 rext = "efuse";
327 tx_r50 = "efuse";
328 nvmem-cells = <&phy_calibration_p3>;
329 nvmem-cell-names = "phy-cal-data";
330 };
331 };
332 };
333 };
334};
335
336&hnat {
337 mtketh-wan = "eth1";
338 mtketh-lan = "lan";
339 mtketh-lan2 = "eth2";
340 mtketh-max-gmac = <3>;
341 status = "okay";
342};
343
344&mmc0 {
345 pinctrl-names = "default", "state_uhs";
346 pinctrl-0 = <&mmc0_pins_default>;
347 pinctrl-1 = <&mmc0_pins_uhs>;
348 bus-width = <8>;
349 max-frequency = <200000000>;
350 cap-mmc-highspeed;
351 mmc-hs200-1_8v;
352 mmc-hs400-1_8v;
353 hs400-ds-delay = <0x12814>;
354 vqmmc-supply = <&reg_1p8v>;
355 vmmc-supply = <&reg_3p3v>;
356 non-removable;
357 no-sd;
358 no-sdio;
359 status = "okay";
360};