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