blob: 8ebcbaf9a3c21d72308c9e93e5dd9a84ad9d817e [file] [log] [blame]
developerbe718682023-05-12 18:09:06 +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/;
developer722ab5f2024-02-22 11:01:46 +08008#include <dt-bindings/gpio/gpio.h>
developerbe718682023-05-12 18:09:06 +08009#include "mt7988.dtsi"
10
11/ {
12 model = "MediaTek MT7988A as 88D DSA 10G SPIM-NAND RFB";
13 compatible = "mediatek,mt7988a-88d-10g-spim-snand",
14 /* Reserve this for DVFS if creating new dts */
15 "mediatek,mt7988";
16
17 chosen {
18 bootargs = "console=ttyS0,115200n1 loglevel=8 \
19 earlycon=uart8250,mmio32,0x11000000 \
20 pci=pcie_bus_perf";
21 };
22
23 cpus {
24 /delete-node/ cpu@3;
25 };
26
27 memory {
28 reg = <0 0x40000000 0 0x10000000>;
29 };
30
31 nmbm_spim_nand {
32 compatible = "generic,nmbm";
33
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 lower-mtd-device = <&spi_nand>;
38 forced-create;
39
40 partitions {
41 compatible = "fixed-partitions";
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 partition@0 {
46 label = "BL2";
47 reg = <0x00000 0x0100000>;
48 read-only;
49 };
50
51 partition@100000 {
52 label = "u-boot-env";
53 reg = <0x0100000 0x0080000>;
54 };
55
56 factory: partition@180000 {
57 label = "Factory";
58 reg = <0x180000 0x0400000>;
59 };
60
61 partition@580000 {
62 label = "FIP";
63 reg = <0x580000 0x0200000>;
64 };
65
66 partition@780000 {
67 label = "ubi";
68 reg = <0x780000 0x7080000>;
69 };
70 };
71 };
72
73 wsys_adie: wsys_adie@0 {
74 // fpga cases need to manual change adie_id / sku_type for dvt only
75 compatible = "mediatek,rebb-mt7988-adie";
76 adie_id = <7976>;
77 sku_type = <3000>;
78 };
79
80 sound_wm8960 {
developer7cf584b2023-12-21 13:04:36 +080081 compatible = "mediatek,mt7986-wm8960-sound";
developerbe718682023-05-12 18:09:06 +080082 audio-routing = "Headphone", "HP_L",
83 "Headphone", "HP_R",
84 "LINPUT1", "AMIC",
85 "RINPUT1", "AMIC";
developer7cf584b2023-12-21 13:04:36 +080086
developerbe718682023-05-12 18:09:06 +080087 status = "disabled";
developer7cf584b2023-12-21 13:04:36 +080088
89 platform {
90 sound-dai = <&afe>;
91 };
92
93 codec {
94 sound-dai = <&wm8960>;
95 };
developerbe718682023-05-12 18:09:06 +080096 };
97
98 sound_si3218x {
developer7cf584b2023-12-21 13:04:36 +080099 compatible = "mediatek,mt7986-si3218x-sound";
developerbe718682023-05-12 18:09:06 +0800100 status = "disabled";
developer7cf584b2023-12-21 13:04:36 +0800101
102 platform {
103 sound-dai = <&afe>;
104 };
105
106 codec {
107 sound-dai = <&proslic_spi>;
108 };
developerbe718682023-05-12 18:09:06 +0800109 };
110};
111
112&fan {
developerfce0d152024-01-11 13:37:13 +0800113 pwms = <&pwm 0 50000>;
developerbe718682023-05-12 18:09:06 +0800114 status = "okay";
115};
116
117&afe {
118 pinctrl-names = "default";
119 pinctrl-0 = <&pcm_pins>;
120 status = "okay";
121};
122
123&pwm {
124 status = "okay";
125};
126
127&uart0 {
128 status = "okay";
129};
130
131&uart1 {
132 pinctrl-names = "default";
133 pinctrl-0 = <&uart1_pins>;
134 status = "okay";
135};
136
137&i2c0 {
138 pinctrl-names = "default";
139 pinctrl-0 = <&i2c0_pins>;
140 status = "okay";
141
142 rt5190a_64: rt5190a@64 {
143 compatible = "richtek,rt5190a";
144 reg = <0x64>;
145 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
146 vin2-supply = <&rt5190_buck1>;
147 vin3-supply = <&rt5190_buck1>;
148 vin4-supply = <&rt5190_buck1>;
149
150 regulators {
151 rt5190_buck1: buck1 {
152 regulator-name = "rt5190a-buck1";
153 regulator-min-microvolt = <5090000>;
154 regulator-max-microvolt = <5090000>;
155 regulator-allowed-modes =
156 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
157 regulator-boot-on;
158 };
159 buck2 {
160 regulator-name = "vcore";
161 regulator-min-microvolt = <600000>;
162 regulator-max-microvolt = <1400000>;
163 regulator-boot-on;
164 };
165 buck3 {
166 regulator-name = "proc";
167 regulator-min-microvolt = <600000>;
168 regulator-max-microvolt = <1400000>;
169 regulator-boot-on;
170 };
171 buck4 {
172 regulator-name = "rt5190a-buck4";
173 regulator-min-microvolt = <850000>;
174 regulator-max-microvolt = <850000>;
175 regulator-allowed-modes =
176 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
177 regulator-boot-on;
178 };
179 ldo {
180 regulator-name = "rt5190a-ldo";
181 regulator-min-microvolt = <1200000>;
182 regulator-max-microvolt = <1200000>;
183 regulator-boot-on;
184 };
185 };
186 };
187};
188
189&i2c1 {
190 pinctrl-names = "default";
191 pinctrl-0 = <&i2c1_pins>;
192 status = "okay";
193
194 wm8960: wm8960@1a {
195 compatible = "wlf,wm8960";
196 reg = <0x1a>;
197 };
198
developera05cf4c2023-10-27 14:35:41 +0800199 zts8032: zts8032@77 {
200 compatible = "zilltek,zts8032";
201 reg = <0x76>;
202 };
203
developerbe718682023-05-12 18:09:06 +0800204 dps368: dps368@77 {
205 compatible = "infineon,dps310";
206 reg = <0x77>;
207 };
developera05cf4c2023-10-27 14:35:41 +0800208
209 rtq6056: rtq6056@40 {
210 compatible = "richtek,rtq6056";
211 reg = <0x40>;
212 shunt-resistor-micro-ohms = <10000>;
213 #io-channel-cells = <1>;
214 };
developerbe718682023-05-12 18:09:06 +0800215};
216
217&spi0 {
218 pinctrl-names = "default";
219 pinctrl-0 = <&spi0_flash_pins>;
220 status = "okay";
221
222 spi_nand: spi_nand@0 {
223 #address-cells = <1>;
224 #size-cells = <1>;
225 compatible = "spi-nand";
226 spi-cal-enable;
227 spi-cal-mode = "read-data";
228 spi-cal-datalen = <7>;
229 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
230 spi-cal-addrlen = <5>;
231 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
232 reg = <0>;
233 spi-max-frequency = <52000000>;
234 spi-tx-buswidth = <4>;
235 spi-rx-buswidth = <4>;
236 };
237};
238
239&spi1 {
240 pinctrl-names = "default";
241 /* pin shared with snfi */
242 pinctrl-0 = <&spic_pins>;
243 status = "disabled";
244
245 proslic_spi: proslic_spi@0 {
246 compatible = "silabs,proslic_spi";
247 reg = <0>;
248 spi-max-frequency = <10000000>;
249 spi-cpha = <1>;
250 spi-cpol = <1>;
251 channel_count = <1>;
252 debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
253 reset_gpio = <&pio 54 0>;
254 ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
255 };
256};
257
258&pcie0 {
259 pinctrl-names = "default";
260 pinctrl-0 = <&pcie0_pins>;
developer722ab5f2024-02-22 11:01:46 +0800261 wifi-reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
262 wifi-reset-msleep = <100>;
developerbe718682023-05-12 18:09:06 +0800263 status = "okay";
264};
265
266&pcie1 {
267 pinctrl-names = "default";
268 pinctrl-0 = <&pcie1_pins>;
269 max-link-width = <1>;
270 status = "okay";
271};
272
273&pcie2 {
274 pinctrl-names = "default";
275 pinctrl-0 = <&pcie2_pins>;
276 status = "disabled";
277};
278
279&pcie3 {
280 pinctrl-names = "default";
281 pinctrl-0 = <&pcie3_pins>;
282 status = "okay";
283};
284
285&pio {
286 mdio0_pins: mdio0-pins {
287 mux {
288 function = "mdio";
289 groups = "mdc_mdio0";
290 };
291
292 conf {
293 groups = "mdc_mdio0";
developeredbe69e2023-06-08 11:08:46 +0800294 drive-strength = <MTK_DRIVE_10mA>;
developerbe718682023-05-12 18:09:06 +0800295 };
296 };
297
developer4af681c2023-05-22 14:34:27 +0800298 gbe0_led0_pins: gbe0-pins {
developerbe718682023-05-12 18:09:06 +0800299 mux {
300 function = "led";
developer4af681c2023-05-22 14:34:27 +0800301 groups = "gbe0_led0";
developerbe718682023-05-12 18:09:06 +0800302 };
303 };
304
developer4af681c2023-05-22 14:34:27 +0800305 gbe1_led0_pins: gbe1-pins {
306 mux {
307 function = "led";
308 groups = "gbe1_led0";
309 };
310 };
311
312 gbe2_led0_pins: gbe2-pins {
313 mux {
314 function = "led";
315 groups = "gbe2_led0";
316 };
317 };
318
319 gbe3_led0_pins: gbe3-pins {
320 mux {
321 function = "led";
322 groups = "gbe3_led0";
323 };
324 };
325
developerbe718682023-05-12 18:09:06 +0800326 i2c0_pins: i2c0-pins-g0 {
327 mux {
328 function = "i2c";
329 groups = "i2c0_1";
330 };
331 };
332
333 pcie0_pins: pcie0-pins {
334 mux {
335 function = "pcie";
developer722ab5f2024-02-22 11:01:46 +0800336 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0";
developerbe718682023-05-12 18:09:06 +0800337 };
338 };
339
340 pcie1_pins: pcie1-pins {
341 mux {
342 function = "pcie";
343 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
344 "pcie_wake_n1_0";
345 };
346 };
347
348 pcie2_pins: pcie2-pins {
349 mux {
350 function = "pcie";
351 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
352 "pcie_wake_n2_0";
353 };
354 };
355
356 pcie3_pins: pcie3-pins {
357 mux {
358 function = "pcie";
359 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
360 "pcie_wake_n3_0";
361 };
362 };
363
364 spi0_flash_pins: spi0-pins {
365 mux {
366 function = "spi";
367 groups = "spi0", "spi0_wp_hold";
368 };
369 };
370
371 spic_pins: spi1-pins {
372 mux {
373 function = "spi";
374 groups = "spi1";
375 };
376 };
377
378 i2c1_pins: i2c1-pins {
379 mux {
380 function = "i2c";
381 groups = "i2c1_0";
382 };
383 };
384
385 i2s_pins: i2s-pins {
386 mux {
387 function = "audio";
388 groups = "i2s";
389 };
390 };
391
392 pcm_pins: pcm-pins {
393 mux {
394 function = "audio";
395 groups = "pcm";
396 };
397 };
398
399 uart1_pins: uart1-pins {
400 mux {
401 function = "uart";
402 groups = "uart1_2";
403 };
404 };
405};
406
407&watchdog {
408 status = "disabled";
409};
410
411&eth {
412 pinctrl-names = "default";
413 pinctrl-0 = <&mdio0_pins>;
414 status = "okay";
415
416 gmac0: mac@0 {
417 compatible = "mediatek,eth-mac";
418 reg = <0>;
419 mac-type = "xgdm";
420 phy-mode = "10gbase-kr";
421
422 fixed-link {
423 speed = <10000>;
424 full-duplex;
425 pause;
426 };
427 };
428
429 gmac1: mac@1 {
430 compatible = "mediatek,eth-mac";
431 reg = <1>;
432 mac-type = "xgdm";
433 phy-mode = "usxgmii";
434 phy-handle = <&phy0>;
435 };
436
437 gmac2: mac@2 {
438 compatible = "mediatek,eth-mac";
439 reg = <2>;
440 mac-type = "xgdm";
441 phy-mode = "usxgmii";
442 phy-handle = <&phy1>;
443 };
444
445 mdio: mdio-bus {
446 #address-cells = <1>;
447 #size-cells = <0>;
448 clock-frequency = <10500000>;
449
450 phy0: ethernet-phy@0 {
451 reg = <0>;
452 compatible = "ethernet-phy-ieee802.3-c45";
453 reset-gpios = <&pio 72 1>;
454 reset-assert-us = <100000>;
455 reset-deassert-us = <221000>;
developer4e17c282023-05-30 10:57:24 +0800456 mdi-reversal = /bits/ 16 <1>;
developerbe718682023-05-12 18:09:06 +0800457 };
458
459 phy1: ethernet-phy@8 {
460 reg = <8>;
461 compatible = "ethernet-phy-ieee802.3-c45";
462 reset-gpios = <&pio 71 1>;
463 reset-assert-us = <100000>;
464 reset-deassert-us = <221000>;
developer4e17c282023-05-30 10:57:24 +0800465 mdi-reversal = /bits/ 16 <1>;
developerbe718682023-05-12 18:09:06 +0800466 };
467
468 switch@0 {
469 compatible = "mediatek,mt7988";
470 reg = <31>;
471 ports {
472 #address-cells = <1>;
473 #size-cells = <0>;
474
475 port@0 {
476 reg = <0>;
477 label = "lan0";
478 phy-mode = "gmii";
479 phy-handle = <&sphy0>;
480 };
481
482 port@1 {
483 reg = <1>;
484 label = "lan1";
485 phy-mode = "gmii";
486 phy-handle = <&sphy1>;
487 };
488
489 port@2 {
490 reg = <2>;
491 label = "lan2";
492 phy-mode = "gmii";
493 phy-handle = <&sphy2>;
494 };
495
496 port@3 {
497 reg = <3>;
498 label = "lan3";
499 phy-mode = "gmii";
500 phy-handle = <&sphy3>;
501 };
502
503 port@6 {
504 reg = <6>;
505 label = "cpu";
506 ethernet = <&gmac0>;
507 phy-mode = "10gbase-kr";
508
509 fixed-link {
510 speed = <10000>;
511 full-duplex;
512 pause;
513 };
514 };
515 };
516
517 mdio {
518 compatible = "mediatek,dsa-slave-mdio";
519 #address-cells = <1>;
520 #size-cells = <0>;
developerbe718682023-05-12 18:09:06 +0800521
522 sphy0: switch_phy0@0 {
523 compatible = "ethernet-phy-id03a2.9481";
524 reg = <0>;
developer4af681c2023-05-22 14:34:27 +0800525 pinctrl-names = "gbe-led";
526 pinctrl-0 = <&gbe0_led0_pins>;
developerbe718682023-05-12 18:09:06 +0800527 nvmem-cells = <&phy_calibration_p0>;
528 nvmem-cell-names = "phy-cal-data";
529 };
530
531 sphy1: switch_phy1@1 {
532 compatible = "ethernet-phy-id03a2.9481";
533 reg = <1>;
developer4af681c2023-05-22 14:34:27 +0800534 pinctrl-names = "gbe-led";
535 pinctrl-0 = <&gbe1_led0_pins>;
developerbe718682023-05-12 18:09:06 +0800536 nvmem-cells = <&phy_calibration_p1>;
537 nvmem-cell-names = "phy-cal-data";
538 };
539
540 sphy2: switch_phy2@2 {
541 compatible = "ethernet-phy-id03a2.9481";
542 reg = <2>;
developer4af681c2023-05-22 14:34:27 +0800543 pinctrl-names = "gbe-led";
544 pinctrl-0 = <&gbe2_led0_pins>;
developerbe718682023-05-12 18:09:06 +0800545 nvmem-cells = <&phy_calibration_p2>;
546 nvmem-cell-names = "phy-cal-data";
547 };
548
549 sphy3: switch_phy3@3 {
550 compatible = "ethernet-phy-id03a2.9481";
551 reg = <3>;
developer4af681c2023-05-22 14:34:27 +0800552 pinctrl-names = "gbe-led";
553 pinctrl-0 = <&gbe3_led0_pins>;
developerbe718682023-05-12 18:09:06 +0800554 nvmem-cells = <&phy_calibration_p3>;
555 nvmem-cell-names = "phy-cal-data";
556 };
557 };
558 };
559 };
560};
561
562&hnat {
563 mtketh-wan = "eth1";
564 mtketh-lan = "lan";
565 mtketh-lan2 = "eth2";
566 mtketh-max-gmac = <3>;
developer722ab5f2024-02-22 11:01:46 +0800567 mtketh-ppe-num = <3>;
developerbe718682023-05-12 18:09:06 +0800568 status = "okay";
569};
570
571&slot0 {
572 mt7996@0,0 {
573 reg = <0x0000 0 0 0 0>;
574 device_type = "pci";
575 mediatek,mtd-eeprom = <&factory 0x0>;
576 };
577};