blob: 7f7ddfd30f61f26308ff141938dea7840eff9ba1 [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 internal-2.5G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-dsa-i2p5g-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
developere2ede1c2023-05-30 17:09:01 +080076&i2c0 {
77 pinctrl-names = "default";
78 pinctrl-0 = <&i2c0_pins>;
79 status = "okay";
80
81 rt5190a_64: rt5190a@64 {
82 compatible = "richtek,rt5190a";
83 reg = <0x64>;
84 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
85 vin2-supply = <&rt5190_buck1>;
86 vin3-supply = <&rt5190_buck1>;
87 vin4-supply = <&rt5190_buck1>;
88
89 regulators {
90 rt5190_buck1: buck1 {
91 regulator-name = "rt5190a-buck1";
92 regulator-min-microvolt = <5090000>;
93 regulator-max-microvolt = <5090000>;
94 regulator-allowed-modes =
95 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
96 regulator-boot-on;
97 };
98 buck2 {
99 regulator-name = "vcore";
100 regulator-min-microvolt = <600000>;
101 regulator-max-microvolt = <1400000>;
102 regulator-boot-on;
103 };
104 buck3 {
105 regulator-name = "proc";
106 regulator-min-microvolt = <600000>;
107 regulator-max-microvolt = <1400000>;
108 regulator-boot-on;
109 };
110 buck4 {
111 regulator-name = "rt5190a-buck4";
112 regulator-min-microvolt = <850000>;
113 regulator-max-microvolt = <850000>;
114 regulator-allowed-modes =
115 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
116 regulator-boot-on;
117 };
118 ldo {
119 regulator-name = "rt5190a-ldo";
120 regulator-min-microvolt = <1200000>;
121 regulator-max-microvolt = <1200000>;
122 regulator-boot-on;
123 };
124 };
125 };
126};
127
developer2cdaeb12022-10-04 20:25:05 +0800128&uart0 {
129 status = "okay";
130};
131
132&spi0 {
133 pinctrl-names = "default";
134 pinctrl-0 = <&spi0_flash_pins>;
135 status = "okay";
136
137 spi_nand: spi_nand@0 {
138 #address-cells = <1>;
139 #size-cells = <1>;
140 compatible = "spi-nand";
141 spi-cal-enable;
142 spi-cal-mode = "read-data";
143 spi-cal-datalen = <7>;
144 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
145 spi-cal-addrlen = <5>;
146 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
147 reg = <0>;
148 spi-max-frequency = <52000000>;
developer5fb80602023-05-02 18:54:53 +0800149 spi-tx-bus-width = <4>;
150 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +0800151 };
152};
153
154&spi1 {
155 pinctrl-names = "default";
156 /* pin shared with snfi */
157 pinctrl-0 = <&spic_pins>;
158 status = "disabled";
159};
160
161&pcie0 {
162 pinctrl-names = "default";
163 pinctrl-0 = <&pcie0_pins>;
164 status = "okay";
165};
166
167&pcie1 {
168 pinctrl-names = "default";
169 pinctrl-0 = <&pcie1_pins>;
170 status = "okay";
171};
172
173&pcie2 {
174 pinctrl-names = "default";
175 pinctrl-0 = <&pcie2_pins>;
176 status = "disabled";
177};
178
179&pcie3 {
180 pinctrl-names = "default";
181 pinctrl-0 = <&pcie3_pins>;
182 status = "okay";
183};
184
185&pio {
developercaca1df2023-05-17 10:54:49 +0800186 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800187 mux {
188 function = "led";
developercaca1df2023-05-17 10:54:49 +0800189 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800190 };
191 };
192
developercaca1df2023-05-17 10:54:49 +0800193 gbe1_led0_pins: gbe1-pins {
194 mux {
195 function = "led";
196 groups = "gbe1_led0";
197 };
198 };
199
200 gbe2_led0_pins: gbe2-pins {
201 mux {
202 function = "led";
203 groups = "gbe2_led0";
204 };
205 };
206
207 gbe3_led0_pins: gbe3-pins {
208 mux {
209 function = "led";
210 groups = "gbe3_led0";
211 };
212 };
213
developer447cb002023-04-06 17:54:54 +0800214 i2p5gbe_led0_pins: 2p5gbe-pins {
215 mux {
216 function = "led";
217 groups = "2p5gbe_led0";
218 };
219 };
220
developere2ede1c2023-05-30 17:09:01 +0800221 i2c0_pins: i2c0-pins-g0 {
222 mux {
223 function = "i2c";
224 groups = "i2c0_1";
225 };
226 };
227
developer2cdaeb12022-10-04 20:25:05 +0800228 pcie0_pins: pcie0-pins {
229 mux {
230 function = "pcie";
231 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
232 "pcie_wake_n0_0";
233 };
234 };
235
236 pcie1_pins: pcie1-pins {
237 mux {
238 function = "pcie";
239 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
240 "pcie_wake_n1_0";
241 };
242 };
243
244 pcie2_pins: pcie2-pins {
245 mux {
246 function = "pcie";
247 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
248 "pcie_wake_n2_0";
249 };
250 };
251
252 pcie3_pins: pcie3-pins {
253 mux {
254 function = "pcie";
255 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
256 "pcie_wake_n3_0";
257 };
258 };
259
260 spi0_flash_pins: spi0-pins {
261 mux {
262 function = "spi";
263 groups = "spi0", "spi0_wp_hold";
264 };
265 };
266
267 spic_pins: spi1-pins {
268 mux {
269 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800270 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800271 };
272 };
273};
274
275&watchdog {
276 status = "disabled";
277};
278
developer2cdaeb12022-10-04 20:25:05 +0800279&eth {
280 status = "okay";
281
282 gmac0: mac@0 {
283 compatible = "mediatek,eth-mac";
284 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800285 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800286 phy-mode = "10gbase-kr";
287
288 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800289 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800290 full-duplex;
291 pause;
292 };
293 };
294
295 gmac1: mac@1 {
296 compatible = "mediatek,eth-mac";
297 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800298 mac-type = "xgdm";
299 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800300 phy-handle = <&phy0>;
301 };
302
303 gmac2: mac@2 {
304 compatible = "mediatek,eth-mac";
305 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800306 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800307 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800308 phy-handle = <&phy1>;
309 };
310
311 mdio: mdio-bus {
312 #address-cells = <1>;
313 #size-cells = <0>;
314 phy0: ethernet-phy@0 {
developer813ffc42023-05-17 13:39:48 +0800315 pinctrl-names = "i2p5gbe-led";
developeraec59ea2023-04-10 16:58:03 +0800316 pinctrl-0 = <&i2p5gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800317 reg = <15>;
318 compatible = "ethernet-phy-ieee802.3-c45";
developer30e13e72022-11-03 10:21:24 +0800319 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800320 };
321
322 phy1: ethernet-phy@8 {
323 reg = <8>;
324 compatible = "ethernet-phy-ieee802.3-c45";
developer301205c2023-05-24 15:39:32 +0800325 reset-gpios = <&pio 71 1>;
326 reset-assert-us = <100000>;
327 reset-deassert-us = <221000>;
328 mdi-reversal = /bits/ 16 <1>;
developer2cdaeb12022-10-04 20:25:05 +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";
developera36549c2022-10-04 16:26:13 +0800341 phy-mode = "gmii";
342 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800343 };
344
345 port@1 {
346 reg = <1>;
347 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800348 phy-mode = "gmii";
349 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800350 };
351
352 port@2 {
353 reg = <2>;
354 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800355 phy-mode = "gmii";
356 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800357 };
358
359 port@3 {
360 reg = <3>;
361 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800362 phy-mode = "gmii";
363 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +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 };
developera36549c2022-10-04 16:26:13 +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>;
developercaca1df2023-05-17 10:54:49 +0800388 pinctrl-names = "gbe-led";
389 pinctrl-0 = <&gbe0_led0_pins>;
developera36549c2022-10-04 16:26:13 +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>;
developercaca1df2023-05-17 10:54:49 +0800397 pinctrl-names = "gbe-led";
398 pinctrl-0 = <&gbe1_led0_pins>;
developera36549c2022-10-04 16:26:13 +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>;
developercaca1df2023-05-17 10:54:49 +0800406 pinctrl-names = "gbe-led";
407 pinctrl-0 = <&gbe2_led0_pins>;
developera36549c2022-10-04 16:26:13 +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>;
developercaca1df2023-05-17 10:54:49 +0800415 pinctrl-names = "gbe-led";
416 pinctrl-0 = <&gbe3_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800417 nvmem-cells = <&phy_calibration_p3>;
418 nvmem-cell-names = "phy-cal-data";
419 };
420 };
developer2cdaeb12022-10-04 20:25:05 +0800421 };
422 };
423};
424
425&hnat {
426 mtketh-wan = "eth1";
427 mtketh-lan = "lan";
428 mtketh-lan2 = "eth2";
429 mtketh-max-gmac = <3>;
430 status = "okay";
431};