blob: eea19a7ab0ba6dffd098e8b002b457786a287ee3 [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
9#include "mt7988.dtsi"
10
11/ {
developer3f9a06c2023-05-23 15:16:44 +080012 model = "MediaTek MT7988D GSW 10G SPIM-NAND RFB";
13 compatible = "mediatek,mt7988d-gsw-10g-spim-snand",
developerc54ce9d2023-01-03 13:30:49 +080014 /* Reserve this for DVFS if creating new dts */
15 "mediatek,mt7988";
16
17 chosen {
18 bootargs = "console=ttyS0,115200n1 loglevel=8 \
19 earlycon=uart8250,mmio32,0x11000000 \
20 pci=pcie_bus_perf";
21 };
22
23 gsw: gsw@0 {
24 compatible = "mediatek,mt753x";
25 mediatek,sysctrl = <&ethwarp>;
26 #address-cells = <1>;
27 #size-cells = <0>;
28 };
29
30 memory {
31 reg = <0 0x40000000 0 0x10000000>;
32 };
33
34 nmbm_spim_nand {
35 compatible = "generic,nmbm";
36
37 #address-cells = <1>;
38 #size-cells = <1>;
39
40 lower-mtd-device = <&spi_nand>;
41 forced-create;
42
43 partitions {
44 compatible = "fixed-partitions";
45 #address-cells = <1>;
46 #size-cells = <1>;
47
48 partition@0 {
49 label = "BL2";
50 reg = <0x00000 0x0100000>;
51 read-only;
52 };
53
54 partition@100000 {
55 label = "u-boot-env";
56 reg = <0x0100000 0x0080000>;
57 };
58
59 factory: partition@180000 {
60 label = "Factory";
61 reg = <0x180000 0x0400000>;
62 };
63
64 partition@580000 {
65 label = "FIP";
66 reg = <0x580000 0x0200000>;
67 };
68
69 partition@780000 {
70 label = "ubi";
71 reg = <0x780000 0x7080000>;
72 };
73 };
74 };
75
76 reg_3p3v: regulator-3p3v {
77 compatible = "regulator-fixed";
78 regulator-name = "fixed-3.3V";
79 regulator-min-microvolt = <3300000>;
80 regulator-max-microvolt = <3300000>;
81 regulator-boot-on;
82 regulator-always-on;
83 };
84
85 wsys_adie: wsys_adie@0 {
86 // fpga cases need to manual change adie_id / sku_type for dvt only
87 compatible = "mediatek,rebb-mt7988-adie";
88 adie_id = <7976>;
89 sku_type = <3000>;
90 };
91};
92
93&fan {
94 pwms = <&pwm 0 50000 0>;
95 status = "okay";
96};
97
98&i2c0 {
99 pinctrl-names = "default";
100 pinctrl-0 = <&i2c0_pins>;
101 status = "okay";
102
103 rt5190a_64: rt5190a@64 {
104 compatible = "richtek,rt5190a";
105 reg = <0x64>;
106 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
107 vin2-supply = <&rt5190_buck1>;
108 vin3-supply = <&rt5190_buck1>;
109 vin4-supply = <&rt5190_buck1>;
110
111 regulators {
112 rt5190_buck1: buck1 {
113 regulator-name = "rt5190a-buck1";
114 regulator-min-microvolt = <5090000>;
115 regulator-max-microvolt = <5090000>;
116 regulator-allowed-modes =
117 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
118 regulator-boot-on;
119 };
120 buck2 {
121 regulator-name = "vcore";
122 regulator-min-microvolt = <600000>;
123 regulator-max-microvolt = <1400000>;
124 regulator-boot-on;
125 };
126 buck3 {
127 regulator-name = "proc";
128 regulator-min-microvolt = <600000>;
129 regulator-max-microvolt = <1400000>;
130 regulator-boot-on;
131 };
132 buck4 {
133 regulator-name = "rt5190a-buck4";
134 regulator-min-microvolt = <850000>;
135 regulator-max-microvolt = <850000>;
136 regulator-allowed-modes =
137 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
138 regulator-boot-on;
139 };
140 ldo {
141 regulator-name = "rt5190a-ldo";
142 regulator-min-microvolt = <1200000>;
143 regulator-max-microvolt = <1200000>;
144 regulator-boot-on;
145 };
146 };
147 };
148};
149
150&i2c1 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&i2c1_pins>;
153 status = "okay";
154};
155
156&pwm {
157 status = "okay";
158};
159
160&uart0 {
161 status = "okay";
162};
163
164&spi0 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&spi0_flash_pins>;
167 status = "okay";
168
169 spi_nand: spi_nand@0 {
170 #address-cells = <1>;
171 #size-cells = <1>;
172 compatible = "spi-nand";
173 spi-cal-enable;
174 spi-cal-mode = "read-data";
175 spi-cal-datalen = <7>;
176 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
177 spi-cal-addrlen = <5>;
178 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
179 reg = <0>;
180 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800181 spi-tx-bus-width = <4>;
182 spi-rx-bus-width = <4>;
developerc54ce9d2023-01-03 13:30:49 +0800183 };
184};
185
186&spi1 {
187 pinctrl-names = "default";
188 /* pin shared with snfi */
189 pinctrl-0 = <&spic_pins>;
190 status = "disabled";
191};
192
193&pcie0 {
194 pinctrl-names = "default";
195 pinctrl-0 = <&pcie0_pins>;
196 status = "okay";
197};
198
199&pcie1 {
200 pinctrl-names = "default";
201 pinctrl-0 = <&pcie1_pins>;
202 status = "disabled";
203};
204
205&pcie2 {
206 pinctrl-names = "default";
207 pinctrl-0 = <&pcie2_pins>;
208 status = "disabled";
209};
210
211&pcie3 {
212 pinctrl-names = "default";
213 pinctrl-0 = <&pcie3_pins>;
214 status = "okay";
215};
216
217&pio {
218 mdio0_pins: mdio0-pins {
219 mux {
220 function = "mdio";
221 groups = "mdc_mdio0";
222 };
223
224 conf {
225 groups = "mdc_mdio0";
226 drive-strength = <MTK_DRIVE_8mA>;
227 };
228 };
229
developercaca1df2023-05-17 10:54:49 +0800230 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800231 mux {
232 function = "led";
developercaca1df2023-05-17 10:54:49 +0800233 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800234 };
235 };
236
developercaca1df2023-05-17 10:54:49 +0800237 gbe1_led0_pins: gbe1-pins {
238 mux {
239 function = "led";
240 groups = "gbe1_led0";
241 };
242 };
243
244 gbe2_led0_pins: gbe2-pins {
245 mux {
246 function = "led";
247 groups = "gbe2_led0";
248 };
249 };
250
251 gbe3_led0_pins: gbe3-pins {
252 mux {
253 function = "led";
254 groups = "gbe3_led0";
255 };
256 };
257
developerb4a8e1f2023-04-28 10:18:42 +0800258 i2p5gbe_led0_pins: 2p5gbe-pins {
259 mux {
260 function = "led";
261 groups = "2p5gbe_led0";
262 };
263 };
264
developerc54ce9d2023-01-03 13:30:49 +0800265 i2c0_pins: i2c0-pins-g0 {
266 mux {
267 function = "i2c";
268 groups = "i2c0_1";
269 };
270 };
271
272 i2c1_pins: i2c1-pins-g0 {
273 mux {
274 function = "i2c";
275 groups = "i2c1_0";
276 };
277 };
278
279 mmc0_pins_default: mmc0-pins-default {
280 mux {
281 function = "flash";
282 groups = "sdcard";
283 };
284 };
285
286 mmc0_pins_uhs: mmc0-pins-uhs {
287 mux {
288 function = "flash";
289 groups = "sdcard";
290 };
291 };
292
293 pcie0_pins: pcie0-pins {
294 mux {
295 function = "pcie";
296 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
297 "pcie_wake_n0_0";
298 };
299 };
300
301 pcie1_pins: pcie1-pins {
302 mux {
303 function = "pcie";
304 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
305 "pcie_wake_n1_0";
306 };
307 };
308
309 pcie2_pins: pcie2-pins {
310 mux {
311 function = "pcie";
312 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
313 "pcie_wake_n2_0";
314 };
315 };
316
317 pcie3_pins: pcie3-pins {
318 mux {
319 function = "pcie";
320 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
321 "pcie_wake_n3_0";
322 };
323 };
324
325 spi0_flash_pins: spi0-pins {
326 mux {
327 function = "spi";
328 groups = "spi0", "spi0_wp_hold";
329 };
330 };
331
332 spic_pins: spi1-pins {
333 mux {
334 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800335 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800336 };
337 };
338};
339
340&watchdog {
341 status = "disabled";
342};
343
344&eth {
345 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800346 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800347 status = "okay";
348
349 gmac0: mac@0 {
350 compatible = "mediatek,eth-mac";
351 reg = <0>;
352 mac-type = "xgdm";
353 phy-mode = "10gbase-kr";
354
355 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800356 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800357 full-duplex;
358 pause;
359 };
360 };
361
362 gmac1: mac@1 {
363 compatible = "mediatek,eth-mac";
364 reg = <1>;
365 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800366 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800367 phy-handle = <&phy0>;
368 };
369
developerb4a8e1f2023-04-28 10:18:42 +0800370 gmac2: mac@2 {
371 compatible = "mediatek,eth-mac";
372 reg = <2>;
373 mac-type = "xgdm";
374 phy-mode = "usxgmii";
375 phy-handle = <&phy1>;
376 };
377
developerc54ce9d2023-01-03 13:30:49 +0800378 mdio: mdio-bus {
379 #address-cells = <1>;
380 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800381 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800382
383 phy0: ethernet-phy@0 {
developer813ffc42023-05-17 13:39:48 +0800384 pinctrl-names = "i2p5gbe-led";
developerb4a8e1f2023-04-28 10:18:42 +0800385 pinctrl-0 = <&i2p5gbe_led0_pins>;
386 reg = <15>;
387 compatible = "ethernet-phy-ieee802.3-c45";
388 phy-mode = "xgmii";
389 };
390
391 phy1: ethernet-phy@8 {
392 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800393 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800394 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800395 reset-assert-us = <100000>;
396 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800397 };
398 };
399};
400
401&hnat {
402 mtketh-wan = "eth1";
403 mtketh-lan = "eth0";
404 mtketh-lan2 = "eth2";
405 mtketh-max-gmac = <3>;
406 status = "okay";
407};
408
409&gsw {
410 mediatek,mdio = <&mdio>;
411 mediatek,portmap = "llllw";
412 mediatek,mdio_master_pinmux = <1>;
413 interrupt-parent = <&gic>;
414 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
415 status = "okay";
416
417 port6: port@6 {
418 compatible = "mediatek,mt753x-port";
419 mediatek,ssc-on;
420 phy-mode = "10gbase-kr";
421 reg = <6>;
422 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800423 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800424 full-duplex;
425 };
426 };
427
428 mdio1: mdio-bus {
429 #address-cells = <1>;
430 #size-cells = <0>;
developerc54ce9d2023-01-03 13:30:49 +0800431
432 gsw_phy0: ethernet-phy@0 {
433 compatible = "ethernet-phy-id03a2.9481";
434 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800435 pinctrl-names = "gbe-led";
436 pinctrl-0 = <&gbe0_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800437 nvmem-cells = <&phy_calibration_p0>;
438 nvmem-cell-names = "phy-cal-data";
439 };
440
441 gsw_phy1: ethernet-phy@1 {
442 compatible = "ethernet-phy-id03a2.9481";
443 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800444 pinctrl-names = "gbe-led";
445 pinctrl-0 = <&gbe1_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800446 nvmem-cells = <&phy_calibration_p1>;
447 nvmem-cell-names = "phy-cal-data";
448 };
449
450 gsw_phy2: ethernet-phy@2 {
451 compatible = "ethernet-phy-id03a2.9481";
452 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800453 pinctrl-names = "gbe-led";
454 pinctrl-0 = <&gbe2_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800455 nvmem-cells = <&phy_calibration_p2>;
456 nvmem-cell-names = "phy-cal-data";
457 };
458
459 gsw_phy3: ethernet-phy@3 {
460 compatible = "ethernet-phy-id03a2.9481";
461 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800462 pinctrl-names = "gbe-led";
463 pinctrl-0 = <&gbe3_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800464 nvmem-cells = <&phy_calibration_p3>;
465 nvmem-cell-names = "phy-cal-data";
466 };
467 };
468};
469
470&mmc0 {
471 pinctrl-names = "default", "state_uhs";
472 pinctrl-0 = <&mmc0_pins_default>;
473 pinctrl-1 = <&mmc0_pins_uhs>;
474 bus-width = <4>;
475 max-frequency = <52000000>;
476 cap-sd-highspeed;
477 vmmc-supply = <&reg_3p3v>;
478 vqmmc-supply = <&reg_3p3v>;
479 no-mmc;
480 no-sdio;
481 status = "okay";
482};