blob: c589a4b4990883840c108e1de23e1e036bccc51a [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 {
134 pcie0_pins: pcie0-pins {
135 mux {
136 function = "pcie";
137 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
138 "pcie_wake_n0_0";
139 };
140 };
141
142 pcie1_pins: pcie1-pins {
143 mux {
144 function = "pcie";
145 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
146 "pcie_wake_n1_0";
147 };
148 };
149
150 pcie2_pins: pcie2-pins {
151 mux {
152 function = "pcie";
153 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
154 "pcie_wake_n2_0";
155 };
156 };
157
158 pcie3_pins: pcie3-pins {
159 mux {
160 function = "pcie";
161 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
162 "pcie_wake_n3_0";
163 };
164 };
165
166 spi0_flash_pins: spi0-pins {
167 mux {
168 function = "spi";
169 groups = "spi0", "spi0_wp_hold";
170 };
171 };
172
173 spic_pins: spi1-pins {
174 mux {
175 function = "spi";
developer1ceb26a2023-02-16 15:43:43 +0800176 groups = "spi1";
developer2cdaeb12022-10-04 20:25:05 +0800177 };
178 };
179};
180
181&watchdog {
182 status = "disabled";
183};
184
developer2cdaeb12022-10-04 20:25:05 +0800185&eth {
186 status = "okay";
187
188 gmac0: mac@0 {
189 compatible = "mediatek,eth-mac";
190 reg = <0>;
developer30e13e72022-11-03 10:21:24 +0800191 mac-type = "xgdm";
developer2cdaeb12022-10-04 20:25:05 +0800192 phy-mode = "10gbase-kr";
193
194 fixed-link {
developerf0145c92023-03-23 23:16:17 +0800195 speed = <10000>;
developer2cdaeb12022-10-04 20:25:05 +0800196 full-duplex;
197 pause;
198 };
199 };
200
201 gmac1: mac@1 {
202 compatible = "mediatek,eth-mac";
203 reg = <1>;
developer30e13e72022-11-03 10:21:24 +0800204 mac-type = "xgdm";
205 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800206 phy-handle = <&phy0>;
207 };
208
209 gmac2: mac@2 {
210 compatible = "mediatek,eth-mac";
211 reg = <2>;
developer30e13e72022-11-03 10:21:24 +0800212 mac-type = "xgdm";
developerf0145c92023-03-23 23:16:17 +0800213 phy-mode = "usxgmii";
developer2cdaeb12022-10-04 20:25:05 +0800214 phy-handle = <&phy1>;
215 };
216
217 mdio: mdio-bus {
218 #address-cells = <1>;
219 #size-cells = <0>;
220 phy0: ethernet-phy@0 {
221 reg = <15>;
222 compatible = "ethernet-phy-ieee802.3-c45";
developer30e13e72022-11-03 10:21:24 +0800223 phy-mode = "xgmii";
developer2cdaeb12022-10-04 20:25:05 +0800224 };
225
226 phy1: ethernet-phy@8 {
227 reg = <8>;
228 compatible = "ethernet-phy-ieee802.3-c45";
229 };
230
231 switch@0 {
232 compatible = "mediatek,mt7988";
233 reg = <31>;
234 ports {
235 #address-cells = <1>;
236 #size-cells = <0>;
237
238 port@0 {
239 reg = <0>;
240 label = "lan0";
developera36549c2022-10-04 16:26:13 +0800241 phy-mode = "gmii";
242 phy-handle = <&sphy0>;
developer2cdaeb12022-10-04 20:25:05 +0800243 };
244
245 port@1 {
246 reg = <1>;
247 label = "lan1";
developera36549c2022-10-04 16:26:13 +0800248 phy-mode = "gmii";
249 phy-handle = <&sphy1>;
developer2cdaeb12022-10-04 20:25:05 +0800250 };
251
252 port@2 {
253 reg = <2>;
254 label = "lan2";
developera36549c2022-10-04 16:26:13 +0800255 phy-mode = "gmii";
256 phy-handle = <&sphy2>;
developer2cdaeb12022-10-04 20:25:05 +0800257 };
258
259 port@3 {
260 reg = <3>;
261 label = "lan3";
developera36549c2022-10-04 16:26:13 +0800262 phy-mode = "gmii";
263 phy-handle = <&sphy3>;
developer2cdaeb12022-10-04 20:25:05 +0800264 };
265
266 port@6 {
267 reg = <6>;
268 label = "cpu";
269 ethernet = <&gmac0>;
270 phy-mode = "10gbase-kr";
271
272 fixed-link {
273 speed = <10000>;
274 full-duplex;
275 pause;
276 };
277 };
278 };
developera36549c2022-10-04 16:26:13 +0800279
280 mdio {
281 compatible = "mediatek,dsa-slave-mdio";
282 #address-cells = <1>;
283 #size-cells = <0>;
284
285 sphy0: switch_phy0@0 {
286 compatible = "ethernet-phy-id03a2.9481";
287 reg = <0>;
288 phy-mode = "gmii";
289 rext = "efuse";
290 tx_r50 = "efuse";
291 nvmem-cells = <&phy_calibration_p0>;
292 nvmem-cell-names = "phy-cal-data";
293 };
294
295 sphy1: switch_phy1@1 {
296 compatible = "ethernet-phy-id03a2.9481";
297 reg = <1>;
298 phy-mode = "gmii";
299 rext = "efuse";
300 tx_r50 = "efuse";
301 nvmem-cells = <&phy_calibration_p1>;
302 nvmem-cell-names = "phy-cal-data";
303 };
304
305 sphy2: switch_phy2@2 {
306 compatible = "ethernet-phy-id03a2.9481";
307 reg = <2>;
308 phy-mode = "gmii";
309 rext = "efuse";
310 tx_r50 = "efuse";
311 nvmem-cells = <&phy_calibration_p2>;
312 nvmem-cell-names = "phy-cal-data";
313 };
314
315 sphy3: switch_phy3@3 {
316 compatible = "ethernet-phy-id03a2.9481";
317 reg = <3>;
318 phy-mode = "gmii";
319 rext = "efuse";
320 tx_r50 = "efuse";
321 nvmem-cells = <&phy_calibration_p3>;
322 nvmem-cell-names = "phy-cal-data";
323 };
324 };
developer2cdaeb12022-10-04 20:25:05 +0800325 };
326 };
327};
328
329&hnat {
330 mtketh-wan = "eth1";
331 mtketh-lan = "lan";
332 mtketh-lan2 = "eth2";
333 mtketh-max-gmac = <3>;
334 status = "okay";
335};