blob: 4805f15d078f30067df1fb182a7a2a8497a57d15 [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
developer2cdaeb12022-10-04 20:25:05 +0800100 pcie0_pins: pcie0-pins {
101 mux {
102 function = "pcie";
103 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
104 "pcie_wake_n0_0";
105 };
106 };
107
108 pcie1_pins: pcie1-pins {
109 mux {
110 function = "pcie";
111 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
112 "pcie_wake_n1_0";
113 };
114 };
115
116 pcie2_pins: pcie2-pins {
117 mux {
118 function = "pcie";
119 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
120 "pcie_wake_n2_0";
121 };
122 };
123
124 pcie3_pins: pcie3-pins {
125 mux {
126 function = "pcie";
127 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
128 "pcie_wake_n3_0";
129 };
130 };
131
132 spic_pins: spi1-pins {
133 mux {
134 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800135 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800136 };
137 };
138
139 mmc0_pins_default: mmc0-pins-default {
140 mux {
141 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800142 groups = "sdcard";
developer2cdaeb12022-10-04 20:25:05 +0800143 };
144 };
145
146 mmc0_pins_uhs: mmc0-pins-uhs {
147 mux {
148 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800149 groups = "sdcard";
developer2cdaeb12022-10-04 20:25:05 +0800150 };
151 };
152};
153
154&watchdog {
155 status = "disabled";
156};
157
158&eth {
developer24ba51c2022-11-15 11:22:46 +0800159 pinctrl-names = "default";
160 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800161 status = "okay";
162
163 gmac0: mac@0 {
164 compatible = "mediatek,eth-mac";
165 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800166 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800167 phy-mode = "10gbase-kr";
168
169 fixed-link {
170 speed = <2500>;
171 full-duplex;
172 pause;
173 };
174 };
175
176 gmac1: mac@1 {
177 compatible = "mediatek,eth-mac";
178 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800179 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800180 phy-mode = "10gbase-kr";
181 phy-handle = <&phy0>;
182 };
183
184 gmac2: mac@2 {
185 compatible = "mediatek,eth-mac";
186 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800187 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800188 phy-mode = "10gbase-kr";
189 phy-handle = <&phy1>;
190 };
191
192 mdio: mdio-bus {
193 #address-cells = <1>;
194 #size-cells = <0>;
developer24ba51c2022-11-15 11:22:46 +0800195 mdc-max-frequency = <10500000>;
196
developer2cdaeb12022-10-04 20:25:05 +0800197 phy0: ethernet-phy@0 {
198 reg = <0>;
199 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800200 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800201 reset-assert-us = <100000>;
202 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800203 };
204
205 phy1: ethernet-phy@8 {
206 reg = <8>;
207 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800208 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800209 reset-assert-us = <100000>;
210 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800211 };
212
213 switch@0 {
214 compatible = "mediatek,mt7988";
215 reg = <31>;
216 ports {
217 #address-cells = <1>;
218 #size-cells = <0>;
219
220 port@0 {
221 reg = <0>;
222 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800223 phy-mode = "gmii";
224 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800225 };
226
227 port@1 {
228 reg = <1>;
229 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800230 phy-mode = "gmii";
231 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800232 };
233
234 port@2 {
235 reg = <2>;
236 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800237 phy-mode = "gmii";
238 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800239 };
240
241 port@3 {
242 reg = <3>;
243 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800244 phy-mode = "gmii";
245 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800246 };
247
248 port@6 {
249 reg = <6>;
250 label = "cpu";
251 ethernet = <&gmac0>;
252 phy-mode = "10gbase-kr";
253
254 fixed-link {
255 speed = <10000>;
256 full-duplex;
257 pause;
258 };
259 };
260 };
developera36549c2022-10-04 16:26:13 +0800261
262 mdio {
263 compatible = "mediatek,dsa-slave-mdio";
264 #address-cells = <1>;
265 #size-cells = <0>;
266
267 sphy0: switch_phy0@0 {
268 compatible = "ethernet-phy-id03a2.9481";
269 reg = <0>;
270 phy-mode = "gmii";
271 rext = "efuse";
272 tx_r50 = "efuse";
273 nvmem-cells = <&phy_calibration_p0>;
274 nvmem-cell-names = "phy-cal-data";
275 };
276
277 sphy1: switch_phy1@1 {
278 compatible = "ethernet-phy-id03a2.9481";
279 reg = <1>;
280 phy-mode = "gmii";
281 rext = "efuse";
282 tx_r50 = "efuse";
283 nvmem-cells = <&phy_calibration_p1>;
284 nvmem-cell-names = "phy-cal-data";
285 };
286
287 sphy2: switch_phy2@2 {
288 compatible = "ethernet-phy-id03a2.9481";
289 reg = <2>;
290 phy-mode = "gmii";
291 rext = "efuse";
292 tx_r50 = "efuse";
293 nvmem-cells = <&phy_calibration_p2>;
294 nvmem-cell-names = "phy-cal-data";
295 };
296
297 sphy3: switch_phy3@3 {
298 compatible = "ethernet-phy-id03a2.9481";
299 reg = <3>;
300 phy-mode = "gmii";
301 rext = "efuse";
302 tx_r50 = "efuse";
303 nvmem-cells = <&phy_calibration_p3>;
304 nvmem-cell-names = "phy-cal-data";
305 };
306 };
developer2cdaeb12022-10-04 20:25:05 +0800307 };
308 };
309};
310
311&hnat {
312 mtketh-wan = "eth1";
313 mtketh-lan = "lan";
314 mtketh-lan2 = "eth2";
315 mtketh-max-gmac = <3>;
316 status = "okay";
317};
318
319&mmc0 {
320 pinctrl-names = "default", "state_uhs";
321 pinctrl-0 = <&mmc0_pins_default>;
322 pinctrl-1 = <&mmc0_pins_uhs>;
323 bus-width = <4>;
324 max-frequency = <52000000>;
325 cap-sd-highspeed;
326 vmmc-supply = <&reg_3p3v>;
327 vqmmc-supply = <&reg_3p3v>;
328 no-mmc;
329 no-sdio;
330 status = "okay";
331};