blob: a720325f8641367334d5593112d5335b72ba6349 [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
developer447cb002023-04-06 17:54:54 +0800265 gbe_led0_pins: gbe-pins {
266 mux {
267 function = "led";
268 groups = "gbe_led0";
269 };
270 };
271
developer86e69ba2022-12-26 12:05:48 +0800272 i2c0_pins: i2c0-pins-g0 {
273 mux {
274 function = "i2c";
275 groups = "i2c0_1";
276 };
277 };
278
developer2cdaeb12022-10-04 20:25:05 +0800279 pcie0_pins: pcie0-pins {
280 mux {
281 function = "pcie";
282 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
283 "pcie_wake_n0_0";
284 };
285 };
286
287 pcie1_pins: pcie1-pins {
288 mux {
289 function = "pcie";
290 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
291 "pcie_wake_n1_0";
292 };
293 };
294
295 pcie2_pins: pcie2-pins {
296 mux {
297 function = "pcie";
298 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
299 "pcie_wake_n2_0";
300 };
301 };
302
303 pcie3_pins: pcie3-pins {
304 mux {
305 function = "pcie";
306 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
307 "pcie_wake_n3_0";
308 };
309 };
310
311 spi0_flash_pins: spi0-pins {
312 mux {
313 function = "spi";
314 groups = "spi0", "spi0_wp_hold";
315 };
316 };
317
318 spic_pins: spi1-pins {
319 mux {
320 function = "spi";
developer3594afb2022-10-25 13:22:53 +0800321 groups = "spi1";
322 };
323 };
324
325 i2c1_pins: i2c1-pins {
326 mux {
327 function = "i2c";
328 groups = "i2c1_0";
329 };
330 };
331
332 i2s_pins: i2s-pins {
333 mux {
334 function = "audio";
335 groups = "i2s";
336 };
337 };
338
339 pcm_pins: pcm-pins {
340 mux {
341 function = "audio";
342 groups = "pcm";
developer2cdaeb12022-10-04 20:25:05 +0800343 };
344 };
developerbb0d2de2023-04-17 18:27:06 +0800345
346 uart1_pins: uart1-pins {
347 mux {
348 function = "uart";
349 groups = "uart1_2";
350 };
351 };
developer2cdaeb12022-10-04 20:25:05 +0800352};
353
354&watchdog {
355 status = "disabled";
356};
357
358&eth {
developer24ba51c2022-11-15 11:22:46 +0800359 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800360 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800361 status = "okay";
362
363 gmac0: mac@0 {
364 compatible = "mediatek,eth-mac";
365 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800366 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800367 phy-mode = "10gbase-kr";
368
369 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800370 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800371 full-duplex;
372 pause;
373 };
374 };
375
376 gmac1: mac@1 {
377 compatible = "mediatek,eth-mac";
378 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800379 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800380 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800381 phy-handle = <&phy0>;
382 };
383
384 gmac2: mac@2 {
385 compatible = "mediatek,eth-mac";
386 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800387 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800388 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800389 phy-handle = <&phy1>;
390 };
391
392 mdio: mdio-bus {
393 #address-cells = <1>;
394 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800395 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800396
developer2cdaeb12022-10-04 20:25:05 +0800397 phy0: ethernet-phy@0 {
398 reg = <0>;
399 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800400 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800401 reset-assert-us = <100000>;
402 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800403 };
404
405 phy1: ethernet-phy@8 {
406 reg = <8>;
407 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800408 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800409 reset-assert-us = <100000>;
410 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800411 };
412
413 switch@0 {
414 compatible = "mediatek,mt7988";
415 reg = <31>;
416 ports {
417 #address-cells = <1>;
418 #size-cells = <0>;
419
420 port@0 {
421 reg = <0>;
422 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800423 phy-mode = "gmii";
424 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800425 };
426
427 port@1 {
428 reg = <1>;
429 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800430 phy-mode = "gmii";
431 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800432 };
433
434 port@2 {
435 reg = <2>;
436 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800437 phy-mode = "gmii";
438 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800439 };
440
441 port@3 {
442 reg = <3>;
443 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800444 phy-mode = "gmii";
445 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800446 };
447
448 port@6 {
449 reg = <6>;
450 label = "cpu";
451 ethernet = <&gmac0>;
452 phy-mode = "10gbase-kr";
453
454 fixed-link {
455 speed = <10000>;
456 full-duplex;
457 pause;
458 };
459 };
460 };
developera36549c2022-10-04 16:26:13 +0800461
462 mdio {
463 compatible = "mediatek,dsa-slave-mdio";
464 #address-cells = <1>;
465 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800466 pinctrl-names = "default";
467 pinctrl-0 = <&gbe_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800468
469 sphy0: switch_phy0@0 {
470 compatible = "ethernet-phy-id03a2.9481";
471 reg = <0>;
472 phy-mode = "gmii";
473 rext = "efuse";
474 tx_r50 = "efuse";
475 nvmem-cells = <&phy_calibration_p0>;
476 nvmem-cell-names = "phy-cal-data";
477 };
478
479 sphy1: switch_phy1@1 {
480 compatible = "ethernet-phy-id03a2.9481";
481 reg = <1>;
482 phy-mode = "gmii";
483 rext = "efuse";
484 tx_r50 = "efuse";
485 nvmem-cells = <&phy_calibration_p1>;
486 nvmem-cell-names = "phy-cal-data";
487 };
488
489 sphy2: switch_phy2@2 {
490 compatible = "ethernet-phy-id03a2.9481";
491 reg = <2>;
492 phy-mode = "gmii";
493 rext = "efuse";
494 tx_r50 = "efuse";
495 nvmem-cells = <&phy_calibration_p2>;
496 nvmem-cell-names = "phy-cal-data";
497 };
498
499 sphy3: switch_phy3@3 {
500 compatible = "ethernet-phy-id03a2.9481";
501 reg = <3>;
502 phy-mode = "gmii";
503 rext = "efuse";
504 tx_r50 = "efuse";
505 nvmem-cells = <&phy_calibration_p3>;
506 nvmem-cell-names = "phy-cal-data";
507 };
508 };
developer2cdaeb12022-10-04 20:25:05 +0800509 };
510 };
511};
512
513&hnat {
514 mtketh-wan = "eth1";
515 mtketh-lan = "lan";
516 mtketh-lan2 = "eth2";
517 mtketh-max-gmac = <3>;
518 status = "okay";
519};
developerde8a1062023-01-31 17:00:33 +0800520
521&slot0 {
522 mt7996@0,0 {
523 reg = <0x0000 0 0 0 0>;
524 device_type = "pci";
525 mediatek,mtd-eeprom = <&factory 0x0>;
526 };
527};