blob: 6bb5bdfa5e44dbb410cdd20b2f9186673a5f1720 [file] [log] [blame]
developerc54ce9d2023-01-03 13:30:49 +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/ {
developer3f9a06c2023-05-23 15:16:44 +080011 model = "MediaTek MT7988D DSA 10G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988d-dsa-10g-spim-snand",
developerc54ce9d2023-01-03 13:30:49 +080013 /* 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";
63 reg = <0x780000 0x7080000>;
64 };
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 };
74
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 };
92};
93
94&fan {
95 pwms = <&pwm 0 50000 0>;
96 status = "okay";
97};
98
99&afe {
100 pinctrl-names = "default";
101 pinctrl-0 = <&pcm_pins>;
102 status = "okay";
103};
104
105&pwm {
106 status = "okay";
107};
108
109&uart0 {
110 status = "okay";
111};
112
113&i2c0 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&i2c0_pins>;
116 status = "okay";
117
118 rt5190a_64: rt5190a@64 {
119 compatible = "richtek,rt5190a";
120 reg = <0x64>;
121 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
122 vin2-supply = <&rt5190_buck1>;
123 vin3-supply = <&rt5190_buck1>;
124 vin4-supply = <&rt5190_buck1>;
125
126 regulators {
127 rt5190_buck1: buck1 {
128 regulator-name = "rt5190a-buck1";
129 regulator-min-microvolt = <5090000>;
130 regulator-max-microvolt = <5090000>;
131 regulator-allowed-modes =
132 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
133 regulator-boot-on;
134 };
135 buck2 {
136 regulator-name = "vcore";
137 regulator-min-microvolt = <600000>;
138 regulator-max-microvolt = <1400000>;
139 regulator-boot-on;
140 };
141 buck3 {
142 regulator-name = "proc";
143 regulator-min-microvolt = <600000>;
144 regulator-max-microvolt = <1400000>;
145 regulator-boot-on;
146 };
147 buck4 {
148 regulator-name = "rt5190a-buck4";
149 regulator-min-microvolt = <850000>;
150 regulator-max-microvolt = <850000>;
151 regulator-allowed-modes =
152 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
153 regulator-boot-on;
154 };
155 ldo {
156 regulator-name = "rt5190a-ldo";
157 regulator-min-microvolt = <1200000>;
158 regulator-max-microvolt = <1200000>;
159 regulator-boot-on;
160 };
161 };
162 };
163};
164
165&i2c1 {
166 pinctrl-names = "default";
167 pinctrl-0 = <&i2c1_pins>;
168 status = "okay";
169
170 wm8960: wm8960@1a {
171 compatible = "wlf,wm8960";
172 reg = <0x1a>;
173 };
174};
175
176&spi0 {
177 pinctrl-names = "default";
178 pinctrl-0 = <&spi0_flash_pins>;
179 status = "okay";
180
181 spi_nand: spi_nand@0 {
182 #address-cells = <1>;
183 #size-cells = <1>;
184 compatible = "spi-nand";
185 spi-cal-enable;
186 spi-cal-mode = "read-data";
187 spi-cal-datalen = <7>;
188 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
189 spi-cal-addrlen = <5>;
190 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
191 reg = <0>;
192 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800193 spi-tx-bus-width = <4>;
194 spi-rx-bus-width = <4>;
developerc54ce9d2023-01-03 13:30:49 +0800195 };
196};
197
198&spi1 {
199 pinctrl-names = "default";
200 /* pin shared with snfi */
201 pinctrl-0 = <&spic_pins>;
202 status = "disabled";
203
204 proslic_spi: proslic_spi@0 {
205 compatible = "silabs,proslic_spi";
206 reg = <0>;
207 spi-max-frequency = <10000000>;
208 spi-cpha = <1>;
209 spi-cpol = <1>;
210 channel_count = <1>;
211 debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
212 reset_gpio = <&pio 54 0>;
213 ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
214 };
215};
216
217&pcie0 {
218 pinctrl-names = "default";
219 pinctrl-0 = <&pcie0_pins>;
220 status = "okay";
221};
222
223&pcie1 {
224 pinctrl-names = "default";
225 pinctrl-0 = <&pcie1_pins>;
226 status = "disabled";
227};
228
229&pcie2 {
230 pinctrl-names = "default";
231 pinctrl-0 = <&pcie2_pins>;
232 status = "disabled";
233};
234
235&pcie3 {
236 pinctrl-names = "default";
237 pinctrl-0 = <&pcie3_pins>;
238 status = "okay";
239};
240
241&pio {
242 mdio0_pins: mdio0-pins {
243 mux {
244 function = "mdio";
245 groups = "mdc_mdio0";
246 };
247
248 conf {
249 groups = "mdc_mdio0";
250 drive-strength = <MTK_DRIVE_8mA>;
251 };
252 };
253
developercaca1df2023-05-17 10:54:49 +0800254 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800255 mux {
256 function = "led";
developercaca1df2023-05-17 10:54:49 +0800257 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800258 };
259 };
260
developercaca1df2023-05-17 10:54:49 +0800261 gbe1_led0_pins: gbe1-pins {
262 mux {
263 function = "led";
264 groups = "gbe1_led0";
265 };
266 };
267
268 gbe2_led0_pins: gbe2-pins {
269 mux {
270 function = "led";
271 groups = "gbe2_led0";
272 };
273 };
274
275 gbe3_led0_pins: gbe3-pins {
276 mux {
277 function = "led";
278 groups = "gbe3_led0";
279 };
280 };
281
developerb4a8e1f2023-04-28 10:18:42 +0800282 i2p5gbe_led0_pins: 2p5gbe-pins {
283 mux {
284 function = "led";
285 groups = "2p5gbe_led0";
286 };
287 };
288
developerc54ce9d2023-01-03 13:30:49 +0800289 i2c0_pins: i2c0-pins-g0 {
290 mux {
291 function = "i2c";
292 groups = "i2c0_1";
293 };
294 };
295
296 pcie0_pins: pcie0-pins {
297 mux {
298 function = "pcie";
299 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
300 "pcie_wake_n0_0";
301 };
302 };
303
304 pcie1_pins: pcie1-pins {
305 mux {
306 function = "pcie";
307 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
308 "pcie_wake_n1_0";
309 };
310 };
311
312 pcie2_pins: pcie2-pins {
313 mux {
314 function = "pcie";
315 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
316 "pcie_wake_n2_0";
317 };
318 };
319
320 pcie3_pins: pcie3-pins {
321 mux {
322 function = "pcie";
323 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
324 "pcie_wake_n3_0";
325 };
326 };
327
328 spi0_flash_pins: spi0-pins {
329 mux {
330 function = "spi";
331 groups = "spi0", "spi0_wp_hold";
332 };
333 };
334
335 spic_pins: spi1-pins {
336 mux {
337 function = "spi";
338 groups = "spi1";
339 };
340 };
341
342 i2c1_pins: i2c1-pins {
343 mux {
344 function = "i2c";
345 groups = "i2c1_0";
346 };
347 };
348
349 i2s_pins: i2s-pins {
350 mux {
351 function = "audio";
352 groups = "i2s";
353 };
354 };
355
356 pcm_pins: pcm-pins {
357 mux {
358 function = "audio";
359 groups = "pcm";
360 };
361 };
362};
363
364&watchdog {
365 status = "disabled";
366};
367
368&eth {
369 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800370 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800371 status = "okay";
372
373 gmac0: mac@0 {
374 compatible = "mediatek,eth-mac";
375 reg = <0>;
376 mac-type = "xgdm";
377 phy-mode = "10gbase-kr";
378
379 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800380 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800381 full-duplex;
382 pause;
383 };
384 };
385
386 gmac1: mac@1 {
387 compatible = "mediatek,eth-mac";
388 reg = <1>;
389 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800390 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800391 phy-handle = <&phy0>;
392 };
393
developerb4a8e1f2023-04-28 10:18:42 +0800394 gmac2: mac@2 {
395 compatible = "mediatek,eth-mac";
396 reg = <2>;
397 mac-type = "xgdm";
398 phy-mode = "usxgmii";
399 phy-handle = <&phy1>;
400 };
401
developerc54ce9d2023-01-03 13:30:49 +0800402 mdio: mdio-bus {
403 #address-cells = <1>;
404 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800405 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800406
407 phy0: ethernet-phy@0 {
developer813ffc42023-05-17 13:39:48 +0800408 pinctrl-names = "i2p5gbe-led";
developerb4a8e1f2023-04-28 10:18:42 +0800409 pinctrl-0 = <&i2p5gbe_led0_pins>;
410 reg = <15>;
411 compatible = "ethernet-phy-ieee802.3-c45";
412 phy-mode = "xgmii";
413 };
414
415 phy1: ethernet-phy@8 {
416 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800417 compatible = "ethernet-phy-ieee802.3-c45";
418 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800419 reset-assert-us = <100000>;
420 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800421 };
422
423 switch@0 {
424 compatible = "mediatek,mt7988";
425 reg = <31>;
426 ports {
427 #address-cells = <1>;
428 #size-cells = <0>;
429
430 port@0 {
431 reg = <0>;
432 label = "lan0";
433 phy-mode = "gmii";
434 phy-handle = <&sphy0>;
435 };
436
437 port@1 {
438 reg = <1>;
439 label = "lan1";
440 phy-mode = "gmii";
441 phy-handle = <&sphy1>;
442 };
443
444 port@2 {
445 reg = <2>;
446 label = "lan2";
447 phy-mode = "gmii";
448 phy-handle = <&sphy2>;
449 };
450
451 port@3 {
452 reg = <3>;
453 label = "lan3";
454 phy-mode = "gmii";
455 phy-handle = <&sphy3>;
456 };
457
458 port@6 {
459 reg = <6>;
460 label = "cpu";
461 ethernet = <&gmac0>;
462 phy-mode = "10gbase-kr";
463
464 fixed-link {
465 speed = <10000>;
466 full-duplex;
467 pause;
468 };
469 };
470 };
471
472 mdio {
473 compatible = "mediatek,dsa-slave-mdio";
474 #address-cells = <1>;
475 #size-cells = <0>;
developerc54ce9d2023-01-03 13:30:49 +0800476
477 sphy0: switch_phy0@0 {
478 compatible = "ethernet-phy-id03a2.9481";
479 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800480 pinctrl-names = "gbe-led";
481 pinctrl-0 = <&gbe0_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800482 nvmem-cells = <&phy_calibration_p0>;
483 nvmem-cell-names = "phy-cal-data";
484 };
485
486 sphy1: switch_phy1@1 {
487 compatible = "ethernet-phy-id03a2.9481";
488 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800489 pinctrl-names = "gbe-led";
490 pinctrl-0 = <&gbe1_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800491 nvmem-cells = <&phy_calibration_p1>;
492 nvmem-cell-names = "phy-cal-data";
493 };
494
495 sphy2: switch_phy2@2 {
496 compatible = "ethernet-phy-id03a2.9481";
497 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800498 pinctrl-names = "gbe-led";
499 pinctrl-0 = <&gbe2_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800500 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>;
developercaca1df2023-05-17 10:54:49 +0800507 pinctrl-names = "gbe-led";
508 pinctrl-0 = <&gbe3_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800509 nvmem-cells = <&phy_calibration_p3>;
510 nvmem-cell-names = "phy-cal-data";
511 };
512 };
513 };
514 };
515};
516
517&hnat {
518 mtketh-wan = "eth1";
519 mtketh-lan = "lan";
520 mtketh-lan2 = "eth2";
521 mtketh-max-gmac = <3>;
522 status = "okay";
523};