blob: 5dcfd584523d07a3cceb11a93872c1040a54b271 [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#include "mt7988.dtsi"
9
10/ {
11 model = "MediaTek MT7988 DSA external-2.5G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-dsa-e2p5g-spim-snand",
13 /* Reserve this for DVFS if creating new dts */
14 "mediatek,mt7988";
15
16 chosen {
17 bootargs = "console=ttyS0,115200n1 loglevel=8 \
18 earlycon=uart8250,mmio32,0x11000000 \
19 pci=pcie_bus_perf";
20 };
21
22 memory {
23 reg = <0 0x40000000 0 0x10000000>;
24 };
25
26 nmbm_spim_nand {
27 compatible = "generic,nmbm";
28
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 lower-mtd-device = <&spi_nand>;
33 forced-create;
34
35 partitions {
36 compatible = "fixed-partitions";
37 #address-cells = <1>;
38 #size-cells = <1>;
39
40 partition@0 {
41 label = "BL2";
42 reg = <0x00000 0x0100000>;
43 read-only;
44 };
45
46 partition@100000 {
47 label = "u-boot-env";
48 reg = <0x0100000 0x0080000>;
49 };
50
51 factory: partition@180000 {
52 label = "Factory";
53 reg = <0x180000 0x0400000>;
54 };
55
56 partition@580000 {
57 label = "FIP";
58 reg = <0x580000 0x0200000>;
59 };
60
61 partition@780000 {
62 label = "ubi";
developerbaa8f602022-12-07 17:07:51 +080063 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080064 };
65 };
66 };
67
68 wsys_adie: wsys_adie@0 {
69 // fpga cases need to manual change adie_id / sku_type for dvt only
70 compatible = "mediatek,rebb-mt7988-adie";
71 adie_id = <7976>;
72 sku_type = <3000>;
73 };
74};
75
76&fan {
77 pwms = <&pwm 0 50000 0>;
78 status = "okay";
79};
80
81&i2c0 {
82 pinctrl-names = "default";
83 pinctrl-0 = <&i2c0_pins>;
84 status = "okay";
85
86 rt5190a_64: rt5190a@64 {
87 compatible = "richtek,rt5190a";
88 reg = <0x64>;
89 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
90 vin2-supply = <&rt5190_buck1>;
91 vin3-supply = <&rt5190_buck1>;
92 vin4-supply = <&rt5190_buck1>;
93
94 regulators {
95 rt5190_buck1: buck1 {
96 regulator-name = "rt5190a-buck1";
97 regulator-min-microvolt = <5090000>;
98 regulator-max-microvolt = <5090000>;
99 regulator-allowed-modes =
100 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
101 regulator-boot-on;
102 };
103 buck2 {
104 regulator-name = "vcore";
105 regulator-min-microvolt = <600000>;
106 regulator-max-microvolt = <1400000>;
107 regulator-boot-on;
108 };
109 buck3 {
110 regulator-name = "proc";
111 regulator-min-microvolt = <600000>;
112 regulator-max-microvolt = <1400000>;
113 regulator-boot-on;
114 };
115 buck4 {
116 regulator-name = "rt5190a-buck4";
117 regulator-min-microvolt = <850000>;
118 regulator-max-microvolt = <850000>;
119 regulator-allowed-modes =
120 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
121 regulator-boot-on;
122 };
123 ldo {
124 regulator-name = "rt5190a-ldo";
125 regulator-min-microvolt = <1200000>;
126 regulator-max-microvolt = <1200000>;
127 regulator-boot-on;
128 };
129 };
130 };
131};
132
133&i2c1 {
134 pinctrl-names = "default";
135 pinctrl-0 = <&i2c1_pins>;
136 status = "okay";
developerf9d31032023-03-03 20:54:33 +0800137
138 dps368: dps368@77 {
139 compatible = "infineon,dps310";
140 reg = <0x77>;
141 };
developer2cdaeb12022-10-04 20:25:05 +0800142};
143
144&pwm {
145 status = "okay";
146};
147
148&uart0 {
149 status = "okay";
150};
151
152&spi0 {
153 pinctrl-names = "default";
154 pinctrl-0 = <&spi0_flash_pins>;
155 status = "okay";
156
157 spi_nand: spi_nand@0 {
158 #address-cells = <1>;
159 #size-cells = <1>;
160 compatible = "spi-nand";
161 spi-cal-enable;
162 spi-cal-mode = "read-data";
163 spi-cal-datalen = <7>;
164 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
165 spi-cal-addrlen = <5>;
166 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
167 reg = <0>;
168 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800169 spi-tx-bus-width = <4>;
170 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +0800171 };
172};
173
174&spi1 {
175 pinctrl-names = "default";
176 /* pin shared with snfi */
177 pinctrl-0 = <&spic_pins>;
178 status = "disabled";
179};
180
181&pcie0 {
182 pinctrl-names = "default";
183 pinctrl-0 = <&pcie0_pins>;
184 status = "okay";
185};
186
187&pcie1 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&pcie1_pins>;
190 status = "okay";
191};
192
193&pcie2 {
194 pinctrl-names = "default";
195 pinctrl-0 = <&pcie2_pins>;
196 status = "disabled";
197};
198
199&pcie3 {
200 pinctrl-names = "default";
201 pinctrl-0 = <&pcie3_pins>;
202 status = "okay";
203};
204
205&pio {
developercaca1df2023-05-17 10:54:49 +0800206 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800207 mux {
208 function = "led";
developercaca1df2023-05-17 10:54:49 +0800209 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800210 };
211 };
212
developercaca1df2023-05-17 10:54:49 +0800213 gbe1_led0_pins: gbe1-pins {
214 mux {
215 function = "led";
216 groups = "gbe1_led0";
217 };
218 };
219
220 gbe2_led0_pins: gbe2-pins {
221 mux {
222 function = "led";
223 groups = "gbe2_led0";
224 };
225 };
226
227 gbe3_led0_pins: gbe3-pins {
228 mux {
229 function = "led";
230 groups = "gbe3_led0";
231 };
232 };
233
developer2cdaeb12022-10-04 20:25:05 +0800234 i2c0_pins: i2c0-pins-g0 {
235 mux {
236 function = "i2c";
237 groups = "i2c0_1";
238 };
239 };
240
241 i2c1_pins: i2c1-pins-g0 {
242 mux {
243 function = "i2c";
244 groups = "i2c1_0";
245 };
246 };
247
248 pcie0_pins: pcie0-pins {
249 mux {
250 function = "pcie";
251 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
252 "pcie_wake_n0_0";
253 };
254 };
255
256 pcie1_pins: pcie1-pins {
257 mux {
258 function = "pcie";
259 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
260 "pcie_wake_n1_0";
261 };
262 };
263
264 pcie2_pins: pcie2-pins {
265 mux {
266 function = "pcie";
267 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
268 "pcie_wake_n2_0";
269 };
270 };
271
272 pcie3_pins: pcie3-pins {
273 mux {
274 function = "pcie";
275 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
276 "pcie_wake_n3_0";
277 };
278 };
279
280 spi0_flash_pins: spi0-pins {
281 mux {
282 function = "spi";
283 groups = "spi0", "spi0_wp_hold";
284 };
285 };
286
287 spic_pins: spi1-pins {
288 mux {
289 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800290 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800291 };
292 };
293};
294
295&watchdog {
296 status = "disabled";
297};
298
299&eth {
300 status = "okay";
301
302 gmac0: mac@0 {
303 compatible = "mediatek,eth-mac";
304 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800305 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800306 phy-mode = "10gbase-kr";
307
308 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800309 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800310 full-duplex;
311 pause;
312 };
313 };
314
315 gmac1: mac@1 {
316 compatible = "mediatek,eth-mac";
317 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800318 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800319 phy-mode = "2500base-x";
320 phy-handle = <&phy13>;
321 };
322
323 gmac2: mac@2 {
324 compatible = "mediatek,eth-mac";
325 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800326 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800327 phy-mode = "2500base-x";
328 phy-handle = <&phy5>;
329 };
330
331 mdio: mdio-bus {
332 #address-cells = <1>;
333 #size-cells = <0>;
334
335 phy5: phy@5 {
336 compatible = "ethernet-phy-ieee802.3-c45";
337 reg = <5>;
338 reset-gpios = <&pio 0 1>;
339 reset-assert-us = <600>;
340 reset-deassert-us = <20000>;
341 };
342
343 phy13: phy@13 {
344 compatible = "ethernet-phy-ieee802.3-c45";
345 reg = <13>;
346 reset-gpios = <&pio 1 1>;
347 reset-assert-us = <600>;
348 reset-deassert-us = <20000>;
349 };
350
351 switch@0 {
352 compatible = "mediatek,mt7988";
353 reg = <31>;
354 ports {
355 #address-cells = <1>;
356 #size-cells = <0>;
357
358 port@0 {
359 reg = <0>;
360 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800361 phy-mode = "gmii";
362 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800363 };
364
365 port@1 {
366 reg = <1>;
367 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800368 phy-mode = "gmii";
369 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800370 };
371
372 port@2 {
373 reg = <2>;
374 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800375 phy-mode = "gmii";
376 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800377 };
378
379 port@3 {
380 reg = <3>;
381 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800382 phy-mode = "gmii";
383 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800384 };
385
386 port@6 {
387 reg = <6>;
388 label = "cpu";
389 ethernet = <&gmac0>;
390 phy-mode = "10gbase-kr";
391
392 fixed-link {
393 speed = <10000>;
394 full-duplex;
395 pause;
396 };
397 };
398 };
developera36549c2022-10-04 16:26:13 +0800399
400 mdio {
401 compatible = "mediatek,dsa-slave-mdio";
402 #address-cells = <1>;
403 #size-cells = <0>;
404
405 sphy0: switch_phy0@0 {
406 compatible = "ethernet-phy-id03a2.9481";
407 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800408 pinctrl-names = "gbe-led";
409 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800410 nvmem-cells = <&phy_calibration_p0>;
411 nvmem-cell-names = "phy-cal-data";
412 };
413
414 sphy1: switch_phy1@1 {
415 compatible = "ethernet-phy-id03a2.9481";
416 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800417 pinctrl-names = "gbe-led";
418 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800419 nvmem-cells = <&phy_calibration_p1>;
420 nvmem-cell-names = "phy-cal-data";
421 };
422
423 sphy2: switch_phy2@2 {
424 compatible = "ethernet-phy-id03a2.9481";
425 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800426 pinctrl-names = "gbe-led";
427 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800428 nvmem-cells = <&phy_calibration_p2>;
429 nvmem-cell-names = "phy-cal-data";
430 };
431
432 sphy3: switch_phy3@3 {
433 compatible = "ethernet-phy-id03a2.9481";
434 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800435 pinctrl-names = "gbe-led";
436 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800437 nvmem-cells = <&phy_calibration_p3>;
438 nvmem-cell-names = "phy-cal-data";
439 };
440 };
developer2cdaeb12022-10-04 20:25:05 +0800441 };
442 };
443};
444
445&hnat {
446 mtketh-wan = "eth1";
447 mtketh-lan = "lan";
448 mtketh-lan2 = "eth2";
449 mtketh-max-gmac = <3>;
450 status = "okay";
451};