blob: 373fdc330d38dcb732838ba60f4d9bd64db8643c [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 {
97 pcie0_pins: pcie0-pins {
98 mux {
99 function = "pcie";
100 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
101 "pcie_wake_n0_0";
102 };
103 };
104
105 pcie1_pins: pcie1-pins {
106 mux {
107 function = "pcie";
108 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
109 "pcie_wake_n1_0";
110 };
111 };
112
113 pcie2_pins: pcie2-pins {
114 mux {
115 function = "pcie";
116 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
117 "pcie_wake_n2_0";
118 };
119 };
120
121 pcie3_pins: pcie3-pins {
122 mux {
123 function = "pcie";
124 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
125 "pcie_wake_n3_0";
126 };
127 };
128
129 spic_pins: spi1-pins {
130 mux {
131 function = "spi";
132 groups = "spi1_1";
133 };
134 };
135
136 mmc0_pins_default: mmc0-pins-default {
137 mux {
138 function = "flash";
139 groups = "emmc_51";
140 };
141 };
142
143 mmc0_pins_uhs: mmc0-pins-uhs {
144 mux {
145 function = "flash";
146 groups = "emmc_51";
147 };
148 };
149};
150
151&watchdog {
152 status = "disabled";
153};
154
155&eth {
156 status = "okay";
157
158 gmac0: mac@0 {
159 compatible = "mediatek,eth-mac";
160 reg = <0>;
161 phy-mode = "10gbase-kr";
162
163 fixed-link {
164 speed = <2500>;
165 full-duplex;
166 pause;
167 };
168 };
169
170 gmac1: mac@1 {
171 compatible = "mediatek,eth-mac";
172 reg = <1>;
173 phy-mode = "10gbase-kr";
174 phy-handle = <&phy0>;
175 };
176
177 gmac2: mac@2 {
178 compatible = "mediatek,eth-mac";
179 reg = <2>;
180 phy-mode = "10gbase-kr";
181 phy-handle = <&phy1>;
182 };
183
184 mdio: mdio-bus {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 phy0: ethernet-phy@0 {
188 reg = <0>;
189 compatible = "ethernet-phy-ieee802.3-c45";
190 reset-gpios = <&pio 71 1>;
191 reset-assert-us = <1000000>;
192 reset-deassert-us = <1000000>;
193 };
194
195 phy1: ethernet-phy@8 {
196 reg = <8>;
197 compatible = "ethernet-phy-ieee802.3-c45";
198 reset-gpios = <&pio 72 1>;
199 reset-assert-us = <1000000>;
200 reset-deassert-us = <1000000>;
201 };
202
203 switch@0 {
204 compatible = "mediatek,mt7988";
205 reg = <31>;
206 ports {
207 #address-cells = <1>;
208 #size-cells = <0>;
209
210 port@0 {
211 reg = <0>;
212 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800213 phy-mode = "gmii";
214 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800215 };
216
217 port@1 {
218 reg = <1>;
219 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800220 phy-mode = "gmii";
221 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800222 };
223
224 port@2 {
225 reg = <2>;
226 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800227 phy-mode = "gmii";
228 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800229 };
230
231 port@3 {
232 reg = <3>;
233 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800234 phy-mode = "gmii";
235 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800236 };
237
238 port@6 {
239 reg = <6>;
240 label = "cpu";
241 ethernet = <&gmac0>;
242 phy-mode = "10gbase-kr";
243
244 fixed-link {
245 speed = <10000>;
246 full-duplex;
247 pause;
248 };
249 };
250 };
developera36549c2022-10-04 16:26:13 +0800251
252 mdio {
253 compatible = "mediatek,dsa-slave-mdio";
254 #address-cells = <1>;
255 #size-cells = <0>;
256
257 sphy0: switch_phy0@0 {
258 compatible = "ethernet-phy-id03a2.9481";
259 reg = <0>;
260 phy-mode = "gmii";
261 rext = "efuse";
262 tx_r50 = "efuse";
263 nvmem-cells = <&phy_calibration_p0>;
264 nvmem-cell-names = "phy-cal-data";
265 };
266
267 sphy1: switch_phy1@1 {
268 compatible = "ethernet-phy-id03a2.9481";
269 reg = <1>;
270 phy-mode = "gmii";
271 rext = "efuse";
272 tx_r50 = "efuse";
273 nvmem-cells = <&phy_calibration_p1>;
274 nvmem-cell-names = "phy-cal-data";
275 };
276
277 sphy2: switch_phy2@2 {
278 compatible = "ethernet-phy-id03a2.9481";
279 reg = <2>;
280 phy-mode = "gmii";
281 rext = "efuse";
282 tx_r50 = "efuse";
283 nvmem-cells = <&phy_calibration_p2>;
284 nvmem-cell-names = "phy-cal-data";
285 };
286
287 sphy3: switch_phy3@3 {
288 compatible = "ethernet-phy-id03a2.9481";
289 reg = <3>;
290 phy-mode = "gmii";
291 rext = "efuse";
292 tx_r50 = "efuse";
293 nvmem-cells = <&phy_calibration_p3>;
294 nvmem-cell-names = "phy-cal-data";
295 };
296 };
developer2cdaeb12022-10-04 20:25:05 +0800297 };
298 };
299};
300
301&hnat {
302 mtketh-wan = "eth1";
303 mtketh-lan = "lan";
304 mtketh-lan2 = "eth2";
305 mtketh-max-gmac = <3>;
306 status = "okay";
307};
308
309&mmc0 {
310 pinctrl-names = "default", "state_uhs";
311 pinctrl-0 = <&mmc0_pins_default>;
312 pinctrl-1 = <&mmc0_pins_uhs>;
313 bus-width = <8>;
314 max-frequency = <200000000>;
315 cap-mmc-highspeed;
316 mmc-hs200-1_8v;
317 mmc-hs400-1_8v;
318 hs400-ds-delay = <0x12814>;
319 vqmmc-supply = <&reg_1p8v>;
320 vmmc-supply = <&reg_3p3v>;
321 non-removable;
322 no-sd;
323 no-sdio;
324 status = "okay";
325};