blob: 9e2e9a99eabb96e7f9aa63168d44914f9448bf07 [file] [log] [blame]
developer0d09a902023-05-05 17:32:24 +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 as 88D DSA 10G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-88d-10g-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 sound_wm8960 {
80 compatible = "mediatek,mt79xx-wm8960-machine";
81 mediatek,platform = <&afe>;
82 audio-routing = "Headphone", "HP_L",
83 "Headphone", "HP_R",
84 "LINPUT1", "AMIC",
85 "RINPUT1", "AMIC";
86 mediatek,audio-codec = <&wm8960>;
87 status = "disabled";
88 };
89
90 sound_si3218x {
91 compatible = "mediatek,mt79xx-si3218x-machine";
92 mediatek,platform = <&afe>;
93 mediatek,ext-codec = <&proslic_spi>;
94 status = "disabled";
95 };
96};
97
98&fan {
99 pwms = <&pwm 0 50000 0>;
100 status = "okay";
101};
102
103&afe {
104 pinctrl-names = "default";
105 pinctrl-0 = <&pcm_pins>;
106 status = "okay";
107};
108
109&pwm {
110 status = "okay";
111};
112
113&uart0 {
114 status = "okay";
115};
116
117&uart1 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&uart1_pins>;
120 status = "okay";
121};
122
123&i2c0 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&i2c0_pins>;
126 status = "okay";
127
128 rt5190a_64: rt5190a@64 {
129 compatible = "richtek,rt5190a";
130 reg = <0x64>;
131 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
132 vin2-supply = <&rt5190_buck1>;
133 vin3-supply = <&rt5190_buck1>;
134 vin4-supply = <&rt5190_buck1>;
135
136 regulators {
137 rt5190_buck1: buck1 {
138 regulator-name = "rt5190a-buck1";
139 regulator-min-microvolt = <5090000>;
140 regulator-max-microvolt = <5090000>;
141 regulator-allowed-modes =
142 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
143 regulator-boot-on;
144 };
145 buck2 {
146 regulator-name = "vcore";
147 regulator-min-microvolt = <600000>;
148 regulator-max-microvolt = <1400000>;
149 regulator-boot-on;
150 };
151 buck3 {
152 regulator-name = "proc";
153 regulator-min-microvolt = <600000>;
154 regulator-max-microvolt = <1400000>;
155 regulator-boot-on;
156 };
157 buck4 {
158 regulator-name = "rt5190a-buck4";
159 regulator-min-microvolt = <850000>;
160 regulator-max-microvolt = <850000>;
161 regulator-allowed-modes =
162 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
163 regulator-boot-on;
164 };
165 ldo {
166 regulator-name = "rt5190a-ldo";
167 regulator-min-microvolt = <1200000>;
168 regulator-max-microvolt = <1200000>;
169 regulator-boot-on;
170 };
171 };
172 };
173};
174
175&i2c1 {
176 pinctrl-names = "default";
177 pinctrl-0 = <&i2c1_pins>;
178 status = "okay";
179
180 wm8960: wm8960@1a {
181 compatible = "wlf,wm8960";
182 reg = <0x1a>;
183 };
184
185 dps368: dps368@77 {
186 compatible = "infineon,dps310";
187 reg = <0x77>;
188 };
189};
190
191&spi0 {
192 pinctrl-names = "default";
193 pinctrl-0 = <&spi0_flash_pins>;
194 status = "okay";
195
196 spi_nand: spi_nand@0 {
197 #address-cells = <1>;
198 #size-cells = <1>;
199 compatible = "spi-nand";
200 spi-cal-enable;
201 spi-cal-mode = "read-data";
202 spi-cal-datalen = <7>;
203 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
204 spi-cal-addrlen = <5>;
205 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
206 reg = <0>;
207 spi-max-frequency = <52000000>;
208 spi-tx-buswidth = <4>;
209 spi-rx-buswidth = <4>;
210 };
211};
212
213&spi1 {
214 pinctrl-names = "default";
215 /* pin shared with snfi */
216 pinctrl-0 = <&spic_pins>;
217 status = "disabled";
218
219 proslic_spi: proslic_spi@0 {
220 compatible = "silabs,proslic_spi";
221 reg = <0>;
222 spi-max-frequency = <10000000>;
223 spi-cpha = <1>;
224 spi-cpol = <1>;
225 channel_count = <1>;
226 debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
227 reset_gpio = <&pio 54 0>;
228 ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
229 };
230};
231
232&pcie0 {
233 pinctrl-names = "default";
234 pinctrl-0 = <&pcie0_pins>;
235 status = "okay";
236};
237
238&pcie1 {
239 pinctrl-names = "default";
240 pinctrl-0 = <&pcie1_pins>;
241 max-link-width = <1>;
242 status = "okay";
243};
244
245&pcie2 {
246 pinctrl-names = "default";
247 pinctrl-0 = <&pcie2_pins>;
248 status = "disabled";
249};
250
251&pcie3 {
252 pinctrl-names = "default";
253 pinctrl-0 = <&pcie3_pins>;
254 status = "okay";
255};
256
257&pio {
258 mdio0_pins: mdio0-pins {
259 mux {
260 function = "mdio";
261 groups = "mdc_mdio0";
262 };
263
264 conf {
265 groups = "mdc_mdio0";
266 drive-strength = <MTK_DRIVE_8mA>;
267 };
268 };
269
developercaca1df2023-05-17 10:54:49 +0800270 gbe0_led0_pins: gbe0-pins {
developer0d09a902023-05-05 17:32:24 +0800271 mux {
272 function = "led";
developercaca1df2023-05-17 10:54:49 +0800273 groups = "gbe0_led0";
developer0d09a902023-05-05 17:32:24 +0800274 };
275 };
276
developercaca1df2023-05-17 10:54:49 +0800277 gbe1_led0_pins: gbe1-pins {
278 mux {
279 function = "led";
280 groups = "gbe1_led0";
281 };
282 };
283
284 gbe2_led0_pins: gbe2-pins {
285 mux {
286 function = "led";
287 groups = "gbe2_led0";
288 };
289 };
290
291 gbe3_led0_pins: gbe3-pins {
292 mux {
293 function = "led";
294 groups = "gbe3_led0";
295 };
296 };
297
developer0d09a902023-05-05 17:32:24 +0800298 i2c0_pins: i2c0-pins-g0 {
299 mux {
300 function = "i2c";
301 groups = "i2c0_1";
302 };
303 };
304
305 pcie0_pins: pcie0-pins {
306 mux {
307 function = "pcie";
308 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
309 "pcie_wake_n0_0";
310 };
311 };
312
313 pcie1_pins: pcie1-pins {
314 mux {
315 function = "pcie";
316 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
317 "pcie_wake_n1_0";
318 };
319 };
320
321 pcie2_pins: pcie2-pins {
322 mux {
323 function = "pcie";
324 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
325 "pcie_wake_n2_0";
326 };
327 };
328
329 pcie3_pins: pcie3-pins {
330 mux {
331 function = "pcie";
332 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
333 "pcie_wake_n3_0";
334 };
335 };
336
337 spi0_flash_pins: spi0-pins {
338 mux {
339 function = "spi";
340 groups = "spi0", "spi0_wp_hold";
341 };
342 };
343
344 spic_pins: spi1-pins {
345 mux {
346 function = "spi";
347 groups = "spi1";
348 };
349 };
350
351 i2c1_pins: i2c1-pins {
352 mux {
353 function = "i2c";
354 groups = "i2c1_0";
355 };
356 };
357
358 i2s_pins: i2s-pins {
359 mux {
360 function = "audio";
361 groups = "i2s";
362 };
363 };
364
365 pcm_pins: pcm-pins {
366 mux {
367 function = "audio";
368 groups = "pcm";
369 };
370 };
371
372 uart1_pins: uart1-pins {
373 mux {
374 function = "uart";
375 groups = "uart1_2";
376 };
377 };
378};
379
380&watchdog {
381 status = "disabled";
382};
383
384&eth {
385 pinctrl-names = "default";
386 pinctrl-0 = <&mdio0_pins>;
387 status = "okay";
388
389 gmac0: mac@0 {
390 compatible = "mediatek,eth-mac";
391 reg = <0>;
392 mac-type = "xgdm";
393 phy-mode = "10gbase-kr";
394
395 fixed-link {
396 speed = <10000>;
397 full-duplex;
398 pause;
399 };
400 };
401
402 gmac1: mac@1 {
403 compatible = "mediatek,eth-mac";
404 reg = <1>;
405 mac-type = "xgdm";
406 phy-mode = "usxgmii";
407 phy-handle = <&phy0>;
408 };
409
410 gmac2: mac@2 {
411 compatible = "mediatek,eth-mac";
412 reg = <2>;
413 mac-type = "xgdm";
414 phy-mode = "usxgmii";
415 phy-handle = <&phy1>;
416 };
417
418 mdio: mdio-bus {
419 #address-cells = <1>;
420 #size-cells = <0>;
421 clock-frequency = <10500000>;
422
423 phy0: ethernet-phy@0 {
424 reg = <0>;
425 compatible = "ethernet-phy-ieee802.3-c45";
426 reset-gpios = <&pio 72 1>;
427 reset-assert-us = <100000>;
428 reset-deassert-us = <221000>;
developer301205c2023-05-24 15:39:32 +0800429 mdi-reversal = /bits/ 16 <1>;
developer0d09a902023-05-05 17:32:24 +0800430 };
431
432 phy1: ethernet-phy@8 {
433 reg = <8>;
434 compatible = "ethernet-phy-ieee802.3-c45";
435 reset-gpios = <&pio 71 1>;
436 reset-assert-us = <100000>;
437 reset-deassert-us = <221000>;
developer301205c2023-05-24 15:39:32 +0800438 mdi-reversal = /bits/ 16 <1>;
developer0d09a902023-05-05 17:32:24 +0800439 };
440
441 switch@0 {
442 compatible = "mediatek,mt7988";
443 reg = <31>;
444 ports {
445 #address-cells = <1>;
446 #size-cells = <0>;
447
448 port@0 {
449 reg = <0>;
450 label = "lan0";
451 phy-mode = "gmii";
452 phy-handle = <&sphy0>;
453 };
454
455 port@1 {
456 reg = <1>;
457 label = "lan1";
458 phy-mode = "gmii";
459 phy-handle = <&sphy1>;
460 };
461
462 port@2 {
463 reg = <2>;
464 label = "lan2";
465 phy-mode = "gmii";
466 phy-handle = <&sphy2>;
467 };
468
469 port@3 {
470 reg = <3>;
471 label = "lan3";
472 phy-mode = "gmii";
473 phy-handle = <&sphy3>;
474 };
475
476 port@6 {
477 reg = <6>;
478 label = "cpu";
479 ethernet = <&gmac0>;
480 phy-mode = "10gbase-kr";
481
482 fixed-link {
483 speed = <10000>;
484 full-duplex;
485 pause;
486 };
487 };
488 };
489
490 mdio {
491 compatible = "mediatek,dsa-slave-mdio";
492 #address-cells = <1>;
493 #size-cells = <0>;
developer0d09a902023-05-05 17:32:24 +0800494
495 sphy0: switch_phy0@0 {
496 compatible = "ethernet-phy-id03a2.9481";
497 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800498 pinctrl-names = "gbe-led";
499 pinctrl-0 = <&gbe0_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800500 nvmem-cells = <&phy_calibration_p0>;
501 nvmem-cell-names = "phy-cal-data";
502 };
503
504 sphy1: switch_phy1@1 {
505 compatible = "ethernet-phy-id03a2.9481";
506 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800507 pinctrl-names = "gbe-led";
508 pinctrl-0 = <&gbe1_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800509 nvmem-cells = <&phy_calibration_p1>;
510 nvmem-cell-names = "phy-cal-data";
511 };
512
513 sphy2: switch_phy2@2 {
514 compatible = "ethernet-phy-id03a2.9481";
515 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800516 pinctrl-names = "gbe-led";
517 pinctrl-0 = <&gbe2_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800518 nvmem-cells = <&phy_calibration_p2>;
519 nvmem-cell-names = "phy-cal-data";
520 };
521
522 sphy3: switch_phy3@3 {
523 compatible = "ethernet-phy-id03a2.9481";
524 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800525 pinctrl-names = "gbe-led";
526 pinctrl-0 = <&gbe3_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800527 nvmem-cells = <&phy_calibration_p3>;
528 nvmem-cell-names = "phy-cal-data";
529 };
530 };
531 };
532 };
533};
534
535&hnat {
536 mtketh-wan = "eth1";
537 mtketh-lan = "lan";
538 mtketh-lan2 = "eth2";
539 mtketh-max-gmac = <3>;
540 status = "okay";
541};
542
543&slot0 {
544 mt7996@0,0 {
545 reg = <0x0000 0 0 0 0>;
546 device_type = "pci";
547 mediatek,mtd-eeprom = <&factory 0x0>;
548 };
549};