blob: 3a2bf1bb49d150ebc85f15092bae69884653171b [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";
64 reg = <0x780000 0x4000000>;
65 };
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
developer2cdaeb12022-10-04 20:25:05 +0800134 pcie0_pins: pcie0-pins {
135 mux {
136 function = "pcie";
137 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
138 "pcie_wake_n0_0";
139 };
140 };
141
142 pcie1_pins: pcie1-pins {
143 mux {
144 function = "pcie";
145 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
146 "pcie_wake_n1_0";
147 };
148 };
149
150 pcie2_pins: pcie2-pins {
151 mux {
152 function = "pcie";
153 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
154 "pcie_wake_n2_0";
155 };
156 };
157
158 pcie3_pins: pcie3-pins {
159 mux {
160 function = "pcie";
161 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
162 "pcie_wake_n3_0";
163 };
164 };
165
166 snfi_pins: snfi-pins {
167 mux {
168 function = "flash";
169 groups = "snfi";
170 };
171 };
172
173 spic_pins: spi1-pins {
174 mux {
175 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800176 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800177 };
178 };
179};
180
181&watchdog {
182 status = "disabled";
183};
184
185&snand {
186 pinctrl-names = "default";
187 /* pin shared with spic */
188 pinctrl-0 = <&snfi_pins>;
189 status = "okay";
190 mediatek,quad-spi;
191};
192
193&eth {
developer24ba51c2022-11-15 11:22:46 +0800194 pinctrl-names = "default";
195 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800196 status = "okay";
197
198 gmac0: mac@0 {
199 compatible = "mediatek,eth-mac";
200 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800201 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800202 phy-mode = "10gbase-kr";
203
204 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800205 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800206 full-duplex;
207 pause;
208 };
209 };
210
211 gmac1: mac@1 {
212 compatible = "mediatek,eth-mac";
213 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800214 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800215 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800216 phy-handle = <&phy0>;
217 };
218
219 gmac2: mac@2 {
220 compatible = "mediatek,eth-mac";
221 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800222 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800223 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800224 phy-handle = <&phy1>;
225 };
226
227 mdio: mdio-bus {
228 #address-cells = <1>;
229 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800230 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800231
developer2cdaeb12022-10-04 20:25:05 +0800232 phy0: ethernet-phy@0 {
233 reg = <0>;
234 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800235 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800236 reset-assert-us = <100000>;
237 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800238 };
239
240 phy1: ethernet-phy@8 {
241 reg = <8>;
242 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800243 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800244 reset-assert-us = <100000>;
245 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800246 };
247
248 switch@0 {
249 compatible = "mediatek,mt7988";
250 reg = <31>;
251 ports {
252 #address-cells = <1>;
253 #size-cells = <0>;
254
255 port@0 {
256 reg = <0>;
257 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800258 phy-mode = "gmii";
259 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800260 };
261
262 port@1 {
263 reg = <1>;
264 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800265 phy-mode = "gmii";
266 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800267 };
268
269 port@2 {
270 reg = <2>;
271 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800272 phy-mode = "gmii";
273 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800274 };
275
276 port@3 {
277 reg = <3>;
278 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800279 phy-mode = "gmii";
280 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800281 };
282
283 port@6 {
284 reg = <6>;
285 label = "cpu";
286 ethernet = <&gmac0>;
287 phy-mode = "10gbase-kr";
288
289 fixed-link {
290 speed = <10000>;
291 full-duplex;
292 pause;
293 };
294 };
295 };
developera36549c2022-10-04 16:26:13 +0800296
297 mdio {
298 compatible = "mediatek,dsa-slave-mdio";
299 #address-cells = <1>;
300 #size-cells = <0>;
301
302 sphy0: switch_phy0@0 {
303 compatible = "ethernet-phy-id03a2.9481";
304 reg = <0>;
305 phy-mode = "gmii";
306 rext = "efuse";
307 tx_r50 = "efuse";
308 nvmem-cells = <&phy_calibration_p0>;
309 nvmem-cell-names = "phy-cal-data";
310 };
311
312 sphy1: switch_phy1@1 {
313 compatible = "ethernet-phy-id03a2.9481";
314 reg = <1>;
315 phy-mode = "gmii";
316 rext = "efuse";
317 tx_r50 = "efuse";
318 nvmem-cells = <&phy_calibration_p1>;
319 nvmem-cell-names = "phy-cal-data";
320 };
321
322 sphy2: switch_phy2@2 {
323 compatible = "ethernet-phy-id03a2.9481";
324 reg = <2>;
325 phy-mode = "gmii";
326 rext = "efuse";
327 tx_r50 = "efuse";
328 nvmem-cells = <&phy_calibration_p2>;
329 nvmem-cell-names = "phy-cal-data";
330 };
331
332 sphy3: switch_phy3@3 {
333 compatible = "ethernet-phy-id03a2.9481";
334 reg = <3>;
335 phy-mode = "gmii";
336 rext = "efuse";
337 tx_r50 = "efuse";
338 nvmem-cells = <&phy_calibration_p3>;
339 nvmem-cell-names = "phy-cal-data";
340 };
341 };
developer2cdaeb12022-10-04 20:25:05 +0800342 };
343 };
344};
345
346&hnat {
347 mtketh-wan = "eth1";
348 mtketh-lan = "lan";
349 mtketh-lan2 = "eth2";
350 mtketh-max-gmac = <3>;
351 status = "okay";
352};