blob: 21852392dabb5f633ad9db2f53eb237f5f08f919 [file] [log] [blame]
developerc54ce9d2023-01-03 13:30:49 +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 MT7988C GSW 10G SFP SPIM-NAND RFB";
12 compatible = "mediatek,mt7988c-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 0x7080000>;
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 = <&i2c1>;
84 mod-def0-gpios = <&pio 0 1>;
developer85e93902023-02-10 13:41:42 +080085 los-gpios = <&pio 30 0>;
developerc54ce9d2023-01-03 13:30:49 +080086 tx-disable-gpios = <&pio 29 0>;
87 };
88};
89
90&fan {
91 pwms = <&pwm 0 50000 0>;
92 status = "okay";
93};
94
95&i2c0 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&i2c0_pins>;
98 status = "okay";
99
100 rt5190a_64: rt5190a@64 {
101 compatible = "richtek,rt5190a";
102 reg = <0x64>;
103 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
104 vin2-supply = <&rt5190_buck1>;
105 vin3-supply = <&rt5190_buck1>;
106 vin4-supply = <&rt5190_buck1>;
107
108 regulators {
109 rt5190_buck1: buck1 {
110 regulator-name = "rt5190a-buck1";
111 regulator-min-microvolt = <5090000>;
112 regulator-max-microvolt = <5090000>;
113 regulator-allowed-modes =
114 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
115 regulator-boot-on;
116 };
117 buck2 {
118 regulator-name = "vcore";
119 regulator-min-microvolt = <600000>;
120 regulator-max-microvolt = <1400000>;
121 regulator-boot-on;
122 };
123 buck3 {
124 regulator-name = "proc";
125 regulator-min-microvolt = <600000>;
126 regulator-max-microvolt = <1400000>;
127 regulator-boot-on;
128 };
129 buck4 {
130 regulator-name = "rt5190a-buck4";
131 regulator-min-microvolt = <850000>;
132 regulator-max-microvolt = <850000>;
133 regulator-allowed-modes =
134 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
135 regulator-boot-on;
136 };
137 ldo {
138 regulator-name = "rt5190a-ldo";
139 regulator-min-microvolt = <1200000>;
140 regulator-max-microvolt = <1200000>;
141 regulator-boot-on;
142 };
143 };
144 };
145};
146
147&i2c1 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&i2c1_pins>;
150 status = "okay";
151};
152
153&pwm {
154 status = "okay";
155};
156
157&uart0 {
158 status = "okay";
159};
160
161&spi0 {
162 pinctrl-names = "default";
163 pinctrl-0 = <&spi0_flash_pins>;
164 status = "okay";
165
166 spi_nand: spi_nand@0 {
167 #address-cells = <1>;
168 #size-cells = <1>;
169 compatible = "spi-nand";
170 spi-cal-enable;
171 spi-cal-mode = "read-data";
172 spi-cal-datalen = <7>;
173 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
174 spi-cal-addrlen = <5>;
175 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
176 reg = <0>;
177 spi-max-frequency = <52000000>;
178 spi-tx-buswidth = <4>;
179 spi-rx-buswidth = <4>;
180 };
181};
182
183&spi1 {
184 pinctrl-names = "default";
185 /* pin shared with snfi */
186 pinctrl-0 = <&spic_pins>;
187 status = "disabled";
188};
189
190&pcie0 {
191 pinctrl-names = "default";
192 pinctrl-0 = <&pcie0_pins>;
193 status = "okay";
194};
195
196&pcie1 {
197 pinctrl-names = "default";
198 pinctrl-0 = <&pcie1_pins>;
199 status = "disabled";
200};
201
202&pcie2 {
203 pinctrl-names = "default";
204 pinctrl-0 = <&pcie2_pins>;
205 status = "disabled";
206};
207
208&pcie3 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&pcie3_pins>;
211 status = "okay";
212};
213
214&pio {
developer447cb002023-04-06 17:54:54 +0800215 gbe_led0_pins: gbe-pins {
216 mux {
217 function = "led";
218 groups = "gbe_led0";
219 };
220 };
221
developerb4a8e1f2023-04-28 10:18:42 +0800222 i2p5gbe_led0_pins: 2p5gbe-pins {
223 mux {
224 function = "led";
225 groups = "2p5gbe_led0";
226 };
227 };
228
developerc54ce9d2023-01-03 13:30:49 +0800229 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 pcie0_pins: pcie0-pins {
244 mux {
245 function = "pcie";
246 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
247 "pcie_wake_n0_0";
248 };
249 };
250
251 pcie1_pins: pcie1-pins {
252 mux {
253 function = "pcie";
254 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
255 "pcie_wake_n1_0";
256 };
257 };
258
259 pcie2_pins: pcie2-pins {
260 mux {
261 function = "pcie";
262 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
263 "pcie_wake_n2_0";
264 };
265 };
266
267 pcie3_pins: pcie3-pins {
268 mux {
269 function = "pcie";
270 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
271 "pcie_wake_n3_0";
272 };
273 };
274
275 spi0_flash_pins: spi0-pins {
276 mux {
277 function = "spi";
278 groups = "spi0", "spi0_wp_hold";
279 };
280 };
281
282 spic_pins: spi1-pins {
283 mux {
284 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800285 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800286 };
287 };
288};
289
290&watchdog {
291 status = "disabled";
292};
293
294&eth {
295 status = "okay";
296
297 gmac0: mac@0 {
298 compatible = "mediatek,eth-mac";
299 reg = <0>;
300 mac-type = "xgdm";
301 phy-mode = "10gbase-kr";
302
303 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800304 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800305 full-duplex;
306 pause;
307 };
308 };
309
310 gmac1: mac@1 {
311 compatible = "mediatek,eth-mac";
312 reg = <1>;
313 mac-type = "xgdm";
developerb4a8e1f2023-04-28 10:18:42 +0800314 phy-mode = "xgmii";
315 phy-handle = <&phy0>;
316 };
317
318 gmac2: mac@2 {
319 compatible = "mediatek,eth-mac";
320 reg = <2>;
321 mac-type = "xgdm";
developerc54ce9d2023-01-03 13:30:49 +0800322 phy-mode = "10gbase-kr";
323 managed = "in-band-status";
324 sfp = <&sfp_esp0>;
325 };
326
327 mdio: mdio-bus {
328 #address-cells = <1>;
329 #size-cells = <0>;
developerb4a8e1f2023-04-28 10:18:42 +0800330
331 phy0: ethernet-phy@0 {
332 pinctrl-names = "default";
333 pinctrl-0 = <&i2p5gbe_led0_pins>;
334 reg = <15>;
335 compatible = "ethernet-phy-ieee802.3-c45";
336 phy-mode = "xgmii";
337 };
338
developerc54ce9d2023-01-03 13:30:49 +0800339 };
340};
341
342&hnat {
343 mtketh-wan = "eth1";
344 mtketh-lan = "eth0";
345 mtketh-lan2 = "eth2";
346 mtketh-max-gmac = <3>;
347 status = "okay";
348};
349
350&gsw {
351 mediatek,mdio = <&mdio>;
352 mediatek,portmap = "llllw";
353 mediatek,mdio_master_pinmux = <1>;
354 interrupt-parent = <&gic>;
355 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
356 status = "okay";
357
358 port6: port@6 {
359 compatible = "mediatek,mt753x-port";
360 mediatek,ssc-on;
361 phy-mode = "10gbase-kr";
362 reg = <6>;
363 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800364 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800365 full-duplex;
366 };
367 };
368
369 mdio1: mdio-bus {
370 #address-cells = <1>;
371 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800372 pinctrl-names = "default";
373 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800374
375 gsw_phy0: ethernet-phy@0 {
376 compatible = "ethernet-phy-id03a2.9481";
377 reg = <0>;
378 phy-mode = "gmii";
379 rext = "efuse";
380 tx_r50 = "efuse";
381 nvmem-cells = <&phy_calibration_p0>;
382 nvmem-cell-names = "phy-cal-data";
383 };
384
385 gsw_phy1: ethernet-phy@1 {
386 compatible = "ethernet-phy-id03a2.9481";
387 reg = <1>;
388 phy-mode = "gmii";
389 rext = "efuse";
390 tx_r50 = "efuse";
391 nvmem-cells = <&phy_calibration_p1>;
392 nvmem-cell-names = "phy-cal-data";
393 };
394
395 gsw_phy2: ethernet-phy@2 {
396 compatible = "ethernet-phy-id03a2.9481";
397 reg = <2>;
398 phy-mode = "gmii";
399 rext = "efuse";
400 tx_r50 = "efuse";
401 nvmem-cells = <&phy_calibration_p2>;
402 nvmem-cell-names = "phy-cal-data";
403 };
404
405 gsw_phy3: ethernet-phy@3 {
406 compatible = "ethernet-phy-id03a2.9481";
407 reg = <3>;
408 phy-mode = "gmii";
409 rext = "efuse";
410 tx_r50 = "efuse";
411 nvmem-cells = <&phy_calibration_p3>;
412 nvmem-cell-names = "phy-cal-data";
413 };
414 };
415};