blob: a77d89c2c50bb701c4e7cfcdc7aff2a121dfd890 [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
developer97cfd792023-05-08 11:18:38 +0800164&uart1 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&uart1_pins>;
167 status = "okay";
168};
169
developer2cdaeb12022-10-04 20:25:05 +0800170&spi0 {
171 pinctrl-names = "default";
172 pinctrl-0 = <&spi0_flash_pins>;
173 status = "okay";
174
175 spi_nand: spi_nand@0 {
176 #address-cells = <1>;
177 #size-cells = <1>;
178 compatible = "spi-nand";
179 spi-cal-enable;
180 spi-cal-mode = "read-data";
181 spi-cal-datalen = <7>;
182 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
183 spi-cal-addrlen = <5>;
184 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
185 reg = <0>;
186 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800187 spi-tx-bus-width = <4>;
188 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +0800189 };
190};
191
192&spi1 {
193 pinctrl-names = "default";
194 /* pin shared with snfi */
195 pinctrl-0 = <&spic_pins>;
196 status = "disabled";
197};
198
199&pcie0 {
200 pinctrl-names = "default";
201 pinctrl-0 = <&pcie0_pins>;
202 status = "okay";
203};
204
205&pcie1 {
206 pinctrl-names = "default";
207 pinctrl-0 = <&pcie1_pins>;
208 status = "okay";
209};
210
211&pcie2 {
212 pinctrl-names = "default";
213 pinctrl-0 = <&pcie2_pins>;
214 status = "disabled";
215};
216
217&pcie3 {
218 pinctrl-names = "default";
219 pinctrl-0 = <&pcie3_pins>;
220 status = "okay";
221};
222
223&pio {
developer24ba51c2022-11-15 11:22:46 +0800224 mdio0_pins: mdio0-pins {
225 mux {
226 function = "mdio";
227 groups = "mdc_mdio0";
228 };
229
230 conf {
231 groups = "mdc_mdio0";
232 drive-strength = <MTK_DRIVE_8mA>;
233 };
234 };
235
developer447cb002023-04-06 17:54:54 +0800236 gbe_led0_pins: gbe-pins {
237 mux {
238 function = "led";
239 groups = "gbe_led0";
240 };
241 };
242
developer2cdaeb12022-10-04 20:25:05 +0800243 i2c0_pins: i2c0-pins-g0 {
244 mux {
245 function = "i2c";
246 groups = "i2c0_1";
247 };
248 };
249
250 i2c1_pins: i2c1-pins-g0 {
251 mux {
252 function = "i2c";
253 groups = "i2c1_0";
254 };
255 };
256
developer9ca473e2022-10-20 19:37:54 +0800257 mmc0_pins_default: mmc0-pins-default {
258 mux {
259 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800260 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800261 };
262 };
263
264 mmc0_pins_uhs: mmc0-pins-uhs {
265 mux {
266 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800267 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800268 };
269 };
270
developer2cdaeb12022-10-04 20:25:05 +0800271 pcie0_pins: pcie0-pins {
272 mux {
273 function = "pcie";
274 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
275 "pcie_wake_n0_0";
276 };
277 };
278
279 pcie1_pins: pcie1-pins {
280 mux {
281 function = "pcie";
282 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
283 "pcie_wake_n1_0";
284 };
285 };
286
287 pcie2_pins: pcie2-pins {
288 mux {
289 function = "pcie";
290 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
291 "pcie_wake_n2_0";
292 };
293 };
294
295 pcie3_pins: pcie3-pins {
296 mux {
297 function = "pcie";
298 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
299 "pcie_wake_n3_0";
300 };
301 };
302
303 spi0_flash_pins: spi0-pins {
304 mux {
305 function = "spi";
306 groups = "spi0", "spi0_wp_hold";
307 };
308 };
309
310 spic_pins: spi1-pins {
311 mux {
312 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800313 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800314 };
315 };
developer97cfd792023-05-08 11:18:38 +0800316
317 uart1_pins: uart1-pins {
318 mux {
319 function = "uart";
320 groups = "uart1_2";
321 };
322 };
developer2cdaeb12022-10-04 20:25:05 +0800323};
324
325&watchdog {
326 status = "disabled";
327};
328
329&eth {
developer24ba51c2022-11-15 11:22:46 +0800330 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800331 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800332 status = "okay";
333
334 gmac0: mac@0 {
335 compatible = "mediatek,eth-mac";
336 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800337 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800338 phy-mode = "10gbase-kr";
339
340 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800341 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800342 full-duplex;
343 pause;
344 };
345 };
346
347 gmac1: mac@1 {
348 compatible = "mediatek,eth-mac";
349 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800350 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800351 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800352 phy-handle = <&phy0>;
353 };
354
355 gmac2: mac@2 {
356 compatible = "mediatek,eth-mac";
357 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800358 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800359 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800360 phy-handle = <&phy1>;
361 };
362
363 mdio: mdio-bus {
364 #address-cells = <1>;
365 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800366 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800367
developer2cdaeb12022-10-04 20:25:05 +0800368 phy0: ethernet-phy@0 {
369 reg = <0>;
370 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800371 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800372 reset-assert-us = <100000>;
373 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800374 };
375
376 phy1: ethernet-phy@8 {
377 reg = <8>;
378 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800379 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800380 reset-assert-us = <100000>;
381 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800382 };
383 };
384};
385
386&hnat {
387 mtketh-wan = "eth1";
388 mtketh-lan = "eth0";
389 mtketh-lan2 = "eth2";
390 mtketh-max-gmac = <3>;
391 status = "okay";
392};
393
394&gsw {
395 mediatek,mdio = <&mdio>;
396 mediatek,portmap = "llllw";
397 mediatek,mdio_master_pinmux = <1>;
398 interrupt-parent = <&gic>;
399 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
400 status = "okay";
401
402 port6: port@6 {
403 compatible = "mediatek,mt753x-port";
404 mediatek,ssc-on;
405 phy-mode = "10gbase-kr";
406 reg = <6>;
407 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800408 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800409 full-duplex;
410 };
411 };
412
413 mdio1: mdio-bus {
414 #address-cells = <1>;
415 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800416 pinctrl-names = "default";
417 pinctrl-0 = <&gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800418
419 gsw_phy0: ethernet-phy@0 {
420 compatible = "ethernet-phy-id03a2.9481";
421 reg = <0>;
422 phy-mode = "gmii";
423 rext = "efuse";
424 tx_r50 = "efuse";
425 nvmem-cells = <&phy_calibration_p0>;
426 nvmem-cell-names = "phy-cal-data";
427 };
428
429 gsw_phy1: ethernet-phy@1 {
430 compatible = "ethernet-phy-id03a2.9481";
431 reg = <1>;
432 phy-mode = "gmii";
433 rext = "efuse";
434 tx_r50 = "efuse";
435 nvmem-cells = <&phy_calibration_p1>;
436 nvmem-cell-names = "phy-cal-data";
437 };
438
439 gsw_phy2: ethernet-phy@2 {
440 compatible = "ethernet-phy-id03a2.9481";
441 reg = <2>;
442 phy-mode = "gmii";
443 rext = "efuse";
444 tx_r50 = "efuse";
445 nvmem-cells = <&phy_calibration_p2>;
446 nvmem-cell-names = "phy-cal-data";
447 };
448
449 gsw_phy3: ethernet-phy@3 {
450 compatible = "ethernet-phy-id03a2.9481";
451 reg = <3>;
452 phy-mode = "gmii";
453 rext = "efuse";
454 tx_r50 = "efuse";
455 nvmem-cells = <&phy_calibration_p3>;
456 nvmem-cell-names = "phy-cal-data";
457 };
458 };
459};
developer9ca473e2022-10-20 19:37:54 +0800460
461&mmc0 {
462 pinctrl-names = "default", "state_uhs";
463 pinctrl-0 = <&mmc0_pins_default>;
464 pinctrl-1 = <&mmc0_pins_uhs>;
465 bus-width = <4>;
466 max-frequency = <52000000>;
467 cap-sd-highspeed;
468 vmmc-supply = <&reg_3p3v>;
469 vqmmc-supply = <&reg_3p3v>;
470 no-mmc;
471 no-sdio;
472 status = "okay";
473};
developerde8a1062023-01-31 17:00:33 +0800474
475&slot0 {
476 mt7996@0,0 {
477 reg = <0x0000 0 0 0 0>;
478 device_type = "pci";
479 mediatek,mtd-eeprom = <&factory 0x0>;
480 };
481};