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