blob: 4edf1f037199b057642cbf1cace36d400217c8f2 [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 MT7988A DSA 10G SPIM-NOR RFB";
12 compatible = "mediatek,mt7988a-dsa-10g-spim-nor",
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 wsys_adie: wsys_adie@0 {
27 // fpga cases need to manual change adie_id / sku_type for dvt only
28 compatible = "mediatek,rebb-mt7988-adie";
29 adie_id = <7976>;
30 sku_type = <3000>;
31 };
32};
33
34&fan {
35 pwms = <&pwm 0 50000 0>;
36 status = "okay";
37};
38
39&pwm {
40 status = "okay";
41};
42
43&uart0 {
44 status = "okay";
45};
46
47&spi1 {
48 pinctrl-names = "default";
49 /* pin shared with snfi */
50 pinctrl-0 = <&spic_pins>;
51 status = "disabled";
52};
53
54&spi2 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&spi2_flash_pins>;
57 status = "okay";
58 spi_nor@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 compatible = "jedec,spi-nor";
62 spi-cal-enable;
63 spi-cal-mode = "read-data";
64 spi-cal-datalen = <7>;
65 spi-cal-data = /bits/ 8 <
66 0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */
67 spi-cal-addrlen = <1>;
68 spi-cal-addr = /bits/ 32 <0x0>;
69 reg = <0>;
70 spi-max-frequency = <52000000>;
71
72 partition@00000 {
73 label = "BL2";
74 reg = <0x00000 0x0040000>;
75 };
76 partition@40000 {
77 label = "u-boot-env";
78 reg = <0x40000 0x0010000>;
79 };
80 factory: partition@50000 {
81 label = "Factory";
82 reg = <0x50000 0x00B0000>;
83 };
84 partition@100000 {
85 label = "FIP";
86 reg = <0x100000 0x0080000>;
87 };
88 partition@180000 {
89 label = "firmware";
90 reg = <0x180000 0xE00000>;
91 };
92 };
93};
94
95&pcie0 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&pcie0_pins>;
98 status = "okay";
99};
100
101&pcie1 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&pcie1_pins>;
104 status = "okay";
105};
106
107&pcie2 {
108 pinctrl-names = "default";
109 pinctrl-0 = <&pcie2_pins>;
110 status = "disabled";
111};
112
113&pcie3 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&pcie3_pins>;
116 status = "okay";
117};
118
119&pio {
120 pcie0_pins: pcie0-pins {
121 mux {
122 function = "pcie";
123 groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0",
124 "pcie_wake_n0_0";
125 };
126 };
127
128 pcie1_pins: pcie1-pins {
129 mux {
130 function = "pcie";
131 groups = "pcie_2l_1_pereset", "pcie_clk_req_n1",
132 "pcie_wake_n1_0";
133 };
134 };
135
136 pcie2_pins: pcie2-pins {
137 mux {
138 function = "pcie";
139 groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0",
140 "pcie_wake_n2_0";
141 };
142 };
143
144 pcie3_pins: pcie3-pins {
145 mux {
146 function = "pcie";
147 groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
148 "pcie_wake_n3_0";
149 };
150 };
151
152 spic_pins: spi1-pins {
153 mux {
154 function = "spi";
155 groups = "spi1_1";
156 };
157 };
158
159 spi2_flash_pins: spi2-pins {
160 mux {
161 function = "spi";
162 groups = "spi2", "spi2_wp_hold";
163 };
164 };
165};
166
167&watchdog {
168 status = "disabled";
169};
170
171&eth {
172 status = "okay";
173
174 gmac0: mac@0 {
175 compatible = "mediatek,eth-mac";
176 reg = <0>;
177 phy-mode = "10gbase-kr";
178
179 fixed-link {
180 speed = <2500>;
181 full-duplex;
182 pause;
183 };
184 };
185
186 gmac1: mac@1 {
187 compatible = "mediatek,eth-mac";
188 reg = <1>;
189 phy-mode = "10gbase-kr";
190 phy-handle = <&phy0>;
191 };
192
193 gmac2: mac@2 {
194 compatible = "mediatek,eth-mac";
195 reg = <2>;
196 phy-mode = "10gbase-kr";
197 phy-handle = <&phy1>;
198 };
199
200 mdio: mdio-bus {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 phy0: ethernet-phy@0 {
204 reg = <0>;
205 compatible = "ethernet-phy-ieee802.3-c45";
206 reset-gpios = <&pio 71 1>;
207 reset-assert-us = <1000000>;
208 reset-deassert-us = <1000000>;
209 };
210
211 phy1: ethernet-phy@8 {
212 reg = <8>;
213 compatible = "ethernet-phy-ieee802.3-c45";
214 reset-gpios = <&pio 72 1>;
215 reset-assert-us = <1000000>;
216 reset-deassert-us = <1000000>;
217 };
218
219 switch@0 {
220 compatible = "mediatek,mt7988";
221 reg = <31>;
222 ports {
223 #address-cells = <1>;
224 #size-cells = <0>;
225
226 port@0 {
227 reg = <0>;
228 label = "lan0";
229 };
230
231 port@1 {
232 reg = <1>;
233 label = "lan1";
234 };
235
236 port@2 {
237 reg = <2>;
238 label = "lan2";
239 };
240
241 port@3 {
242 reg = <3>;
243 label = "lan3";
244 };
245
246 port@6 {
247 reg = <6>;
248 label = "cpu";
249 ethernet = <&gmac0>;
250 phy-mode = "10gbase-kr";
251
252 fixed-link {
253 speed = <10000>;
254 full-duplex;
255 pause;
256 };
257 };
258 };
259 };
260 };
261};
262
263&hnat {
264 mtketh-wan = "eth1";
265 mtketh-lan = "lan";
266 mtketh-lan2 = "eth2";
267 mtketh-max-gmac = <3>;
268 status = "okay";
269};
270
271&wed {
272 dy_txbm_enable = "true";
273 dy_txbm_budge = <8>;
274 txbm_init_sz = <10>;
275 status = "okay";
276};