blob: 7878c52ac98aecb77b21bf156fceffa73d741e47 [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
134 pcie0_pins: pcie0-pins {
135 mux {
136 function = "pcie";
137 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
138 "pcie_wake_n0_0";
139 };
140 };
141
142 pcie1_pins: pcie1-pins {
143 mux {
144 function = "pcie";
145 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
146 "pcie_wake_n1_0";
147 };
148 };
149
150 pcie2_pins: pcie2-pins {
151 mux {
152 function = "pcie";
153 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
154 "pcie_wake_n2_0";
155 };
156 };
157
158 pcie3_pins: pcie3-pins {
159 mux {
160 function = "pcie";
161 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
162 "pcie_wake_n3_0";
163 };
164 };
165
166 spic_pins: spi1-pins {
167 mux {
168 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800169 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800170 };
171 };
172
173 spi2_flash_pins: spi2-pins {
174 mux {
175 function = "spi";
176 groups = "spi2", "spi2_wp_hold";
177 };
178 };
179};
180
181&watchdog {
182 status = "disabled";
183};
184
185&eth {
186 pinctrl-names = "default";
187 pinctrl-0 = <&mdio0_pins>;
188 status = "okay";
189
190 gmac0: mac@0 {
191 compatible = "mediatek,eth-mac";
192 reg = <0>;
193 mac-type = "xgdm";
194 phy-mode = "10gbase-kr";
195
196 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800197 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800198 full-duplex;
199 pause;
200 };
201 };
202
203 gmac1: mac@1 {
204 compatible = "mediatek,eth-mac";
205 reg = <1>;
206 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800207 phy-mode = "usxgmii";
developerc54ce9d2023-01-03 13:30:49 +0800208 phy-handle = <&phy0>;
209 };
210
211 mdio: mdio-bus {
212 #address-cells = <1>;
213 #size-cells = <0>;
developerc4d8da72023-03-16 14:37:28 +0800214 clock-frequency = <10500000>;
developerc54ce9d2023-01-03 13:30:49 +0800215
216 phy0: ethernet-phy@0 {
217 reg = <0>;
218 compatible = "ethernet-phy-ieee802.3-c45";
219 reset-gpios = <&pio 72 1>;
developer265607f2023-03-01 18:37:46 +0800220 reset-assert-us = <100000>;
221 reset-deassert-us = <221000>;
developerc54ce9d2023-01-03 13:30:49 +0800222 };
223
224 switch@0 {
225 compatible = "mediatek,mt7988";
226 reg = <31>;
227 ports {
228 #address-cells = <1>;
229 #size-cells = <0>;
230
231 port@0 {
232 reg = <0>;
233 label = "lan0";
234 phy-mode = "gmii";
235 phy-handle = <&sphy0>;
236 };
237
238 port@1 {
239 reg = <1>;
240 label = "lan1";
241 phy-mode = "gmii";
242 phy-handle = <&sphy1>;
243 };
244
245 port@2 {
246 reg = <2>;
247 label = "lan2";
248 phy-mode = "gmii";
249 phy-handle = <&sphy2>;
250 };
251
252 port@3 {
253 reg = <3>;
254 label = "lan3";
255 phy-mode = "gmii";
256 phy-handle = <&sphy3>;
257 };
258
259 port@6 {
260 reg = <6>;
261 label = "cpu";
262 ethernet = <&gmac0>;
263 phy-mode = "10gbase-kr";
264
265 fixed-link {
266 speed = <10000>;
267 full-duplex;
268 pause;
269 };
270 };
271 };
272
273 mdio {
274 compatible = "mediatek,dsa-slave-mdio";
275 #address-cells = <1>;
276 #size-cells = <0>;
277
278 sphy0: switch_phy0@0 {
279 compatible = "ethernet-phy-id03a2.9481";
280 reg = <0>;
281 phy-mode = "gmii";
282 rext = "efuse";
283 tx_r50 = "efuse";
284 nvmem-cells = <&phy_calibration_p0>;
285 nvmem-cell-names = "phy-cal-data";
286 };
287
288 sphy1: switch_phy1@1 {
289 compatible = "ethernet-phy-id03a2.9481";
290 reg = <1>;
291 phy-mode = "gmii";
292 rext = "efuse";
293 tx_r50 = "efuse";
294 nvmem-cells = <&phy_calibration_p1>;
295 nvmem-cell-names = "phy-cal-data";
296 };
297
298 sphy2: switch_phy2@2 {
299 compatible = "ethernet-phy-id03a2.9481";
300 reg = <2>;
301 phy-mode = "gmii";
302 rext = "efuse";
303 tx_r50 = "efuse";
304 nvmem-cells = <&phy_calibration_p2>;
305 nvmem-cell-names = "phy-cal-data";
306 };
307
308 sphy3: switch_phy3@3 {
309 compatible = "ethernet-phy-id03a2.9481";
310 reg = <3>;
311 phy-mode = "gmii";
312 rext = "efuse";
313 tx_r50 = "efuse";
314 nvmem-cells = <&phy_calibration_p3>;
315 nvmem-cell-names = "phy-cal-data";
316 };
317 };
318 };
319 };
320};
321
322&hnat {
323 mtketh-wan = "eth1";
324 mtketh-lan = "lan";
325 mtketh-lan2 = "eth2";
326 mtketh-max-gmac = <3>;
327 status = "okay";
328};
329
330&wed {
331 dy_txbm_enable = "true";
332 dy_txbm_budge = <8>;
333 txbm_init_sz = <10>;
334 status = "okay";
335};