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