blob: ba261f6c7ac9b3811f49bff25483b538b01bca1a [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/ {
11 model = "MediaTek MT7988C DSA 10G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988c-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";
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>;
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";
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
developer447cb002023-04-06 17:54:54 +0800254 gbe_led0_pins: gbe-pins {
255 mux {
256 function = "led";
257 groups = "gbe_led0";
258 };
259 };
260
developerc54ce9d2023-01-03 13:30:49 +0800261 i2c0_pins: i2c0-pins-g0 {
262 mux {
263 function = "i2c";
264 groups = "i2c0_1";
265 };
266 };
267
268 pcie0_pins: pcie0-pins {
269 mux {
270 function = "pcie";
271 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
272 "pcie_wake_n0_0";
273 };
274 };
275
276 pcie1_pins: pcie1-pins {
277 mux {
278 function = "pcie";
279 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
280 "pcie_wake_n1_0";
281 };
282 };
283
284 pcie2_pins: pcie2-pins {
285 mux {
286 function = "pcie";
287 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
288 "pcie_wake_n2_0";
289 };
290 };
291
292 pcie3_pins: pcie3-pins {
293 mux {
294 function = "pcie";
295 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
296 "pcie_wake_n3_0";
297 };
298 };
299
300 spi0_flash_pins: spi0-pins {
301 mux {
302 function = "spi";
303 groups = "spi0", "spi0_wp_hold";
304 };
305 };
306
307 spic_pins: spi1-pins {
308 mux {
309 function = "spi";
310 groups = "spi1";
311 };
312 };
313
314 i2c1_pins: i2c1-pins {
315 mux {
316 function = "i2c";
317 groups = "i2c1_0";
318 };
319 };
320
321 i2s_pins: i2s-pins {
322 mux {
323 function = "audio";
324 groups = "i2s";
325 };
326 };
327
328 pcm_pins: pcm-pins {
329 mux {
330 function = "audio";
331 groups = "pcm";
332 };
333 };
334};
335
336&watchdog {
337 status = "disabled";
338};
339
340&eth {
341 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800342 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800343 status = "okay";
344
345 gmac0: mac@0 {
346 compatible = "mediatek,eth-mac";
347 reg = <0>;
348 mac-type = "xgdm";
349 phy-mode = "10gbase-kr";
350
351 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800352 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800353 full-duplex;
354 pause;
355 };
356 };
357
358 gmac1: mac@1 {
359 compatible = "mediatek,eth-mac";
360 reg = <1>;
361 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800362 phy-mode = "usxgmii";
developerc54ce9d2023-01-03 13:30:49 +0800363 phy-handle = <&phy0>;
364 };
365
366 mdio: mdio-bus {
367 #address-cells = <1>;
368 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800369 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800370
371 phy0: ethernet-phy@0 {
372 reg = <0>;
373 compatible = "ethernet-phy-ieee802.3-c45";
374 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800375 reset-assert-us = <100000>;
376 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800377 };
378
379 switch@0 {
380 compatible = "mediatek,mt7988";
381 reg = <31>;
382 ports {
383 #address-cells = <1>;
384 #size-cells = <0>;
385
386 port@0 {
387 reg = <0>;
388 label = "lan0";
389 phy-mode = "gmii";
390 phy-handle = <&sphy0>;
391 };
392
393 port@1 {
394 reg = <1>;
395 label = "lan1";
396 phy-mode = "gmii";
397 phy-handle = <&sphy1>;
398 };
399
400 port@2 {
401 reg = <2>;
402 label = "lan2";
403 phy-mode = "gmii";
404 phy-handle = <&sphy2>;
405 };
406
407 port@3 {
408 reg = <3>;
409 label = "lan3";
410 phy-mode = "gmii";
411 phy-handle = <&sphy3>;
412 };
413
414 port@6 {
415 reg = <6>;
416 label = "cpu";
417 ethernet = <&gmac0>;
418 phy-mode = "10gbase-kr";
419
420 fixed-link {
421 speed = <10000>;
422 full-duplex;
423 pause;
424 };
425 };
426 };
427
428 mdio {
429 compatible = "mediatek,dsa-slave-mdio";
430 #address-cells = <1>;
431 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800432 pinctrl-names = "default";
433 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800434
435 sphy0: switch_phy0@0 {
436 compatible = "ethernet-phy-id03a2.9481";
437 reg = <0>;
438 phy-mode = "gmii";
439 rext = "efuse";
440 tx_r50 = "efuse";
441 nvmem-cells = <&phy_calibration_p0>;
442 nvmem-cell-names = "phy-cal-data";
443 };
444
445 sphy1: switch_phy1@1 {
446 compatible = "ethernet-phy-id03a2.9481";
447 reg = <1>;
448 phy-mode = "gmii";
449 rext = "efuse";
450 tx_r50 = "efuse";
451 nvmem-cells = <&phy_calibration_p1>;
452 nvmem-cell-names = "phy-cal-data";
453 };
454
455 sphy2: switch_phy2@2 {
456 compatible = "ethernet-phy-id03a2.9481";
457 reg = <2>;
458 phy-mode = "gmii";
459 rext = "efuse";
460 tx_r50 = "efuse";
461 nvmem-cells = <&phy_calibration_p2>;
462 nvmem-cell-names = "phy-cal-data";
463 };
464
465 sphy3: switch_phy3@3 {
466 compatible = "ethernet-phy-id03a2.9481";
467 reg = <3>;
468 phy-mode = "gmii";
469 rext = "efuse";
470 tx_r50 = "efuse";
471 nvmem-cells = <&phy_calibration_p3>;
472 nvmem-cell-names = "phy-cal-data";
473 };
474 };
475 };
476 };
477};
478
479&hnat {
480 mtketh-wan = "eth1";
481 mtketh-lan = "lan";
482 mtketh-lan2 = "eth2";
483 mtketh-max-gmac = <3>;
484 status = "okay";
485};