blob: e658fd3993e985f64cf01d247778369d204e8577 [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
developer2cdaeb12022-10-04 20:25:05 +0800109 pcie0_pins: pcie0-pins {
110 mux {
111 function = "pcie";
112 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
113 "pcie_wake_n0_0";
114 };
115 };
116
117 pcie1_pins: pcie1-pins {
118 mux {
119 function = "pcie";
120 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
121 "pcie_wake_n1_0";
122 };
123 };
124
125 pcie2_pins: pcie2-pins {
126 mux {
127 function = "pcie";
128 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
129 "pcie_wake_n2_0";
130 };
131 };
132
133 pcie3_pins: pcie3-pins {
134 mux {
135 function = "pcie";
136 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
137 "pcie_wake_n3_0";
138 };
139 };
140
141 spic_pins: spi1-pins {
142 mux {
143 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800144 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800145 };
146 };
147
148 mmc0_pins_default: mmc0-pins-default {
149 mux {
150 function = "flash";
151 groups = "emmc_51";
152 };
153 };
154
155 mmc0_pins_uhs: mmc0-pins-uhs {
156 mux {
157 function = "flash";
158 groups = "emmc_51";
159 };
160 };
161};
162
163&watchdog {
164 status = "disabled";
165};
166
167&eth {
developer24ba51c2022-11-15 11:22:46 +0800168 pinctrl-names = "default";
169 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800170 status = "okay";
171
172 gmac0: mac@0 {
173 compatible = "mediatek,eth-mac";
174 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800175 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800176 phy-mode = "10gbase-kr";
177
178 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800179 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800180 full-duplex;
181 pause;
182 };
183 };
184
185 gmac1: mac@1 {
186 compatible = "mediatek,eth-mac";
187 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800188 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800189 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800190 phy-handle = <&phy0>;
191 };
192
193 gmac2: mac@2 {
194 compatible = "mediatek,eth-mac";
195 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800196 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800197 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800198 phy-handle = <&phy1>;
199 };
200
201 mdio: mdio-bus {
202 #address-cells = <1>;
203 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800204 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800205
developer2cdaeb12022-10-04 20:25:05 +0800206 phy0: ethernet-phy@0 {
207 reg = <0>;
208 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800209 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800210 reset-assert-us = <100000>;
211 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800212 };
213
214 phy1: ethernet-phy@8 {
215 reg = <8>;
216 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800217 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800218 reset-assert-us = <100000>;
219 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800220 };
221
222 switch@0 {
223 compatible = "mediatek,mt7988";
224 reg = <31>;
225 ports {
226 #address-cells = <1>;
227 #size-cells = <0>;
228
229 port@0 {
230 reg = <0>;
231 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800232 phy-mode = "gmii";
233 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800234 };
235
236 port@1 {
237 reg = <1>;
238 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800239 phy-mode = "gmii";
240 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800241 };
242
243 port@2 {
244 reg = <2>;
245 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800246 phy-mode = "gmii";
247 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800248 };
249
250 port@3 {
251 reg = <3>;
252 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800253 phy-mode = "gmii";
254 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800255 };
256
257 port@6 {
258 reg = <6>;
259 label = "cpu";
260 ethernet = <&gmac0>;
261 phy-mode = "10gbase-kr";
262
263 fixed-link {
264 speed = <10000>;
265 full-duplex;
266 pause;
267 };
268 };
269 };
developera36549c2022-10-04 16:26:13 +0800270
271 mdio {
272 compatible = "mediatek,dsa-slave-mdio";
273 #address-cells = <1>;
274 #size-cells = <0>;
275
276 sphy0: switch_phy0@0 {
277 compatible = "ethernet-phy-id03a2.9481";
278 reg = <0>;
279 phy-mode = "gmii";
280 rext = "efuse";
281 tx_r50 = "efuse";
282 nvmem-cells = <&phy_calibration_p0>;
283 nvmem-cell-names = "phy-cal-data";
284 };
285
286 sphy1: switch_phy1@1 {
287 compatible = "ethernet-phy-id03a2.9481";
288 reg = <1>;
289 phy-mode = "gmii";
290 rext = "efuse";
291 tx_r50 = "efuse";
292 nvmem-cells = <&phy_calibration_p1>;
293 nvmem-cell-names = "phy-cal-data";
294 };
295
296 sphy2: switch_phy2@2 {
297 compatible = "ethernet-phy-id03a2.9481";
298 reg = <2>;
299 phy-mode = "gmii";
300 rext = "efuse";
301 tx_r50 = "efuse";
302 nvmem-cells = <&phy_calibration_p2>;
303 nvmem-cell-names = "phy-cal-data";
304 };
305
306 sphy3: switch_phy3@3 {
307 compatible = "ethernet-phy-id03a2.9481";
308 reg = <3>;
309 phy-mode = "gmii";
310 rext = "efuse";
311 tx_r50 = "efuse";
312 nvmem-cells = <&phy_calibration_p3>;
313 nvmem-cell-names = "phy-cal-data";
314 };
315 };
developer2cdaeb12022-10-04 20:25:05 +0800316 };
317 };
318};
319
320&hnat {
321 mtketh-wan = "eth1";
322 mtketh-lan = "lan";
323 mtketh-lan2 = "eth2";
324 mtketh-max-gmac = <3>;
325 status = "okay";
326};
327
328&mmc0 {
329 pinctrl-names = "default", "state_uhs";
330 pinctrl-0 = <&mmc0_pins_default>;
331 pinctrl-1 = <&mmc0_pins_uhs>;
332 bus-width = <8>;
333 max-frequency = <200000000>;
334 cap-mmc-highspeed;
335 mmc-hs200-1_8v;
336 mmc-hs400-1_8v;
337 hs400-ds-delay = <0x12814>;
338 vqmmc-supply = <&reg_1p8v>;
339 vmmc-supply = <&reg_3p3v>;
340 non-removable;
341 no-sd;
342 no-sdio;
343 status = "okay";
344};