blob: 6bf9cd77f62dc3391578662ade4c4249d6b4e96a [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>;
developer5fb80602023-05-02 18:54:53 +080097 spi-tx-bus-width = <4>;
98 spi-rx-bus-width = <4>;
developer2cdaeb12022-10-04 20:25:05 +080099 };
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 {
200 status = "okay";
201
202 gmac0: mac@0 {
203 compatible = "mediatek,eth-mac";
204 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800205 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800206 phy-mode = "10gbase-kr";
207
208 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800209 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800210 full-duplex;
211 pause;
212 };
213 };
214
215 gmac1: mac@1 {
216 compatible = "mediatek,eth-mac";
217 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800218 mac-type = "xgdm";
219 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800220 phy-handle = <&phy0>;
221 };
222
223 gmac2: mac@2 {
224 compatible = "mediatek,eth-mac";
225 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800226 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800227 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800228 phy-handle = <&phy1>;
229 };
230
231 mdio: mdio-bus {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 phy0: ethernet-phy@0 {
developeraec59ea2023-04-10 16:58:03 +0800235 pinctrl-names = "default";
236 pinctrl-0 = <&i2p5gbe_led0_pins>;
developer2cdaeb12022-10-04 20:25:05 +0800237 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>;
developer941468f2023-04-10 15:21:02 +0800300 pinctrl-names = "default";
301 pinctrl-0 = <&gbe_led0_pins>;
developera36549c2022-10-04 16:26:13 +0800302
303 sphy0: switch_phy0@0 {
304 compatible = "ethernet-phy-id03a2.9481";
305 reg = <0>;
306 phy-mode = "gmii";
307 rext = "efuse";
308 tx_r50 = "efuse";
309 nvmem-cells = <&phy_calibration_p0>;
310 nvmem-cell-names = "phy-cal-data";
311 };
312
313 sphy1: switch_phy1@1 {
314 compatible = "ethernet-phy-id03a2.9481";
315 reg = <1>;
316 phy-mode = "gmii";
317 rext = "efuse";
318 tx_r50 = "efuse";
319 nvmem-cells = <&phy_calibration_p1>;
320 nvmem-cell-names = "phy-cal-data";
321 };
322
323 sphy2: switch_phy2@2 {
324 compatible = "ethernet-phy-id03a2.9481";
325 reg = <2>;
326 phy-mode = "gmii";
327 rext = "efuse";
328 tx_r50 = "efuse";
329 nvmem-cells = <&phy_calibration_p2>;
330 nvmem-cell-names = "phy-cal-data";
331 };
332
333 sphy3: switch_phy3@3 {
334 compatible = "ethernet-phy-id03a2.9481";
335 reg = <3>;
336 phy-mode = "gmii";
337 rext = "efuse";
338 tx_r50 = "efuse";
339 nvmem-cells = <&phy_calibration_p3>;
340 nvmem-cell-names = "phy-cal-data";
341 };
342 };
developer2cdaeb12022-10-04 20:25:05 +0800343 };
344 };
345};
346
347&hnat {
348 mtketh-wan = "eth1";
349 mtketh-lan = "lan";
350 mtketh-lan2 = "eth2";
351 mtketh-max-gmac = <3>;
352 status = "okay";
353};