blob: 4711824acecf8f140fe52c4e6d65b67732ff4a33 [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 MT7988 DSA internal-2.5G SPIM-NAND RFB";
12 compatible = "mediatek,mt7988a-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";
developerbaa8f602022-12-07 17:07:51 +080063 reg = <0x780000 0x7080000>;
developer2cdaeb12022-10-04 20:25:05 +080064 };
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 = "okay";
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
developer2cdaeb12022-10-04 20:25:05 +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";
developer2cdaeb12022-10-04 20:25:05 +0800191 };
192 };
193};
194
195&watchdog {
196 status = "disabled";
197};
198
developer2cdaeb12022-10-04 20:25:05 +0800199&eth {
developer447cb002023-04-06 17:54:54 +0800200 pinctrl-names = "default";
201 pinctrl-0 = <&gbe_led0_pins>, <&i2p5gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800202 status = "okay";
203
204 gmac0: mac@0 {
205 compatible = "mediatek,eth-mac";
206 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800207 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800208 phy-mode = "10gbase-kr";
209
210 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800211 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800212 full-duplex;
213 pause;
214 };
215 };
216
217 gmac1: mac@1 {
218 compatible = "mediatek,eth-mac";
219 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800220 mac-type = "xgdm";
221 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800222 phy-handle = <&phy0>;
223 };
224
225 gmac2: mac@2 {
226 compatible = "mediatek,eth-mac";
227 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800228 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800229 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800230 phy-handle = <&phy1>;
231 };
232
233 mdio: mdio-bus {
234 #address-cells = <1>;
235 #size-cells = <0>;
236 phy0: ethernet-phy@0 {
237 reg = <15>;
238 compatible = "ethernet-phy-ieee802.3-c45";
developer30e13e72022-11-03 10:21:24 +0800239 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800240 };
241
242 phy1: ethernet-phy@8 {
243 reg = <8>;
244 compatible = "ethernet-phy-ieee802.3-c45";
245 };
246
247 switch@0 {
248 compatible = "mediatek,mt7988";
249 reg = <31>;
250 ports {
251 #address-cells = <1>;
252 #size-cells = <0>;
253
254 port@0 {
255 reg = <0>;
256 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800257 phy-mode = "gmii";
258 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800259 };
260
261 port@1 {
262 reg = <1>;
263 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800264 phy-mode = "gmii";
265 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800266 };
267
268 port@2 {
269 reg = <2>;
270 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800271 phy-mode = "gmii";
272 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800273 };
274
275 port@3 {
276 reg = <3>;
277 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800278 phy-mode = "gmii";
279 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800280 };
281
282 port@6 {
283 reg = <6>;
284 label = "cpu";
285 ethernet = <&gmac0>;
286 phy-mode = "10gbase-kr";
287
288 fixed-link {
289 speed = <10000>;
290 full-duplex;
291 pause;
292 };
293 };
294 };
developera36549c2022-10-04 16:26:13 +0800295
296 mdio {
297 compatible = "mediatek,dsa-slave-mdio";
298 #address-cells = <1>;
299 #size-cells = <0>;
300
301 sphy0: switch_phy0@0 {
302 compatible = "ethernet-phy-id03a2.9481";
303 reg = <0>;
304 phy-mode = "gmii";
305 rext = "efuse";
306 tx_r50 = "efuse";
307 nvmem-cells = <&phy_calibration_p0>;
308 nvmem-cell-names = "phy-cal-data";
309 };
310
311 sphy1: switch_phy1@1 {
312 compatible = "ethernet-phy-id03a2.9481";
313 reg = <1>;
314 phy-mode = "gmii";
315 rext = "efuse";
316 tx_r50 = "efuse";
317 nvmem-cells = <&phy_calibration_p1>;
318 nvmem-cell-names = "phy-cal-data";
319 };
320
321 sphy2: switch_phy2@2 {
322 compatible = "ethernet-phy-id03a2.9481";
323 reg = <2>;
324 phy-mode = "gmii";
325 rext = "efuse";
326 tx_r50 = "efuse";
327 nvmem-cells = <&phy_calibration_p2>;
328 nvmem-cell-names = "phy-cal-data";
329 };
330
331 sphy3: switch_phy3@3 {
332 compatible = "ethernet-phy-id03a2.9481";
333 reg = <3>;
334 phy-mode = "gmii";
335 rext = "efuse";
336 tx_r50 = "efuse";
337 nvmem-cells = <&phy_calibration_p3>;
338 nvmem-cell-names = "phy-cal-data";
339 };
340 };
developer2cdaeb12022-10-04 20:25:05 +0800341 };
342 };
343};
344
345&hnat {
346 mtketh-wan = "eth1";
347 mtketh-lan = "lan";
348 mtketh-lan2 = "eth2";
349 mtketh-max-gmac = <3>;
350 status = "okay";
351};