blob: e8b6f14e95bc257ca13f41c15573d591e334a4cd [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 internal-2.5G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988c-dsa-i2p5g-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 0x7080000>;
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&uart0 {
77 status = "okay";
78};
79
80&spi0 {
81 pinctrl-names = "default";
82 pinctrl-0 = <&spi0_flash_pins>;
83 status = "okay";
84
85 spi_nand: spi_nand@0 {
86 #address-cells = <1>;
87 #size-cells = <1>;
88 compatible = "spi-nand";
89 spi-cal-enable;
90 spi-cal-mode = "read-data";
91 spi-cal-datalen = <7>;
92 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
93 spi-cal-addrlen = <5>;
94 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
95 reg = <0>;
96 spi-max-frequency = <52000000>;
97 spi-tx-buswidth = <4>;
98 spi-rx-buswidth = <4>;
99 };
100};
101
102&spi1 {
103 pinctrl-names = "default";
104 /* pin shared with snfi */
105 pinctrl-0 = <&spic_pins>;
106 status = "disabled";
107};
108
109&pcie0 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pcie0_pins>;
112 status = "okay";
113};
114
115&pcie1 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&pcie1_pins>;
118 status = "disabled";
119};
120
121&pcie2 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&pcie2_pins>;
124 status = "disabled";
125};
126
127&pcie3 {
128 pinctrl-names = "default";
129 pinctrl-0 = <&pcie3_pins>;
130 status = "okay";
131};
132
133&pio {
developer447cb002023-04-06 17:54:54 +0800134 gbe_led0_pins: gbe-pins {
135 mux {
136 function = "led";
137 groups = "gbe_led0";
138 };
139 };
140
141 i2p5gbe_led0_pins: 2p5gbe-pins {
142 mux {
143 function = "led";
144 groups = "2p5gbe_led0";
145 };
146 };
147
developerc54ce9d2023-01-03 13:30:49 +0800148 pcie0_pins: pcie0-pins {
149 mux {
150 function = "pcie";
151 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
152 "pcie_wake_n0_0";
153 };
154 };
155
156 pcie1_pins: pcie1-pins {
157 mux {
158 function = "pcie";
159 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
160 "pcie_wake_n1_0";
161 };
162 };
163
164 pcie2_pins: pcie2-pins {
165 mux {
166 function = "pcie";
167 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
168 "pcie_wake_n2_0";
169 };
170 };
171
172 pcie3_pins: pcie3-pins {
173 mux {
174 function = "pcie";
175 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
176 "pcie_wake_n3_0";
177 };
178 };
179
180 spi0_flash_pins: spi0-pins {
181 mux {
182 function = "spi";
183 groups = "spi0", "spi0_wp_hold";
184 };
185 };
186
187 spic_pins: spi1-pins {
188 mux {
189 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800190 groups = "spi1";
developerc54ce9d2023-01-03 13:30:49 +0800191 };
192 };
193};
194
195&watchdog {
196 status = "disabled";
197};
198
199&eth {
200 status = "okay";
201
202 gmac0: mac@0 {
203 compatible = "mediatek,eth-mac";
204 reg = <0>;
205 mac-type = "xgdm";
206 phy-mode = "10gbase-kr";
207
208 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800209 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800210 full-duplex;
211 pause;
212 };
213 };
214
215 gmac1: mac@1 {
216 compatible = "mediatek,eth-mac";
217 reg = <1>;
218 mac-type = "xgdm";
219 phy-mode = "xgmii";
220 phy-handle = <&phy0>;
221 };
222
223 mdio: mdio-bus {
224 #address-cells = <1>;
225 #size-cells = <0>;
226 phy0: ethernet-phy@0 {
developeraec59ea2023-04-10 16:58:03 +0800227 pinctrl-names = "default";
228 pinctrl-0 = <&i2p5gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800229 reg = <15>;
230 compatible = "ethernet-phy-ieee802.3-c45";
231 phy-mode = "xgmii";
232 };
233
234 switch@0 {
235 compatible = "mediatek,mt7988";
236 reg = <31>;
237 ports {
238 #address-cells = <1>;
239 #size-cells = <0>;
240
241 port@0 {
242 reg = <0>;
243 label = "lan0";
244 phy-mode = "gmii";
245 phy-handle = <&sphy0>;
246 };
247
248 port@1 {
249 reg = <1>;
250 label = "lan1";
251 phy-mode = "gmii";
252 phy-handle = <&sphy1>;
253 };
254
255 port@2 {
256 reg = <2>;
257 label = "lan2";
258 phy-mode = "gmii";
259 phy-handle = <&sphy2>;
260 };
261
262 port@3 {
263 reg = <3>;
264 label = "lan3";
265 phy-mode = "gmii";
266 phy-handle = <&sphy3>;
267 };
268
269 port@6 {
270 reg = <6>;
271 label = "cpu";
272 ethernet = <&gmac0>;
273 phy-mode = "10gbase-kr";
274
275 fixed-link {
276 speed = <10000>;
277 full-duplex;
278 pause;
279 };
280 };
281 };
282
283 mdio {
284 compatible = "mediatek,dsa-slave-mdio";
285 #address-cells = <1>;
286 #size-cells = <0>;
developer941468f2023-04-10 15:21:02 +0800287 pinctrl-names = "default";
288 pinctrl-0 = <&gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800289
290 sphy0: switch_phy0@0 {
291 compatible = "ethernet-phy-id03a2.9481";
292 reg = <0>;
293 phy-mode = "gmii";
294 rext = "efuse";
295 tx_r50 = "efuse";
296 nvmem-cells = <&phy_calibration_p0>;
297 nvmem-cell-names = "phy-cal-data";
298 };
299
300 sphy1: switch_phy1@1 {
301 compatible = "ethernet-phy-id03a2.9481";
302 reg = <1>;
303 phy-mode = "gmii";
304 rext = "efuse";
305 tx_r50 = "efuse";
306 nvmem-cells = <&phy_calibration_p1>;
307 nvmem-cell-names = "phy-cal-data";
308 };
309
310 sphy2: switch_phy2@2 {
311 compatible = "ethernet-phy-id03a2.9481";
312 reg = <2>;
313 phy-mode = "gmii";
314 rext = "efuse";
315 tx_r50 = "efuse";
316 nvmem-cells = <&phy_calibration_p2>;
317 nvmem-cell-names = "phy-cal-data";
318 };
319
320 sphy3: switch_phy3@3 {
321 compatible = "ethernet-phy-id03a2.9481";
322 reg = <3>;
323 phy-mode = "gmii";
324 rext = "efuse";
325 tx_r50 = "efuse";
326 nvmem-cells = <&phy_calibration_p3>;
327 nvmem-cell-names = "phy-cal-data";
328 };
329 };
330 };
331 };
332};
333
334&hnat {
335 mtketh-wan = "eth1";
336 mtketh-lan = "lan";
337 mtketh-lan2 = "eth2";
338 mtketh-max-gmac = <3>;
339 status = "okay";
340};