blob: 35982e3c96bb5252ee8a37aeacba3848eedea0de [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 MT7988A DSA 10G SPIM-NOR RFB";
12 compatible = "mediatek,mt7988a-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";
82 reg = <0x50000 0x00B0000>;
83 };
84 partition@100000 {
85 label = "FIP";
86 reg = <0x100000 0x0080000>;
87 };
88 partition@180000 {
89 label = "firmware";
90 reg = <0x180000 0xE00000>;
91 };
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 = "okay";
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 pcie0_pins: pcie0-pins {
121 mux {
122 function = "pcie";
123 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
124 "pcie_wake_n0_0";
125 };
126 };
127
128 pcie1_pins: pcie1-pins {
129 mux {
130 function = "pcie";
131 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
132 "pcie_wake_n1_0";
133 };
134 };
135
136 pcie2_pins: pcie2-pins {
137 mux {
138 function = "pcie";
139 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
140 "pcie_wake_n2_0";
141 };
142 };
143
144 pcie3_pins: pcie3-pins {
145 mux {
146 function = "pcie";
147 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
148 "pcie_wake_n3_0";
149 };
150 };
151
152 spic_pins: spi1-pins {
153 mux {
154 function = "spi";
155 groups = "spi1_1";
156 };
157 };
158
159 spi2_flash_pins: spi2-pins {
160 mux {
161 function = "spi";
162 groups = "spi2", "spi2_wp_hold";
163 };
164 };
165};
166
167&watchdog {
168 status = "disabled";
169};
170
171&eth {
172 status = "okay";
173
174 gmac0: mac@0 {
175 compatible = "mediatek,eth-mac";
176 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800177 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800178 phy-mode = "10gbase-kr";
179
180 fixed-link {
181 speed = <2500>;
182 full-duplex;
183 pause;
184 };
185 };
186
187 gmac1: mac@1 {
188 compatible = "mediatek,eth-mac";
189 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800190 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800191 phy-mode = "10gbase-kr";
192 phy-handle = <&phy0>;
193 };
194
195 gmac2: mac@2 {
196 compatible = "mediatek,eth-mac";
197 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800198 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800199 phy-mode = "10gbase-kr";
200 phy-handle = <&phy1>;
201 };
202
203 mdio: mdio-bus {
204 #address-cells = <1>;
205 #size-cells = <0>;
206 phy0: ethernet-phy@0 {
207 reg = <0>;
208 compatible = "ethernet-phy-ieee802.3-c45";
209 reset-gpios = <&pio 71 1>;
210 reset-assert-us = <1000000>;
211 reset-deassert-us = <1000000>;
212 };
213
214 phy1: ethernet-phy@8 {
215 reg = <8>;
216 compatible = "ethernet-phy-ieee802.3-c45";
217 reset-gpios = <&pio 72 1>;
218 reset-assert-us = <1000000>;
219 reset-deassert-us = <1000000>;
220 };
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";
developera36549c2022-10-04 16:26:13 +0800232 phy-mode = "gmii";
233 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800234 };
235
236 port@1 {
237 reg = <1>;
238 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800239 phy-mode = "gmii";
240 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800241 };
242
243 port@2 {
244 reg = <2>;
245 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800246 phy-mode = "gmii";
247 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800248 };
249
250 port@3 {
251 reg = <3>;
252 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800253 phy-mode = "gmii";
254 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800255 };
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 };
developera36549c2022-10-04 16:26:13 +0800270
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 };
developer2cdaeb12022-10-04 20:25:05 +0800316 };
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};