blob: 2ed715cfd8aad52b7e08709764a4d1b7cbceb1f0 [file] [log] [blame]
developer79a21a22023-01-09 13:57:39 +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/;
developer722ab5f2024-02-22 11:01:46 +08008#include <dt-bindings/gpio/gpio.h>
developer79a21a22023-01-09 13:57:39 +08009#include "mt7988.dtsi"
10
11/ {
developer4e17c282023-05-30 10:57:24 +080012 model = "MediaTek MT7988D GSW 10G SFP SPIM-NAND RFB";
13 compatible = "mediatek,mt7988d-gsw-10g-sfp-spim-snand",
developer79a21a22023-01-09 13:57:39 +080014 /* Reserve this for DVFS if creating new dts */
15 "mediatek,mt7988";
16
17 chosen {
18 bootargs = "console=ttyS0,115200n1 loglevel=8 \
19 earlycon=uart8250,mmio32,0x11000000";
20 };
21
developer8c0bd0c2023-07-17 10:45:20 +080022 cpus {
23 /delete-node/ cpu@3;
24 };
25
developer79a21a22023-01-09 13:57:39 +080026 gsw: gsw@0 {
27 compatible = "mediatek,mt753x";
28 mediatek,sysctrl = <&ethwarp>;
29 #address-cells = <1>;
30 #size-cells = <0>;
31 };
32
33 memory {
34 reg = <0 0x40000000 0 0x10000000>;
35 };
36
37 nmbm_spim_nand {
38 compatible = "generic,nmbm";
39
40 #address-cells = <1>;
41 #size-cells = <1>;
42
43 lower-mtd-device = <&spi_nand>;
44 forced-create;
45
46 partitions {
47 compatible = "fixed-partitions";
48 #address-cells = <1>;
49 #size-cells = <1>;
50
51 partition@0 {
52 label = "BL2";
53 reg = <0x00000 0x0100000>;
54 read-only;
55 };
56
57 partition@100000 {
58 label = "u-boot-env";
59 reg = <0x0100000 0x0080000>;
60 };
61
62 factory: partition@180000 {
63 label = "Factory";
64 reg = <0x180000 0x0400000>;
65 };
66
67 partition@580000 {
68 label = "FIP";
69 reg = <0x580000 0x0200000>;
70 };
71
72 partition@780000 {
73 label = "ubi";
74 reg = <0x780000 0x7080000>;
75 };
76 };
77 };
78
79 wsys_adie: wsys_adie@0 {
80 // fpga cases need to manual change adie_id / sku_type for dvt only
81 compatible = "mediatek,rebb-mt7988-adie";
82 adie_id = <7976>;
83 sku_type = <3000>;
84 };
85
86 sfp_esp0: sfp@0 {
87 compatible = "sff,sfp";
88 i2c-bus = <&i2c1>;
89 mod-def0-gpios = <&pio 0 1>;
developer3ed7b542023-02-13 16:51:27 +080090 los-gpios = <&pio 30 0>;
developer79a21a22023-01-09 13:57:39 +080091 tx-disable-gpios = <&pio 29 0>;
92 };
93};
94
95&fan {
developerfce0d152024-01-11 13:37:13 +080096 pwms = <&pwm 0 50000>;
developer79a21a22023-01-09 13:57:39 +080097 status = "okay";
98};
99
100&i2c0 {
101 pinctrl-names = "default";
102 pinctrl-0 = <&i2c0_pins>;
103 status = "okay";
104
105 rt5190a_64: rt5190a@64 {
106 compatible = "richtek,rt5190a";
107 reg = <0x64>;
108 /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
109 vin2-supply = <&rt5190_buck1>;
110 vin3-supply = <&rt5190_buck1>;
111 vin4-supply = <&rt5190_buck1>;
112
113 regulators {
114 rt5190_buck1: buck1 {
115 regulator-name = "rt5190a-buck1";
116 regulator-min-microvolt = <5090000>;
117 regulator-max-microvolt = <5090000>;
118 regulator-allowed-modes =
119 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
120 regulator-boot-on;
121 };
122 buck2 {
123 regulator-name = "vcore";
124 regulator-min-microvolt = <600000>;
125 regulator-max-microvolt = <1400000>;
126 regulator-boot-on;
127 };
128 buck3 {
129 regulator-name = "proc";
130 regulator-min-microvolt = <600000>;
131 regulator-max-microvolt = <1400000>;
132 regulator-boot-on;
133 };
134 buck4 {
135 regulator-name = "rt5190a-buck4";
136 regulator-min-microvolt = <850000>;
137 regulator-max-microvolt = <850000>;
138 regulator-allowed-modes =
139 <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
140 regulator-boot-on;
141 };
142 ldo {
143 regulator-name = "rt5190a-ldo";
144 regulator-min-microvolt = <1200000>;
145 regulator-max-microvolt = <1200000>;
146 regulator-boot-on;
147 };
148 };
149 };
150};
151
152&i2c1 {
153 pinctrl-names = "default";
154 pinctrl-0 = <&i2c1_pins>;
155 status = "okay";
156};
157
158&pwm {
159 status = "okay";
160};
161
162&uart0 {
163 status = "okay";
164};
165
166&spi0 {
167 pinctrl-names = "default";
168 pinctrl-0 = <&spi0_flash_pins>;
169 status = "okay";
170
171 spi_nand: spi_nand@0 {
172 #address-cells = <1>;
173 #size-cells = <1>;
174 compatible = "spi-nand";
175 spi-cal-enable;
176 spi-cal-mode = "read-data";
177 spi-cal-datalen = <7>;
178 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
179 spi-cal-addrlen = <5>;
180 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
181 reg = <0>;
182 spi-max-frequency = <52000000>;
developer4af681c2023-05-22 14:34:27 +0800183 spi-tx-bus-width = <4>;
184 spi-rx-bus-width = <4>;
developer79a21a22023-01-09 13:57:39 +0800185 };
186};
187
188&spi1 {
189 pinctrl-names = "default";
190 /* pin shared with snfi */
191 pinctrl-0 = <&spic_pins>;
192 status = "disabled";
193};
194
195&pcie0 {
196 pinctrl-names = "default";
197 pinctrl-0 = <&pcie0_pins>;
developer722ab5f2024-02-22 11:01:46 +0800198 wifi-reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
199 wifi-reset-msleep = <100>;
developer79a21a22023-01-09 13:57:39 +0800200 status = "okay";
201};
202
203&pcie1 {
204 pinctrl-names = "default";
205 pinctrl-0 = <&pcie1_pins>;
206 status = "disabled";
207};
208
209&pcie2 {
210 pinctrl-names = "default";
211 pinctrl-0 = <&pcie2_pins>;
212 status = "disabled";
213};
214
215&pcie3 {
216 pinctrl-names = "default";
217 pinctrl-0 = <&pcie3_pins>;
218 status = "okay";
219};
220
221&pio {
developer4af681c2023-05-22 14:34:27 +0800222 gbe0_led0_pins: gbe0-pins {
developer63460d62023-04-11 10:42:32 +0800223 mux {
224 function = "led";
developer4af681c2023-05-22 14:34:27 +0800225 groups = "gbe0_led0";
developer63460d62023-04-11 10:42:32 +0800226 };
227 };
228
developer4af681c2023-05-22 14:34:27 +0800229 gbe1_led0_pins: gbe1-pins {
230 mux {
231 function = "led";
232 groups = "gbe1_led0";
233 };
234 };
235
236 gbe2_led0_pins: gbe2-pins {
237 mux {
238 function = "led";
239 groups = "gbe2_led0";
240 };
241 };
242
243 gbe3_led0_pins: gbe3-pins {
244 mux {
245 function = "led";
246 groups = "gbe3_led0";
247 };
248 };
249
developer16431302023-05-05 13:02:37 +0800250 i2p5gbe_led0_pins: 2p5gbe-pins {
251 mux {
252 function = "led";
253 groups = "2p5gbe_led0";
254 };
255 };
256
developer79a21a22023-01-09 13:57:39 +0800257 i2c0_pins: i2c0-pins-g0 {
258 mux {
259 function = "i2c";
260 groups = "i2c0_1";
261 };
262 };
263
264 i2c1_pins: i2c1-pins-g0 {
265 mux {
266 function = "i2c";
267 groups = "i2c1_sfp";
268 };
269 };
270
271 pcie0_pins: pcie0-pins {
272 mux {
273 function = "pcie";
developer722ab5f2024-02-22 11:01:46 +0800274 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0";
developer79a21a22023-01-09 13:57:39 +0800275 };
276 };
277
278 pcie1_pins: pcie1-pins {
279 mux {
280 function = "pcie";
281 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
282 "pcie_wake_n1_0";
283 };
284 };
285
286 pcie2_pins: pcie2-pins {
287 mux {
288 function = "pcie";
289 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
290 "pcie_wake_n2_0";
291 };
292 };
293
294 pcie3_pins: pcie3-pins {
295 mux {
296 function = "pcie";
297 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
298 "pcie_wake_n3_0";
299 };
300 };
301
302 spi0_flash_pins: spi0-pins {
303 mux {
304 function = "spi";
305 groups = "spi0", "spi0_wp_hold";
306 };
307 };
308
309 spic_pins: spi1-pins {
310 mux {
311 function = "spi";
developerd5169582023-02-17 10:32:38 +0800312 groups = "spi1";
developer79a21a22023-01-09 13:57:39 +0800313 };
314 };
315};
316
317&watchdog {
318 status = "disabled";
319};
320
321&eth {
322 status = "okay";
323
324 gmac0: mac@0 {
325 compatible = "mediatek,eth-mac";
326 reg = <0>;
327 mac-type = "xgdm";
328 phy-mode = "10gbase-kr";
329
330 fixed-link {
developer59a6bdc2023-03-29 11:55:43 +0800331 speed = <10000>;
developer79a21a22023-01-09 13:57:39 +0800332 full-duplex;
333 pause;
334 };
335 };
336
337 gmac1: mac@1 {
338 compatible = "mediatek,eth-mac";
339 reg = <1>;
340 mac-type = "xgdm";
developer16431302023-05-05 13:02:37 +0800341 phy-mode = "xgmii";
342 phy-handle = <&phy0>;
343 };
344
345 gmac2: mac@2 {
346 compatible = "mediatek,eth-mac";
347 reg = <2>;
348 mac-type = "xgdm";
developer79a21a22023-01-09 13:57:39 +0800349 phy-mode = "10gbase-kr";
350 managed = "in-band-status";
351 sfp = <&sfp_esp0>;
352 };
353
354 mdio: mdio-bus {
355 #address-cells = <1>;
356 #size-cells = <0>;
developer16431302023-05-05 13:02:37 +0800357
358 phy0: ethernet-phy@0 {
developer4e17c282023-05-30 10:57:24 +0800359 pinctrl-names = "i2p5gbe-led";
developer16431302023-05-05 13:02:37 +0800360 pinctrl-0 = <&i2p5gbe_led0_pins>;
361 reg = <15>;
362 compatible = "ethernet-phy-ieee802.3-c45";
363 phy-mode = "xgmii";
364 };
365
developer79a21a22023-01-09 13:57:39 +0800366 };
367};
368
369&hnat {
370 mtketh-wan = "eth1";
371 mtketh-lan = "eth0";
372 mtketh-lan2 = "eth2";
373 mtketh-max-gmac = <3>;
developer722ab5f2024-02-22 11:01:46 +0800374 mtketh-ppe-num = <3>;
developer79a21a22023-01-09 13:57:39 +0800375 status = "okay";
376};
377
378&gsw {
379 mediatek,mdio = <&mdio>;
380 mediatek,portmap = "llllw";
381 mediatek,mdio_master_pinmux = <1>;
382 interrupt-parent = <&gic>;
383 interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
384 status = "okay";
385
386 port6: port@6 {
387 compatible = "mediatek,mt753x-port";
388 mediatek,ssc-on;
389 phy-mode = "10gbase-kr";
390 reg = <6>;
391 fixed-link {
developer59a6bdc2023-03-29 11:55:43 +0800392 speed = <10000>;
developer79a21a22023-01-09 13:57:39 +0800393 full-duplex;
394 };
395 };
396
397 mdio1: mdio-bus {
398 #address-cells = <1>;
399 #size-cells = <0>;
developer79a21a22023-01-09 13:57:39 +0800400
401 gsw_phy0: ethernet-phy@0 {
402 compatible = "ethernet-phy-id03a2.9481";
403 reg = <0>;
developer4af681c2023-05-22 14:34:27 +0800404 pinctrl-names = "gbe-led";
405 pinctrl-0 = <&gbe0_led0_pins>;
developer79a21a22023-01-09 13:57:39 +0800406 nvmem-cells = <&phy_calibration_p0>;
407 nvmem-cell-names = "phy-cal-data";
408 };
409
410 gsw_phy1: ethernet-phy@1 {
411 compatible = "ethernet-phy-id03a2.9481";
412 reg = <1>;
developer4af681c2023-05-22 14:34:27 +0800413 pinctrl-names = "gbe-led";
414 pinctrl-0 = <&gbe1_led0_pins>;
developer79a21a22023-01-09 13:57:39 +0800415 nvmem-cells = <&phy_calibration_p1>;
416 nvmem-cell-names = "phy-cal-data";
417 };
418
419 gsw_phy2: ethernet-phy@2 {
420 compatible = "ethernet-phy-id03a2.9481";
421 reg = <2>;
developer4af681c2023-05-22 14:34:27 +0800422 pinctrl-names = "gbe-led";
423 pinctrl-0 = <&gbe2_led0_pins>;
developer79a21a22023-01-09 13:57:39 +0800424 nvmem-cells = <&phy_calibration_p2>;
425 nvmem-cell-names = "phy-cal-data";
426 };
427
428 gsw_phy3: ethernet-phy@3 {
429 compatible = "ethernet-phy-id03a2.9481";
430 reg = <3>;
developer4af681c2023-05-22 14:34:27 +0800431 pinctrl-names = "gbe-led";
432 pinctrl-0 = <&gbe3_led0_pins>;
developer79a21a22023-01-09 13:57:39 +0800433 nvmem-cells = <&phy_calibration_p3>;
434 nvmem-cell-names = "phy-cal-data";
435 };
436 };
437};