blob: bda84feecdb637448d81531d0d0513561a02b995 [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
9#include "mt7988.dtsi"
10
11/ {
12 model = "MediaTek MT7988 GSW 10G SPIM-NAND RFB";
13 compatible = "mediatek,mt7988a-gsw-10g-spim-snand",
14 /* 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";
developerbaa8f602022-12-07 17:07:51 +080071 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080072 };
73 };
74 };
75
developer9ca473e2022-10-20 19:37:54 +080076 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
developer2cdaeb12022-10-04 20:25:05 +080085 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>;
181 spi-tx-buswidth = <4>;
182 spi-rx-buswidth = <4>;
183 };
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 = "okay";
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 {
developer24ba51c2022-11-15 11:22:46 +0800218 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
developer447cb002023-04-06 17:54:54 +0800230 gbe_led0_pins: gbe-pins {
231 mux {
232 function = "led";
233 groups = "gbe_led0";
234 };
235 };
236
developer2cdaeb12022-10-04 20:25:05 +0800237 i2c0_pins: i2c0-pins-g0 {
238 mux {
239 function = "i2c";
240 groups = "i2c0_1";
241 };
242 };
243
244 i2c1_pins: i2c1-pins-g0 {
245 mux {
246 function = "i2c";
247 groups = "i2c1_0";
248 };
249 };
250
developer9ca473e2022-10-20 19:37:54 +0800251 mmc0_pins_default: mmc0-pins-default {
252 mux {
253 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800254 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800255 };
256 };
257
258 mmc0_pins_uhs: mmc0-pins-uhs {
259 mux {
260 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800261 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800262 };
263 };
264
developer2cdaeb12022-10-04 20:25:05 +0800265 pcie0_pins: pcie0-pins {
266 mux {
267 function = "pcie";
268 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
269 "pcie_wake_n0_0";
270 };
271 };
272
273 pcie1_pins: pcie1-pins {
274 mux {
275 function = "pcie";
276 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
277 "pcie_wake_n1_0";
278 };
279 };
280
281 pcie2_pins: pcie2-pins {
282 mux {
283 function = "pcie";
284 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
285 "pcie_wake_n2_0";
286 };
287 };
288
289 pcie3_pins: pcie3-pins {
290 mux {
291 function = "pcie";
292 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
293 "pcie_wake_n3_0";
294 };
295 };
296
297 spi0_flash_pins: spi0-pins {
298 mux {
299 function = "spi";
300 groups = "spi0", "spi0_wp_hold";
301 };
302 };
303
304 spic_pins: spi1-pins {
305 mux {
306 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800307 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800308 };
309 };
310};
311
312&watchdog {
313 status = "disabled";
314};
315
316&eth {
developer24ba51c2022-11-15 11:22:46 +0800317 pinctrl-names = "default";
developer447cb002023-04-06 17:54:54 +0800318 pinctrl-0 = <&mdio0_pins>, <&gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800319 status = "okay";
320
321 gmac0: mac@0 {
322 compatible = "mediatek,eth-mac";
323 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800324 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800325 phy-mode = "10gbase-kr";
326
327 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800328 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800329 full-duplex;
330 pause;
331 };
332 };
333
334 gmac1: mac@1 {
335 compatible = "mediatek,eth-mac";
336 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800337 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800338 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800339 phy-handle = <&phy0>;
340 };
341
342 gmac2: mac@2 {
343 compatible = "mediatek,eth-mac";
344 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800345 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800346 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800347 phy-handle = <&phy1>;
348 };
349
350 mdio: mdio-bus {
351 #address-cells = <1>;
352 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800353 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800354
developer2cdaeb12022-10-04 20:25:05 +0800355 phy0: ethernet-phy@0 {
356 reg = <0>;
357 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800358 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800359 reset-assert-us = <100000>;
360 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800361 };
362
363 phy1: ethernet-phy@8 {
364 reg = <8>;
365 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800366 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800367 reset-assert-us = <100000>;
368 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800369 };
370 };
371};
372
373&hnat {
374 mtketh-wan = "eth1";
375 mtketh-lan = "eth0";
376 mtketh-lan2 = "eth2";
377 mtketh-max-gmac = <3>;
378 status = "okay";
379};
380
381&gsw {
382 mediatek,mdio = <&mdio>;
383 mediatek,portmap = "llllw";
384 mediatek,mdio_master_pinmux = <1>;
385 interrupt-parent = <&gic>;
386 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
387 status = "okay";
388
389 port6: port@6 {
390 compatible = "mediatek,mt753x-port";
391 mediatek,ssc-on;
392 phy-mode = "10gbase-kr";
393 reg = <6>;
394 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800395 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800396 full-duplex;
397 };
398 };
399
400 mdio1: mdio-bus {
401 #address-cells = <1>;
402 #size-cells = <0>;
403
404 gsw_phy0: ethernet-phy@0 {
405 compatible = "ethernet-phy-id03a2.9481";
406 reg = <0>;
407 phy-mode = "gmii";
408 rext = "efuse";
409 tx_r50 = "efuse";
410 nvmem-cells = <&phy_calibration_p0>;
411 nvmem-cell-names = "phy-cal-data";
412 };
413
414 gsw_phy1: ethernet-phy@1 {
415 compatible = "ethernet-phy-id03a2.9481";
416 reg = <1>;
417 phy-mode = "gmii";
418 rext = "efuse";
419 tx_r50 = "efuse";
420 nvmem-cells = <&phy_calibration_p1>;
421 nvmem-cell-names = "phy-cal-data";
422 };
423
424 gsw_phy2: ethernet-phy@2 {
425 compatible = "ethernet-phy-id03a2.9481";
426 reg = <2>;
427 phy-mode = "gmii";
428 rext = "efuse";
429 tx_r50 = "efuse";
430 nvmem-cells = <&phy_calibration_p2>;
431 nvmem-cell-names = "phy-cal-data";
432 };
433
434 gsw_phy3: ethernet-phy@3 {
435 compatible = "ethernet-phy-id03a2.9481";
436 reg = <3>;
437 phy-mode = "gmii";
438 rext = "efuse";
439 tx_r50 = "efuse";
440 nvmem-cells = <&phy_calibration_p3>;
441 nvmem-cell-names = "phy-cal-data";
442 };
443 };
444};
developer9ca473e2022-10-20 19:37:54 +0800445
446&mmc0 {
447 pinctrl-names = "default", "state_uhs";
448 pinctrl-0 = <&mmc0_pins_default>;
449 pinctrl-1 = <&mmc0_pins_uhs>;
450 bus-width = <4>;
451 max-frequency = <52000000>;
452 cap-sd-highspeed;
453 vmmc-supply = <&reg_3p3v>;
454 vqmmc-supply = <&reg_3p3v>;
455 no-mmc;
456 no-sdio;
457 status = "okay";
458};
developerde8a1062023-01-31 17:00:33 +0800459
460&slot0 {
461 mt7996@0,0 {
462 reg = <0x0000 0 0 0 0>;
463 device_type = "pci";
464 mediatek,mtd-eeprom = <&factory 0x0>;
465 };
466};