blob: 4b224a9dbabff308edba10c3708847b2d1e3b9e6 [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 SFP SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-gsw-10g-sfp-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 };
20
21 gsw: gsw@0 {
22 compatible = "mediatek,mt753x";
23 mediatek,sysctrl = <&ethwarp>;
24 #address-cells = <1>;
25 #size-cells = <0>;
26 };
27
28 memory {
29 reg = <0 0x40000000 0 0x10000000>;
30 };
31
32 nmbm_spim_nand {
33 compatible = "generic,nmbm";
34
35 #address-cells = <1>;
36 #size-cells = <1>;
37
38 lower-mtd-device = <&spi_nand>;
39 forced-create;
40
41 partitions {
42 compatible = "fixed-partitions";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 partition@0 {
47 label = "BL2";
48 reg = <0x00000 0x0100000>;
49 read-only;
50 };
51
52 partition@100000 {
53 label = "u-boot-env";
54 reg = <0x0100000 0x0080000>;
55 };
56
57 factory: partition@180000 {
58 label = "Factory";
59 reg = <0x180000 0x0400000>;
60 };
61
62 partition@580000 {
63 label = "FIP";
64 reg = <0x580000 0x0200000>;
65 };
66
67 partition@780000 {
68 label = "ubi";
69 reg = <0x780000 0x4000000>;
70 };
71 };
72 };
73
74 wsys_adie: wsys_adie@0 {
75 // fpga cases need to manual change adie_id / sku_type for dvt only
76 compatible = "mediatek,rebb-mt7988-adie";
77 adie_id = <7976>;
78 sku_type = <3000>;
79 };
80
81 sfp_esp0: sfp@0 {
82 compatible = "sff,sfp";
83 i2c-bus = <&i2c2>;
84 tx-disable-gpios = <&pio 29 0>;
85 };
86
87 sfp_esp1: sfp@1 {
88 compatible = "sff,sfp";
89 i2c-bus = <&i2c1>;
90 tx-disable-gpios = <&pio 36 0>;
91 };
92};
93
94&fan {
95 pwms = <&pwm 0 50000 0>;
96 status = "okay";
97};
98
99&i2c0 {
100 pinctrl-names = "default";
101 pinctrl-0 = <&i2c0_pins>;
102 status = "okay";
103
104 rt5190a_64: rt5190a@64 {
105 compatible = "richtek,rt5190a";
106 reg = <0x64>;
107 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
108 vin2-supply = <&rt5190_buck1>;
109 vin3-supply = <&rt5190_buck1>;
110 vin4-supply = <&rt5190_buck1>;
111
112 regulators {
113 rt5190_buck1: buck1 {
114 regulator-name = "rt5190a-buck1";
115 regulator-min-microvolt = <5090000>;
116 regulator-max-microvolt = <5090000>;
117 regulator-allowed-modes =
118 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
119 regulator-boot-on;
120 };
121 buck2 {
122 regulator-name = "vcore";
123 regulator-min-microvolt = <600000>;
124 regulator-max-microvolt = <1400000>;
125 regulator-boot-on;
126 };
127 buck3 {
128 regulator-name = "proc";
129 regulator-min-microvolt = <600000>;
130 regulator-max-microvolt = <1400000>;
131 regulator-boot-on;
132 };
133 buck4 {
134 regulator-name = "rt5190a-buck4";
135 regulator-min-microvolt = <850000>;
136 regulator-max-microvolt = <850000>;
137 regulator-allowed-modes =
138 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
139 regulator-boot-on;
140 };
141 ldo {
142 regulator-name = "rt5190a-ldo";
143 regulator-min-microvolt = <1200000>;
144 regulator-max-microvolt = <1200000>;
145 regulator-boot-on;
146 };
147 };
148 };
149};
150
151&i2c1 {
152 pinctrl-names = "default";
153 pinctrl-0 = <&i2c1_pins>;
154 status = "okay";
155};
156
157&i2c2 {
158 pinctrl-names = "default";
159 pinctrl-0 = <&i2c2_pins>;
160 status = "okay";
161};
162
163&pwm {
164 status = "okay";
165};
166
167&uart0 {
168 status = "okay";
169};
170
171&spi0 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&spi0_flash_pins>;
174 status = "okay";
175
176 spi_nand: spi_nand@0 {
177 #address-cells = <1>;
178 #size-cells = <1>;
179 compatible = "spi-nand";
180 spi-cal-enable;
181 spi-cal-mode = "read-data";
182 spi-cal-datalen = <7>;
183 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
184 spi-cal-addrlen = <5>;
185 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
186 reg = <0>;
187 spi-max-frequency = <52000000>;
188 spi-tx-buswidth = <4>;
189 spi-rx-buswidth = <4>;
190 };
191};
192
193&spi1 {
194 pinctrl-names = "default";
195 /* pin shared with snfi */
196 pinctrl-0 = <&spic_pins>;
197 status = "disabled";
198};
199
200&pcie0 {
201 pinctrl-names = "default";
202 pinctrl-0 = <&pcie0_pins>;
203 status = "okay";
204};
205
206&pcie1 {
207 pinctrl-names = "default";
208 pinctrl-0 = <&pcie1_pins>;
209 status = "okay";
210};
211
212&pcie2 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&pcie2_pins>;
215 status = "disabled";
216};
217
218&pcie3 {
219 pinctrl-names = "default";
220 pinctrl-0 = <&pcie3_pins>;
221 status = "okay";
222};
223
224&pio {
225 i2c0_pins: i2c0-pins-g0 {
226 mux {
227 function = "i2c";
228 groups = "i2c0_1";
229 };
230 };
231
232 i2c1_pins: i2c1-pins-g0 {
233 mux {
234 function = "i2c";
235 groups = "i2c1_sfp";
236 };
237 };
238
239 i2c2_pins: i2c2-pins-g0 {
240 mux {
241 function = "i2c";
242 groups = "i2c2_0";
243 };
244 };
245
246 pcie0_pins: pcie0-pins {
247 mux {
248 function = "pcie";
249 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
250 "pcie_wake_n0_0";
251 };
252 };
253
254 pcie1_pins: pcie1-pins {
255 mux {
256 function = "pcie";
257 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
258 "pcie_wake_n1_0";
259 };
260 };
261
262 pcie2_pins: pcie2-pins {
263 mux {
264 function = "pcie";
265 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
266 "pcie_wake_n2_0";
267 };
268 };
269
270 pcie3_pins: pcie3-pins {
271 mux {
272 function = "pcie";
273 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
274 "pcie_wake_n3_0";
275 };
276 };
277
278 spi0_flash_pins: spi0-pins {
279 mux {
280 function = "spi";
281 groups = "spi0", "spi0_wp_hold";
282 };
283 };
284
285 spic_pins: spi1-pins {
286 mux {
287 function = "spi";
288 groups = "spi1_1";
289 };
290 };
291};
292
293&watchdog {
294 status = "disabled";
295};
296
297&eth {
298 status = "okay";
299
300 gmac0: mac@0 {
301 compatible = "mediatek,eth-mac";
302 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800303 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800304 phy-mode = "10gbase-kr";
305
306 fixed-link {
307 speed = <2500>;
308 full-duplex;
309 pause;
310 };
311 };
312
313 gmac1: mac@1 {
314 compatible = "mediatek,eth-mac";
315 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800316 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800317 phy-mode = "10gbase-kr";
318 managed = "in-band-status";
319 sfp = <&sfp_esp1>;
320 };
321
322 gmac2: mac@2 {
323 compatible = "mediatek,eth-mac";
324 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800325 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800326 phy-mode = "10gbase-kr";
327 managed = "in-band-status";
328 sfp = <&sfp_esp0>;
329 };
330
331 mdio: mdio-bus {
332 #address-cells = <1>;
333 #size-cells = <0>;
334 };
335};
336
337&hnat {
338 mtketh-wan = "eth1";
339 mtketh-lan = "eth0";
340 mtketh-lan2 = "eth2";
341 mtketh-max-gmac = <3>;
342 status = "okay";
343};
344
345&gsw {
346 mediatek,mdio = <&mdio>;
347 mediatek,portmap = "llllw";
348 mediatek,mdio_master_pinmux = <1>;
349 interrupt-parent = <&gic>;
350 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
351 status = "okay";
352
353 port6: port@6 {
354 compatible = "mediatek,mt753x-port";
355 mediatek,ssc-on;
356 phy-mode = "10gbase-kr";
357 reg = <6>;
358 fixed-link {
359 speed = <2500>;
360 full-duplex;
361 };
362 };
363
364 mdio1: mdio-bus {
365 #address-cells = <1>;
366 #size-cells = <0>;
367
368 gsw_phy0: ethernet-phy@0 {
369 compatible = "ethernet-phy-id03a2.9481";
370 reg = <0>;
371 phy-mode = "gmii";
372 rext = "efuse";
373 tx_r50 = "efuse";
374 nvmem-cells = <&phy_calibration_p0>;
375 nvmem-cell-names = "phy-cal-data";
376 };
377
378 gsw_phy1: ethernet-phy@1 {
379 compatible = "ethernet-phy-id03a2.9481";
380 reg = <1>;
381 phy-mode = "gmii";
382 rext = "efuse";
383 tx_r50 = "efuse";
384 nvmem-cells = <&phy_calibration_p1>;
385 nvmem-cell-names = "phy-cal-data";
386 };
387
388 gsw_phy2: ethernet-phy@2 {
389 compatible = "ethernet-phy-id03a2.9481";
390 reg = <2>;
391 phy-mode = "gmii";
392 rext = "efuse";
393 tx_r50 = "efuse";
394 nvmem-cells = <&phy_calibration_p2>;
395 nvmem-cell-names = "phy-cal-data";
396 };
397
398 gsw_phy3: ethernet-phy@3 {
399 compatible = "ethernet-phy-id03a2.9481";
400 reg = <3>;
401 phy-mode = "gmii";
402 rext = "efuse";
403 tx_r50 = "efuse";
404 nvmem-cells = <&phy_calibration_p3>;
405 nvmem-cell-names = "phy-cal-data";
406 };
407 };
408};