blob: b61f09b65a7cb2917ab7a1264017c8f668724489 [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 DSA 10G SPIM-NOR RFB";
12 compatible = "mediatek,mt7988c-dsa-10g-spim-nor",
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 pci=pcie_bus_perf";
20 };
21
22 memory {
23 reg = <0 0x40000000 0 0x10000000>;
24 };
25
26 wsys_adie: wsys_adie@0 {
27 // fpga cases need to manual change adie_id / sku_type for dvt only
28 compatible = "mediatek,rebb-mt7988-adie";
29 adie_id = <7976>;
30 sku_type = <3000>;
31 };
32};
33
34&fan {
35 pwms = <&pwm 0 50000 0>;
36 status = "okay";
37};
38
39&pwm {
40 status = "okay";
41};
42
43&uart0 {
44 status = "okay";
45};
46
47&spi1 {
48 pinctrl-names = "default";
49 /* pin shared with snfi */
50 pinctrl-0 = <&spic_pins>;
51 status = "disabled";
52};
53
54&spi2 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&spi2_flash_pins>;
57 status = "okay";
58 spi_nor@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 compatible = "jedec,spi-nor";
62 spi-cal-enable;
63 spi-cal-mode = "read-data";
64 spi-cal-datalen = <7>;
65 spi-cal-data = /bits/ 8 <
66 0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */
67 spi-cal-addrlen = <1>;
68 spi-cal-addr = /bits/ 32 <0x0>;
69 reg = <0>;
70 spi-max-frequency = <52000000>;
developer1e51a742023-03-14 15:16:01 +080071 spi-tx-bus-width = <4>;
72 spi-rx-bus-width = <4>;
developerc54ce9d2023-01-03 13:30:49 +080073
74 partition@00000 {
75 label = "BL2";
76 reg = <0x00000 0x0040000>;
77 };
78 partition@40000 {
79 label = "u-boot-env";
80 reg = <0x40000 0x0010000>;
81 };
82 factory: partition@50000 {
83 label = "Factory";
developer8f434cd2023-02-07 10:29:26 +080084 reg = <0x50000 0x0200000>;
developerc54ce9d2023-01-03 13:30:49 +080085 };
developer8f434cd2023-02-07 10:29:26 +080086 partition@250000 {
developerc54ce9d2023-01-03 13:30:49 +080087 label = "FIP";
developer8f434cd2023-02-07 10:29:26 +080088 reg = <0x250000 0x0080000>;
developerc54ce9d2023-01-03 13:30:49 +080089 };
developer8f434cd2023-02-07 10:29:26 +080090 partition@2D0000 {
developerc54ce9d2023-01-03 13:30:49 +080091 label = "firmware";
developer8f434cd2023-02-07 10:29:26 +080092 reg = <0x2D0000 0x1D30000>;
developerc54ce9d2023-01-03 13:30:49 +080093 };
94 };
95};
96
97&pcie0 {
98 pinctrl-names = "default";
99 pinctrl-0 = <&pcie0_pins>;
100 status = "okay";
101};
102
103&pcie1 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&pcie1_pins>;
106 status = "disabled";
107};
108
109&pcie2 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pcie2_pins>;
112 status = "disabled";
113};
114
115&pcie3 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&pcie3_pins>;
118 status = "okay";
119};
120
121&pio {
122 mdio0_pins: mdio0-pins {
123 mux {
124 function = "mdio";
125 groups = "mdc_mdio0";
126 };
127
128 conf {
129 groups = "mdc_mdio0";
130 drive-strength = <MTK_DRIVE_8mA>;
131 };
132 };
133
developer447cb002023-04-06 17:54:54 +0800134 gbe_led0_pins: gbe-pins {
135 mux {
136 function = "led";
137 groups = "gbe_led0";
138 };
139 };
140
developerc54ce9d2023-01-03 13:30:49 +0800141 pcie0_pins: pcie0-pins {
142 mux {
143 function = "pcie";
144 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
145 "pcie_wake_n0_0";
146 };
147 };
148
149 pcie1_pins: pcie1-pins {
150 mux {
151 function = "pcie";
152 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
153 "pcie_wake_n1_0";
154 };
155 };
156
157 pcie2_pins: pcie2-pins {
158 mux {
159 function = "pcie";
160 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
161 "pcie_wake_n2_0";
162 };
163 };
164
165 pcie3_pins: pcie3-pins {
166 mux {
167 function = "pcie";
168 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
169 "pcie_wake_n3_0";
170 };
171 };
172
173 spic_pins: spi1-pins {
174 mux {
175 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800176 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800177 };
178 };
179
180 spi2_flash_pins: spi2-pins {
181 mux {
182 function = "spi";
183 groups = "spi2", "spi2_wp_hold";
184 };
185 };
186};
187
188&watchdog {
189 status = "disabled";
190};
191
192&eth {
193 pinctrl-names = "default";
developer447cb002023-04-06 17:54:54 +0800194 pinctrl-0 = <&mdio0_pins>, <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800195 status = "okay";
196
197 gmac0: mac@0 {
198 compatible = "mediatek,eth-mac";
199 reg = <0>;
200 mac-type = "xgdm";
201 phy-mode = "10gbase-kr";
202
203 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800204 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800205 full-duplex;
206 pause;
207 };
208 };
209
210 gmac1: mac@1 {
211 compatible = "mediatek,eth-mac";
212 reg = <1>;
213 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800214 phy-mode = "usxgmii";
developerc54ce9d2023-01-03 13:30:49 +0800215 phy-handle = <&phy0>;
216 };
217
218 mdio: mdio-bus {
219 #address-cells = <1>;
220 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800221 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800222
223 phy0: ethernet-phy@0 {
224 reg = <0>;
225 compatible = "ethernet-phy-ieee802.3-c45";
226 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800227 reset-assert-us = <100000>;
228 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800229 };
230
231 switch@0 {
232 compatible = "mediatek,mt7988";
233 reg = <31>;
234 ports {
235 #address-cells = <1>;
236 #size-cells = <0>;
237
238 port@0 {
239 reg = <0>;
240 label = "lan0";
241 phy-mode = "gmii";
242 phy-handle = <&sphy0>;
243 };
244
245 port@1 {
246 reg = <1>;
247 label = "lan1";
248 phy-mode = "gmii";
249 phy-handle = <&sphy1>;
250 };
251
252 port@2 {
253 reg = <2>;
254 label = "lan2";
255 phy-mode = "gmii";
256 phy-handle = <&sphy2>;
257 };
258
259 port@3 {
260 reg = <3>;
261 label = "lan3";
262 phy-mode = "gmii";
263 phy-handle = <&sphy3>;
264 };
265
266 port@6 {
267 reg = <6>;
268 label = "cpu";
269 ethernet = <&gmac0>;
270 phy-mode = "10gbase-kr";
271
272 fixed-link {
273 speed = <10000>;
274 full-duplex;
275 pause;
276 };
277 };
278 };
279
280 mdio {
281 compatible = "mediatek,dsa-slave-mdio";
282 #address-cells = <1>;
283 #size-cells = <0>;
284
285 sphy0: switch_phy0@0 {
286 compatible = "ethernet-phy-id03a2.9481";
287 reg = <0>;
288 phy-mode = "gmii";
289 rext = "efuse";
290 tx_r50 = "efuse";
291 nvmem-cells = <&phy_calibration_p0>;
292 nvmem-cell-names = "phy-cal-data";
293 };
294
295 sphy1: switch_phy1@1 {
296 compatible = "ethernet-phy-id03a2.9481";
297 reg = <1>;
298 phy-mode = "gmii";
299 rext = "efuse";
300 tx_r50 = "efuse";
301 nvmem-cells = <&phy_calibration_p1>;
302 nvmem-cell-names = "phy-cal-data";
303 };
304
305 sphy2: switch_phy2@2 {
306 compatible = "ethernet-phy-id03a2.9481";
307 reg = <2>;
308 phy-mode = "gmii";
309 rext = "efuse";
310 tx_r50 = "efuse";
311 nvmem-cells = <&phy_calibration_p2>;
312 nvmem-cell-names = "phy-cal-data";
313 };
314
315 sphy3: switch_phy3@3 {
316 compatible = "ethernet-phy-id03a2.9481";
317 reg = <3>;
318 phy-mode = "gmii";
319 rext = "efuse";
320 tx_r50 = "efuse";
321 nvmem-cells = <&phy_calibration_p3>;
322 nvmem-cell-names = "phy-cal-data";
323 };
324 };
325 };
326 };
327};
328
329&hnat {
330 mtketh-wan = "eth1";
331 mtketh-lan = "lan";
332 mtketh-lan2 = "eth2";
333 mtketh-max-gmac = <3>;
334 status = "okay";
335};
336
337&wed {
338 dy_txbm_enable = "true";
339 dy_txbm_budge = <8>;
340 txbm_init_sz = <10>;
341 status = "okay";
342};