blob: 2fa9f5daaec6b8cacce492551953fd9285b2c853 [file] [log] [blame]
developer29344f12022-10-17 12:01:44 +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/;
developer722ab5f2024-02-22 11:01:46 +08008#include <dt-bindings/gpio/gpio.h>
developer29344f12022-10-17 12:01:44 +08009#include "mt7988.dtsi"
10
11/ {
12 model = "MediaTek MT7988A DSA 10G SPIM-NOR RFB";
13 compatible = "mediatek,mt7988a-dsa-10g-spim-nor",
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 memory {
24 reg = <0 0x40000000 0 0x10000000>;
25 };
26
27 wsys_adie: wsys_adie@0 {
28 // fpga cases need to manual change adie_id / sku_type for dvt only
29 compatible = "mediatek,rebb-mt7988-adie";
30 adie_id = <7976>;
31 sku_type = <3000>;
32 };
33};
34
35&fan {
developerfce0d152024-01-11 13:37:13 +080036 pwms = <&pwm 0 50000>;
developer29344f12022-10-17 12:01:44 +080037 status = "okay";
38};
39
40&pwm {
41 status = "okay";
42};
43
44&uart0 {
45 status = "okay";
46};
47
developer64376db2024-04-08 14:04:38 +080048&i2c0 {
49 pinctrl-names = "default";
50 pinctrl-0 = <&i2c0_pins>;
51 status = "okay";
52
53 rt5190a_64: rt5190a@64 {
54 compatible = "richtek,rt5190a";
55 reg = <0x64>;
56 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
57 vin2-supply = <&rt5190_buck1>;
58 vin3-supply = <&rt5190_buck1>;
59 vin4-supply = <&rt5190_buck1>;
60
61 regulators {
62 rt5190_buck1: buck1 {
63 regulator-name = "rt5190a-buck1";
64 regulator-min-microvolt = <5090000>;
65 regulator-max-microvolt = <5090000>;
66 regulator-allowed-modes =
67 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
68 regulator-boot-on;
69 };
70 buck2 {
71 regulator-name = "vcore";
72 regulator-min-microvolt = <600000>;
73 regulator-max-microvolt = <1400000>;
74 regulator-boot-on;
75 };
76 buck3 {
77 regulator-name = "proc";
78 regulator-min-microvolt = <600000>;
79 regulator-max-microvolt = <1400000>;
80 regulator-boot-on;
81 };
82 buck4 {
83 regulator-name = "rt5190a-buck4";
84 regulator-min-microvolt = <850000>;
85 regulator-max-microvolt = <850000>;
86 regulator-allowed-modes =
87 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
88 regulator-boot-on;
89 };
90 ldo {
91 regulator-name = "rt5190a-ldo";
92 regulator-min-microvolt = <1200000>;
93 regulator-max-microvolt = <1200000>;
94 regulator-boot-on;
95 };
96 };
97 };
98};
99
developer29344f12022-10-17 12:01:44 +0800100&spi1 {
101 pinctrl-names = "default";
102 /* pin shared with snfi */
103 pinctrl-0 = <&spic_pins>;
104 status = "disabled";
105};
106
107&spi2 {
108 pinctrl-names = "default";
109 pinctrl-0 = <&spi2_flash_pins>;
110 status = "okay";
111 spi_nor@0 {
112 #address-cells = <1>;
113 #size-cells = <1>;
114 compatible = "jedec,spi-nor";
115 spi-cal-enable;
116 spi-cal-mode = "read-data";
117 spi-cal-datalen = <7>;
118 spi-cal-data = /bits/ 8 <
119 0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */
120 spi-cal-addrlen = <1>;
121 spi-cal-addr = /bits/ 32 <0x0>;
122 reg = <0>;
123 spi-max-frequency = <52000000>;
developer05085502023-04-06 13:04:13 +0800124 spi-tx-bus-width = <4>;
125 spi-rx-bus-width = <4>;
developer29344f12022-10-17 12:01:44 +0800126
127 partition@00000 {
128 label = "BL2";
129 reg = <0x00000 0x0040000>;
130 };
131 partition@40000 {
132 label = "u-boot-env";
133 reg = <0x40000 0x0010000>;
134 };
135 factory: partition@50000 {
136 label = "Factory";
developer993c84b2023-02-15 16:03:22 +0800137 reg = <0x50000 0x0200000>;
developer29344f12022-10-17 12:01:44 +0800138 };
developer993c84b2023-02-15 16:03:22 +0800139 partition@250000 {
developer29344f12022-10-17 12:01:44 +0800140 label = "FIP";
developer993c84b2023-02-15 16:03:22 +0800141 reg = <0x250000 0x0080000>;
developer29344f12022-10-17 12:01:44 +0800142 };
developer993c84b2023-02-15 16:03:22 +0800143 partition@2D0000 {
developer29344f12022-10-17 12:01:44 +0800144 label = "firmware";
developer993c84b2023-02-15 16:03:22 +0800145 reg = <0x2D0000 0x1D30000>;
developer29344f12022-10-17 12:01:44 +0800146 };
147 };
148};
149
150&pcie0 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&pcie0_pins>;
developer722ab5f2024-02-22 11:01:46 +0800153 wifi-reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
154 wifi-reset-msleep = <100>;
developer29344f12022-10-17 12:01:44 +0800155 status = "okay";
156};
157
158&pcie1 {
159 pinctrl-names = "default";
160 pinctrl-0 = <&pcie1_pins>;
161 status = "okay";
162};
163
164&pcie2 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&pcie2_pins>;
167 status = "disabled";
168};
169
170&pcie3 {
171 pinctrl-names = "default";
172 pinctrl-0 = <&pcie3_pins>;
173 status = "okay";
174};
175
176&pio {
developer1d83bed2022-11-16 14:11:04 +0800177 mdio0_pins: mdio0-pins {
178 mux {
179 function = "mdio";
180 groups = "mdc_mdio0";
181 };
182
183 conf {
184 groups = "mdc_mdio0";
developeredbe69e2023-06-08 11:08:46 +0800185 drive-strength = <MTK_DRIVE_10mA>;
developer1d83bed2022-11-16 14:11:04 +0800186 };
187 };
188
developer4af681c2023-05-22 14:34:27 +0800189 gbe0_led0_pins: gbe0-pins {
developer63460d62023-04-11 10:42:32 +0800190 mux {
191 function = "led";
developer4af681c2023-05-22 14:34:27 +0800192 groups = "gbe0_led0";
developer63460d62023-04-11 10:42:32 +0800193 };
194 };
195
developer4af681c2023-05-22 14:34:27 +0800196 gbe1_led0_pins: gbe1-pins {
197 mux {
198 function = "led";
199 groups = "gbe1_led0";
200 };
201 };
202
203 gbe2_led0_pins: gbe2-pins {
204 mux {
205 function = "led";
206 groups = "gbe2_led0";
207 };
208 };
209
210 gbe3_led0_pins: gbe3-pins {
211 mux {
212 function = "led";
213 groups = "gbe3_led0";
214 };
215 };
216
developer64376db2024-04-08 14:04:38 +0800217 i2c0_pins: i2c0-pins-g0 {
218 mux {
219 function = "i2c";
220 groups = "i2c0_1";
221 };
222 };
223
developer29344f12022-10-17 12:01:44 +0800224 pcie0_pins: pcie0-pins {
225 mux {
226 function = "pcie";
developer722ab5f2024-02-22 11:01:46 +0800227 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0";
developer29344f12022-10-17 12:01:44 +0800228 };
229 };
230
231 pcie1_pins: pcie1-pins {
232 mux {
233 function = "pcie";
234 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
235 "pcie_wake_n1_0";
236 };
237 };
238
239 pcie2_pins: pcie2-pins {
240 mux {
241 function = "pcie";
242 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
243 "pcie_wake_n2_0";
244 };
245 };
246
247 pcie3_pins: pcie3-pins {
248 mux {
249 function = "pcie";
250 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
251 "pcie_wake_n3_0";
252 };
253 };
254
255 spic_pins: spi1-pins {
256 mux {
257 function = "spi";
developerd5169582023-02-17 10:32:38 +0800258 groups = "spi1";
developer29344f12022-10-17 12:01:44 +0800259 };
260 };
261
262 spi2_flash_pins: spi2-pins {
263 mux {
264 function = "spi";
265 groups = "spi2", "spi2_wp_hold";
266 };
267 };
268};
269
270&watchdog {
271 status = "disabled";
272};
273
274&eth {
developer1d83bed2022-11-16 14:11:04 +0800275 pinctrl-names = "default";
276 pinctrl-0 = <&mdio0_pins>;
developer29344f12022-10-17 12:01:44 +0800277 status = "okay";
278
279 gmac0: mac@0 {
280 compatible = "mediatek,eth-mac";
281 reg = <0>;
developer2cbf2fb2022-11-16 12:20:48 +0800282 mac-type = "xgdm";
developer29344f12022-10-17 12:01:44 +0800283 phy-mode = "10gbase-kr";
284
285 fixed-link {
developer59a6bdc2023-03-29 11:55:43 +0800286 speed = <10000>;
developer29344f12022-10-17 12:01:44 +0800287 full-duplex;
288 pause;
289 };
290 };
291
292 gmac1: mac@1 {
293 compatible = "mediatek,eth-mac";
294 reg = <1>;
developer2cbf2fb2022-11-16 12:20:48 +0800295 mac-type = "xgdm";
developer59a6bdc2023-03-29 11:55:43 +0800296 phy-mode = "usxgmii";
developer29344f12022-10-17 12:01:44 +0800297 phy-handle = <&phy0>;
298 };
299
300 gmac2: mac@2 {
301 compatible = "mediatek,eth-mac";
302 reg = <2>;
developer2cbf2fb2022-11-16 12:20:48 +0800303 mac-type = "xgdm";
developer59a6bdc2023-03-29 11:55:43 +0800304 phy-mode = "usxgmii";
developer29344f12022-10-17 12:01:44 +0800305 phy-handle = <&phy1>;
306 };
307
308 mdio: mdio-bus {
309 #address-cells = <1>;
310 #size-cells = <0>;
developer9faf1ef2023-03-21 16:49:51 +0800311 clock-frequency = <10500000>;
developer1d83bed2022-11-16 14:11:04 +0800312
developer29344f12022-10-17 12:01:44 +0800313 phy0: ethernet-phy@0 {
314 reg = <0>;
315 compatible = "ethernet-phy-ieee802.3-c45";
developer1721ef62022-11-24 14:42:19 +0800316 reset-gpios = <&pio 72 1>;
developerc98d48d2023-03-02 19:44:01 +0800317 reset-assert-us = <100000>;
318 reset-deassert-us = <221000>;
developer4e17c282023-05-30 10:57:24 +0800319 mdi-reversal = /bits/ 16 <1>;
developer29344f12022-10-17 12:01:44 +0800320 };
321
322 phy1: ethernet-phy@8 {
323 reg = <8>;
324 compatible = "ethernet-phy-ieee802.3-c45";
developer1721ef62022-11-24 14:42:19 +0800325 reset-gpios = <&pio 71 1>;
developerc98d48d2023-03-02 19:44:01 +0800326 reset-assert-us = <100000>;
327 reset-deassert-us = <221000>;
developer4e17c282023-05-30 10:57:24 +0800328 mdi-reversal = /bits/ 16 <1>;
developer29344f12022-10-17 12:01:44 +0800329 };
330
331 switch@0 {
332 compatible = "mediatek,mt7988";
333 reg = <31>;
334 ports {
335 #address-cells = <1>;
336 #size-cells = <0>;
337
338 port@0 {
339 reg = <0>;
340 label = "lan0";
developere1262222022-10-25 12:20:54 +0800341 phy-mode = "gmii";
342 phy-handle = <&sphy0>;
developer29344f12022-10-17 12:01:44 +0800343 };
344
345 port@1 {
346 reg = <1>;
347 label = "lan1";
developere1262222022-10-25 12:20:54 +0800348 phy-mode = "gmii";
349 phy-handle = <&sphy1>;
developer29344f12022-10-17 12:01:44 +0800350 };
351
352 port@2 {
353 reg = <2>;
354 label = "lan2";
developere1262222022-10-25 12:20:54 +0800355 phy-mode = "gmii";
356 phy-handle = <&sphy2>;
developer29344f12022-10-17 12:01:44 +0800357 };
358
359 port@3 {
360 reg = <3>;
361 label = "lan3";
developere1262222022-10-25 12:20:54 +0800362 phy-mode = "gmii";
363 phy-handle = <&sphy3>;
developer29344f12022-10-17 12:01:44 +0800364 };
365
366 port@6 {
367 reg = <6>;
368 label = "cpu";
369 ethernet = <&gmac0>;
370 phy-mode = "10gbase-kr";
371
372 fixed-link {
373 speed = <10000>;
374 full-duplex;
375 pause;
376 };
377 };
378 };
developere1262222022-10-25 12:20:54 +0800379
380 mdio {
381 compatible = "mediatek,dsa-slave-mdio";
382 #address-cells = <1>;
383 #size-cells = <0>;
384
385 sphy0: switch_phy0@0 {
386 compatible = "ethernet-phy-id03a2.9481";
387 reg = <0>;
developer4af681c2023-05-22 14:34:27 +0800388 pinctrl-names = "gbe-led";
389 pinctrl-0 = <&gbe0_led0_pins>;
developere1262222022-10-25 12:20:54 +0800390 nvmem-cells = <&phy_calibration_p0>;
391 nvmem-cell-names = "phy-cal-data";
392 };
393
394 sphy1: switch_phy1@1 {
395 compatible = "ethernet-phy-id03a2.9481";
396 reg = <1>;
developer4af681c2023-05-22 14:34:27 +0800397 pinctrl-names = "gbe-led";
398 pinctrl-0 = <&gbe1_led0_pins>;
developere1262222022-10-25 12:20:54 +0800399 nvmem-cells = <&phy_calibration_p1>;
400 nvmem-cell-names = "phy-cal-data";
401 };
402
403 sphy2: switch_phy2@2 {
404 compatible = "ethernet-phy-id03a2.9481";
405 reg = <2>;
developer4af681c2023-05-22 14:34:27 +0800406 pinctrl-names = "gbe-led";
407 pinctrl-0 = <&gbe2_led0_pins>;
developere1262222022-10-25 12:20:54 +0800408 nvmem-cells = <&phy_calibration_p2>;
409 nvmem-cell-names = "phy-cal-data";
410 };
411
412 sphy3: switch_phy3@3 {
413 compatible = "ethernet-phy-id03a2.9481";
414 reg = <3>;
developer4af681c2023-05-22 14:34:27 +0800415 pinctrl-names = "gbe-led";
416 pinctrl-0 = <&gbe3_led0_pins>;
developere1262222022-10-25 12:20:54 +0800417 nvmem-cells = <&phy_calibration_p3>;
418 nvmem-cell-names = "phy-cal-data";
419 };
420 };
developer29344f12022-10-17 12:01:44 +0800421 };
422 };
423};
424
425&hnat {
426 mtketh-wan = "eth1";
427 mtketh-lan = "lan";
428 mtketh-lan2 = "eth2";
429 mtketh-max-gmac = <3>;
developer722ab5f2024-02-22 11:01:46 +0800430 mtketh-ppe-num = <3>;
developer29344f12022-10-17 12:01:44 +0800431 status = "okay";
432};
433
434&wed {
435 dy_txbm_enable = "true";
436 dy_txbm_budge = <8>;
437 txbm_init_sz = <10>;
438 status = "okay";
439};