blob: 3dbbae8f6f0d76157fb2b0525c036ff6a6b9de1f [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>;
429 };
430
431 phy1: ethernet-phy@8 {
432 reg = <8>;
433 compatible = "ethernet-phy-ieee802.3-c45";
434 reset-gpios = <&pio 71 1>;
435 reset-assert-us = <100000>;
436 reset-deassert-us = <221000>;
437 };
438
439 switch@0 {
440 compatible = "mediatek,mt7988";
441 reg = <31>;
442 ports {
443 #address-cells = <1>;
444 #size-cells = <0>;
445
446 port@0 {
447 reg = <0>;
448 label = "lan0";
449 phy-mode = "gmii";
450 phy-handle = <&sphy0>;
451 };
452
453 port@1 {
454 reg = <1>;
455 label = "lan1";
456 phy-mode = "gmii";
457 phy-handle = <&sphy1>;
458 };
459
460 port@2 {
461 reg = <2>;
462 label = "lan2";
463 phy-mode = "gmii";
464 phy-handle = <&sphy2>;
465 };
466
467 port@3 {
468 reg = <3>;
469 label = "lan3";
470 phy-mode = "gmii";
471 phy-handle = <&sphy3>;
472 };
473
474 port@6 {
475 reg = <6>;
476 label = "cpu";
477 ethernet = <&gmac0>;
478 phy-mode = "10gbase-kr";
479
480 fixed-link {
481 speed = <10000>;
482 full-duplex;
483 pause;
484 };
485 };
486 };
487
488 mdio {
489 compatible = "mediatek,dsa-slave-mdio";
490 #address-cells = <1>;
491 #size-cells = <0>;
developer0d09a902023-05-05 17:32:24 +0800492
493 sphy0: switch_phy0@0 {
494 compatible = "ethernet-phy-id03a2.9481";
495 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800496 pinctrl-names = "gbe-led";
497 pinctrl-0 = <&gbe0_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800498 nvmem-cells = <&phy_calibration_p0>;
499 nvmem-cell-names = "phy-cal-data";
500 };
501
502 sphy1: switch_phy1@1 {
503 compatible = "ethernet-phy-id03a2.9481";
504 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800505 pinctrl-names = "gbe-led";
506 pinctrl-0 = <&gbe1_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800507 nvmem-cells = <&phy_calibration_p1>;
508 nvmem-cell-names = "phy-cal-data";
509 };
510
511 sphy2: switch_phy2@2 {
512 compatible = "ethernet-phy-id03a2.9481";
513 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800514 pinctrl-names = "gbe-led";
515 pinctrl-0 = <&gbe2_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800516 nvmem-cells = <&phy_calibration_p2>;
517 nvmem-cell-names = "phy-cal-data";
518 };
519
520 sphy3: switch_phy3@3 {
521 compatible = "ethernet-phy-id03a2.9481";
522 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800523 pinctrl-names = "gbe-led";
524 pinctrl-0 = <&gbe3_led0_pins>;
developer0d09a902023-05-05 17:32:24 +0800525 nvmem-cells = <&phy_calibration_p3>;
526 nvmem-cell-names = "phy-cal-data";
527 };
528 };
529 };
530 };
531};
532
533&hnat {
534 mtketh-wan = "eth1";
535 mtketh-lan = "lan";
536 mtketh-lan2 = "eth2";
537 mtketh-max-gmac = <3>;
538 status = "okay";
539};
540
541&slot0 {
542 mt7996@0,0 {
543 reg = <0x0000 0 0 0 0>;
544 device_type = "pci";
545 mediatek,mtd-eeprom = <&factory 0x0>;
546 };
547};