blob: d6795eef0ab4ebd10070127f626242143d9855bc [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";
137};
138
139&pwm {
140 status = "okay";
141};
142
143&uart0 {
144 status = "okay";
145};
146
147&spi0 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&spi0_flash_pins>;
150 status = "okay";
151
152 spi_nand: spi_nand@0 {
153 #address-cells = <1>;
154 #size-cells = <1>;
155 compatible = "spi-nand";
156 spi-cal-enable;
157 spi-cal-mode = "read-data";
158 spi-cal-datalen = <7>;
159 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
160 spi-cal-addrlen = <5>;
161 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
162 reg = <0>;
163 spi-max-frequency = <52000000>;
164 spi-tx-buswidth = <4>;
165 spi-rx-buswidth = <4>;
166 };
167};
168
169&spi1 {
170 pinctrl-names = "default";
171 /* pin shared with snfi */
172 pinctrl-0 = <&spic_pins>;
173 status = "disabled";
174};
175
176&pcie0 {
177 pinctrl-names = "default";
178 pinctrl-0 = <&pcie0_pins>;
179 status = "okay";
180};
181
182&pcie1 {
183 pinctrl-names = "default";
184 pinctrl-0 = <&pcie1_pins>;
185 status = "okay";
186};
187
188&pcie2 {
189 pinctrl-names = "default";
190 pinctrl-0 = <&pcie2_pins>;
191 status = "disabled";
192};
193
194&pcie3 {
195 pinctrl-names = "default";
196 pinctrl-0 = <&pcie3_pins>;
197 status = "okay";
198};
199
200&pio {
201 i2c0_pins: i2c0-pins-g0 {
202 mux {
203 function = "i2c";
204 groups = "i2c0_1";
205 };
206 };
207
208 i2c1_pins: i2c1-pins-g0 {
209 mux {
210 function = "i2c";
211 groups = "i2c1_0";
212 };
213 };
214
215 pcie0_pins: pcie0-pins {
216 mux {
217 function = "pcie";
218 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
219 "pcie_wake_n0_0";
220 };
221 };
222
223 pcie1_pins: pcie1-pins {
224 mux {
225 function = "pcie";
226 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
227 "pcie_wake_n1_0";
228 };
229 };
230
231 pcie2_pins: pcie2-pins {
232 mux {
233 function = "pcie";
234 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
235 "pcie_wake_n2_0";
236 };
237 };
238
239 pcie3_pins: pcie3-pins {
240 mux {
241 function = "pcie";
242 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
243 "pcie_wake_n3_0";
244 };
245 };
246
247 spi0_flash_pins: spi0-pins {
248 mux {
249 function = "spi";
250 groups = "spi0", "spi0_wp_hold";
251 };
252 };
253
254 spic_pins: spi1-pins {
255 mux {
256 function = "spi";
257 groups = "spi1_1";
258 };
259 };
260};
261
262&watchdog {
263 status = "disabled";
264};
265
266&eth {
267 status = "okay";
268
269 gmac0: mac@0 {
270 compatible = "mediatek,eth-mac";
271 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800272 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800273 phy-mode = "10gbase-kr";
274
275 fixed-link {
276 speed = <2500>;
277 full-duplex;
278 pause;
279 };
280 };
281
282 gmac1: mac@1 {
283 compatible = "mediatek,eth-mac";
284 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800285 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800286 phy-mode = "2500base-x";
287 phy-handle = <&phy13>;
288 };
289
290 gmac2: mac@2 {
291 compatible = "mediatek,eth-mac";
292 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800293 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800294 phy-mode = "2500base-x";
295 phy-handle = <&phy5>;
296 };
297
298 mdio: mdio-bus {
299 #address-cells = <1>;
300 #size-cells = <0>;
301
302 phy5: phy@5 {
303 compatible = "ethernet-phy-ieee802.3-c45";
304 reg = <5>;
305 reset-gpios = <&pio 0 1>;
306 reset-assert-us = <600>;
307 reset-deassert-us = <20000>;
308 };
309
310 phy13: phy@13 {
311 compatible = "ethernet-phy-ieee802.3-c45";
312 reg = <13>;
313 reset-gpios = <&pio 1 1>;
314 reset-assert-us = <600>;
315 reset-deassert-us = <20000>;
316 };
317
318 switch@0 {
319 compatible = "mediatek,mt7988";
320 reg = <31>;
321 ports {
322 #address-cells = <1>;
323 #size-cells = <0>;
324
325 port@0 {
326 reg = <0>;
327 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800328 phy-mode = "gmii";
329 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800330 };
331
332 port@1 {
333 reg = <1>;
334 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800335 phy-mode = "gmii";
336 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800337 };
338
339 port@2 {
340 reg = <2>;
341 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800342 phy-mode = "gmii";
343 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800344 };
345
346 port@3 {
347 reg = <3>;
348 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800349 phy-mode = "gmii";
350 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800351 };
352
353 port@6 {
354 reg = <6>;
355 label = "cpu";
356 ethernet = <&gmac0>;
357 phy-mode = "10gbase-kr";
358
359 fixed-link {
360 speed = <10000>;
361 full-duplex;
362 pause;
363 };
364 };
365 };
developera36549c2022-10-04 16:26:13 +0800366
367 mdio {
368 compatible = "mediatek,dsa-slave-mdio";
369 #address-cells = <1>;
370 #size-cells = <0>;
371
372 sphy0: switch_phy0@0 {
373 compatible = "ethernet-phy-id03a2.9481";
374 reg = <0>;
375 phy-mode = "gmii";
376 rext = "efuse";
377 tx_r50 = "efuse";
378 nvmem-cells = <&phy_calibration_p0>;
379 nvmem-cell-names = "phy-cal-data";
380 };
381
382 sphy1: switch_phy1@1 {
383 compatible = "ethernet-phy-id03a2.9481";
384 reg = <1>;
385 phy-mode = "gmii";
386 rext = "efuse";
387 tx_r50 = "efuse";
388 nvmem-cells = <&phy_calibration_p1>;
389 nvmem-cell-names = "phy-cal-data";
390 };
391
392 sphy2: switch_phy2@2 {
393 compatible = "ethernet-phy-id03a2.9481";
394 reg = <2>;
395 phy-mode = "gmii";
396 rext = "efuse";
397 tx_r50 = "efuse";
398 nvmem-cells = <&phy_calibration_p2>;
399 nvmem-cell-names = "phy-cal-data";
400 };
401
402 sphy3: switch_phy3@3 {
403 compatible = "ethernet-phy-id03a2.9481";
404 reg = <3>;
405 phy-mode = "gmii";
406 rext = "efuse";
407 tx_r50 = "efuse";
408 nvmem-cells = <&phy_calibration_p3>;
409 nvmem-cell-names = "phy-cal-data";
410 };
411 };
developer2cdaeb12022-10-04 20:25:05 +0800412 };
413 };
414};
415
416&hnat {
417 mtketh-wan = "eth1";
418 mtketh-lan = "lan";
419 mtketh-lan2 = "eth2";
420 mtketh-max-gmac = <3>;
421 status = "okay";
422};