blob: eb076edbd552369eb676d41c87f62c7160851a08 [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 SNFI-NAND RFB";
12 compatible = "mediatek,mt7988a-dsa-10g-snfi-snand",
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 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>;
developer2cdaeb12022-10-04 20:25:05 +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 = "okay";
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 {
developer24ba51c2022-11-15 11:22:46 +0800122 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
developer2cdaeb12022-10-04 20:25:05 +0800162 pcie0_pins: pcie0-pins {
163 mux {
164 function = "pcie";
165 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
166 "pcie_wake_n0_0";
167 };
168 };
169
170 pcie1_pins: pcie1-pins {
171 mux {
172 function = "pcie";
173 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
174 "pcie_wake_n1_0";
175 };
176 };
177
178 pcie2_pins: pcie2-pins {
179 mux {
180 function = "pcie";
181 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
182 "pcie_wake_n2_0";
183 };
184 };
185
186 pcie3_pins: pcie3-pins {
187 mux {
188 function = "pcie";
189 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
190 "pcie_wake_n3_0";
191 };
192 };
193
194 snfi_pins: snfi-pins {
195 mux {
196 function = "flash";
197 groups = "snfi";
198 };
199 };
200
201 spic_pins: spi1-pins {
202 mux {
203 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800204 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800205 };
206 };
207};
208
209&watchdog {
210 status = "disabled";
211};
212
213&snand {
214 pinctrl-names = "default";
215 /* pin shared with spic */
216 pinctrl-0 = <&snfi_pins>;
217 status = "okay";
218 mediatek,quad-spi;
219};
220
221&eth {
developer24ba51c2022-11-15 11:22:46 +0800222 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800223 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800224 status = "okay";
225
226 gmac0: mac@0 {
227 compatible = "mediatek,eth-mac";
228 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800229 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800230 phy-mode = "10gbase-kr";
231
232 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800233 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800234 full-duplex;
235 pause;
236 };
237 };
238
239 gmac1: mac@1 {
240 compatible = "mediatek,eth-mac";
241 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800242 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800243 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800244 phy-handle = <&phy0>;
245 };
246
247 gmac2: mac@2 {
248 compatible = "mediatek,eth-mac";
249 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800250 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800251 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800252 phy-handle = <&phy1>;
253 };
254
255 mdio: mdio-bus {
256 #address-cells = <1>;
257 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800258 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800259
developer2cdaeb12022-10-04 20:25:05 +0800260 phy0: ethernet-phy@0 {
261 reg = <0>;
262 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800263 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800264 reset-assert-us = <100000>;
265 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800266 };
267
268 phy1: ethernet-phy@8 {
269 reg = <8>;
270 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800271 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800272 reset-assert-us = <100000>;
273 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800274 };
275
276 switch@0 {
277 compatible = "mediatek,mt7988";
278 reg = <31>;
279 ports {
280 #address-cells = <1>;
281 #size-cells = <0>;
282
283 port@0 {
284 reg = <0>;
285 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800286 phy-mode = "gmii";
287 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800288 };
289
290 port@1 {
291 reg = <1>;
292 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800293 phy-mode = "gmii";
294 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800295 };
296
297 port@2 {
298 reg = <2>;
299 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800300 phy-mode = "gmii";
301 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800302 };
303
304 port@3 {
305 reg = <3>;
306 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800307 phy-mode = "gmii";
308 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800309 };
310
311 port@6 {
312 reg = <6>;
313 label = "cpu";
314 ethernet = <&gmac0>;
315 phy-mode = "10gbase-kr";
316
317 fixed-link {
318 speed = <10000>;
319 full-duplex;
320 pause;
321 };
322 };
323 };
developera36549c2022-10-04 16:26:13 +0800324
325 mdio {
326 compatible = "mediatek,dsa-slave-mdio";
327 #address-cells = <1>;
328 #size-cells = <0>;
329
330 sphy0: switch_phy0@0 {
331 compatible = "ethernet-phy-id03a2.9481";
332 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800333 pinctrl-names = "gbe-led";
334 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800335 nvmem-cells = <&phy_calibration_p0>;
336 nvmem-cell-names = "phy-cal-data";
337 };
338
339 sphy1: switch_phy1@1 {
340 compatible = "ethernet-phy-id03a2.9481";
341 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800342 pinctrl-names = "gbe-led";
343 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800344 nvmem-cells = <&phy_calibration_p1>;
345 nvmem-cell-names = "phy-cal-data";
346 };
347
348 sphy2: switch_phy2@2 {
349 compatible = "ethernet-phy-id03a2.9481";
350 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800351 pinctrl-names = "gbe-led";
352 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800353 nvmem-cells = <&phy_calibration_p2>;
354 nvmem-cell-names = "phy-cal-data";
355 };
356
357 sphy3: switch_phy3@3 {
358 compatible = "ethernet-phy-id03a2.9481";
359 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800360 pinctrl-names = "gbe-led";
361 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800362 nvmem-cells = <&phy_calibration_p3>;
363 nvmem-cell-names = "phy-cal-data";
364 };
365 };
developer2cdaeb12022-10-04 20:25:05 +0800366 };
367 };
368};
369
370&hnat {
371 mtketh-wan = "eth1";
372 mtketh-lan = "lan";
373 mtketh-lan2 = "eth2";
374 mtketh-max-gmac = <3>;
375 status = "okay";
376};