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