blob: 26fd171cdca2f9ae6ec9890289566fb4383bb55c [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>;
71
72 partition@00000 {
73 label = "BL2";
74 reg = <0x00000 0x0040000>;
75 };
76 partition@40000 {
77 label = "u-boot-env";
78 reg = <0x40000 0x0010000>;
79 };
80 factory: partition@50000 {
81 label = "Factory";
developer8f434cd2023-02-07 10:29:26 +080082 reg = <0x50000 0x0200000>;
developerc54ce9d2023-01-03 13:30:49 +080083 };
developer8f434cd2023-02-07 10:29:26 +080084 partition@250000 {
developerc54ce9d2023-01-03 13:30:49 +080085 label = "FIP";
developer8f434cd2023-02-07 10:29:26 +080086 reg = <0x250000 0x0080000>;
developerc54ce9d2023-01-03 13:30:49 +080087 };
developer8f434cd2023-02-07 10:29:26 +080088 partition@2D0000 {
developerc54ce9d2023-01-03 13:30:49 +080089 label = "firmware";
developer8f434cd2023-02-07 10:29:26 +080090 reg = <0x2D0000 0x1D30000>;
developerc54ce9d2023-01-03 13:30:49 +080091 };
92 };
93};
94
95&pcie0 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&pcie0_pins>;
98 status = "okay";
99};
100
101&pcie1 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&pcie1_pins>;
104 status = "disabled";
105};
106
107&pcie2 {
108 pinctrl-names = "default";
109 pinctrl-0 = <&pcie2_pins>;
110 status = "disabled";
111};
112
113&pcie3 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&pcie3_pins>;
116 status = "okay";
117};
118
119&pio {
120 mdio0_pins: mdio0-pins {
121 mux {
122 function = "mdio";
123 groups = "mdc_mdio0";
124 };
125
126 conf {
127 groups = "mdc_mdio0";
128 drive-strength = <MTK_DRIVE_8mA>;
129 };
130 };
131
132 pcie0_pins: pcie0-pins {
133 mux {
134 function = "pcie";
135 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
136 "pcie_wake_n0_0";
137 };
138 };
139
140 pcie1_pins: pcie1-pins {
141 mux {
142 function = "pcie";
143 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
144 "pcie_wake_n1_0";
145 };
146 };
147
148 pcie2_pins: pcie2-pins {
149 mux {
150 function = "pcie";
151 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
152 "pcie_wake_n2_0";
153 };
154 };
155
156 pcie3_pins: pcie3-pins {
157 mux {
158 function = "pcie";
159 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
160 "pcie_wake_n3_0";
161 };
162 };
163
164 spic_pins: spi1-pins {
165 mux {
166 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800167 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800168 };
169 };
170
171 spi2_flash_pins: spi2-pins {
172 mux {
173 function = "spi";
174 groups = "spi2", "spi2_wp_hold";
175 };
176 };
177};
178
179&watchdog {
180 status = "disabled";
181};
182
183&eth {
184 pinctrl-names = "default";
185 pinctrl-0 = <&mdio0_pins>;
186 status = "okay";
187
188 gmac0: mac@0 {
189 compatible = "mediatek,eth-mac";
190 reg = <0>;
191 mac-type = "xgdm";
192 phy-mode = "10gbase-kr";
193
194 fixed-link {
195 speed = <2500>;
196 full-duplex;
197 pause;
198 };
199 };
200
201 gmac1: mac@1 {
202 compatible = "mediatek,eth-mac";
203 reg = <1>;
204 mac-type = "xgdm";
205 phy-mode = "10gbase-kr";
206 phy-handle = <&phy0>;
207 };
208
209 mdio: mdio-bus {
210 #address-cells = <1>;
211 #size-cells = <0>;
212 mdc-max-frequency = <10500000>;
213
214 phy0: ethernet-phy@0 {
215 reg = <0>;
216 compatible = "ethernet-phy-ieee802.3-c45";
217 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800218 reset-assert-us = <100000>;
219 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800220 };
221
222 switch@0 {
223 compatible = "mediatek,mt7988";
224 reg = <31>;
225 ports {
226 #address-cells = <1>;
227 #size-cells = <0>;
228
229 port@0 {
230 reg = <0>;
231 label = "lan0";
232 phy-mode = "gmii";
233 phy-handle = <&sphy0>;
234 };
235
236 port@1 {
237 reg = <1>;
238 label = "lan1";
239 phy-mode = "gmii";
240 phy-handle = <&sphy1>;
241 };
242
243 port@2 {
244 reg = <2>;
245 label = "lan2";
246 phy-mode = "gmii";
247 phy-handle = <&sphy2>;
248 };
249
250 port@3 {
251 reg = <3>;
252 label = "lan3";
253 phy-mode = "gmii";
254 phy-handle = <&sphy3>;
255 };
256
257 port@6 {
258 reg = <6>;
259 label = "cpu";
260 ethernet = <&gmac0>;
261 phy-mode = "10gbase-kr";
262
263 fixed-link {
264 speed = <10000>;
265 full-duplex;
266 pause;
267 };
268 };
269 };
270
271 mdio {
272 compatible = "mediatek,dsa-slave-mdio";
273 #address-cells = <1>;
274 #size-cells = <0>;
275
276 sphy0: switch_phy0@0 {
277 compatible = "ethernet-phy-id03a2.9481";
278 reg = <0>;
279 phy-mode = "gmii";
280 rext = "efuse";
281 tx_r50 = "efuse";
282 nvmem-cells = <&phy_calibration_p0>;
283 nvmem-cell-names = "phy-cal-data";
284 };
285
286 sphy1: switch_phy1@1 {
287 compatible = "ethernet-phy-id03a2.9481";
288 reg = <1>;
289 phy-mode = "gmii";
290 rext = "efuse";
291 tx_r50 = "efuse";
292 nvmem-cells = <&phy_calibration_p1>;
293 nvmem-cell-names = "phy-cal-data";
294 };
295
296 sphy2: switch_phy2@2 {
297 compatible = "ethernet-phy-id03a2.9481";
298 reg = <2>;
299 phy-mode = "gmii";
300 rext = "efuse";
301 tx_r50 = "efuse";
302 nvmem-cells = <&phy_calibration_p2>;
303 nvmem-cell-names = "phy-cal-data";
304 };
305
306 sphy3: switch_phy3@3 {
307 compatible = "ethernet-phy-id03a2.9481";
308 reg = <3>;
309 phy-mode = "gmii";
310 rext = "efuse";
311 tx_r50 = "efuse";
312 nvmem-cells = <&phy_calibration_p3>;
313 nvmem-cell-names = "phy-cal-data";
314 };
315 };
316 };
317 };
318};
319
320&hnat {
321 mtketh-wan = "eth1";
322 mtketh-lan = "lan";
323 mtketh-lan2 = "eth2";
324 mtketh-max-gmac = <3>;
325 status = "okay";
326};
327
328&wed {
329 dy_txbm_enable = "true";
330 dy_txbm_budge = <8>;
331 txbm_init_sz = <10>;
332 status = "okay";
333};