blob: c2ff33d61dc67ad071c307fe31ec745bff16197c [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 {
215 i2c0_pins: i2c0-pins-g0 {
216 mux {
217 function = "i2c";
218 groups = "i2c0_1";
219 };
220 };
221
222 i2c1_pins: i2c1-pins-g0 {
223 mux {
224 function = "i2c";
225 groups = "i2c1_sfp";
226 };
227 };
228
229 pcie0_pins: pcie0-pins {
230 mux {
231 function = "pcie";
232 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
233 "pcie_wake_n0_0";
234 };
235 };
236
237 pcie1_pins: pcie1-pins {
238 mux {
239 function = "pcie";
240 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
241 "pcie_wake_n1_0";
242 };
243 };
244
245 pcie2_pins: pcie2-pins {
246 mux {
247 function = "pcie";
248 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
249 "pcie_wake_n2_0";
250 };
251 };
252
253 pcie3_pins: pcie3-pins {
254 mux {
255 function = "pcie";
256 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
257 "pcie_wake_n3_0";
258 };
259 };
260
261 spi0_flash_pins: spi0-pins {
262 mux {
263 function = "spi";
264 groups = "spi0", "spi0_wp_hold";
265 };
266 };
267
268 spic_pins: spi1-pins {
269 mux {
270 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800271 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800272 };
273 };
274};
275
276&watchdog {
277 status = "disabled";
278};
279
280&eth {
281 status = "okay";
282
283 gmac0: mac@0 {
284 compatible = "mediatek,eth-mac";
285 reg = <0>;
286 mac-type = "xgdm";
287 phy-mode = "10gbase-kr";
288
289 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800290 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800291 full-duplex;
292 pause;
293 };
294 };
295
296 gmac1: mac@1 {
297 compatible = "mediatek,eth-mac";
298 reg = <1>;
299 mac-type = "xgdm";
300 phy-mode = "10gbase-kr";
301 managed = "in-band-status";
302 sfp = <&sfp_esp0>;
303 };
304
305 mdio: mdio-bus {
306 #address-cells = <1>;
307 #size-cells = <0>;
308 };
309};
310
311&hnat {
312 mtketh-wan = "eth1";
313 mtketh-lan = "eth0";
314 mtketh-lan2 = "eth2";
315 mtketh-max-gmac = <3>;
316 status = "okay";
317};
318
319&gsw {
320 mediatek,mdio = <&mdio>;
321 mediatek,portmap = "llllw";
322 mediatek,mdio_master_pinmux = <1>;
323 interrupt-parent = <&gic>;
324 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
325 status = "okay";
326
327 port6: port@6 {
328 compatible = "mediatek,mt753x-port";
329 mediatek,ssc-on;
330 phy-mode = "10gbase-kr";
331 reg = <6>;
332 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800333 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800334 full-duplex;
335 };
336 };
337
338 mdio1: mdio-bus {
339 #address-cells = <1>;
340 #size-cells = <0>;
341
342 gsw_phy0: ethernet-phy@0 {
343 compatible = "ethernet-phy-id03a2.9481";
344 reg = <0>;
345 phy-mode = "gmii";
346 rext = "efuse";
347 tx_r50 = "efuse";
348 nvmem-cells = <&phy_calibration_p0>;
349 nvmem-cell-names = "phy-cal-data";
350 };
351
352 gsw_phy1: ethernet-phy@1 {
353 compatible = "ethernet-phy-id03a2.9481";
354 reg = <1>;
355 phy-mode = "gmii";
356 rext = "efuse";
357 tx_r50 = "efuse";
358 nvmem-cells = <&phy_calibration_p1>;
359 nvmem-cell-names = "phy-cal-data";
360 };
361
362 gsw_phy2: ethernet-phy@2 {
363 compatible = "ethernet-phy-id03a2.9481";
364 reg = <2>;
365 phy-mode = "gmii";
366 rext = "efuse";
367 tx_r50 = "efuse";
368 nvmem-cells = <&phy_calibration_p2>;
369 nvmem-cell-names = "phy-cal-data";
370 };
371
372 gsw_phy3: ethernet-phy@3 {
373 compatible = "ethernet-phy-id03a2.9481";
374 reg = <3>;
375 phy-mode = "gmii";
376 rext = "efuse";
377 tx_r50 = "efuse";
378 nvmem-cells = <&phy_calibration_p3>;
379 nvmem-cell-names = "phy-cal-data";
380 };
381 };
382};