blob: b6e7efe47c6b0a1d5397997f5bbefa2541f1de4e [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/ {
12 model = "MediaTek MT7988C GSW 10G SPIM-NAND RFB";
13 compatible = "mediatek,mt7988c-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";
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
developer447cb002023-04-06 17:54:54 +0800230 gbe_led0_pins: gbe-pins {
231 mux {
232 function = "led";
233 groups = "gbe_led0";
234 };
235 };
236
developerb4a8e1f2023-04-28 10:18:42 +0800237 i2p5gbe_led0_pins: 2p5gbe-pins {
238 mux {
239 function = "led";
240 groups = "2p5gbe_led0";
241 };
242 };
243
developerc54ce9d2023-01-03 13:30:49 +0800244 i2c0_pins: i2c0-pins-g0 {
245 mux {
246 function = "i2c";
247 groups = "i2c0_1";
248 };
249 };
250
251 i2c1_pins: i2c1-pins-g0 {
252 mux {
253 function = "i2c";
254 groups = "i2c1_0";
255 };
256 };
257
258 mmc0_pins_default: mmc0-pins-default {
259 mux {
260 function = "flash";
261 groups = "sdcard";
262 };
263 };
264
265 mmc0_pins_uhs: mmc0-pins-uhs {
266 mux {
267 function = "flash";
268 groups = "sdcard";
269 };
270 };
271
272 pcie0_pins: pcie0-pins {
273 mux {
274 function = "pcie";
275 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
276 "pcie_wake_n0_0";
277 };
278 };
279
280 pcie1_pins: pcie1-pins {
281 mux {
282 function = "pcie";
283 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
284 "pcie_wake_n1_0";
285 };
286 };
287
288 pcie2_pins: pcie2-pins {
289 mux {
290 function = "pcie";
291 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
292 "pcie_wake_n2_0";
293 };
294 };
295
296 pcie3_pins: pcie3-pins {
297 mux {
298 function = "pcie";
299 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
300 "pcie_wake_n3_0";
301 };
302 };
303
304 spi0_flash_pins: spi0-pins {
305 mux {
306 function = "spi";
307 groups = "spi0", "spi0_wp_hold";
308 };
309 };
310
311 spic_pins: spi1-pins {
312 mux {
313 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800314 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800315 };
316 };
317};
318
319&watchdog {
320 status = "disabled";
321};
322
323&eth {
324 pinctrl-names = "default";
developer941468f2023-04-10 15:21:02 +0800325 pinctrl-0 = <&mdio0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800326 status = "okay";
327
328 gmac0: mac@0 {
329 compatible = "mediatek,eth-mac";
330 reg = <0>;
331 mac-type = "xgdm";
332 phy-mode = "10gbase-kr";
333
334 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800335 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800336 full-duplex;
337 pause;
338 };
339 };
340
341 gmac1: mac@1 {
342 compatible = "mediatek,eth-mac";
343 reg = <1>;
344 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800345 phy-mode = "xgmii";
developerc54ce9d2023-01-03 13:30:49 +0800346 phy-handle = <&phy0>;
347 };
348
developerb4a8e1f2023-04-28 10:18:42 +0800349 gmac2: mac@2 {
350 compatible = "mediatek,eth-mac";
351 reg = <2>;
352 mac-type = "xgdm";
353 phy-mode = "usxgmii";
354 phy-handle = <&phy1>;
355 };
356
developerc54ce9d2023-01-03 13:30:49 +0800357 mdio: mdio-bus {
358 #address-cells = <1>;
359 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800360 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800361
362 phy0: ethernet-phy@0 {
developerb4a8e1f2023-04-28 10:18:42 +0800363 pinctrl-names = "default";
364 pinctrl-0 = <&i2p5gbe_led0_pins>;
365 reg = <15>;
366 compatible = "ethernet-phy-ieee802.3-c45";
367 phy-mode = "xgmii";
368 };
369
370 phy1: ethernet-phy@8 {
371 reg = <8>;
developerc54ce9d2023-01-03 13:30:49 +0800372 compatible = "ethernet-phy-ieee802.3-c45";
developerb4a8e1f2023-04-28 10:18:42 +0800373 reset-gpios = <&pio 3 1>;
developer265607f2023-03-01 18:37:46 +0800374 reset-assert-us = <100000>;
375 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800376 };
377 };
378};
379
380&hnat {
381 mtketh-wan = "eth1";
382 mtketh-lan = "eth0";
383 mtketh-lan2 = "eth2";
384 mtketh-max-gmac = <3>;
385 status = "okay";
386};
387
388&gsw {
389 mediatek,mdio = <&mdio>;
390 mediatek,portmap = "llllw";
391 mediatek,mdio_master_pinmux = <1>;
392 interrupt-parent = <&gic>;
393 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
394 status = "okay";
395
396 port6: port@6 {
397 compatible = "mediatek,mt753x-port";
398 mediatek,ssc-on;
399 phy-mode = "10gbase-kr";
400 reg = <6>;
401 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800402 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800403 full-duplex;
404 };
405 };
406
407 mdio1: mdio-bus {
408 #address-cells = <1>;
409 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800410 pinctrl-names = "default";
411 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800412
413 gsw_phy0: ethernet-phy@0 {
414 compatible = "ethernet-phy-id03a2.9481";
415 reg = <0>;
416 phy-mode = "gmii";
417 rext = "efuse";
418 tx_r50 = "efuse";
419 nvmem-cells = <&phy_calibration_p0>;
420 nvmem-cell-names = "phy-cal-data";
421 };
422
423 gsw_phy1: ethernet-phy@1 {
424 compatible = "ethernet-phy-id03a2.9481";
425 reg = <1>;
426 phy-mode = "gmii";
427 rext = "efuse";
428 tx_r50 = "efuse";
429 nvmem-cells = <&phy_calibration_p1>;
430 nvmem-cell-names = "phy-cal-data";
431 };
432
433 gsw_phy2: ethernet-phy@2 {
434 compatible = "ethernet-phy-id03a2.9481";
435 reg = <2>;
436 phy-mode = "gmii";
437 rext = "efuse";
438 tx_r50 = "efuse";
439 nvmem-cells = <&phy_calibration_p2>;
440 nvmem-cell-names = "phy-cal-data";
441 };
442
443 gsw_phy3: ethernet-phy@3 {
444 compatible = "ethernet-phy-id03a2.9481";
445 reg = <3>;
446 phy-mode = "gmii";
447 rext = "efuse";
448 tx_r50 = "efuse";
449 nvmem-cells = <&phy_calibration_p3>;
450 nvmem-cell-names = "phy-cal-data";
451 };
452 };
453};
454
455&mmc0 {
456 pinctrl-names = "default", "state_uhs";
457 pinctrl-0 = <&mmc0_pins_default>;
458 pinctrl-1 = <&mmc0_pins_uhs>;
459 bus-width = <4>;
460 max-frequency = <52000000>;
461 cap-sd-highspeed;
462 vmmc-supply = <&reg_3p3v>;
463 vqmmc-supply = <&reg_3p3v>;
464 no-mmc;
465 no-sdio;
466 status = "okay";
467};