blob: cdc692c5d8aa55a2efd5424d1f1e8cb1a3d0f0b7 [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 SPIM-NOR RFB";
12 compatible = "mediatek,mt7988a-dsa-10g-spim-nor",
13 /* Reserve this for DVFS if creating new dts */
14 "mediatek,mt7988";
15
16 chosen {
17 bootargs = "console=ttyS0,115200n1 loglevel=8 \
18 earlycon=uart8250,mmio32,0x11000000 \
19 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
34&fan {
35 pwms = <&pwm 0 50000 0>;
36 status = "okay";
37};
38
39&pwm {
40 status = "okay";
41};
42
43&uart0 {
44 status = "okay";
45};
46
47&spi1 {
48 pinctrl-names = "default";
49 /* pin shared with snfi */
50 pinctrl-0 = <&spic_pins>;
51 status = "disabled";
52};
53
54&spi2 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&spi2_flash_pins>;
57 status = "okay";
58 spi_nor@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 compatible = "jedec,spi-nor";
62 spi-cal-enable;
63 spi-cal-mode = "read-data";
64 spi-cal-datalen = <7>;
65 spi-cal-data = /bits/ 8 <
66 0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */
67 spi-cal-addrlen = <1>;
68 spi-cal-addr = /bits/ 32 <0x0>;
69 reg = <0>;
70 spi-max-frequency = <52000000>;
71
72 partition@00000 {
73 label = "BL2";
74 reg = <0x00000 0x0040000>;
75 };
76 partition@40000 {
77 label = "u-boot-env";
78 reg = <0x40000 0x0010000>;
79 };
80 factory: partition@50000 {
81 label = "Factory";
82 reg = <0x50000 0x00B0000>;
83 };
84 partition@100000 {
85 label = "FIP";
86 reg = <0x100000 0x0080000>;
87 };
88 partition@180000 {
89 label = "firmware";
90 reg = <0x180000 0xE00000>;
91 };
92 };
93};
94
95&pcie0 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&pcie0_pins>;
98 status = "okay";
99};
100
101&pcie1 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&pcie1_pins>;
104 status = "okay";
105};
106
107&pcie2 {
108 pinctrl-names = "default";
109 pinctrl-0 = <&pcie2_pins>;
110 status = "disabled";
111};
112
113&pcie3 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&pcie3_pins>;
116 status = "okay";
117};
118
119&pio {
developer24ba51c2022-11-15 11:22:46 +0800120 mdio0_pins: mdio0-pins {
121 mux {
122 function = "mdio";
123 groups = "mdc_mdio0";
124 };
125
126 conf {
127 groups = "mdc_mdio0";
128 drive-strength = <MTK_DRIVE_8mA>;
129 };
130 };
131
developer2cdaeb12022-10-04 20:25:05 +0800132 pcie0_pins: pcie0-pins {
133 mux {
134 function = "pcie";
135 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
136 "pcie_wake_n0_0";
137 };
138 };
139
140 pcie1_pins: pcie1-pins {
141 mux {
142 function = "pcie";
143 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
144 "pcie_wake_n1_0";
145 };
146 };
147
148 pcie2_pins: pcie2-pins {
149 mux {
150 function = "pcie";
151 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
152 "pcie_wake_n2_0";
153 };
154 };
155
156 pcie3_pins: pcie3-pins {
157 mux {
158 function = "pcie";
159 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
160 "pcie_wake_n3_0";
161 };
162 };
163
164 spic_pins: spi1-pins {
165 mux {
166 function = "spi";
167 groups = "spi1_1";
168 };
169 };
170
171 spi2_flash_pins: spi2-pins {
172 mux {
173 function = "spi";
174 groups = "spi2", "spi2_wp_hold";
175 };
176 };
177};
178
179&watchdog {
180 status = "disabled";
181};
182
183&eth {
developer24ba51c2022-11-15 11:22:46 +0800184 pinctrl-names = "default";
185 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800186 status = "okay";
187
188 gmac0: mac@0 {
189 compatible = "mediatek,eth-mac";
190 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800191 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800192 phy-mode = "10gbase-kr";
193
194 fixed-link {
195 speed = <2500>;
196 full-duplex;
197 pause;
198 };
199 };
200
201 gmac1: mac@1 {
202 compatible = "mediatek,eth-mac";
203 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800204 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800205 phy-mode = "10gbase-kr";
206 phy-handle = <&phy0>;
207 };
208
209 gmac2: mac@2 {
210 compatible = "mediatek,eth-mac";
211 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800212 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800213 phy-mode = "10gbase-kr";
214 phy-handle = <&phy1>;
215 };
216
217 mdio: mdio-bus {
218 #address-cells = <1>;
219 #size-cells = <0>;
developer24ba51c2022-11-15 11:22:46 +0800220 mdc-max-frequency = <10500000>;
221
developer2cdaeb12022-10-04 20:25:05 +0800222 phy0: ethernet-phy@0 {
223 reg = <0>;
224 compatible = "ethernet-phy-ieee802.3-c45";
225 reset-gpios = <&pio 71 1>;
226 reset-assert-us = <1000000>;
227 reset-deassert-us = <1000000>;
228 };
229
230 phy1: ethernet-phy@8 {
231 reg = <8>;
232 compatible = "ethernet-phy-ieee802.3-c45";
233 reset-gpios = <&pio 72 1>;
234 reset-assert-us = <1000000>;
235 reset-deassert-us = <1000000>;
236 };
237
238 switch@0 {
239 compatible = "mediatek,mt7988";
240 reg = <31>;
241 ports {
242 #address-cells = <1>;
243 #size-cells = <0>;
244
245 port@0 {
246 reg = <0>;
247 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800248 phy-mode = "gmii";
249 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800250 };
251
252 port@1 {
253 reg = <1>;
254 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800255 phy-mode = "gmii";
256 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800257 };
258
259 port@2 {
260 reg = <2>;
261 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800262 phy-mode = "gmii";
263 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800264 };
265
266 port@3 {
267 reg = <3>;
268 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800269 phy-mode = "gmii";
270 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800271 };
272
273 port@6 {
274 reg = <6>;
275 label = "cpu";
276 ethernet = <&gmac0>;
277 phy-mode = "10gbase-kr";
278
279 fixed-link {
280 speed = <10000>;
281 full-duplex;
282 pause;
283 };
284 };
285 };
developera36549c2022-10-04 16:26:13 +0800286
287 mdio {
288 compatible = "mediatek,dsa-slave-mdio";
289 #address-cells = <1>;
290 #size-cells = <0>;
291
292 sphy0: switch_phy0@0 {
293 compatible = "ethernet-phy-id03a2.9481";
294 reg = <0>;
295 phy-mode = "gmii";
296 rext = "efuse";
297 tx_r50 = "efuse";
298 nvmem-cells = <&phy_calibration_p0>;
299 nvmem-cell-names = "phy-cal-data";
300 };
301
302 sphy1: switch_phy1@1 {
303 compatible = "ethernet-phy-id03a2.9481";
304 reg = <1>;
305 phy-mode = "gmii";
306 rext = "efuse";
307 tx_r50 = "efuse";
308 nvmem-cells = <&phy_calibration_p1>;
309 nvmem-cell-names = "phy-cal-data";
310 };
311
312 sphy2: switch_phy2@2 {
313 compatible = "ethernet-phy-id03a2.9481";
314 reg = <2>;
315 phy-mode = "gmii";
316 rext = "efuse";
317 tx_r50 = "efuse";
318 nvmem-cells = <&phy_calibration_p2>;
319 nvmem-cell-names = "phy-cal-data";
320 };
321
322 sphy3: switch_phy3@3 {
323 compatible = "ethernet-phy-id03a2.9481";
324 reg = <3>;
325 phy-mode = "gmii";
326 rext = "efuse";
327 tx_r50 = "efuse";
328 nvmem-cells = <&phy_calibration_p3>;
329 nvmem-cell-names = "phy-cal-data";
330 };
331 };
developer2cdaeb12022-10-04 20:25:05 +0800332 };
333 };
334};
335
336&hnat {
337 mtketh-wan = "eth1";
338 mtketh-lan = "lan";
339 mtketh-lan2 = "eth2";
340 mtketh-max-gmac = <3>;
341 status = "okay";
342};
343
344&wed {
345 dy_txbm_enable = "true";
346 dy_txbm_budge = <8>;
347 txbm_init_sz = <10>;
348 status = "okay";
349};