blob: 53d0b93d9baf07a8648fa9781295571d220b3945 [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
developer2cdaeb12022-10-04 20:25:05 +0800230 i2c0_pins: i2c0-pins-g0 {
231 mux {
232 function = "i2c";
233 groups = "i2c0_1";
234 };
235 };
236
237 i2c1_pins: i2c1-pins-g0 {
238 mux {
239 function = "i2c";
240 groups = "i2c1_0";
241 };
242 };
243
developer9ca473e2022-10-20 19:37:54 +0800244 mmc0_pins_default: mmc0-pins-default {
245 mux {
246 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800247 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800248 };
249 };
250
251 mmc0_pins_uhs: mmc0-pins-uhs {
252 mux {
253 function = "flash";
developer7d52c342022-11-03 11:46:34 +0800254 groups = "sdcard";
developer9ca473e2022-10-20 19:37:54 +0800255 };
256 };
257
developer2cdaeb12022-10-04 20:25:05 +0800258 pcie0_pins: pcie0-pins {
259 mux {
260 function = "pcie";
261 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
262 "pcie_wake_n0_0";
263 };
264 };
265
266 pcie1_pins: pcie1-pins {
267 mux {
268 function = "pcie";
269 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
270 "pcie_wake_n1_0";
271 };
272 };
273
274 pcie2_pins: pcie2-pins {
275 mux {
276 function = "pcie";
277 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
278 "pcie_wake_n2_0";
279 };
280 };
281
282 pcie3_pins: pcie3-pins {
283 mux {
284 function = "pcie";
285 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
286 "pcie_wake_n3_0";
287 };
288 };
289
290 spi0_flash_pins: spi0-pins {
291 mux {
292 function = "spi";
293 groups = "spi0", "spi0_wp_hold";
294 };
295 };
296
297 spic_pins: spi1-pins {
298 mux {
299 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800300 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800301 };
302 };
303};
304
305&watchdog {
306 status = "disabled";
307};
308
309&eth {
developer24ba51c2022-11-15 11:22:46 +0800310 pinctrl-names = "default";
311 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800312 status = "okay";
313
314 gmac0: mac@0 {
315 compatible = "mediatek,eth-mac";
316 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800317 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800318 phy-mode = "10gbase-kr";
319
320 fixed-link {
321 speed = <2500>;
322 full-duplex;
323 pause;
324 };
325 };
326
327 gmac1: mac@1 {
328 compatible = "mediatek,eth-mac";
329 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800330 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800331 phy-mode = "10gbase-kr";
332 phy-handle = <&phy0>;
333 };
334
335 gmac2: mac@2 {
336 compatible = "mediatek,eth-mac";
337 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800338 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800339 phy-mode = "10gbase-kr";
340 phy-handle = <&phy1>;
341 };
342
343 mdio: mdio-bus {
344 #address-cells = <1>;
345 #size-cells = <0>;
developer24ba51c2022-11-15 11:22:46 +0800346 mdc-max-frequency = <10500000>;
347
developer2cdaeb12022-10-04 20:25:05 +0800348 phy0: ethernet-phy@0 {
349 reg = <0>;
350 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800351 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800352 reset-assert-us = <100000>;
353 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800354 };
355
356 phy1: ethernet-phy@8 {
357 reg = <8>;
358 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800359 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800360 reset-assert-us = <100000>;
361 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800362 };
363 };
364};
365
366&hnat {
367 mtketh-wan = "eth1";
368 mtketh-lan = "eth0";
369 mtketh-lan2 = "eth2";
370 mtketh-max-gmac = <3>;
371 status = "okay";
372};
373
374&gsw {
375 mediatek,mdio = <&mdio>;
376 mediatek,portmap = "llllw";
377 mediatek,mdio_master_pinmux = <1>;
378 interrupt-parent = <&gic>;
379 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
380 status = "okay";
381
382 port6: port@6 {
383 compatible = "mediatek,mt753x-port";
384 mediatek,ssc-on;
385 phy-mode = "10gbase-kr";
386 reg = <6>;
387 fixed-link {
388 speed = <2500>;
389 full-duplex;
390 };
391 };
392
393 mdio1: mdio-bus {
394 #address-cells = <1>;
395 #size-cells = <0>;
396
397 gsw_phy0: ethernet-phy@0 {
398 compatible = "ethernet-phy-id03a2.9481";
399 reg = <0>;
400 phy-mode = "gmii";
401 rext = "efuse";
402 tx_r50 = "efuse";
403 nvmem-cells = <&phy_calibration_p0>;
404 nvmem-cell-names = "phy-cal-data";
405 };
406
407 gsw_phy1: ethernet-phy@1 {
408 compatible = "ethernet-phy-id03a2.9481";
409 reg = <1>;
410 phy-mode = "gmii";
411 rext = "efuse";
412 tx_r50 = "efuse";
413 nvmem-cells = <&phy_calibration_p1>;
414 nvmem-cell-names = "phy-cal-data";
415 };
416
417 gsw_phy2: ethernet-phy@2 {
418 compatible = "ethernet-phy-id03a2.9481";
419 reg = <2>;
420 phy-mode = "gmii";
421 rext = "efuse";
422 tx_r50 = "efuse";
423 nvmem-cells = <&phy_calibration_p2>;
424 nvmem-cell-names = "phy-cal-data";
425 };
426
427 gsw_phy3: ethernet-phy@3 {
428 compatible = "ethernet-phy-id03a2.9481";
429 reg = <3>;
430 phy-mode = "gmii";
431 rext = "efuse";
432 tx_r50 = "efuse";
433 nvmem-cells = <&phy_calibration_p3>;
434 nvmem-cell-names = "phy-cal-data";
435 };
436 };
437};
developer9ca473e2022-10-20 19:37:54 +0800438
439&mmc0 {
440 pinctrl-names = "default", "state_uhs";
441 pinctrl-0 = <&mmc0_pins_default>;
442 pinctrl-1 = <&mmc0_pins_uhs>;
443 bus-width = <4>;
444 max-frequency = <52000000>;
445 cap-sd-highspeed;
446 vmmc-supply = <&reg_3p3v>;
447 vqmmc-supply = <&reg_3p3v>;
448 no-mmc;
449 no-sdio;
450 status = "okay";
451};
developerde8a1062023-01-31 17:00:33 +0800452
453&slot0 {
454 mt7996@0,0 {
455 reg = <0x0000 0 0 0 0>;
456 device_type = "pci";
457 mediatek,mtd-eeprom = <&factory 0x0>;
458 };
459};