blob: 43332d48f617afac180d42819ede618a47103ae6 [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 {
231 i2c0_pins: i2c0-pins-g0 {
232 mux {
233 function = "i2c";
234 groups = "i2c0_1";
235 };
236 };
237
238 i2c1_pins: i2c1-pins-g0 {
239 mux {
240 function = "i2c";
241 groups = "i2c1_sfp";
242 };
243 };
244
245 i2c2_pins: i2c2-pins-g0 {
246 mux {
247 function = "i2c";
248 groups = "i2c2_0";
249 };
250 };
251
252 pcie0_pins: pcie0-pins {
253 mux {
254 function = "pcie";
255 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
256 "pcie_wake_n0_0";
257 };
258 };
259
260 pcie1_pins: pcie1-pins {
261 mux {
262 function = "pcie";
263 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
264 "pcie_wake_n1_0";
265 };
266 };
267
268 pcie2_pins: pcie2-pins {
269 mux {
270 function = "pcie";
271 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
272 "pcie_wake_n2_0";
273 };
274 };
275
276 pcie3_pins: pcie3-pins {
277 mux {
278 function = "pcie";
279 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
280 "pcie_wake_n3_0";
281 };
282 };
283
284 spi0_flash_pins: spi0-pins {
285 mux {
286 function = "spi";
287 groups = "spi0", "spi0_wp_hold";
288 };
289 };
290
291 spic_pins: spi1-pins {
292 mux {
293 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800294 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800295 };
296 };
297};
298
299&watchdog {
300 status = "disabled";
301};
302
303&eth {
304 status = "okay";
305
306 gmac0: mac@0 {
307 compatible = "mediatek,eth-mac";
308 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800309 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800310 phy-mode = "10gbase-kr";
311
312 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800313 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800314 full-duplex;
315 pause;
316 };
317 };
318
319 gmac1: mac@1 {
320 compatible = "mediatek,eth-mac";
321 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800322 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800323 phy-mode = "10gbase-kr";
324 managed = "in-band-status";
325 sfp = <&sfp_esp1>;
326 };
327
328 gmac2: mac@2 {
329 compatible = "mediatek,eth-mac";
330 reg = <2>;
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_esp0>;
335 };
336
337 mdio: mdio-bus {
338 #address-cells = <1>;
339 #size-cells = <0>;
340 };
341};
342
343&hnat {
344 mtketh-wan = "eth1";
345 mtketh-lan = "eth0";
346 mtketh-lan2 = "eth2";
347 mtketh-max-gmac = <3>;
348 status = "okay";
349};
350
351&gsw {
352 mediatek,mdio = <&mdio>;
353 mediatek,portmap = "llllw";
354 mediatek,mdio_master_pinmux = <1>;
355 interrupt-parent = <&gic>;
356 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
357 status = "okay";
358
359 port6: port@6 {
360 compatible = "mediatek,mt753x-port";
361 mediatek,ssc-on;
362 phy-mode = "10gbase-kr";
363 reg = <6>;
364 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800365 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800366 full-duplex;
367 };
368 };
369
370 mdio1: mdio-bus {
371 #address-cells = <1>;
372 #size-cells = <0>;
373
374 gsw_phy0: ethernet-phy@0 {
375 compatible = "ethernet-phy-id03a2.9481";
376 reg = <0>;
377 phy-mode = "gmii";
378 rext = "efuse";
379 tx_r50 = "efuse";
380 nvmem-cells = <&phy_calibration_p0>;
381 nvmem-cell-names = "phy-cal-data";
382 };
383
384 gsw_phy1: ethernet-phy@1 {
385 compatible = "ethernet-phy-id03a2.9481";
386 reg = <1>;
387 phy-mode = "gmii";
388 rext = "efuse";
389 tx_r50 = "efuse";
390 nvmem-cells = <&phy_calibration_p1>;
391 nvmem-cell-names = "phy-cal-data";
392 };
393
394 gsw_phy2: ethernet-phy@2 {
395 compatible = "ethernet-phy-id03a2.9481";
396 reg = <2>;
397 phy-mode = "gmii";
398 rext = "efuse";
399 tx_r50 = "efuse";
400 nvmem-cells = <&phy_calibration_p2>;
401 nvmem-cell-names = "phy-cal-data";
402 };
403
404 gsw_phy3: ethernet-phy@3 {
405 compatible = "ethernet-phy-id03a2.9481";
406 reg = <3>;
407 phy-mode = "gmii";
408 rext = "efuse";
409 tx_r50 = "efuse";
410 nvmem-cells = <&phy_calibration_p3>;
411 nvmem-cell-names = "phy-cal-data";
412 };
413 };
414};