blob: cbc7ff02907bfba98588d487679bf163e4d3dc3c [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/ {
11 model = "MediaTek MT7988C DSA 10G SNFI-NAND RFB";
12 compatible = "mediatek,mt7988c-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 = "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
134 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";
developerc54ce9d2023-01-03 13:30:49 +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 {
194 pinctrl-names = "default";
195 pinctrl-0 = <&mdio0_pins>;
196 status = "okay";
197
198 gmac0: mac@0 {
199 compatible = "mediatek,eth-mac";
200 reg = <0>;
201 mac-type = "xgdm";
202 phy-mode = "10gbase-kr";
203
204 fixed-link {
205 speed = <2500>;
206 full-duplex;
207 pause;
208 };
209 };
210
211 gmac1: mac@1 {
212 compatible = "mediatek,eth-mac";
213 reg = <1>;
214 mac-type = "xgdm";
215 phy-mode = "10gbase-kr";
216 phy-handle = <&phy0>;
217 };
218
219 mdio: mdio-bus {
220 #address-cells = <1>;
221 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800222 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800223
224 phy0: ethernet-phy@0 {
225 reg = <0>;
226 compatible = "ethernet-phy-ieee802.3-c45";
227 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800228 reset-assert-us = <100000>;
229 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800230 };
231
232 switch@0 {
233 compatible = "mediatek,mt7988";
234 reg = <31>;
235 ports {
236 #address-cells = <1>;
237 #size-cells = <0>;
238
239 port@0 {
240 reg = <0>;
241 label = "lan0";
242 phy-mode = "gmii";
243 phy-handle = <&sphy0>;
244 };
245
246 port@1 {
247 reg = <1>;
248 label = "lan1";
249 phy-mode = "gmii";
250 phy-handle = <&sphy1>;
251 };
252
253 port@2 {
254 reg = <2>;
255 label = "lan2";
256 phy-mode = "gmii";
257 phy-handle = <&sphy2>;
258 };
259
260 port@3 {
261 reg = <3>;
262 label = "lan3";
263 phy-mode = "gmii";
264 phy-handle = <&sphy3>;
265 };
266
267 port@6 {
268 reg = <6>;
269 label = "cpu";
270 ethernet = <&gmac0>;
271 phy-mode = "10gbase-kr";
272
273 fixed-link {
274 speed = <10000>;
275 full-duplex;
276 pause;
277 };
278 };
279 };
280
281 mdio {
282 compatible = "mediatek,dsa-slave-mdio";
283 #address-cells = <1>;
284 #size-cells = <0>;
285
286 sphy0: switch_phy0@0 {
287 compatible = "ethernet-phy-id03a2.9481";
288 reg = <0>;
289 phy-mode = "gmii";
290 rext = "efuse";
291 tx_r50 = "efuse";
292 nvmem-cells = <&phy_calibration_p0>;
293 nvmem-cell-names = "phy-cal-data";
294 };
295
296 sphy1: switch_phy1@1 {
297 compatible = "ethernet-phy-id03a2.9481";
298 reg = <1>;
299 phy-mode = "gmii";
300 rext = "efuse";
301 tx_r50 = "efuse";
302 nvmem-cells = <&phy_calibration_p1>;
303 nvmem-cell-names = "phy-cal-data";
304 };
305
306 sphy2: switch_phy2@2 {
307 compatible = "ethernet-phy-id03a2.9481";
308 reg = <2>;
309 phy-mode = "gmii";
310 rext = "efuse";
311 tx_r50 = "efuse";
312 nvmem-cells = <&phy_calibration_p2>;
313 nvmem-cell-names = "phy-cal-data";
314 };
315
316 sphy3: switch_phy3@3 {
317 compatible = "ethernet-phy-id03a2.9481";
318 reg = <3>;
319 phy-mode = "gmii";
320 rext = "efuse";
321 tx_r50 = "efuse";
322 nvmem-cells = <&phy_calibration_p3>;
323 nvmem-cell-names = "phy-cal-data";
324 };
325 };
326 };
327 };
328};
329
330&hnat {
331 mtketh-wan = "eth1";
332 mtketh-lan = "lan";
333 mtketh-lan2 = "eth2";
334 mtketh-max-gmac = <3>;
335 status = "okay";
336};