blob: abe06284dc0cf3418bfcb8a2e05b0911cb898e6b [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>;
developer5fb80602023-05-02 18:54:53 +0800194 spi-tx-bus-width = <4>;
195 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +0800196 };
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 {
developercaca1df2023-05-17 10:54:49 +0800231 gbe0_led0_pins: gbe0-pins {
developer447cb002023-04-06 17:54:54 +0800232 mux {
233 function = "led";
developercaca1df2023-05-17 10:54:49 +0800234 groups = "gbe0_led0";
developer447cb002023-04-06 17:54:54 +0800235 };
236 };
237
developercaca1df2023-05-17 10:54:49 +0800238 gbe1_led0_pins: gbe1-pins {
239 mux {
240 function = "led";
241 groups = "gbe1_led0";
242 };
243 };
244
245 gbe2_led0_pins: gbe2-pins {
246 mux {
247 function = "led";
248 groups = "gbe2_led0";
249 };
250 };
251
252 gbe3_led0_pins: gbe3-pins {
253 mux {
254 function = "led";
255 groups = "gbe3_led0";
256 };
257 };
258
developer2cdaeb12022-10-04 20:25:05 +0800259 i2c0_pins: i2c0-pins-g0 {
260 mux {
261 function = "i2c";
262 groups = "i2c0_1";
263 };
264 };
265
266 i2c1_pins: i2c1-pins-g0 {
267 mux {
268 function = "i2c";
269 groups = "i2c1_sfp";
270 };
271 };
272
273 i2c2_pins: i2c2-pins-g0 {
274 mux {
275 function = "i2c";
276 groups = "i2c2_0";
277 };
278 };
279
280 pcie0_pins: pcie0-pins {
281 mux {
282 function = "pcie";
283 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
284 "pcie_wake_n0_0";
285 };
286 };
287
288 pcie1_pins: pcie1-pins {
289 mux {
290 function = "pcie";
291 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
292 "pcie_wake_n1_0";
293 };
294 };
295
296 pcie2_pins: pcie2-pins {
297 mux {
298 function = "pcie";
299 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
300 "pcie_wake_n2_0";
301 };
302 };
303
304 pcie3_pins: pcie3-pins {
305 mux {
306 function = "pcie";
307 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
308 "pcie_wake_n3_0";
309 };
310 };
311
312 spi0_flash_pins: spi0-pins {
313 mux {
314 function = "spi";
315 groups = "spi0", "spi0_wp_hold";
316 };
317 };
318
319 spic_pins: spi1-pins {
320 mux {
321 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800322 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800323 };
324 };
325};
326
327&watchdog {
328 status = "disabled";
329};
330
331&eth {
332 status = "okay";
333
334 gmac0: mac@0 {
335 compatible = "mediatek,eth-mac";
336 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800337 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800338 phy-mode = "10gbase-kr";
339
340 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800341 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800342 full-duplex;
343 pause;
344 };
345 };
346
347 gmac1: mac@1 {
348 compatible = "mediatek,eth-mac";
349 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800350 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800351 phy-mode = "10gbase-kr";
352 managed = "in-band-status";
353 sfp = <&sfp_esp1>;
354 };
355
356 gmac2: mac@2 {
357 compatible = "mediatek,eth-mac";
358 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800359 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800360 phy-mode = "10gbase-kr";
361 managed = "in-band-status";
362 sfp = <&sfp_esp0>;
363 };
364
365 mdio: mdio-bus {
366 #address-cells = <1>;
367 #size-cells = <0>;
368 };
369};
370
371&hnat {
372 mtketh-wan = "eth1";
373 mtketh-lan = "eth0";
374 mtketh-lan2 = "eth2";
375 mtketh-max-gmac = <3>;
376 status = "okay";
377};
378
379&gsw {
380 mediatek,mdio = <&mdio>;
381 mediatek,portmap = "llllw";
382 mediatek,mdio_master_pinmux = <1>;
383 interrupt-parent = <&gic>;
384 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
385 status = "okay";
386
387 port6: port@6 {
388 compatible = "mediatek,mt753x-port";
389 mediatek,ssc-on;
390 phy-mode = "10gbase-kr";
391 reg = <6>;
392 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800393 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800394 full-duplex;
395 };
396 };
397
398 mdio1: mdio-bus {
399 #address-cells = <1>;
400 #size-cells = <0>;
developer2cdaeb12022-10-04 20:25:05 +0800401
402 gsw_phy0: ethernet-phy@0 {
403 compatible = "ethernet-phy-id03a2.9481";
404 reg = <0>;
developercaca1df2023-05-17 10:54:49 +0800405 pinctrl-names = "gbe-led";
406 pinctrl-0 = <&gbe0_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800407 nvmem-cells = <&phy_calibration_p0>;
408 nvmem-cell-names = "phy-cal-data";
409 };
410
411 gsw_phy1: ethernet-phy@1 {
412 compatible = "ethernet-phy-id03a2.9481";
413 reg = <1>;
developercaca1df2023-05-17 10:54:49 +0800414 pinctrl-names = "gbe-led";
415 pinctrl-0 = <&gbe1_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800416 nvmem-cells = <&phy_calibration_p1>;
417 nvmem-cell-names = "phy-cal-data";
418 };
419
420 gsw_phy2: ethernet-phy@2 {
421 compatible = "ethernet-phy-id03a2.9481";
422 reg = <2>;
developercaca1df2023-05-17 10:54:49 +0800423 pinctrl-names = "gbe-led";
424 pinctrl-0 = <&gbe2_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800425 nvmem-cells = <&phy_calibration_p2>;
426 nvmem-cell-names = "phy-cal-data";
427 };
428
429 gsw_phy3: ethernet-phy@3 {
430 compatible = "ethernet-phy-id03a2.9481";
431 reg = <3>;
developercaca1df2023-05-17 10:54:49 +0800432 pinctrl-names = "gbe-led";
433 pinctrl-0 = <&gbe3_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800434 nvmem-cells = <&phy_calibration_p3>;
435 nvmem-cell-names = "phy-cal-data";
436 };
437 };
438};