blob: d305570513d47be0ae3e541463994d755012004b [file] [log] [blame]
developer2cdaeb12022-10-04 20:25:05 +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 DSA 10G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-dsa-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 memory {
23 reg = <0 0x40000000 0 0x10000000>;
24 };
25
26 nmbm_spim_nand {
27 compatible = "generic,nmbm";
28
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 lower-mtd-device = <&spi_nand>;
33 forced-create;
34
35 partitions {
36 compatible = "fixed-partitions";
37 #address-cells = <1>;
38 #size-cells = <1>;
39
40 partition@0 {
41 label = "BL2";
42 reg = <0x00000 0x0100000>;
43 read-only;
44 };
45
46 partition@100000 {
47 label = "u-boot-env";
48 reg = <0x0100000 0x0080000>;
49 };
50
51 factory: partition@180000 {
52 label = "Factory";
53 reg = <0x180000 0x0400000>;
54 };
55
56 partition@580000 {
57 label = "FIP";
58 reg = <0x580000 0x0200000>;
59 };
60
61 partition@780000 {
62 label = "ubi";
developerbaa8f602022-12-07 17:07:51 +080063 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080064 };
65 };
66 };
67
68 wsys_adie: wsys_adie@0 {
69 // fpga cases need to manual change adie_id / sku_type for dvt only
70 compatible = "mediatek,rebb-mt7988-adie";
71 adie_id = <7976>;
72 sku_type = <3000>;
73 };
developer3594afb2022-10-25 13:22:53 +080074
75 sound_wm8960 {
76 compatible = "mediatek,mt79xx-wm8960-machine";
77 mediatek,platform = <&afe>;
78 audio-routing = "Headphone", "HP_L",
79 "Headphone", "HP_R",
80 "LINPUT1", "AMIC",
81 "RINPUT1", "AMIC";
82 mediatek,audio-codec = <&wm8960>;
83 status = "disabled";
84 };
85
86 sound_si3218x {
87 compatible = "mediatek,mt79xx-si3218x-machine";
88 mediatek,platform = <&afe>;
89 mediatek,ext-codec = <&proslic_spi>;
90 status = "disabled";
91 };
developer2cdaeb12022-10-04 20:25:05 +080092};
93
94&fan {
95 pwms = <&pwm 0 50000 0>;
96 status = "okay";
97};
98
developer3594afb2022-10-25 13:22:53 +080099&afe {
100 pinctrl-names = "default";
101 pinctrl-0 = <&pcm_pins>;
102 status = "okay";
103};
104
developer2cdaeb12022-10-04 20:25:05 +0800105&pwm {
106 status = "okay";
107};
108
109&uart0 {
110 status = "okay";
111};
112
developerbb0d2de2023-04-17 18:27:06 +0800113&uart1 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&uart1_pins>;
116 status = "okay";
117};
118
developer86e69ba2022-12-26 12:05:48 +0800119&i2c0 {
120 pinctrl-names = "default";
121 pinctrl-0 = <&i2c0_pins>;
122 status = "okay";
123
124 rt5190a_64: rt5190a@64 {
125 compatible = "richtek,rt5190a";
126 reg = <0x64>;
127 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
128 vin2-supply = <&rt5190_buck1>;
129 vin3-supply = <&rt5190_buck1>;
130 vin4-supply = <&rt5190_buck1>;
131
132 regulators {
133 rt5190_buck1: buck1 {
134 regulator-name = "rt5190a-buck1";
135 regulator-min-microvolt = <5090000>;
136 regulator-max-microvolt = <5090000>;
137 regulator-allowed-modes =
138 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
139 regulator-boot-on;
140 };
141 buck2 {
142 regulator-name = "vcore";
143 regulator-min-microvolt = <600000>;
144 regulator-max-microvolt = <1400000>;
145 regulator-boot-on;
146 };
147 buck3 {
148 regulator-name = "proc";
149 regulator-min-microvolt = <600000>;
150 regulator-max-microvolt = <1400000>;
151 regulator-boot-on;
152 };
153 buck4 {
154 regulator-name = "rt5190a-buck4";
155 regulator-min-microvolt = <850000>;
156 regulator-max-microvolt = <850000>;
157 regulator-allowed-modes =
158 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
159 regulator-boot-on;
160 };
161 ldo {
162 regulator-name = "rt5190a-ldo";
163 regulator-min-microvolt = <1200000>;
164 regulator-max-microvolt = <1200000>;
165 regulator-boot-on;
166 };
167 };
168 };
169};
170
developer3594afb2022-10-25 13:22:53 +0800171&i2c1 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&i2c1_pins>;
174 status = "okay";
175
176 wm8960: wm8960@1a {
177 compatible = "wlf,wm8960";
178 reg = <0x1a>;
179 };
developerf9d31032023-03-03 20:54:33 +0800180
181 dps368: dps368@77 {
182 compatible = "infineon,dps310";
183 reg = <0x77>;
184 };
developer3594afb2022-10-25 13:22:53 +0800185};
186
developer2cdaeb12022-10-04 20:25:05 +0800187&spi0 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&spi0_flash_pins>;
190 status = "okay";
191
192 spi_nand: spi_nand@0 {
193 #address-cells = <1>;
194 #size-cells = <1>;
195 compatible = "spi-nand";
196 spi-cal-enable;
197 spi-cal-mode = "read-data";
198 spi-cal-datalen = <7>;
199 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
200 spi-cal-addrlen = <5>;
201 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
202 reg = <0>;
203 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800204 spi-tx-bus-width = <4>;
205 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +0800206 };
207};
208
209&spi1 {
210 pinctrl-names = "default";
211 /* pin shared with snfi */
212 pinctrl-0 = <&spic_pins>;
213 status = "disabled";
developer3594afb2022-10-25 13:22:53 +0800214
215 proslic_spi: proslic_spi@0 {
216 compatible = "silabs,proslic_spi";
217 reg = <0>;
218 spi-max-frequency = <10000000>;
219 spi-cpha = <1>;
220 spi-cpol = <1>;
221 channel_count = <1>;
222 debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
223 reset_gpio = <&pio 54 0>;
224 ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
225 };
developer2cdaeb12022-10-04 20:25:05 +0800226};
227
228&pcie0 {
229 pinctrl-names = "default";
230 pinctrl-0 = <&pcie0_pins>;
231 status = "okay";
232};
233
234&pcie1 {
235 pinctrl-names = "default";
236 pinctrl-0 = <&pcie1_pins>;
237 status = "okay";
238};
239
240&pcie2 {
241 pinctrl-names = "default";
242 pinctrl-0 = <&pcie2_pins>;
243 status = "disabled";
244};
245
246&pcie3 {
247 pinctrl-names = "default";
248 pinctrl-0 = <&pcie3_pins>;
249 status = "okay";
250};
251
252&pio {
developer24ba51c2022-11-15 11:22:46 +0800253 mdio0_pins: mdio0-pins {
254 mux {
255 function = "mdio";
256 groups = "mdc_mdio0";
257 };
258
259 conf {
260 groups = "mdc_mdio0";
261 drive-strength = <MTK_DRIVE_8mA>;
262 };
263 };
264
developercaca1df2023-05-17 10:54:49 +0800265 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800266 mux {
267 function = "led";
developercaca1df2023-05-17 10:54:49 +0800268 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800269 };
270 };
271
developercaca1df2023-05-17 10:54:49 +0800272 gbe1_led0_pins: gbe1-pins {
273 mux {
274 function = "led";
275 groups = "gbe1_led0";
276 };
277 };
278
279 gbe2_led0_pins: gbe2-pins {
280 mux {
281 function = "led";
282 groups = "gbe2_led0";
283 };
284 };
285
286 gbe3_led0_pins: gbe3-pins {
287 mux {
288 function = "led";
289 groups = "gbe3_led0";
290 };
291 };
292
developer86e69ba2022-12-26 12:05:48 +0800293 i2c0_pins: i2c0-pins-g0 {
294 mux {
295 function = "i2c";
296 groups = "i2c0_1";
297 };
298 };
299
developer2cdaeb12022-10-04 20:25:05 +0800300 pcie0_pins: pcie0-pins {
301 mux {
302 function = "pcie";
303 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
304 "pcie_wake_n0_0";
305 };
306 };
307
308 pcie1_pins: pcie1-pins {
309 mux {
310 function = "pcie";
311 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
312 "pcie_wake_n1_0";
313 };
314 };
315
316 pcie2_pins: pcie2-pins {
317 mux {
318 function = "pcie";
319 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
320 "pcie_wake_n2_0";
321 };
322 };
323
324 pcie3_pins: pcie3-pins {
325 mux {
326 function = "pcie";
327 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
328 "pcie_wake_n3_0";
329 };
330 };
331
332 spi0_flash_pins: spi0-pins {
333 mux {
334 function = "spi";
335 groups = "spi0", "spi0_wp_hold";
336 };
337 };
338
339 spic_pins: spi1-pins {
340 mux {
341 function = "spi";
developer3594afb2022-10-25 13:22:53 +0800342 groups = "spi1";
343 };
344 };
345
346 i2c1_pins: i2c1-pins {
347 mux {
348 function = "i2c";
349 groups = "i2c1_0";
350 };
351 };
352
353 i2s_pins: i2s-pins {
354 mux {
355 function = "audio";
356 groups = "i2s";
357 };
358 };
359
360 pcm_pins: pcm-pins {
361 mux {
362 function = "audio";
363 groups = "pcm";
developer2cdaeb12022-10-04 20:25:05 +0800364 };
365 };
developerbb0d2de2023-04-17 18:27:06 +0800366
367 uart1_pins: uart1-pins {
368 mux {
369 function = "uart";
370 groups = "uart1_2";
371 };
372 };
developer2cdaeb12022-10-04 20:25:05 +0800373};
374
375&watchdog {
376 status = "disabled";
377};
378
379&eth {
developer24ba51c2022-11-15 11:22:46 +0800380 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800381 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800382 status = "okay";
383
384 gmac0: mac@0 {
385 compatible = "mediatek,eth-mac";
386 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800387 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800388 phy-mode = "10gbase-kr";
389
390 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800391 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800392 full-duplex;
393 pause;
394 };
395 };
396
397 gmac1: mac@1 {
398 compatible = "mediatek,eth-mac";
399 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800400 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800401 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800402 phy-handle = <&phy0>;
403 };
404
405 gmac2: mac@2 {
406 compatible = "mediatek,eth-mac";
407 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800408 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800409 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800410 phy-handle = <&phy1>;
411 };
412
413 mdio: mdio-bus {
414 #address-cells = <1>;
415 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800416 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800417
developer2cdaeb12022-10-04 20:25:05 +0800418 phy0: ethernet-phy@0 {
419 reg = <0>;
420 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800421 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800422 reset-assert-us = <100000>;
423 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800424 };
425
426 phy1: ethernet-phy@8 {
427 reg = <8>;
428 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800429 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800430 reset-assert-us = <100000>;
431 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800432 };
433
434 switch@0 {
435 compatible = "mediatek,mt7988";
436 reg = <31>;
437 ports {
438 #address-cells = <1>;
439 #size-cells = <0>;
440
441 port@0 {
442 reg = <0>;
443 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800444 phy-mode = "gmii";
445 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800446 };
447
448 port@1 {
449 reg = <1>;
450 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800451 phy-mode = "gmii";
452 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800453 };
454
455 port@2 {
456 reg = <2>;
457 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800458 phy-mode = "gmii";
459 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800460 };
461
462 port@3 {
463 reg = <3>;
464 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800465 phy-mode = "gmii";
466 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800467 };
468
469 port@6 {
470 reg = <6>;
471 label = "cpu";
472 ethernet = <&gmac0>;
473 phy-mode = "10gbase-kr";
474
475 fixed-link {
476 speed = <10000>;
477 full-duplex;
478 pause;
479 };
480 };
481 };
developera36549c2022-10-04 16:26:13 +0800482
483 mdio {
484 compatible = "mediatek,dsa-slave-mdio";
485 #address-cells = <1>;
486 #size-cells = <0>;
487
488 sphy0: switch_phy0@0 {
489 compatible = "ethernet-phy-id03a2.9481";
490 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800491 pinctrl-names = "gbe-led";
492 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800493 nvmem-cells = <&phy_calibration_p0>;
494 nvmem-cell-names = "phy-cal-data";
495 };
496
497 sphy1: switch_phy1@1 {
498 compatible = "ethernet-phy-id03a2.9481";
499 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800500 pinctrl-names = "gbe-led";
501 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800502 nvmem-cells = <&phy_calibration_p1>;
503 nvmem-cell-names = "phy-cal-data";
504 };
505
506 sphy2: switch_phy2@2 {
507 compatible = "ethernet-phy-id03a2.9481";
508 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800509 pinctrl-names = "gbe-led";
510 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800511 nvmem-cells = <&phy_calibration_p2>;
512 nvmem-cell-names = "phy-cal-data";
513 };
514
515 sphy3: switch_phy3@3 {
516 compatible = "ethernet-phy-id03a2.9481";
517 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800518 pinctrl-names = "gbe-led";
519 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800520 nvmem-cells = <&phy_calibration_p3>;
521 nvmem-cell-names = "phy-cal-data";
522 };
523 };
developer2cdaeb12022-10-04 20:25:05 +0800524 };
525 };
526};
527
528&hnat {
529 mtketh-wan = "eth1";
530 mtketh-lan = "lan";
531 mtketh-lan2 = "eth2";
532 mtketh-max-gmac = <3>;
533 status = "okay";
534};
developerde8a1062023-01-31 17:00:33 +0800535
536&slot0 {
537 mt7996@0,0 {
538 reg = <0x0000 0 0 0 0>;
539 device_type = "pci";
540 mediatek,mtd-eeprom = <&factory 0x0>;
541 };
542};