blob: 1011cb3667db87c80ab8c272c8ac99eef4aeb8c7 [file] [log] [blame]
developer2cdaeb12022-10-04 20:25:05 +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 MT7988A DSA 10G eMMC RFB";
12 compatible = "mediatek,mt7988a-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 = "okay";
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 {
developer24ba51c2022-11-15 11:22:46 +080097 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
developercaca1df2023-05-17 10:54:49 +0800109 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800110 mux {
111 function = "led";
developercaca1df2023-05-17 10:54:49 +0800112 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800113 };
114 };
115
developercaca1df2023-05-17 10:54:49 +0800116 gbe1_led0_pins: gbe1-pins {
117 mux {
118 function = "led";
119 groups = "gbe1_led0";
120 };
121 };
122
123 gbe2_led0_pins: gbe2-pins {
124 mux {
125 function = "led";
126 groups = "gbe2_led0";
127 };
128 };
129
130 gbe3_led0_pins: gbe3-pins {
131 mux {
132 function = "led";
133 groups = "gbe3_led0";
134 };
135 };
136
developer2cdaeb12022-10-04 20:25:05 +0800137 pcie0_pins: pcie0-pins {
138 mux {
139 function = "pcie";
140 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
141 "pcie_wake_n0_0";
142 };
143 };
144
145 pcie1_pins: pcie1-pins {
146 mux {
147 function = "pcie";
148 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
149 "pcie_wake_n1_0";
150 };
151 };
152
153 pcie2_pins: pcie2-pins {
154 mux {
155 function = "pcie";
156 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
157 "pcie_wake_n2_0";
158 };
159 };
160
161 pcie3_pins: pcie3-pins {
162 mux {
163 function = "pcie";
164 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
165 "pcie_wake_n3_0";
166 };
167 };
168
169 spic_pins: spi1-pins {
170 mux {
171 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800172 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800173 };
174 };
175
176 mmc0_pins_default: mmc0-pins-default {
177 mux {
178 function = "flash";
179 groups = "emmc_51";
180 };
181 };
182
183 mmc0_pins_uhs: mmc0-pins-uhs {
184 mux {
185 function = "flash";
186 groups = "emmc_51";
187 };
188 };
189};
190
191&watchdog {
192 status = "disabled";
193};
194
195&eth {
developer24ba51c2022-11-15 11:22:46 +0800196 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800197 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800198 status = "okay";
199
200 gmac0: mac@0 {
201 compatible = "mediatek,eth-mac";
202 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800203 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800204 phy-mode = "10gbase-kr";
205
206 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800207 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800208 full-duplex;
209 pause;
210 };
211 };
212
213 gmac1: mac@1 {
214 compatible = "mediatek,eth-mac";
215 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800216 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800217 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800218 phy-handle = <&phy0>;
219 };
220
221 gmac2: mac@2 {
222 compatible = "mediatek,eth-mac";
223 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800224 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800225 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800226 phy-handle = <&phy1>;
227 };
228
229 mdio: mdio-bus {
230 #address-cells = <1>;
231 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800232 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800233
developer2cdaeb12022-10-04 20:25:05 +0800234 phy0: ethernet-phy@0 {
235 reg = <0>;
236 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800237 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800238 reset-assert-us = <100000>;
239 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800240 };
241
242 phy1: ethernet-phy@8 {
243 reg = <8>;
244 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800245 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800246 reset-assert-us = <100000>;
247 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800248 };
249
250 switch@0 {
251 compatible = "mediatek,mt7988";
252 reg = <31>;
253 ports {
254 #address-cells = <1>;
255 #size-cells = <0>;
256
257 port@0 {
258 reg = <0>;
259 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800260 phy-mode = "gmii";
261 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800262 };
263
264 port@1 {
265 reg = <1>;
266 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800267 phy-mode = "gmii";
268 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800269 };
270
271 port@2 {
272 reg = <2>;
273 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800274 phy-mode = "gmii";
275 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800276 };
277
278 port@3 {
279 reg = <3>;
280 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800281 phy-mode = "gmii";
282 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800283 };
284
285 port@6 {
286 reg = <6>;
287 label = "cpu";
288 ethernet = <&gmac0>;
289 phy-mode = "10gbase-kr";
290
291 fixed-link {
292 speed = <10000>;
293 full-duplex;
294 pause;
295 };
296 };
297 };
developera36549c2022-10-04 16:26:13 +0800298
299 mdio {
300 compatible = "mediatek,dsa-slave-mdio";
301 #address-cells = <1>;
302 #size-cells = <0>;
303
304 sphy0: switch_phy0@0 {
305 compatible = "ethernet-phy-id03a2.9481";
306 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800307 pinctrl-names = "gbe-led";
308 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800309 nvmem-cells = <&phy_calibration_p0>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312
313 sphy1: switch_phy1@1 {
314 compatible = "ethernet-phy-id03a2.9481";
315 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800316 pinctrl-names = "gbe-led";
317 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800318 nvmem-cells = <&phy_calibration_p1>;
319 nvmem-cell-names = "phy-cal-data";
320 };
321
322 sphy2: switch_phy2@2 {
323 compatible = "ethernet-phy-id03a2.9481";
324 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800325 pinctrl-names = "gbe-led";
326 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800327 nvmem-cells = <&phy_calibration_p2>;
328 nvmem-cell-names = "phy-cal-data";
329 };
330
331 sphy3: switch_phy3@3 {
332 compatible = "ethernet-phy-id03a2.9481";
333 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800334 pinctrl-names = "gbe-led";
335 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800336 nvmem-cells = <&phy_calibration_p3>;
337 nvmem-cell-names = "phy-cal-data";
338 };
339 };
developer2cdaeb12022-10-04 20:25:05 +0800340 };
341 };
342};
343
344&hnat {
345 mtketh-wan = "eth1";
346 mtketh-lan = "lan";
347 mtketh-lan2 = "eth2";
348 mtketh-max-gmac = <3>;
349 status = "okay";
350};
351
352&mmc0 {
353 pinctrl-names = "default", "state_uhs";
354 pinctrl-0 = <&mmc0_pins_default>;
355 pinctrl-1 = <&mmc0_pins_uhs>;
356 bus-width = <8>;
357 max-frequency = <200000000>;
358 cap-mmc-highspeed;
359 mmc-hs200-1_8v;
360 mmc-hs400-1_8v;
361 hs400-ds-delay = <0x12814>;
362 vqmmc-supply = <&reg_1p8v>;
363 vmmc-supply = <&reg_3p3v>;
364 non-removable;
365 no-sd;
366 no-sdio;
367 status = "okay";
368};