blob: adbfb7c65134b6bad5118d284c7c08bdce11e041 [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
developer447cb002023-04-06 17:54:54 +0800134 gbe_led0_pins: gbe-pins {
135 mux {
136 function = "led";
137 groups = "gbe_led0";
138 };
139 };
140
developer2cdaeb12022-10-04 20:25:05 +0800141 pcie0_pins: pcie0-pins {
142 mux {
143 function = "pcie";
144 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
145 "pcie_wake_n0_0";
146 };
147 };
148
149 pcie1_pins: pcie1-pins {
150 mux {
151 function = "pcie";
152 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
153 "pcie_wake_n1_0";
154 };
155 };
156
157 pcie2_pins: pcie2-pins {
158 mux {
159 function = "pcie";
160 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
161 "pcie_wake_n2_0";
162 };
163 };
164
165 pcie3_pins: pcie3-pins {
166 mux {
167 function = "pcie";
168 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
169 "pcie_wake_n3_0";
170 };
171 };
172
173 snfi_pins: snfi-pins {
174 mux {
175 function = "flash";
176 groups = "snfi";
177 };
178 };
179
180 spic_pins: spi1-pins {
181 mux {
182 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800183 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800184 };
185 };
186};
187
188&watchdog {
189 status = "disabled";
190};
191
192&snand {
193 pinctrl-names = "default";
194 /* pin shared with spic */
195 pinctrl-0 = <&snfi_pins>;
196 status = "okay";
197 mediatek,quad-spi;
198};
199
200&eth {
developer24ba51c2022-11-15 11:22:46 +0800201 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800202 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800203 status = "okay";
204
205 gmac0: mac@0 {
206 compatible = "mediatek,eth-mac";
207 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800208 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800209 phy-mode = "10gbase-kr";
210
211 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800212 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800213 full-duplex;
214 pause;
215 };
216 };
217
218 gmac1: mac@1 {
219 compatible = "mediatek,eth-mac";
220 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800221 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800222 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800223 phy-handle = <&phy0>;
224 };
225
226 gmac2: mac@2 {
227 compatible = "mediatek,eth-mac";
228 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800229 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800230 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800231 phy-handle = <&phy1>;
232 };
233
234 mdio: mdio-bus {
235 #address-cells = <1>;
236 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800237 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800238
developer2cdaeb12022-10-04 20:25:05 +0800239 phy0: ethernet-phy@0 {
240 reg = <0>;
241 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800242 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800243 reset-assert-us = <100000>;
244 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800245 };
246
247 phy1: ethernet-phy@8 {
248 reg = <8>;
249 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800250 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800251 reset-assert-us = <100000>;
252 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800253 };
254
255 switch@0 {
256 compatible = "mediatek,mt7988";
257 reg = <31>;
258 ports {
259 #address-cells = <1>;
260 #size-cells = <0>;
261
262 port@0 {
263 reg = <0>;
264 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800265 phy-mode = "gmii";
266 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800267 };
268
269 port@1 {
270 reg = <1>;
271 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800272 phy-mode = "gmii";
273 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800274 };
275
276 port@2 {
277 reg = <2>;
278 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800279 phy-mode = "gmii";
280 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800281 };
282
283 port@3 {
284 reg = <3>;
285 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800286 phy-mode = "gmii";
287 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800288 };
289
290 port@6 {
291 reg = <6>;
292 label = "cpu";
293 ethernet = <&gmac0>;
294 phy-mode = "10gbase-kr";
295
296 fixed-link {
297 speed = <10000>;
298 full-duplex;
299 pause;
300 };
301 };
302 };
developera36549c2022-10-04 16:26:13 +0800303
304 mdio {
305 compatible = "mediatek,dsa-slave-mdio";
306 #address-cells = <1>;
307 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800308 pinctrl-names = "default";
309 pinctrl-0 = <&gbe_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800310
311 sphy0: switch_phy0@0 {
312 compatible = "ethernet-phy-id03a2.9481";
313 reg = <0>;
314 phy-mode = "gmii";
315 rext = "efuse";
316 tx_r50 = "efuse";
317 nvmem-cells = <&phy_calibration_p0>;
318 nvmem-cell-names = "phy-cal-data";
319 };
320
321 sphy1: switch_phy1@1 {
322 compatible = "ethernet-phy-id03a2.9481";
323 reg = <1>;
324 phy-mode = "gmii";
325 rext = "efuse";
326 tx_r50 = "efuse";
327 nvmem-cells = <&phy_calibration_p1>;
328 nvmem-cell-names = "phy-cal-data";
329 };
330
331 sphy2: switch_phy2@2 {
332 compatible = "ethernet-phy-id03a2.9481";
333 reg = <2>;
334 phy-mode = "gmii";
335 rext = "efuse";
336 tx_r50 = "efuse";
337 nvmem-cells = <&phy_calibration_p2>;
338 nvmem-cell-names = "phy-cal-data";
339 };
340
341 sphy3: switch_phy3@3 {
342 compatible = "ethernet-phy-id03a2.9481";
343 reg = <3>;
344 phy-mode = "gmii";
345 rext = "efuse";
346 tx_r50 = "efuse";
347 nvmem-cells = <&phy_calibration_p3>;
348 nvmem-cell-names = "phy-cal-data";
349 };
350 };
developer2cdaeb12022-10-04 20:25:05 +0800351 };
352 };
353};
354
355&hnat {
356 mtketh-wan = "eth1";
357 mtketh-lan = "lan";
358 mtketh-lan2 = "eth2";
359 mtketh-max-gmac = <3>;
360 status = "okay";
361};