blob: e9254033d87794ac4ccfdc938c1f689ef71c872a [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 {
developer447cb002023-04-06 17:54:54 +0800200 pinctrl-names = "default";
201 pinctrl-0 = <&gbe_led0_pins>, <&i2p5gbe_led0_pins>;
developerc54ce9d2023-01-03 13:30:49 +0800202 status = "okay";
203
204 gmac0: mac@0 {
205 compatible = "mediatek,eth-mac";
206 reg = <0>;
207 mac-type = "xgdm";
208 phy-mode = "10gbase-kr";
209
210 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800211 speed = <10000>;
developerc54ce9d2023-01-03 13:30:49 +0800212 full-duplex;
213 pause;
214 };
215 };
216
217 gmac1: mac@1 {
218 compatible = "mediatek,eth-mac";
219 reg = <1>;
220 mac-type = "xgdm";
221 phy-mode = "xgmii";
222 phy-handle = <&phy0>;
223 };
224
225 mdio: mdio-bus {
226 #address-cells = <1>;
227 #size-cells = <0>;
228 phy0: ethernet-phy@0 {
229 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>;
287
288 sphy0: switch_phy0@0 {
289 compatible = "ethernet-phy-id03a2.9481";
290 reg = <0>;
291 phy-mode = "gmii";
292 rext = "efuse";
293 tx_r50 = "efuse";
294 nvmem-cells = <&phy_calibration_p0>;
295 nvmem-cell-names = "phy-cal-data";
296 };
297
298 sphy1: switch_phy1@1 {
299 compatible = "ethernet-phy-id03a2.9481";
300 reg = <1>;
301 phy-mode = "gmii";
302 rext = "efuse";
303 tx_r50 = "efuse";
304 nvmem-cells = <&phy_calibration_p1>;
305 nvmem-cell-names = "phy-cal-data";
306 };
307
308 sphy2: switch_phy2@2 {
309 compatible = "ethernet-phy-id03a2.9481";
310 reg = <2>;
311 phy-mode = "gmii";
312 rext = "efuse";
313 tx_r50 = "efuse";
314 nvmem-cells = <&phy_calibration_p2>;
315 nvmem-cell-names = "phy-cal-data";
316 };
317
318 sphy3: switch_phy3@3 {
319 compatible = "ethernet-phy-id03a2.9481";
320 reg = <3>;
321 phy-mode = "gmii";
322 rext = "efuse";
323 tx_r50 = "efuse";
324 nvmem-cells = <&phy_calibration_p3>;
325 nvmem-cell-names = "phy-cal-data";
326 };
327 };
328 };
329 };
330};
331
332&hnat {
333 mtketh-wan = "eth1";
334 mtketh-lan = "lan";
335 mtketh-lan2 = "eth2";
336 mtketh-max-gmac = <3>;
337 status = "okay";
338};