blob: 8aa687e4fb4cf55d68e8e4ed13a45ad1e15ed8eb [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
270 gbe_led0_pins: gbe-pins {
271 mux {
272 function = "led";
273 groups = "gbe_led0";
274 };
275 };
276
277 i2c0_pins: i2c0-pins-g0 {
278 mux {
279 function = "i2c";
280 groups = "i2c0_1";
281 };
282 };
283
284 pcie0_pins: pcie0-pins {
285 mux {
286 function = "pcie";
287 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
288 "pcie_wake_n0_0";
289 };
290 };
291
292 pcie1_pins: pcie1-pins {
293 mux {
294 function = "pcie";
295 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
296 "pcie_wake_n1_0";
297 };
298 };
299
300 pcie2_pins: pcie2-pins {
301 mux {
302 function = "pcie";
303 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
304 "pcie_wake_n2_0";
305 };
306 };
307
308 pcie3_pins: pcie3-pins {
309 mux {
310 function = "pcie";
311 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
312 "pcie_wake_n3_0";
313 };
314 };
315
316 spi0_flash_pins: spi0-pins {
317 mux {
318 function = "spi";
319 groups = "spi0", "spi0_wp_hold";
320 };
321 };
322
323 spic_pins: spi1-pins {
324 mux {
325 function = "spi";
326 groups = "spi1";
327 };
328 };
329
330 i2c1_pins: i2c1-pins {
331 mux {
332 function = "i2c";
333 groups = "i2c1_0";
334 };
335 };
336
337 i2s_pins: i2s-pins {
338 mux {
339 function = "audio";
340 groups = "i2s";
341 };
342 };
343
344 pcm_pins: pcm-pins {
345 mux {
346 function = "audio";
347 groups = "pcm";
348 };
349 };
350
351 uart1_pins: uart1-pins {
352 mux {
353 function = "uart";
354 groups = "uart1_2";
355 };
356 };
357};
358
359&watchdog {
360 status = "disabled";
361};
362
363&eth {
364 pinctrl-names = "default";
365 pinctrl-0 = <&mdio0_pins>;
366 status = "okay";
367
368 gmac0: mac@0 {
369 compatible = "mediatek,eth-mac";
370 reg = <0>;
371 mac-type = "xgdm";
372 phy-mode = "10gbase-kr";
373
374 fixed-link {
375 speed = <10000>;
376 full-duplex;
377 pause;
378 };
379 };
380
381 gmac1: mac@1 {
382 compatible = "mediatek,eth-mac";
383 reg = <1>;
384 mac-type = "xgdm";
385 phy-mode = "usxgmii";
386 phy-handle = <&phy0>;
387 };
388
389 gmac2: mac@2 {
390 compatible = "mediatek,eth-mac";
391 reg = <2>;
392 mac-type = "xgdm";
393 phy-mode = "usxgmii";
394 phy-handle = <&phy1>;
395 };
396
397 mdio: mdio-bus {
398 #address-cells = <1>;
399 #size-cells = <0>;
400 clock-frequency = <10500000>;
401
402 phy0: ethernet-phy@0 {
403 reg = <0>;
404 compatible = "ethernet-phy-ieee802.3-c45";
405 reset-gpios = <&pio 72 1>;
406 reset-assert-us = <100000>;
407 reset-deassert-us = <221000>;
408 };
409
410 phy1: ethernet-phy@8 {
411 reg = <8>;
412 compatible = "ethernet-phy-ieee802.3-c45";
413 reset-gpios = <&pio 71 1>;
414 reset-assert-us = <100000>;
415 reset-deassert-us = <221000>;
416 };
417
418 switch@0 {
419 compatible = "mediatek,mt7988";
420 reg = <31>;
421 ports {
422 #address-cells = <1>;
423 #size-cells = <0>;
424
425 port@0 {
426 reg = <0>;
427 label = "lan0";
428 phy-mode = "gmii";
429 phy-handle = <&sphy0>;
430 };
431
432 port@1 {
433 reg = <1>;
434 label = "lan1";
435 phy-mode = "gmii";
436 phy-handle = <&sphy1>;
437 };
438
439 port@2 {
440 reg = <2>;
441 label = "lan2";
442 phy-mode = "gmii";
443 phy-handle = <&sphy2>;
444 };
445
446 port@3 {
447 reg = <3>;
448 label = "lan3";
449 phy-mode = "gmii";
450 phy-handle = <&sphy3>;
451 };
452
453 port@6 {
454 reg = <6>;
455 label = "cpu";
456 ethernet = <&gmac0>;
457 phy-mode = "10gbase-kr";
458
459 fixed-link {
460 speed = <10000>;
461 full-duplex;
462 pause;
463 };
464 };
465 };
466
467 mdio {
468 compatible = "mediatek,dsa-slave-mdio";
469 #address-cells = <1>;
470 #size-cells = <0>;
471 pinctrl-names = "default";
472 pinctrl-0 = <&gbe_led0_pins>;
473
474 sphy0: switch_phy0@0 {
475 compatible = "ethernet-phy-id03a2.9481";
476 reg = <0>;
477 phy-mode = "gmii";
478 rext = "efuse";
479 tx_r50 = "efuse";
480 nvmem-cells = <&phy_calibration_p0>;
481 nvmem-cell-names = "phy-cal-data";
482 };
483
484 sphy1: switch_phy1@1 {
485 compatible = "ethernet-phy-id03a2.9481";
486 reg = <1>;
487 phy-mode = "gmii";
488 rext = "efuse";
489 tx_r50 = "efuse";
490 nvmem-cells = <&phy_calibration_p1>;
491 nvmem-cell-names = "phy-cal-data";
492 };
493
494 sphy2: switch_phy2@2 {
495 compatible = "ethernet-phy-id03a2.9481";
496 reg = <2>;
497 phy-mode = "gmii";
498 rext = "efuse";
499 tx_r50 = "efuse";
500 nvmem-cells = <&phy_calibration_p2>;
501 nvmem-cell-names = "phy-cal-data";
502 };
503
504 sphy3: switch_phy3@3 {
505 compatible = "ethernet-phy-id03a2.9481";
506 reg = <3>;
507 phy-mode = "gmii";
508 rext = "efuse";
509 tx_r50 = "efuse";
510 nvmem-cells = <&phy_calibration_p3>;
511 nvmem-cell-names = "phy-cal-data";
512 };
513 };
514 };
515 };
516};
517
518&hnat {
519 mtketh-wan = "eth1";
520 mtketh-lan = "lan";
521 mtketh-lan2 = "eth2";
522 mtketh-max-gmac = <3>;
523 status = "okay";
524};
525
526&slot0 {
527 mt7996@0,0 {
528 reg = <0x0000 0 0 0 0>;
529 device_type = "pci";
530 mediatek,mtd-eeprom = <&factory 0x0>;
531 };
532};