blob: 8e832f368ee1a215eb880046b746ce1769745867 [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>;
177 phy-mode = "10gbase-kr";
178
179 fixed-link {
180 speed = <2500>;
181 full-duplex;
182 pause;
183 };
184 };
185
186 gmac1: mac@1 {
187 compatible = "mediatek,eth-mac";
188 reg = <1>;
189 phy-mode = "10gbase-kr";
190 phy-handle = <&phy0>;
191 };
192
193 gmac2: mac@2 {
194 compatible = "mediatek,eth-mac";
195 reg = <2>;
196 phy-mode = "10gbase-kr";
197 phy-handle = <&phy1>;
198 };
199
200 mdio: mdio-bus {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 phy0: ethernet-phy@0 {
204 reg = <0>;
205 compatible = "ethernet-phy-ieee802.3-c45";
206 reset-gpios = <&pio 71 1>;
207 reset-assert-us = <1000000>;
208 reset-deassert-us = <1000000>;
209 };
210
211 phy1: ethernet-phy@8 {
212 reg = <8>;
213 compatible = "ethernet-phy-ieee802.3-c45";
214 reset-gpios = <&pio 72 1>;
215 reset-assert-us = <1000000>;
216 reset-deassert-us = <1000000>;
217 };
218
219 switch@0 {
220 compatible = "mediatek,mt7988";
221 reg = <31>;
222 ports {
223 #address-cells = <1>;
224 #size-cells = <0>;
225
226 port@0 {
227 reg = <0>;
228 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800229 phy-mode = "gmii";
230 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800231 };
232
233 port@1 {
234 reg = <1>;
235 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800236 phy-mode = "gmii";
237 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800238 };
239
240 port@2 {
241 reg = <2>;
242 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800243 phy-mode = "gmii";
244 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800245 };
246
247 port@3 {
248 reg = <3>;
249 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800250 phy-mode = "gmii";
251 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800252 };
253
254 port@6 {
255 reg = <6>;
256 label = "cpu";
257 ethernet = <&gmac0>;
258 phy-mode = "10gbase-kr";
259
260 fixed-link {
261 speed = <10000>;
262 full-duplex;
263 pause;
264 };
265 };
266 };
developera36549c2022-10-04 16:26:13 +0800267
268 mdio {
269 compatible = "mediatek,dsa-slave-mdio";
270 #address-cells = <1>;
271 #size-cells = <0>;
272
273 sphy0: switch_phy0@0 {
274 compatible = "ethernet-phy-id03a2.9481";
275 reg = <0>;
276 phy-mode = "gmii";
277 rext = "efuse";
278 tx_r50 = "efuse";
279 nvmem-cells = <&phy_calibration_p0>;
280 nvmem-cell-names = "phy-cal-data";
281 };
282
283 sphy1: switch_phy1@1 {
284 compatible = "ethernet-phy-id03a2.9481";
285 reg = <1>;
286 phy-mode = "gmii";
287 rext = "efuse";
288 tx_r50 = "efuse";
289 nvmem-cells = <&phy_calibration_p1>;
290 nvmem-cell-names = "phy-cal-data";
291 };
292
293 sphy2: switch_phy2@2 {
294 compatible = "ethernet-phy-id03a2.9481";
295 reg = <2>;
296 phy-mode = "gmii";
297 rext = "efuse";
298 tx_r50 = "efuse";
299 nvmem-cells = <&phy_calibration_p2>;
300 nvmem-cell-names = "phy-cal-data";
301 };
302
303 sphy3: switch_phy3@3 {
304 compatible = "ethernet-phy-id03a2.9481";
305 reg = <3>;
306 phy-mode = "gmii";
307 rext = "efuse";
308 tx_r50 = "efuse";
309 nvmem-cells = <&phy_calibration_p3>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312 };
developer2cdaeb12022-10-04 20:25:05 +0800313 };
314 };
315};
316
317&hnat {
318 mtketh-wan = "eth1";
319 mtketh-lan = "lan";
320 mtketh-lan2 = "eth2";
321 mtketh-max-gmac = <3>;
322 status = "okay";
323};
324
325&wed {
326 dy_txbm_enable = "true";
327 dy_txbm_budge = <8>;
328 txbm_init_sz = <10>;
329 status = "okay";
330};