blob: d6c72374c290adbcd0661b98a4fca2524f914b23 [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";
developerbaa8f602022-12-07 17:07:51 +080069 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080070 };
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";
developer1d0a83e2022-12-09 14:37:19 +080083 i2c-bus = <&i2c1>;
84 mod-def0-gpios = <&pio 35 1>;
developer2cdaeb12022-10-04 20:25:05 +080085 tx-disable-gpios = <&pio 29 0>;
developer46cc2672023-01-09 10:17:40 +080086 maximum-power-milliwatt = <3000>;
developer2cdaeb12022-10-04 20:25:05 +080087 };
88
89 sfp_esp1: sfp@1 {
90 compatible = "sff,sfp";
developer1d0a83e2022-12-09 14:37:19 +080091 i2c-bus = <&i2c2>;
92 mod-def0-gpios = <&pio 82 1>;
developer2cdaeb12022-10-04 20:25:05 +080093 tx-disable-gpios = <&pio 36 0>;
developer46cc2672023-01-09 10:17:40 +080094 maximum-power-milliwatt = <3000>;
developer2cdaeb12022-10-04 20:25:05 +080095 };
96};
97
98&fan {
99 pwms = <&pwm 0 50000 0>;
100 status = "okay";
101};
102
103&i2c0 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&i2c0_pins>;
106 status = "okay";
107
108 rt5190a_64: rt5190a@64 {
109 compatible = "richtek,rt5190a";
110 reg = <0x64>;
111 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
112 vin2-supply = <&rt5190_buck1>;
113 vin3-supply = <&rt5190_buck1>;
114 vin4-supply = <&rt5190_buck1>;
115
116 regulators {
117 rt5190_buck1: buck1 {
118 regulator-name = "rt5190a-buck1";
119 regulator-min-microvolt = <5090000>;
120 regulator-max-microvolt = <5090000>;
121 regulator-allowed-modes =
122 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
123 regulator-boot-on;
124 };
125 buck2 {
126 regulator-name = "vcore";
127 regulator-min-microvolt = <600000>;
128 regulator-max-microvolt = <1400000>;
129 regulator-boot-on;
130 };
131 buck3 {
132 regulator-name = "proc";
133 regulator-min-microvolt = <600000>;
134 regulator-max-microvolt = <1400000>;
135 regulator-boot-on;
136 };
137 buck4 {
138 regulator-name = "rt5190a-buck4";
139 regulator-min-microvolt = <850000>;
140 regulator-max-microvolt = <850000>;
141 regulator-allowed-modes =
142 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
143 regulator-boot-on;
144 };
145 ldo {
146 regulator-name = "rt5190a-ldo";
147 regulator-min-microvolt = <1200000>;
148 regulator-max-microvolt = <1200000>;
149 regulator-boot-on;
150 };
151 };
152 };
153};
154
155&i2c1 {
156 pinctrl-names = "default";
157 pinctrl-0 = <&i2c1_pins>;
158 status = "okay";
159};
160
161&i2c2 {
162 pinctrl-names = "default";
163 pinctrl-0 = <&i2c2_pins>;
164 status = "okay";
165};
166
167&pwm {
168 status = "okay";
169};
170
171&uart0 {
172 status = "okay";
173};
174
175&spi0 {
176 pinctrl-names = "default";
177 pinctrl-0 = <&spi0_flash_pins>;
178 status = "okay";
179
180 spi_nand: spi_nand@0 {
181 #address-cells = <1>;
182 #size-cells = <1>;
183 compatible = "spi-nand";
184 spi-cal-enable;
185 spi-cal-mode = "read-data";
186 spi-cal-datalen = <7>;
187 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
188 spi-cal-addrlen = <5>;
189 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
190 reg = <0>;
191 spi-max-frequency = <52000000>;
192 spi-tx-buswidth = <4>;
193 spi-rx-buswidth = <4>;
194 };
195};
196
197&spi1 {
198 pinctrl-names = "default";
199 /* pin shared with snfi */
200 pinctrl-0 = <&spic_pins>;
201 status = "disabled";
202};
203
204&pcie0 {
205 pinctrl-names = "default";
206 pinctrl-0 = <&pcie0_pins>;
207 status = "okay";
208};
209
210&pcie1 {
211 pinctrl-names = "default";
212 pinctrl-0 = <&pcie1_pins>;
213 status = "okay";
214};
215
216&pcie2 {
217 pinctrl-names = "default";
218 pinctrl-0 = <&pcie2_pins>;
219 status = "disabled";
220};
221
222&pcie3 {
223 pinctrl-names = "default";
224 pinctrl-0 = <&pcie3_pins>;
225 status = "okay";
226};
227
228&pio {
229 i2c0_pins: i2c0-pins-g0 {
230 mux {
231 function = "i2c";
232 groups = "i2c0_1";
233 };
234 };
235
236 i2c1_pins: i2c1-pins-g0 {
237 mux {
238 function = "i2c";
239 groups = "i2c1_sfp";
240 };
241 };
242
243 i2c2_pins: i2c2-pins-g0 {
244 mux {
245 function = "i2c";
246 groups = "i2c2_0";
247 };
248 };
249
250 pcie0_pins: pcie0-pins {
251 mux {
252 function = "pcie";
253 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
254 "pcie_wake_n0_0";
255 };
256 };
257
258 pcie1_pins: pcie1-pins {
259 mux {
260 function = "pcie";
261 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
262 "pcie_wake_n1_0";
263 };
264 };
265
266 pcie2_pins: pcie2-pins {
267 mux {
268 function = "pcie";
269 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
270 "pcie_wake_n2_0";
271 };
272 };
273
274 pcie3_pins: pcie3-pins {
275 mux {
276 function = "pcie";
277 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
278 "pcie_wake_n3_0";
279 };
280 };
281
282 spi0_flash_pins: spi0-pins {
283 mux {
284 function = "spi";
285 groups = "spi0", "spi0_wp_hold";
286 };
287 };
288
289 spic_pins: spi1-pins {
290 mux {
291 function = "spi";
292 groups = "spi1_1";
293 };
294 };
295};
296
297&watchdog {
298 status = "disabled";
299};
300
301&eth {
302 status = "okay";
303
304 gmac0: mac@0 {
305 compatible = "mediatek,eth-mac";
306 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800307 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800308 phy-mode = "10gbase-kr";
309
310 fixed-link {
311 speed = <2500>;
312 full-duplex;
313 pause;
314 };
315 };
316
317 gmac1: mac@1 {
318 compatible = "mediatek,eth-mac";
319 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800320 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800321 phy-mode = "10gbase-kr";
322 managed = "in-band-status";
323 sfp = <&sfp_esp1>;
324 };
325
326 gmac2: mac@2 {
327 compatible = "mediatek,eth-mac";
328 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800329 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800330 phy-mode = "10gbase-kr";
331 managed = "in-band-status";
332 sfp = <&sfp_esp0>;
333 };
334
335 mdio: mdio-bus {
336 #address-cells = <1>;
337 #size-cells = <0>;
338 };
339};
340
341&hnat {
342 mtketh-wan = "eth1";
343 mtketh-lan = "eth0";
344 mtketh-lan2 = "eth2";
345 mtketh-max-gmac = <3>;
346 status = "okay";
347};
348
349&gsw {
350 mediatek,mdio = <&mdio>;
351 mediatek,portmap = "llllw";
352 mediatek,mdio_master_pinmux = <1>;
353 interrupt-parent = <&gic>;
354 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
355 status = "okay";
356
357 port6: port@6 {
358 compatible = "mediatek,mt753x-port";
359 mediatek,ssc-on;
360 phy-mode = "10gbase-kr";
361 reg = <6>;
362 fixed-link {
363 speed = <2500>;
364 full-duplex;
365 };
366 };
367
368 mdio1: mdio-bus {
369 #address-cells = <1>;
370 #size-cells = <0>;
371
372 gsw_phy0: ethernet-phy@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 gsw_phy1: ethernet-phy@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 gsw_phy2: ethernet-phy@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 gsw_phy3: ethernet-phy@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 };
412};