blob: 5548023d4c2c1ae53a97e37ecd0553569f96d6c4 [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 SD RFB";
12 compatible = "mediatek,mt7988a-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 = "okay";
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 {
developer24ba51c2022-11-15 11:22:46 +080088 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
developer2cdaeb12022-10-04 20:25:05 +0800128 pcie0_pins: pcie0-pins {
129 mux {
130 function = "pcie";
131 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
132 "pcie_wake_n0_0";
133 };
134 };
135
136 pcie1_pins: pcie1-pins {
137 mux {
138 function = "pcie";
139 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
140 "pcie_wake_n1_0";
141 };
142 };
143
144 pcie2_pins: pcie2-pins {
145 mux {
146 function = "pcie";
147 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
148 "pcie_wake_n2_0";
149 };
150 };
151
152 pcie3_pins: pcie3-pins {
153 mux {
154 function = "pcie";
155 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
156 "pcie_wake_n3_0";
157 };
158 };
159
160 spic_pins: spi1-pins {
161 mux {
162 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800163 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800164 };
165 };
166
167 mmc0_pins_default: mmc0-pins-default {
168 mux {
169 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800170 groups = "sdcard";
developer2cdaeb12022-10-04 20:25:05 +0800171 };
172 };
173
174 mmc0_pins_uhs: mmc0-pins-uhs {
175 mux {
176 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800177 groups = "sdcard";
developer2cdaeb12022-10-04 20:25:05 +0800178 };
179 };
180};
181
182&watchdog {
183 status = "disabled";
184};
185
186&eth {
developer24ba51c2022-11-15 11:22:46 +0800187 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800188 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800189 status = "okay";
190
191 gmac0: mac@0 {
192 compatible = "mediatek,eth-mac";
193 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800194 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800195 phy-mode = "10gbase-kr";
196
197 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800198 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800199 full-duplex;
200 pause;
201 };
202 };
203
204 gmac1: mac@1 {
205 compatible = "mediatek,eth-mac";
206 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800207 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800208 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800209 phy-handle = <&phy0>;
210 };
211
212 gmac2: mac@2 {
213 compatible = "mediatek,eth-mac";
214 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800215 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800216 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800217 phy-handle = <&phy1>;
218 };
219
220 mdio: mdio-bus {
221 #address-cells = <1>;
222 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800223 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800224
developer2cdaeb12022-10-04 20:25:05 +0800225 phy0: ethernet-phy@0 {
226 reg = <0>;
227 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800228 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800229 reset-assert-us = <100000>;
230 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800231 };
232
233 phy1: ethernet-phy@8 {
234 reg = <8>;
235 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800236 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800237 reset-assert-us = <100000>;
238 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800239 };
240
241 switch@0 {
242 compatible = "mediatek,mt7988";
243 reg = <31>;
244 ports {
245 #address-cells = <1>;
246 #size-cells = <0>;
247
248 port@0 {
249 reg = <0>;
250 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800251 phy-mode = "gmii";
252 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800253 };
254
255 port@1 {
256 reg = <1>;
257 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800258 phy-mode = "gmii";
259 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800260 };
261
262 port@2 {
263 reg = <2>;
264 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800265 phy-mode = "gmii";
266 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800267 };
268
269 port@3 {
270 reg = <3>;
271 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800272 phy-mode = "gmii";
273 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800274 };
275
276 port@6 {
277 reg = <6>;
278 label = "cpu";
279 ethernet = <&gmac0>;
280 phy-mode = "10gbase-kr";
281
282 fixed-link {
283 speed = <10000>;
284 full-duplex;
285 pause;
286 };
287 };
288 };
developera36549c2022-10-04 16:26:13 +0800289
290 mdio {
291 compatible = "mediatek,dsa-slave-mdio";
292 #address-cells = <1>;
293 #size-cells = <0>;
294
295 sphy0: switch_phy0@0 {
296 compatible = "ethernet-phy-id03a2.9481";
297 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800298 pinctrl-names = "gbe-led";
299 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800300 nvmem-cells = <&phy_calibration_p0>;
301 nvmem-cell-names = "phy-cal-data";
302 };
303
304 sphy1: switch_phy1@1 {
305 compatible = "ethernet-phy-id03a2.9481";
306 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800307 pinctrl-names = "gbe-led";
308 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800309 nvmem-cells = <&phy_calibration_p1>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312
313 sphy2: switch_phy2@2 {
314 compatible = "ethernet-phy-id03a2.9481";
315 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800316 pinctrl-names = "gbe-led";
317 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800318 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>;
developercaca1df2023-05-17 10:54:49 +0800325 pinctrl-names = "gbe-led";
326 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800327 nvmem-cells = <&phy_calibration_p3>;
328 nvmem-cell-names = "phy-cal-data";
329 };
330 };
developer2cdaeb12022-10-04 20:25:05 +0800331 };
332 };
333};
334
335&hnat {
336 mtketh-wan = "eth1";
337 mtketh-lan = "lan";
338 mtketh-lan2 = "eth2";
339 mtketh-max-gmac = <3>;
340 status = "okay";
341};
342
343&mmc0 {
344 pinctrl-names = "default", "state_uhs";
345 pinctrl-0 = <&mmc0_pins_default>;
346 pinctrl-1 = <&mmc0_pins_uhs>;
347 bus-width = <4>;
348 max-frequency = <52000000>;
349 cap-sd-highspeed;
350 vmmc-supply = <&reg_3p3v>;
351 vqmmc-supply = <&reg_3p3v>;
352 no-mmc;
353 no-sdio;
354 status = "okay";
355};