blob: 67852a1685bb10c2d9b5371cdeb5af11d8f82c85 [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 GSW 10G SPIM-NAND 4PCIe RFB";
12 compatible = "mediatek,mt7988a-gsw-10g-spim-snand-4pcie",
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 gsw: gsw@0 {
23 compatible = "mediatek,mt753x";
24 mediatek,sysctrl = <&ethwarp>;
25 #address-cells = <1>;
26 #size-cells = <0>;
27 };
28
29 memory {
30 reg = <0 0x40000000 0 0x10000000>;
31 };
32
33 nmbm_spim_nand {
34 compatible = "generic,nmbm";
35
36 #address-cells = <1>;
37 #size-cells = <1>;
38
39 lower-mtd-device = <&spi_nand>;
40 forced-create;
41
42 partitions {
43 compatible = "fixed-partitions";
44 #address-cells = <1>;
45 #size-cells = <1>;
46
47 partition@0 {
48 label = "BL2";
49 reg = <0x00000 0x0100000>;
50 read-only;
51 };
52
53 partition@100000 {
54 label = "u-boot-env";
55 reg = <0x0100000 0x0080000>;
56 };
57
58 factory: partition@180000 {
59 label = "Factory";
60 reg = <0x180000 0x0400000>;
61 };
62
63 partition@580000 {
64 label = "FIP";
65 reg = <0x580000 0x0200000>;
66 };
67
68 partition@780000 {
69 label = "ubi";
developerbaa8f602022-12-07 17:07:51 +080070 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080071 };
72 };
73 };
74
75 wsys_adie: wsys_adie@0 {
76 // fpga cases need to manual change adie_id / sku_type for dvt only
77 compatible = "mediatek,rebb-mt7988-adie";
78 adie_id = <7976>;
79 sku_type = <3000>;
80 };
81};
82
83&fan {
84 pwms = <&pwm 0 50000 0>;
85 status = "okay";
86};
87
88&i2c0 {
89 pinctrl-names = "default";
90 pinctrl-0 = <&i2c0_pins>;
91 status = "okay";
92
93 rt5190a_64: rt5190a@64 {
94 compatible = "richtek,rt5190a";
95 reg = <0x64>;
96 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
97 vin2-supply = <&rt5190_buck1>;
98 vin3-supply = <&rt5190_buck1>;
99 vin4-supply = <&rt5190_buck1>;
100
101 regulators {
102 rt5190_buck1: buck1 {
103 regulator-name = "rt5190a-buck1";
104 regulator-min-microvolt = <5090000>;
105 regulator-max-microvolt = <5090000>;
106 regulator-allowed-modes =
107 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
108 regulator-boot-on;
109 };
110 buck2 {
111 regulator-name = "vcore";
112 regulator-min-microvolt = <600000>;
113 regulator-max-microvolt = <1400000>;
114 regulator-boot-on;
115 };
116 buck3 {
117 regulator-name = "proc";
118 regulator-min-microvolt = <600000>;
119 regulator-max-microvolt = <1400000>;
120 regulator-boot-on;
121 };
122 buck4 {
123 regulator-name = "rt5190a-buck4";
124 regulator-min-microvolt = <850000>;
125 regulator-max-microvolt = <850000>;
126 regulator-allowed-modes =
127 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
128 regulator-boot-on;
129 };
130 ldo {
131 regulator-name = "rt5190a-ldo";
132 regulator-min-microvolt = <1200000>;
133 regulator-max-microvolt = <1200000>;
134 regulator-boot-on;
135 };
136 };
137 };
138};
139
140&i2c1 {
141 pinctrl-names = "default";
142 pinctrl-0 = <&i2c1_pins>;
143 status = "okay";
144};
145
146&pwm {
147 status = "okay";
148};
149
150&uart0 {
151 status = "okay";
152};
153
154&spi0 {
155 pinctrl-names = "default";
156 pinctrl-0 = <&spi0_flash_pins>;
157 status = "okay";
158
159 spi_nand: spi_nand@0 {
160 #address-cells = <1>;
161 #size-cells = <1>;
162 compatible = "spi-nand";
163 spi-cal-enable;
164 spi-cal-mode = "read-data";
165 spi-cal-datalen = <7>;
166 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
167 spi-cal-addrlen = <5>;
168 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
169 reg = <0>;
170 spi-max-frequency = <52000000>;
171 spi-tx-buswidth = <4>;
172 spi-rx-buswidth = <4>;
173 };
174};
175
176&spi1 {
177 pinctrl-names = "default";
178 /* pin shared with snfi */
179 pinctrl-0 = <&spic_pins>;
180 status = "disabled";
181};
182
183&pcie0 {
184 pinctrl-names = "default";
185 pinctrl-0 = <&pcie0_pins>;
186 status = "okay";
187};
188
189&pcie1 {
190 pinctrl-names = "default";
191 pinctrl-0 = <&pcie1_pins>;
192 status = "okay";
193};
194
195&pcie2 {
196 pinctrl-names = "default";
197 pinctrl-0 = <&pcie2_pins>;
198 status = "okay";
199};
200
201&pcie3 {
202 pinctrl-names = "default";
203 pinctrl-0 = <&pcie3_pins>;
204 status = "okay";
205};
206
207&pio {
developer24ba51c2022-11-15 11:22:46 +0800208 mdio0_pins: mdio0-pins {
209 mux {
210 function = "mdio";
211 groups = "mdc_mdio0";
212 };
213
214 conf {
215 groups = "mdc_mdio0";
216 drive-strength = <MTK_DRIVE_8mA>;
217 };
218 };
219
developer2cdaeb12022-10-04 20:25:05 +0800220 i2c0_pins: i2c0-pins-g0 {
221 mux {
222 function = "i2c";
223 groups = "i2c0_1";
224 };
225 };
226
227 i2c1_pins: i2c1-pins-g0 {
228 mux {
229 function = "i2c";
230 groups = "i2c1_0";
231 };
232 };
233
234 pcie0_pins: pcie0-pins {
235 mux {
236 function = "pcie";
237 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
238 "pcie_wake_n0_0";
239 };
240 };
241
242 pcie1_pins: pcie1-pins {
243 mux {
244 function = "pcie";
245 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
246 "pcie_wake_n1_0";
247 };
248 };
249
250 pcie2_pins: pcie2-pins {
251 mux {
252 function = "pcie";
253 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
254 "pcie_wake_n2_0";
255 };
256 };
257
258 pcie3_pins: pcie3-pins {
259 mux {
260 function = "pcie";
261 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
262 "pcie_wake_n3_0";
263 };
264 };
265
266 spi0_flash_pins: spi0-pins {
267 mux {
268 function = "spi";
269 groups = "spi0", "spi0_wp_hold";
270 };
271 };
272
273 spic_pins: spi1-pins {
274 mux {
275 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800276 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800277 };
278 };
279};
280
281&watchdog {
282 status = "disabled";
283};
284
285&xhci0 {
286 status = "disabled";
287};
288
289&eth {
developer24ba51c2022-11-15 11:22:46 +0800290 pinctrl-names = "default";
291 pinctrl-0 = <&mdio0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800292 status = "okay";
293
294 gmac0: mac@0 {
295 compatible = "mediatek,eth-mac";
296 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800297 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800298 phy-mode = "10gbase-kr";
299
300 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800301 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800302 full-duplex;
303 pause;
304 };
305 };
306
307 gmac1: mac@1 {
308 compatible = "mediatek,eth-mac";
309 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800310 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800311 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800312 phy-handle = <&phy0>;
313 };
314
315 gmac2: mac@2 {
316 compatible = "mediatek,eth-mac";
317 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800318 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800319 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800320 phy-handle = <&phy1>;
321 };
322
323 mdio: mdio-bus {
324 #address-cells = <1>;
325 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800326 clock-frequency = <10500000>;
developer24ba51c2022-11-15 11:22:46 +0800327
developer2cdaeb12022-10-04 20:25:05 +0800328 phy0: ethernet-phy@0 {
329 reg = <0>;
330 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800331 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800332 reset-assert-us = <100000>;
333 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800334 };
335
336 phy1: ethernet-phy@8 {
337 reg = <8>;
338 compatible = "ethernet-phy-ieee802.3-c45";
developer60678072022-11-23 15:52:54 +0800339 reset-gpios = <&pio 71 1>;
developer265607f2023-03-01 18:37:46 +0800340 reset-assert-us = <100000>;
341 reset-deassert-us = <221000>;
developer2cdaeb12022-10-04 20:25:05 +0800342 };
343 };
344};
345
346&hnat {
347 mtketh-wan = "eth1";
348 mtketh-lan = "eth0";
349 mtketh-lan2 = "eth2";
350 mtketh-max-gmac = <3>;
351 status = "okay";
352};
353
354&gsw {
355 mediatek,mdio = <&mdio>;
356 mediatek,portmap = "llllw";
357 mediatek,mdio_master_pinmux = <1>;
358 interrupt-parent = <&gic>;
359 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
360 status = "okay";
361
362 port6: port@6 {
363 compatible = "mediatek,mt753x-port";
364 mediatek,ssc-on;
365 phy-mode = "10gbase-kr";
366 reg = <6>;
367 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800368 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800369 full-duplex;
370 };
371 };
372
373 mdio1: mdio-bus {
374 #address-cells = <1>;
375 #size-cells = <0>;
376
377 gsw_phy0: ethernet-phy@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 gsw_phy1: ethernet-phy@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 gsw_phy2: ethernet-phy@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 gsw_phy3: ethernet-phy@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 };
417};