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