blob: 0352d8355ce5c1c03eebbfa3dfa66ca2c187e8d1 [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
developer86e69ba2022-12-26 12:05:48 +0800113&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
developer3594afb2022-10-25 13:22:53 +0800165&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
developer2cdaeb12022-10-04 20:25:05 +0800176&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>;
193 spi-tx-buswidth = <4>;
194 spi-rx-buswidth = <4>;
195 };
196};
197
198&spi1 {
199 pinctrl-names = "default";
200 /* pin shared with snfi */
201 pinctrl-0 = <&spic_pins>;
202 status = "disabled";
developer3594afb2022-10-25 13:22:53 +0800203
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 };
developer2cdaeb12022-10-04 20:25:05 +0800215};
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 = "okay";
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 {
developer24ba51c2022-11-15 11:22:46 +0800242 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
developer86e69ba2022-12-26 12:05:48 +0800254 i2c0_pins: i2c0-pins-g0 {
255 mux {
256 function = "i2c";
257 groups = "i2c0_1";
258 };
259 };
260
developer2cdaeb12022-10-04 20:25:05 +0800261 pcie0_pins: pcie0-pins {
262 mux {
263 function = "pcie";
264 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
265 "pcie_wake_n0_0";
266 };
267 };
268
269 pcie1_pins: pcie1-pins {
270 mux {
271 function = "pcie";
272 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
273 "pcie_wake_n1_0";
274 };
275 };
276
277 pcie2_pins: pcie2-pins {
278 mux {
279 function = "pcie";
280 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
281 "pcie_wake_n2_0";
282 };
283 };
284
285 pcie3_pins: pcie3-pins {
286 mux {
287 function = "pcie";
288 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
289 "pcie_wake_n3_0";
290 };
291 };
292
293 spi0_flash_pins: spi0-pins {
294 mux {
295 function = "spi";
296 groups = "spi0", "spi0_wp_hold";
297 };
298 };
299
300 spic_pins: spi1-pins {
301 mux {
302 function = "spi";
developer3594afb2022-10-25 13:22:53 +0800303 groups = "spi1";
304 };
305 };
306
307 i2c1_pins: i2c1-pins {
308 mux {
309 function = "i2c";
310 groups = "i2c1_0";
311 };
312 };
313
314 i2s_pins: i2s-pins {
315 mux {
316 function = "audio";
317 groups = "i2s";
318 };
319 };
320
321 pcm_pins: pcm-pins {
322 mux {
323 function = "audio";
324 groups = "pcm";
developer2cdaeb12022-10-04 20:25:05 +0800325 };
326 };
327};
328
329&watchdog {
330 status = "disabled";
331};
332
333&eth {
developer24ba51c2022-11-15 11:22:46 +0800334 pinctrl-names = "default";
335 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800336 status = "okay";
337
338 gmac0: mac@0 {
339 compatible = "mediatek,eth-mac";
340 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800341 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800342 phy-mode = "10gbase-kr";
343
344 fixed-link {
345 speed = <2500>;
346 full-duplex;
347 pause;
348 };
349 };
350
351 gmac1: mac@1 {
352 compatible = "mediatek,eth-mac";
353 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800354 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800355 phy-mode = "10gbase-kr";
356 phy-handle = <&phy0>;
357 };
358
359 gmac2: mac@2 {
360 compatible = "mediatek,eth-mac";
361 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800362 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800363 phy-mode = "10gbase-kr";
364 phy-handle = <&phy1>;
365 };
366
367 mdio: mdio-bus {
368 #address-cells = <1>;
369 #size-cells = <0>;
developer24ba51c2022-11-15 11:22:46 +0800370 mdc-max-frequency = <10500000>;
371
developer2cdaeb12022-10-04 20:25:05 +0800372 phy0: ethernet-phy@0 {
373 reg = <0>;
374 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800375 reset-gpios = <&pio 72 1>;
developer2cdaeb12022-10-04 20:25:05 +0800376 reset-assert-us = <1000000>;
377 reset-deassert-us = <1000000>;
378 };
379
380 phy1: ethernet-phy@8 {
381 reg = <8>;
382 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800383 reset-gpios = <&pio 71 1>;
developer2cdaeb12022-10-04 20:25:05 +0800384 reset-assert-us = <1000000>;
385 reset-deassert-us = <1000000>;
386 };
387
388 switch@0 {
389 compatible = "mediatek,mt7988";
390 reg = <31>;
391 ports {
392 #address-cells = <1>;
393 #size-cells = <0>;
394
395 port@0 {
396 reg = <0>;
397 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800398 phy-mode = "gmii";
399 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800400 };
401
402 port@1 {
403 reg = <1>;
404 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800405 phy-mode = "gmii";
406 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800407 };
408
409 port@2 {
410 reg = <2>;
411 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800412 phy-mode = "gmii";
413 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800414 };
415
416 port@3 {
417 reg = <3>;
418 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800419 phy-mode = "gmii";
420 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800421 };
422
423 port@6 {
424 reg = <6>;
425 label = "cpu";
426 ethernet = <&gmac0>;
427 phy-mode = "10gbase-kr";
428
429 fixed-link {
430 speed = <10000>;
431 full-duplex;
432 pause;
433 };
434 };
435 };
developera36549c2022-10-04 16:26:13 +0800436
437 mdio {
438 compatible = "mediatek,dsa-slave-mdio";
439 #address-cells = <1>;
440 #size-cells = <0>;
441
442 sphy0: switch_phy0@0 {
443 compatible = "ethernet-phy-id03a2.9481";
444 reg = <0>;
445 phy-mode = "gmii";
446 rext = "efuse";
447 tx_r50 = "efuse";
448 nvmem-cells = <&phy_calibration_p0>;
449 nvmem-cell-names = "phy-cal-data";
450 };
451
452 sphy1: switch_phy1@1 {
453 compatible = "ethernet-phy-id03a2.9481";
454 reg = <1>;
455 phy-mode = "gmii";
456 rext = "efuse";
457 tx_r50 = "efuse";
458 nvmem-cells = <&phy_calibration_p1>;
459 nvmem-cell-names = "phy-cal-data";
460 };
461
462 sphy2: switch_phy2@2 {
463 compatible = "ethernet-phy-id03a2.9481";
464 reg = <2>;
465 phy-mode = "gmii";
466 rext = "efuse";
467 tx_r50 = "efuse";
468 nvmem-cells = <&phy_calibration_p2>;
469 nvmem-cell-names = "phy-cal-data";
470 };
471
472 sphy3: switch_phy3@3 {
473 compatible = "ethernet-phy-id03a2.9481";
474 reg = <3>;
475 phy-mode = "gmii";
476 rext = "efuse";
477 tx_r50 = "efuse";
478 nvmem-cells = <&phy_calibration_p3>;
479 nvmem-cell-names = "phy-cal-data";
480 };
481 };
developer2cdaeb12022-10-04 20:25:05 +0800482 };
483 };
484};
485
486&hnat {
487 mtketh-wan = "eth1";
488 mtketh-lan = "lan";
489 mtketh-lan2 = "eth2";
490 mtketh-max-gmac = <3>;
491 status = "okay";
492};
developerde8a1062023-01-31 17:00:33 +0800493
494&slot0 {
495 mt7996@0,0 {
496 reg = <0x0000 0 0 0 0>;
497 device_type = "pci";
498 mediatek,mtd-eeprom = <&factory 0x0>;
499 };
500};