blob: 22ec0a13fb4fe095b7d17ece3b31aef0c0669f1a [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
254 i2c0_pins: i2c0-pins-g0 {
255 mux {
256 function = "i2c";
257 groups = "i2c0_1";
258 };
259 };
260
261 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";
303 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";
325 };
326 };
327};
328
329&watchdog {
330 status = "disabled";
331};
332
333&eth {
334 pinctrl-names = "default";
335 pinctrl-0 = <&mdio0_pins>;
336 status = "okay";
337
338 gmac0: mac@0 {
339 compatible = "mediatek,eth-mac";
340 reg = <0>;
341 mac-type = "xgdm";
342 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>;
354 mac-type = "xgdm";
355 phy-mode = "10gbase-kr";
356 phy-handle = <&phy0>;
357 };
358
359 mdio: mdio-bus {
360 #address-cells = <1>;
361 #size-cells = <0>;
362 mdc-max-frequency = <10500000>;
363
364 phy0: ethernet-phy@0 {
365 reg = <0>;
366 compatible = "ethernet-phy-ieee802.3-c45";
367 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800368 reset-assert-us = <100000>;
369 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800370 };
371
372 switch@0 {
373 compatible = "mediatek,mt7988";
374 reg = <31>;
375 ports {
376 #address-cells = <1>;
377 #size-cells = <0>;
378
379 port@0 {
380 reg = <0>;
381 label = "lan0";
382 phy-mode = "gmii";
383 phy-handle = <&sphy0>;
384 };
385
386 port@1 {
387 reg = <1>;
388 label = "lan1";
389 phy-mode = "gmii";
390 phy-handle = <&sphy1>;
391 };
392
393 port@2 {
394 reg = <2>;
395 label = "lan2";
396 phy-mode = "gmii";
397 phy-handle = <&sphy2>;
398 };
399
400 port@3 {
401 reg = <3>;
402 label = "lan3";
403 phy-mode = "gmii";
404 phy-handle = <&sphy3>;
405 };
406
407 port@6 {
408 reg = <6>;
409 label = "cpu";
410 ethernet = <&gmac0>;
411 phy-mode = "10gbase-kr";
412
413 fixed-link {
414 speed = <10000>;
415 full-duplex;
416 pause;
417 };
418 };
419 };
420
421 mdio {
422 compatible = "mediatek,dsa-slave-mdio";
423 #address-cells = <1>;
424 #size-cells = <0>;
425
426 sphy0: switch_phy0@0 {
427 compatible = "ethernet-phy-id03a2.9481";
428 reg = <0>;
429 phy-mode = "gmii";
430 rext = "efuse";
431 tx_r50 = "efuse";
432 nvmem-cells = <&phy_calibration_p0>;
433 nvmem-cell-names = "phy-cal-data";
434 };
435
436 sphy1: switch_phy1@1 {
437 compatible = "ethernet-phy-id03a2.9481";
438 reg = <1>;
439 phy-mode = "gmii";
440 rext = "efuse";
441 tx_r50 = "efuse";
442 nvmem-cells = <&phy_calibration_p1>;
443 nvmem-cell-names = "phy-cal-data";
444 };
445
446 sphy2: switch_phy2@2 {
447 compatible = "ethernet-phy-id03a2.9481";
448 reg = <2>;
449 phy-mode = "gmii";
450 rext = "efuse";
451 tx_r50 = "efuse";
452 nvmem-cells = <&phy_calibration_p2>;
453 nvmem-cell-names = "phy-cal-data";
454 };
455
456 sphy3: switch_phy3@3 {
457 compatible = "ethernet-phy-id03a2.9481";
458 reg = <3>;
459 phy-mode = "gmii";
460 rext = "efuse";
461 tx_r50 = "efuse";
462 nvmem-cells = <&phy_calibration_p3>;
463 nvmem-cell-names = "phy-cal-data";
464 };
465 };
466 };
467 };
468};
469
470&hnat {
471 mtketh-wan = "eth1";
472 mtketh-lan = "lan";
473 mtketh-lan2 = "eth2";
474 mtketh-max-gmac = <3>;
475 status = "okay";
476};