blob: 887ff0f53717f891338b8bd00fed9af7740842a0 [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/ {
developer3f9a06c2023-05-23 15:16:44 +080011 model = "MediaTek MT7988D DSA 10G SNFI-NAND RFB";
12 compatible = "mediatek,mt7988d-dsa-10g-snfi-snand",
developerc54ce9d2023-01-03 13:30:49 +080013 /* 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 nmbm_snfi {
27 compatible = "generic,nmbm";
28
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 lower-mtd-device = <&snand>;
33 forced-create;
34 empty-page-ecc-protected;
35
36 partitions {
37 compatible = "fixed-partitions";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 partition@0 {
42 label = "BL2";
43 reg = <0x00000 0x0100000>;
44 read-only;
45 };
46
47 partition@100000 {
48 label = "u-boot-env";
49 reg = <0x0100000 0x0080000>;
50 };
51
52 factory: partition@180000 {
53 label = "Factory";
54 reg = <0x180000 0x0400000>;
55 };
56
57 partition@580000 {
58 label = "FIP";
59 reg = <0x580000 0x0200000>;
60 };
61
62 partition@780000 {
63 label = "ubi";
developerba03dd72023-04-28 10:12:23 +080064 reg = <0x780000 0x7080000>;
developerc54ce9d2023-01-03 13:30:49 +080065 };
66 };
67 };
68
69 wsys_adie: wsys_adie@0 {
70 // fpga cases need to manual change adie_id / sku_type for dvt only
71 compatible = "mediatek,rebb-mt7988-adie";
72 adie_id = <7976>;
73 sku_type = <3000>;
74 };
75};
76
77&fan {
78 pwms = <&pwm 0 50000 0>;
79 status = "okay";
80};
81
82&pwm {
83 status = "okay";
84};
85
86&uart0 {
87 status = "okay";
88};
89
90&spi1 {
91 pinctrl-names = "default";
92 /* pin shared with snfi */
93 pinctrl-0 = <&spic_pins>;
94 status = "disabled";
95};
96
97&pcie0 {
98 pinctrl-names = "default";
99 pinctrl-0 = <&pcie0_pins>;
100 status = "okay";
101};
102
103&pcie1 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&pcie1_pins>;
106 status = "disabled";
107};
108
109&pcie2 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pcie2_pins>;
112 status = "disabled";
113};
114
115&pcie3 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&pcie3_pins>;
118 status = "okay";
119};
120
121&pio {
122 mdio0_pins: mdio0-pins {
123 mux {
124 function = "mdio";
125 groups = "mdc_mdio0";
126 };
127
128 conf {
129 groups = "mdc_mdio0";
130 drive-strength = <MTK_DRIVE_8mA>;
131 };
132 };
133
developercaca1df2023-05-17 10:54:49 +0800134 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800135 mux {
136 function = "led";
developercaca1df2023-05-17 10:54:49 +0800137 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800138 };
139 };
140
developercaca1df2023-05-17 10:54:49 +0800141 gbe1_led0_pins: gbe1-pins {
142 mux {
143 function = "led";
144 groups = "gbe1_led0";
145 };
146 };
147
148 gbe2_led0_pins: gbe2-pins {
149 mux {
150 function = "led";
151 groups = "gbe2_led0";
152 };
153 };
154
155 gbe3_led0_pins: gbe3-pins {
156 mux {
157 function = "led";
158 groups = "gbe3_led0";
159 };
160 };
161
developerb4a8e1f2023-04-28 10:18:42 +0800162 i2p5gbe_led0_pins: 2p5gbe-pins {
163 mux {
164 function = "led";
165 groups = "2p5gbe_led0";
166 };
167 };
168
developerc54ce9d2023-01-03 13:30:49 +0800169 pcie0_pins: pcie0-pins {
170 mux {
171 function = "pcie";
172 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
173 "pcie_wake_n0_0";
174 };
175 };
176
177 pcie1_pins: pcie1-pins {
178 mux {
179 function = "pcie";
180 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
181 "pcie_wake_n1_0";
182 };
183 };
184
185 pcie2_pins: pcie2-pins {
186 mux {
187 function = "pcie";
188 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
189 "pcie_wake_n2_0";
190 };
191 };
192
193 pcie3_pins: pcie3-pins {
194 mux {
195 function = "pcie";
196 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
197 "pcie_wake_n3_0";
198 };
199 };
200
201 snfi_pins: snfi-pins {
202 mux {
203 function = "flash";
204 groups = "snfi";
205 };
206 };
207
208 spic_pins: spi1-pins {
209 mux {
210 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800211 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800212 };
213 };
214};
215
216&watchdog {
217 status = "disabled";
218};
219
220&snand {
221 pinctrl-names = "default";
222 /* pin shared with spic */
223 pinctrl-0 = <&snfi_pins>;
224 status = "okay";
225 mediatek,quad-spi;
226};
227
228&eth {
229 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800230 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800231 status = "okay";
232
233 gmac0: mac@0 {
234 compatible = "mediatek,eth-mac";
235 reg = <0>;
236 mac-type = "xgdm";
237 phy-mode = "10gbase-kr";
238
239 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800240 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800241 full-duplex;
242 pause;
243 };
244 };
245
246 gmac1: mac@1 {
247 compatible = "mediatek,eth-mac";
248 reg = <1>;
249 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800250 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800251 phy-handle = <&phy0>;
252 };
253
developerb4a8e1f2023-04-28 10:18:42 +0800254 gmac2: mac@2 {
255 compatible = "mediatek,eth-mac";
256 reg = <2>;
257 mac-type = "xgdm";
258 phy-mode = "usxgmii";
259 phy-handle = <&phy1>;
260 };
261
developerc54ce9d2023-01-03 13:30:49 +0800262 mdio: mdio-bus {
263 #address-cells = <1>;
264 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800265 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800266
267 phy0: ethernet-phy@0 {
developer813ffc42023-05-17 13:39:48 +0800268 pinctrl-names = "i2p5gbe-led";
developerb4a8e1f2023-04-28 10:18:42 +0800269 pinctrl-0 = <&i2p5gbe_led0_pins>;
270 reg = <15>;
271 compatible = "ethernet-phy-ieee802.3-c45";
272 phy-mode = "xgmii";
273 };
274
275 phy1: ethernet-phy@8 {
276 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800277 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800278 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800279 reset-assert-us = <100000>;
280 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800281 };
282
283 switch@0 {
284 compatible = "mediatek,mt7988";
285 reg = <31>;
286 ports {
287 #address-cells = <1>;
288 #size-cells = <0>;
289
290 port@0 {
291 reg = <0>;
292 label = "lan0";
293 phy-mode = "gmii";
294 phy-handle = <&sphy0>;
295 };
296
297 port@1 {
298 reg = <1>;
299 label = "lan1";
300 phy-mode = "gmii";
301 phy-handle = <&sphy1>;
302 };
303
304 port@2 {
305 reg = <2>;
306 label = "lan2";
307 phy-mode = "gmii";
308 phy-handle = <&sphy2>;
309 };
310
311 port@3 {
312 reg = <3>;
313 label = "lan3";
314 phy-mode = "gmii";
315 phy-handle = <&sphy3>;
316 };
317
318 port@6 {
319 reg = <6>;
320 label = "cpu";
321 ethernet = <&gmac0>;
322 phy-mode = "10gbase-kr";
323
324 fixed-link {
325 speed = <10000>;
326 full-duplex;
327 pause;
328 };
329 };
330 };
331
332 mdio {
333 compatible = "mediatek,dsa-slave-mdio";
334 #address-cells = <1>;
335 #size-cells = <0>;
developerc54ce9d2023-01-03 13:30:49 +0800336
337 sphy0: switch_phy0@0 {
338 compatible = "ethernet-phy-id03a2.9481";
339 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800340 pinctrl-names = "gbe-led";
341 pinctrl-0 = <&gbe0_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800342 nvmem-cells = <&phy_calibration_p0>;
343 nvmem-cell-names = "phy-cal-data";
344 };
345
346 sphy1: switch_phy1@1 {
347 compatible = "ethernet-phy-id03a2.9481";
348 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800349 pinctrl-names = "gbe-led";
350 pinctrl-0 = <&gbe1_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800351 nvmem-cells = <&phy_calibration_p1>;
352 nvmem-cell-names = "phy-cal-data";
353 };
354
355 sphy2: switch_phy2@2 {
356 compatible = "ethernet-phy-id03a2.9481";
357 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800358 pinctrl-names = "gbe-led";
359 pinctrl-0 = <&gbe2_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800360 nvmem-cells = <&phy_calibration_p2>;
361 nvmem-cell-names = "phy-cal-data";
362 };
363
364 sphy3: switch_phy3@3 {
365 compatible = "ethernet-phy-id03a2.9481";
366 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800367 pinctrl-names = "gbe-led";
368 pinctrl-0 = <&gbe3_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800369 nvmem-cells = <&phy_calibration_p3>;
370 nvmem-cell-names = "phy-cal-data";
371 };
372 };
373 };
374 };
375};
376
377&hnat {
378 mtketh-wan = "eth1";
379 mtketh-lan = "lan";
380 mtketh-lan2 = "eth2";
381 mtketh-max-gmac = <3>;
382 status = "okay";
383};