blob: fe54f53ec03230482052e81c18c78050a5800d11 [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
109 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";
developerc54ce9d2023-01-03 13:30:49 +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 {
168 pinctrl-names = "default";
169 pinctrl-0 = <&mdio0_pins>;
170 status = "okay";
171
172 gmac0: mac@0 {
173 compatible = "mediatek,eth-mac";
174 reg = <0>;
175 mac-type = "xgdm";
176 phy-mode = "10gbase-kr";
177
178 fixed-link {
179 speed = <2500>;
180 full-duplex;
181 pause;
182 };
183 };
184
185 gmac1: mac@1 {
186 compatible = "mediatek,eth-mac";
187 reg = <1>;
188 mac-type = "xgdm";
189 phy-mode = "10gbase-kr";
190 phy-handle = <&phy0>;
191 };
192
193 mdio: mdio-bus {
194 #address-cells = <1>;
195 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800196 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800197
198 phy0: ethernet-phy@0 {
199 reg = <0>;
200 compatible = "ethernet-phy-ieee802.3-c45";
201 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800202 reset-assert-us = <100000>;
203 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800204 };
205
206 switch@0 {
207 compatible = "mediatek,mt7988";
208 reg = <31>;
209 ports {
210 #address-cells = <1>;
211 #size-cells = <0>;
212
213 port@0 {
214 reg = <0>;
215 label = "lan0";
216 phy-mode = "gmii";
217 phy-handle = <&sphy0>;
218 };
219
220 port@1 {
221 reg = <1>;
222 label = "lan1";
223 phy-mode = "gmii";
224 phy-handle = <&sphy1>;
225 };
226
227 port@2 {
228 reg = <2>;
229 label = "lan2";
230 phy-mode = "gmii";
231 phy-handle = <&sphy2>;
232 };
233
234 port@3 {
235 reg = <3>;
236 label = "lan3";
237 phy-mode = "gmii";
238 phy-handle = <&sphy3>;
239 };
240
241 port@6 {
242 reg = <6>;
243 label = "cpu";
244 ethernet = <&gmac0>;
245 phy-mode = "10gbase-kr";
246
247 fixed-link {
248 speed = <10000>;
249 full-duplex;
250 pause;
251 };
252 };
253 };
254
255 mdio {
256 compatible = "mediatek,dsa-slave-mdio";
257 #address-cells = <1>;
258 #size-cells = <0>;
259
260 sphy0: switch_phy0@0 {
261 compatible = "ethernet-phy-id03a2.9481";
262 reg = <0>;
263 phy-mode = "gmii";
264 rext = "efuse";
265 tx_r50 = "efuse";
266 nvmem-cells = <&phy_calibration_p0>;
267 nvmem-cell-names = "phy-cal-data";
268 };
269
270 sphy1: switch_phy1@1 {
271 compatible = "ethernet-phy-id03a2.9481";
272 reg = <1>;
273 phy-mode = "gmii";
274 rext = "efuse";
275 tx_r50 = "efuse";
276 nvmem-cells = <&phy_calibration_p1>;
277 nvmem-cell-names = "phy-cal-data";
278 };
279
280 sphy2: switch_phy2@2 {
281 compatible = "ethernet-phy-id03a2.9481";
282 reg = <2>;
283 phy-mode = "gmii";
284 rext = "efuse";
285 tx_r50 = "efuse";
286 nvmem-cells = <&phy_calibration_p2>;
287 nvmem-cell-names = "phy-cal-data";
288 };
289
290 sphy3: switch_phy3@3 {
291 compatible = "ethernet-phy-id03a2.9481";
292 reg = <3>;
293 phy-mode = "gmii";
294 rext = "efuse";
295 tx_r50 = "efuse";
296 nvmem-cells = <&phy_calibration_p3>;
297 nvmem-cell-names = "phy-cal-data";
298 };
299 };
300 };
301 };
302};
303
304&hnat {
305 mtketh-wan = "eth1";
306 mtketh-lan = "lan";
307 mtketh-lan2 = "eth2";
308 mtketh-max-gmac = <3>;
309 status = "okay";
310};
311
312&mmc0 {
313 pinctrl-names = "default", "state_uhs";
314 pinctrl-0 = <&mmc0_pins_default>;
315 pinctrl-1 = <&mmc0_pins_uhs>;
316 bus-width = <8>;
317 max-frequency = <200000000>;
318 cap-mmc-highspeed;
319 mmc-hs200-1_8v;
320 mmc-hs400-1_8v;
321 hs400-ds-delay = <0x12814>;
322 vqmmc-supply = <&reg_1p8v>;
323 vmmc-supply = <&reg_3p3v>;
324 non-removable;
325 no-sd;
326 no-sdio;
327 status = "okay";
328};