blob: 74fa4261ae404f9820a43817397825f6f77d5aa1 [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>;
169 spi-tx-buswidth = <4>;
170 spi-rx-buswidth = <4>;
171 };
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 {
206 i2c0_pins: i2c0-pins-g0 {
207 mux {
208 function = "i2c";
209 groups = "i2c0_1";
210 };
211 };
212
213 i2c1_pins: i2c1-pins-g0 {
214 mux {
215 function = "i2c";
216 groups = "i2c1_0";
217 };
218 };
219
220 pcie0_pins: pcie0-pins {
221 mux {
222 function = "pcie";
223 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
224 "pcie_wake_n0_0";
225 };
226 };
227
228 pcie1_pins: pcie1-pins {
229 mux {
230 function = "pcie";
231 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
232 "pcie_wake_n1_0";
233 };
234 };
235
236 pcie2_pins: pcie2-pins {
237 mux {
238 function = "pcie";
239 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
240 "pcie_wake_n2_0";
241 };
242 };
243
244 pcie3_pins: pcie3-pins {
245 mux {
246 function = "pcie";
247 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
248 "pcie_wake_n3_0";
249 };
250 };
251
252 spi0_flash_pins: spi0-pins {
253 mux {
254 function = "spi";
255 groups = "spi0", "spi0_wp_hold";
256 };
257 };
258
259 spic_pins: spi1-pins {
260 mux {
261 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800262 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800263 };
264 };
265};
266
267&watchdog {
268 status = "disabled";
269};
270
271&eth {
272 status = "okay";
273
274 gmac0: mac@0 {
275 compatible = "mediatek,eth-mac";
276 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800277 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800278 phy-mode = "10gbase-kr";
279
280 fixed-link {
281 speed = <2500>;
282 full-duplex;
283 pause;
284 };
285 };
286
287 gmac1: mac@1 {
288 compatible = "mediatek,eth-mac";
289 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800290 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800291 phy-mode = "2500base-x";
292 phy-handle = <&phy13>;
293 };
294
295 gmac2: mac@2 {
296 compatible = "mediatek,eth-mac";
297 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800298 mac-type = "gdm";
developer2cdaeb12022-10-04 20:25:05 +0800299 phy-mode = "2500base-x";
300 phy-handle = <&phy5>;
301 };
302
303 mdio: mdio-bus {
304 #address-cells = <1>;
305 #size-cells = <0>;
306
307 phy5: phy@5 {
308 compatible = "ethernet-phy-ieee802.3-c45";
309 reg = <5>;
310 reset-gpios = <&pio 0 1>;
311 reset-assert-us = <600>;
312 reset-deassert-us = <20000>;
313 };
314
315 phy13: phy@13 {
316 compatible = "ethernet-phy-ieee802.3-c45";
317 reg = <13>;
318 reset-gpios = <&pio 1 1>;
319 reset-assert-us = <600>;
320 reset-deassert-us = <20000>;
321 };
322
323 switch@0 {
324 compatible = "mediatek,mt7988";
325 reg = <31>;
326 ports {
327 #address-cells = <1>;
328 #size-cells = <0>;
329
330 port@0 {
331 reg = <0>;
332 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800333 phy-mode = "gmii";
334 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800335 };
336
337 port@1 {
338 reg = <1>;
339 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800340 phy-mode = "gmii";
341 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800342 };
343
344 port@2 {
345 reg = <2>;
346 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800347 phy-mode = "gmii";
348 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800349 };
350
351 port@3 {
352 reg = <3>;
353 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800354 phy-mode = "gmii";
355 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800356 };
357
358 port@6 {
359 reg = <6>;
360 label = "cpu";
361 ethernet = <&gmac0>;
362 phy-mode = "10gbase-kr";
363
364 fixed-link {
365 speed = <10000>;
366 full-duplex;
367 pause;
368 };
369 };
370 };
developera36549c2022-10-04 16:26:13 +0800371
372 mdio {
373 compatible = "mediatek,dsa-slave-mdio";
374 #address-cells = <1>;
375 #size-cells = <0>;
376
377 sphy0: switch_phy0@0 {
378 compatible = "ethernet-phy-id03a2.9481";
379 reg = <0>;
380 phy-mode = "gmii";
381 rext = "efuse";
382 tx_r50 = "efuse";
383 nvmem-cells = <&phy_calibration_p0>;
384 nvmem-cell-names = "phy-cal-data";
385 };
386
387 sphy1: switch_phy1@1 {
388 compatible = "ethernet-phy-id03a2.9481";
389 reg = <1>;
390 phy-mode = "gmii";
391 rext = "efuse";
392 tx_r50 = "efuse";
393 nvmem-cells = <&phy_calibration_p1>;
394 nvmem-cell-names = "phy-cal-data";
395 };
396
397 sphy2: switch_phy2@2 {
398 compatible = "ethernet-phy-id03a2.9481";
399 reg = <2>;
400 phy-mode = "gmii";
401 rext = "efuse";
402 tx_r50 = "efuse";
403 nvmem-cells = <&phy_calibration_p2>;
404 nvmem-cell-names = "phy-cal-data";
405 };
406
407 sphy3: switch_phy3@3 {
408 compatible = "ethernet-phy-id03a2.9481";
409 reg = <3>;
410 phy-mode = "gmii";
411 rext = "efuse";
412 tx_r50 = "efuse";
413 nvmem-cells = <&phy_calibration_p3>;
414 nvmem-cell-names = "phy-cal-data";
415 };
416 };
developer2cdaeb12022-10-04 20:25:05 +0800417 };
418 };
419};
420
421&hnat {
422 mtketh-wan = "eth1";
423 mtketh-lan = "lan";
424 mtketh-lan2 = "eth2";
425 mtketh-max-gmac = <3>;
426 status = "okay";
427};