blob: 4c1ae3db7c873d06b093029e0020de5451dc104c [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
developer447cb002023-04-06 17:54:54 +0800109 gbe_led0_pins: gbe-pins {
110 mux {
111 function = "led";
112 groups = "gbe_led0";
113 };
114 };
115
developer2cdaeb12022-10-04 20:25:05 +0800116 pcie0_pins: pcie0-pins {
117 mux {
118 function = "pcie";
119 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
120 "pcie_wake_n0_0";
121 };
122 };
123
124 pcie1_pins: pcie1-pins {
125 mux {
126 function = "pcie";
127 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
128 "pcie_wake_n1_0";
129 };
130 };
131
132 pcie2_pins: pcie2-pins {
133 mux {
134 function = "pcie";
135 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
136 "pcie_wake_n2_0";
137 };
138 };
139
140 pcie3_pins: pcie3-pins {
141 mux {
142 function = "pcie";
143 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
144 "pcie_wake_n3_0";
145 };
146 };
147
148 spic_pins: spi1-pins {
149 mux {
150 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800151 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800152 };
153 };
154
155 mmc0_pins_default: mmc0-pins-default {
156 mux {
157 function = "flash";
158 groups = "emmc_51";
159 };
160 };
161
162 mmc0_pins_uhs: mmc0-pins-uhs {
163 mux {
164 function = "flash";
165 groups = "emmc_51";
166 };
167 };
168};
169
170&watchdog {
171 status = "disabled";
172};
173
174&eth {
developer24ba51c2022-11-15 11:22:46 +0800175 pinctrl-names = "default";
developer447cb002023-04-06 17:54:54 +0800176 pinctrl-0 = <&mdio0_pins>, <&gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800177 status = "okay";
178
179 gmac0: mac@0 {
180 compatible = "mediatek,eth-mac";
181 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800182 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800183 phy-mode = "10gbase-kr";
184
185 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800186 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800187 full-duplex;
188 pause;
189 };
190 };
191
192 gmac1: mac@1 {
193 compatible = "mediatek,eth-mac";
194 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800195 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800196 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800197 phy-handle = <&phy0>;
198 };
199
200 gmac2: mac@2 {
201 compatible = "mediatek,eth-mac";
202 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800203 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800204 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800205 phy-handle = <&phy1>;
206 };
207
208 mdio: mdio-bus {
209 #address-cells = <1>;
210 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800211 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800212
developer2cdaeb12022-10-04 20:25:05 +0800213 phy0: ethernet-phy@0 {
214 reg = <0>;
215 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800216 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800217 reset-assert-us = <100000>;
218 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800219 };
220
221 phy1: ethernet-phy@8 {
222 reg = <8>;
223 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800224 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800225 reset-assert-us = <100000>;
226 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800227 };
228
229 switch@0 {
230 compatible = "mediatek,mt7988";
231 reg = <31>;
232 ports {
233 #address-cells = <1>;
234 #size-cells = <0>;
235
236 port@0 {
237 reg = <0>;
238 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800239 phy-mode = "gmii";
240 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800241 };
242
243 port@1 {
244 reg = <1>;
245 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800246 phy-mode = "gmii";
247 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800248 };
249
250 port@2 {
251 reg = <2>;
252 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800253 phy-mode = "gmii";
254 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800255 };
256
257 port@3 {
258 reg = <3>;
259 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800260 phy-mode = "gmii";
261 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800262 };
263
264 port@6 {
265 reg = <6>;
266 label = "cpu";
267 ethernet = <&gmac0>;
268 phy-mode = "10gbase-kr";
269
270 fixed-link {
271 speed = <10000>;
272 full-duplex;
273 pause;
274 };
275 };
276 };
developera36549c2022-10-04 16:26:13 +0800277
278 mdio {
279 compatible = "mediatek,dsa-slave-mdio";
280 #address-cells = <1>;
281 #size-cells = <0>;
282
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 };
developer2cdaeb12022-10-04 20:25:05 +0800323 };
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 = <8>;
340 max-frequency = <200000000>;
341 cap-mmc-highspeed;
342 mmc-hs200-1_8v;
343 mmc-hs400-1_8v;
344 hs400-ds-delay = <0x12814>;
345 vqmmc-supply = <&reg_1p8v>;
346 vmmc-supply = <&reg_3p3v>;
347 non-removable;
348 no-sd;
349 no-sdio;
350 status = "okay";
351};