blob: ed91a18a46e0dd3fe07cca25927ce58b7b606b05 [file] [log] [blame]
developerd4f92102023-09-11 09:26:54 +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 MT7988D DSA 10G SFP SPIM-NAND RFB";
12 compatible = "mediatek,mt7988d-dsa-10g-sfp-spim-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 cpus {
23 /delete-node/ cpu@3;
24 };
25
26 memory {
27 reg = <0 0x40000000 0 0x10000000>;
28 };
29
30 nmbm_spim_nand {
31 compatible = "generic,nmbm";
32
33 #address-cells = <1>;
34 #size-cells = <1>;
35
36 lower-mtd-device = <&spi_nand>;
37 forced-create;
38
39 partitions {
40 compatible = "fixed-partitions";
41 #address-cells = <1>;
42 #size-cells = <1>;
43
44 partition@0 {
45 label = "BL2";
46 reg = <0x00000 0x0100000>;
47 read-only;
48 };
49
50 partition@100000 {
51 label = "u-boot-env";
52 reg = <0x0100000 0x0080000>;
53 };
54
55 factory: partition@180000 {
56 label = "Factory";
57 reg = <0x180000 0x0400000>;
58 };
59
60 partition@580000 {
61 label = "FIP";
62 reg = <0x580000 0x0200000>;
63 };
64
65 partition@780000 {
66 label = "ubi";
67 reg = <0x780000 0x7080000>;
68 };
69 };
70 };
71
72 wsys_adie: wsys_adie@0 {
73 // fpga cases need to manual change adie_id / sku_type for dvt only
74 compatible = "mediatek,rebb-mt7988-adie";
75 adie_id = <7976>;
76 sku_type = <3000>;
77 };
78
79 sfp_esp0: sfp@0 {
80 compatible = "sff,sfp";
81 i2c-bus = <&i2c1>;
82 mod-def0-gpios = <&pio 0 1>;
83 los-gpios = <&pio 30 0>;
84 tx-disable-gpios = <&pio 29 0>;
85 };
86};
87
88&fan {
89 pwms = <&pwm 0 50000 0>;
90 status = "okay";
91};
92
93&pwm {
94 status = "okay";
95};
96
97&uart0 {
98 status = "okay";
99};
100
101&i2c0 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&i2c0_pins>;
104 status = "okay";
105
106 rt5190a_64: rt5190a@64 {
107 compatible = "richtek,rt5190a";
108 reg = <0x64>;
109 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
110 vin2-supply = <&rt5190_buck1>;
111 vin3-supply = <&rt5190_buck1>;
112 vin4-supply = <&rt5190_buck1>;
113
114 regulators {
115 rt5190_buck1: buck1 {
116 regulator-name = "rt5190a-buck1";
117 regulator-min-microvolt = <5090000>;
118 regulator-max-microvolt = <5090000>;
119 regulator-allowed-modes =
120 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
121 regulator-boot-on;
122 };
123 buck2 {
124 regulator-name = "vcore";
125 regulator-min-microvolt = <600000>;
126 regulator-max-microvolt = <1400000>;
127 regulator-boot-on;
128 };
129 buck3 {
130 regulator-name = "proc";
131 regulator-min-microvolt = <600000>;
132 regulator-max-microvolt = <1400000>;
133 regulator-boot-on;
134 };
135 buck4 {
136 regulator-name = "rt5190a-buck4";
137 regulator-min-microvolt = <850000>;
138 regulator-max-microvolt = <850000>;
139 regulator-allowed-modes =
140 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
141 regulator-boot-on;
142 };
143 ldo {
144 regulator-name = "rt5190a-ldo";
145 regulator-min-microvolt = <1200000>;
146 regulator-max-microvolt = <1200000>;
147 regulator-boot-on;
148 };
149 };
150 };
151};
152
153&i2c1 {
154 pinctrl-names = "default";
155 pinctrl-0 = <&i2c1_pins>;
156 status = "okay";
157};
158
159&spi0 {
160 pinctrl-names = "default";
161 pinctrl-0 = <&spi0_flash_pins>;
162 status = "okay";
163
164 spi_nand: spi_nand@0 {
165 #address-cells = <1>;
166 #size-cells = <1>;
167 compatible = "spi-nand";
168 spi-cal-enable;
169 spi-cal-mode = "read-data";
170 spi-cal-datalen = <7>;
171 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
172 spi-cal-addrlen = <5>;
173 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
174 reg = <0>;
175 spi-max-frequency = <52000000>;
176 spi-tx-bus-width = <4>;
177 spi-rx-bus-width = <4>;
178 };
179};
180
181&spi1 {
182 pinctrl-names = "default";
183 /* pin shared with snfi */
184 pinctrl-0 = <&spic_pins>;
185 status = "disabled";
186
187 proslic_spi: proslic_spi@0 {
188 compatible = "silabs,proslic_spi";
189 reg = <0>;
190 spi-max-frequency = <10000000>;
191 spi-cpha = <1>;
192 spi-cpol = <1>;
193 channel_count = <1>;
194 debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
195 reset_gpio = <&pio 54 0>;
196 ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
197 };
198};
199
200&pcie0 {
201 pinctrl-names = "default";
202 pinctrl-0 = <&pcie0_pins>;
203 status = "okay";
204};
205
206&pcie1 {
207 pinctrl-names = "default";
208 pinctrl-0 = <&pcie1_pins>;
209 status = "disabled";
210};
211
212&pcie2 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&pcie2_pins>;
215 status = "disabled";
216};
217
218&pcie3 {
219 pinctrl-names = "default";
220 pinctrl-0 = <&pcie3_pins>;
221 status = "okay";
222};
223
224&pio {
225 gbe0_led0_pins: gbe0-pins {
226 mux {
227 function = "led";
228 groups = "gbe0_led0";
229 };
230 };
231
232 gbe1_led0_pins: gbe1-pins {
233 mux {
234 function = "led";
235 groups = "gbe1_led0";
236 };
237 };
238
239 gbe2_led0_pins: gbe2-pins {
240 mux {
241 function = "led";
242 groups = "gbe2_led0";
243 };
244 };
245
246 gbe3_led0_pins: gbe3-pins {
247 mux {
248 function = "led";
249 groups = "gbe3_led0";
250 };
251 };
252
253 i2p5gbe_led0_pins: 2p5gbe-pins {
254 mux {
255 function = "led";
256 groups = "2p5gbe_led0";
257 };
258 };
259
260 i2c0_pins: i2c0-pins-g0 {
261 mux {
262 function = "i2c";
263 groups = "i2c0_1";
264 };
265 };
266
267 i2c1_pins: i2c1-pins-g0 {
268 mux {
269 function = "i2c";
270 groups = "i2c1_sfp";
271 };
272
273 conf {
274 groups = "i2c1_sfp";
275 drive-strength = <MTK_DRIVE_8mA>;
276 };
277 };
278
279 pcie0_pins: pcie0-pins {
280 mux {
281 function = "pcie";
282 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
283 "pcie_wake_n0_0";
284 };
285 };
286
287 pcie1_pins: pcie1-pins {
288 mux {
289 function = "pcie";
290 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
291 "pcie_wake_n1_0";
292 };
293 };
294
295 pcie2_pins: pcie2-pins {
296 mux {
297 function = "pcie";
298 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
299 "pcie_wake_n2_0";
300 };
301 };
302
303 pcie3_pins: pcie3-pins {
304 mux {
305 function = "pcie";
306 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
307 "pcie_wake_n3_0";
308 };
309 };
310
311 spi0_flash_pins: spi0-pins {
312 mux {
313 function = "spi";
314 groups = "spi0", "spi0_wp_hold";
315 };
316 };
317
318 spic_pins: spi1-pins {
319 mux {
320 function = "spi";
321 groups = "spi1";
322 };
323 };
324};
325
326&watchdog {
327 status = "disabled";
328};
329
330&eth {
331 status = "okay";
332
333 gmac0: mac@0 {
334 compatible = "mediatek,eth-mac";
335 reg = <0>;
336 mac-type = "xgdm";
337 phy-mode = "10gbase-kr";
338
339 fixed-link {
340 speed = <10000>;
341 full-duplex;
342 pause;
343 };
344 };
345
346 gmac1: mac@1 {
347 compatible = "mediatek,eth-mac";
348 reg = <1>;
349 mac-type = "xgdm";
350 phy-mode = "xgmii";
351 phy-handle = <&phy0>;
352 };
353
354 gmac2: mac@2 {
355 compatible = "mediatek,eth-mac";
356 reg = <2>;
357 mac-type = "xgdm";
358 phy-mode = "10gbase-kr";
359 managed = "in-band-status";
360 sfp = <&sfp_esp0>;
361 };
362
363 mdio: mdio-bus {
364 #address-cells = <1>;
365 #size-cells = <0>;
366
367 phy0: ethernet-phy@0 {
368 pinctrl-names = "i2p5gbe-led";
369 pinctrl-0 = <&i2p5gbe_led0_pins>;
370 reg = <15>;
371 compatible = "ethernet-phy-ieee802.3-c45";
372 phy-mode = "xgmii";
373 };
374
375 switch@0 {
376 compatible = "mediatek,mt7988";
377 reg = <31>;
378 ports {
379 #address-cells = <1>;
380 #size-cells = <0>;
381
382 port@0 {
383 reg = <0>;
384 label = "lan0";
385 phy-mode = "gmii";
386 phy-handle = <&sphy0>;
387 };
388
389 port@1 {
390 reg = <1>;
391 label = "lan1";
392 phy-mode = "gmii";
393 phy-handle = <&sphy1>;
394 };
395
396 port@2 {
397 reg = <2>;
398 label = "lan2";
399 phy-mode = "gmii";
400 phy-handle = <&sphy2>;
401 };
402
403 port@3 {
404 reg = <3>;
405 label = "lan3";
406 phy-mode = "gmii";
407 phy-handle = <&sphy3>;
408 };
409
410 port@6 {
411 reg = <6>;
412 label = "cpu";
413 ethernet = <&gmac0>;
414 phy-mode = "10gbase-kr";
415
416 fixed-link {
417 speed = <10000>;
418 full-duplex;
419 pause;
420 };
421 };
422 };
423
424 mdio {
425 compatible = "mediatek,dsa-slave-mdio";
426 #address-cells = <1>;
427 #size-cells = <0>;
428
429 sphy0: switch_phy0@0 {
430 compatible = "ethernet-phy-id03a2.9481";
431 reg = <0>;
432 pinctrl-names = "gbe-led";
433 pinctrl-0 = <&gbe0_led0_pins>;
434 nvmem-cells = <&phy_calibration_p0>;
435 nvmem-cell-names = "phy-cal-data";
436 };
437
438 sphy1: switch_phy1@1 {
439 compatible = "ethernet-phy-id03a2.9481";
440 reg = <1>;
441 pinctrl-names = "gbe-led";
442 pinctrl-0 = <&gbe1_led0_pins>;
443 nvmem-cells = <&phy_calibration_p1>;
444 nvmem-cell-names = "phy-cal-data";
445 };
446
447 sphy2: switch_phy2@2 {
448 compatible = "ethernet-phy-id03a2.9481";
449 reg = <2>;
450 pinctrl-names = "gbe-led";
451 pinctrl-0 = <&gbe2_led0_pins>;
452 nvmem-cells = <&phy_calibration_p2>;
453 nvmem-cell-names = "phy-cal-data";
454 };
455
456 sphy3: switch_phy3@3 {
457 compatible = "ethernet-phy-id03a2.9481";
458 reg = <3>;
459 pinctrl-names = "gbe-led";
460 pinctrl-0 = <&gbe3_led0_pins>;
461 nvmem-cells = <&phy_calibration_p3>;
462 nvmem-cell-names = "phy-cal-data";
463 };
464 };
465 };
466 };
467};
468
469&hnat {
470 mtketh-wan = "eth1";
471 mtketh-lan = "lan";
472 mtketh-lan2 = "eth2";
473 mtketh-max-gmac = <3>;
474 status = "okay";
475};