blob: c7e83fd42f71222e06400cb6e752f009ddb313f2 [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>;
developer301205c2023-05-24 15:39:32 +0800266 mdi-reversal = /bits/ 16 <1>;
developer2cdaeb12022-10-04 20:25:05 +0800267 };
268
269 phy1: ethernet-phy@8 {
270 reg = <8>;
271 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800272 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800273 reset-assert-us = <100000>;
274 reset-deassert-us = <221000>;
developer301205c2023-05-24 15:39:32 +0800275 mdi-reversal = /bits/ 16 <1>;
developer2cdaeb12022-10-04 20:25:05 +0800276 };
277
278 switch@0 {
279 compatible = "mediatek,mt7988";
280 reg = <31>;
281 ports {
282 #address-cells = <1>;
283 #size-cells = <0>;
284
285 port@0 {
286 reg = <0>;
287 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800288 phy-mode = "gmii";
289 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800290 };
291
292 port@1 {
293 reg = <1>;
294 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800295 phy-mode = "gmii";
296 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800297 };
298
299 port@2 {
300 reg = <2>;
301 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800302 phy-mode = "gmii";
303 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800304 };
305
306 port@3 {
307 reg = <3>;
308 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800309 phy-mode = "gmii";
310 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800311 };
312
313 port@6 {
314 reg = <6>;
315 label = "cpu";
316 ethernet = <&gmac0>;
317 phy-mode = "10gbase-kr";
318
319 fixed-link {
320 speed = <10000>;
321 full-duplex;
322 pause;
323 };
324 };
325 };
developera36549c2022-10-04 16:26:13 +0800326
327 mdio {
328 compatible = "mediatek,dsa-slave-mdio";
329 #address-cells = <1>;
330 #size-cells = <0>;
331
332 sphy0: switch_phy0@0 {
333 compatible = "ethernet-phy-id03a2.9481";
334 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800335 pinctrl-names = "gbe-led";
336 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800337 nvmem-cells = <&phy_calibration_p0>;
338 nvmem-cell-names = "phy-cal-data";
339 };
340
341 sphy1: switch_phy1@1 {
342 compatible = "ethernet-phy-id03a2.9481";
343 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800344 pinctrl-names = "gbe-led";
345 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800346 nvmem-cells = <&phy_calibration_p1>;
347 nvmem-cell-names = "phy-cal-data";
348 };
349
350 sphy2: switch_phy2@2 {
351 compatible = "ethernet-phy-id03a2.9481";
352 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800353 pinctrl-names = "gbe-led";
354 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800355 nvmem-cells = <&phy_calibration_p2>;
356 nvmem-cell-names = "phy-cal-data";
357 };
358
359 sphy3: switch_phy3@3 {
360 compatible = "ethernet-phy-id03a2.9481";
361 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800362 pinctrl-names = "gbe-led";
363 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800364 nvmem-cells = <&phy_calibration_p3>;
365 nvmem-cell-names = "phy-cal-data";
366 };
367 };
developer2cdaeb12022-10-04 20:25:05 +0800368 };
369 };
370};
371
372&hnat {
373 mtketh-wan = "eth1";
374 mtketh-lan = "lan";
375 mtketh-lan2 = "eth2";
376 mtketh-max-gmac = <3>;
377 status = "okay";
378};