blob: 8e49212ce55ec752600d5193fb2c5dec13d46b8c [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 SNFI-NAND RFB";
12 compatible = "mediatek,mt7988a-dsa-10g-snfi-snand",
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 nmbm_snfi {
27 compatible = "generic,nmbm";
28
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 lower-mtd-device = <&snand>;
33 forced-create;
34 empty-page-ecc-protected;
35
36 partitions {
37 compatible = "fixed-partitions";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 partition@0 {
42 label = "BL2";
43 reg = <0x00000 0x0100000>;
44 read-only;
45 };
46
47 partition@100000 {
48 label = "u-boot-env";
49 reg = <0x0100000 0x0080000>;
50 };
51
52 factory: partition@180000 {
53 label = "Factory";
54 reg = <0x180000 0x0400000>;
55 };
56
57 partition@580000 {
58 label = "FIP";
59 reg = <0x580000 0x0200000>;
60 };
61
62 partition@780000 {
63 label = "ubi";
64 reg = <0x780000 0x4000000>;
65 };
66 };
67 };
68
69 wsys_adie: wsys_adie@0 {
70 // fpga cases need to manual change adie_id / sku_type for dvt only
71 compatible = "mediatek,rebb-mt7988-adie";
72 adie_id = <7976>;
73 sku_type = <3000>;
74 };
75};
76
77&fan {
78 pwms = <&pwm 0 50000 0>;
79 status = "okay";
80};
81
82&pwm {
83 status = "okay";
84};
85
86&uart0 {
87 status = "okay";
88};
89
90&spi1 {
91 pinctrl-names = "default";
92 /* pin shared with snfi */
93 pinctrl-0 = <&spic_pins>;
94 status = "disabled";
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 = "okay";
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 pcie0_pins: pcie0-pins {
123 mux {
124 function = "pcie";
125 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
126 "pcie_wake_n0_0";
127 };
128 };
129
130 pcie1_pins: pcie1-pins {
131 mux {
132 function = "pcie";
133 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
134 "pcie_wake_n1_0";
135 };
136 };
137
138 pcie2_pins: pcie2-pins {
139 mux {
140 function = "pcie";
141 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
142 "pcie_wake_n2_0";
143 };
144 };
145
146 pcie3_pins: pcie3-pins {
147 mux {
148 function = "pcie";
149 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
150 "pcie_wake_n3_0";
151 };
152 };
153
154 snfi_pins: snfi-pins {
155 mux {
156 function = "flash";
157 groups = "snfi";
158 };
159 };
160
161 spic_pins: spi1-pins {
162 mux {
163 function = "spi";
164 groups = "spi1_1";
165 };
166 };
167};
168
169&watchdog {
170 status = "disabled";
171};
172
173&snand {
174 pinctrl-names = "default";
175 /* pin shared with spic */
176 pinctrl-0 = <&snfi_pins>;
177 status = "okay";
178 mediatek,quad-spi;
179};
180
181&eth {
182 status = "okay";
183
184 gmac0: mac@0 {
185 compatible = "mediatek,eth-mac";
186 reg = <0>;
187 phy-mode = "10gbase-kr";
188
189 fixed-link {
190 speed = <2500>;
191 full-duplex;
192 pause;
193 };
194 };
195
196 gmac1: mac@1 {
197 compatible = "mediatek,eth-mac";
198 reg = <1>;
199 phy-mode = "10gbase-kr";
200 phy-handle = <&phy0>;
201 };
202
203 gmac2: mac@2 {
204 compatible = "mediatek,eth-mac";
205 reg = <2>;
206 phy-mode = "10gbase-kr";
207 phy-handle = <&phy1>;
208 };
209
210 mdio: mdio-bus {
211 #address-cells = <1>;
212 #size-cells = <0>;
213 phy0: ethernet-phy@0 {
214 reg = <0>;
215 compatible = "ethernet-phy-ieee802.3-c45";
216 reset-gpios = <&pio 71 1>;
217 reset-assert-us = <1000000>;
218 reset-deassert-us = <1000000>;
219 };
220
221 phy1: ethernet-phy@8 {
222 reg = <8>;
223 compatible = "ethernet-phy-ieee802.3-c45";
224 reset-gpios = <&pio 72 1>;
225 reset-assert-us = <1000000>;
226 reset-deassert-us = <1000000>;
227 };
228
229 switch@0 {
230 compatible = "mediatek,mt7988";
231 reg = <31>;
232 ports {
233 #address-cells = <1>;
234 #size-cells = <0>;
235
236 port@0 {
237 reg = <0>;
238 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800239 phy-mode = "gmii";
240 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800241 };
242
243 port@1 {
244 reg = <1>;
245 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800246 phy-mode = "gmii";
247 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800248 };
249
250 port@2 {
251 reg = <2>;
252 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800253 phy-mode = "gmii";
254 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800255 };
256
257 port@3 {
258 reg = <3>;
259 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800260 phy-mode = "gmii";
261 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800262 };
263
264 port@6 {
265 reg = <6>;
266 label = "cpu";
267 ethernet = <&gmac0>;
268 phy-mode = "10gbase-kr";
269
270 fixed-link {
271 speed = <10000>;
272 full-duplex;
273 pause;
274 };
275 };
276 };
developera36549c2022-10-04 16:26:13 +0800277
278 mdio {
279 compatible = "mediatek,dsa-slave-mdio";
280 #address-cells = <1>;
281 #size-cells = <0>;
282
283 sphy0: switch_phy0@0 {
284 compatible = "ethernet-phy-id03a2.9481";
285 reg = <0>;
286 phy-mode = "gmii";
287 rext = "efuse";
288 tx_r50 = "efuse";
289 nvmem-cells = <&phy_calibration_p0>;
290 nvmem-cell-names = "phy-cal-data";
291 };
292
293 sphy1: switch_phy1@1 {
294 compatible = "ethernet-phy-id03a2.9481";
295 reg = <1>;
296 phy-mode = "gmii";
297 rext = "efuse";
298 tx_r50 = "efuse";
299 nvmem-cells = <&phy_calibration_p1>;
300 nvmem-cell-names = "phy-cal-data";
301 };
302
303 sphy2: switch_phy2@2 {
304 compatible = "ethernet-phy-id03a2.9481";
305 reg = <2>;
306 phy-mode = "gmii";
307 rext = "efuse";
308 tx_r50 = "efuse";
309 nvmem-cells = <&phy_calibration_p2>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312
313 sphy3: switch_phy3@3 {
314 compatible = "ethernet-phy-id03a2.9481";
315 reg = <3>;
316 phy-mode = "gmii";
317 rext = "efuse";
318 tx_r50 = "efuse";
319 nvmem-cells = <&phy_calibration_p3>;
320 nvmem-cell-names = "phy-cal-data";
321 };
322 };
developer2cdaeb12022-10-04 20:25:05 +0800323 };
324 };
325};
326
327&hnat {
328 mtketh-wan = "eth1";
329 mtketh-lan = "lan";
330 mtketh-lan2 = "eth2";
331 mtketh-max-gmac = <3>;
332 status = "okay";
333};