blob: 5d8d557d21c33d0887709dde789262462fc73c91 [file] [log] [blame]
developercd6a1382022-01-11 15:45:19 +08001/dts-v1/;
2#include "mt7986b.dtsi"
3#include "mt7986b-pinctrl.dtsi"
4/ {
5 model = "MediaTek MT7986b RFB";
6 compatible = "mediatek,mt7986b-2500wan-sd-rfb";
7 chosen {
8 bootargs = "console=ttyS0,115200n1 loglevel=8 \
9 earlycon=uart8250,mmio32,0x11002000 \
10 root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
11 };
12
13 memory {
14 reg = <0 0x40000000 0 0x10000000>;
15 };
16
17 reg_3p3v: regulator-3p3v {
18 compatible = "regulator-fixed";
19 regulator-name = "fixed-3.3V";
20 regulator-min-microvolt = <3300000>;
21 regulator-max-microvolt = <3300000>;
22 regulator-boot-on;
23 regulator-always-on;
24 };
25};
26
27&uart0 {
28 status = "okay";
29};
30
31/* Warning: pins shared with &snand */
32&uart1 {
33 pinctrl-names = "default";
34 pinctrl-0 = <&uart1_pins>;
35 status = "disabled";
36};
37
38/* Warning: pins shared with &spi1 */
39&uart2 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&uart2_pins>;
42 status = "disabled";
43};
44
45&i2c0 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&i2c_pins>;
48 status = "okay";
49};
50
51&watchdog {
52 status = "okay";
53};
54
55&eth {
56 status = "okay";
57
58 gmac0: mac@0 {
59 compatible = "mediatek,eth-mac";
60 reg = <0>;
61 phy-mode = "2500base-x";
developer283fc452022-08-18 19:50:33 +080062
63 fixed-link {
64 speed = <2500>;
65 full-duplex;
66 pause;
developer8b1069e2022-08-26 17:49:39 +080067 link-gpio = <&pio 47 0>;
68 phy-handle = <&phy5>;
69 label = "lan5";
developer283fc452022-08-18 19:50:33 +080070 };
developercd6a1382022-01-11 15:45:19 +080071 };
72
73 gmac1: mac@1 {
74 compatible = "mediatek,eth-mac";
75 reg = <1>;
76 phy-mode = "2500base-x";
developer8b1069e2022-08-26 17:49:39 +080077
78 fixed-link {
79 speed = <2500>;
80 full-duplex;
81 pause;
82 link-gpio = <&pio 46 0>;
83 phy-handle = <&phy6>;
84 };
developercd6a1382022-01-11 15:45:19 +080085 };
86
87 mdio: mdio-bus {
88 #address-cells = <1>;
89 #size-cells = <0>;
90
developerf0a1e452022-08-15 12:06:11 +080091 reset-gpios = <&pio 6 1>;
92 reset-delay-us = <600>;
93
developercd6a1382022-01-11 15:45:19 +080094 phy5: phy@5 {
developer8b1069e2022-08-26 17:49:39 +080095 compatible = "ethernet-phy-id67c9.de0a";
developercd6a1382022-01-11 15:45:19 +080096 reg = <5>;
developercd6a1382022-01-11 15:45:19 +080097 };
98
99 phy6: phy@6 {
developer8b1069e2022-08-26 17:49:39 +0800100 compatible = "ethernet-phy-id67c9.de0a";
developercd6a1382022-01-11 15:45:19 +0800101 reg = <6>;
developercd6a1382022-01-11 15:45:19 +0800102 };
103
104 switch@0 {
105 compatible = "mediatek,mt7531";
106 reg = <31>;
107 reset-gpios = <&pio 5 0>;
108
109 ports {
110 #address-cells = <1>;
111 #size-cells = <0>;
112
113 port@0 {
114 reg = <0>;
115 label = "lan0";
116 };
117
118 port@1 {
119 reg = <1>;
120 label = "lan1";
121 };
122
123 port@2 {
124 reg = <2>;
125 label = "lan2";
126 };
127
128 port@3 {
129 reg = <3>;
130 label = "lan3";
131 };
132
133 port@4 {
134 reg = <4>;
135 label = "lan4";
136 };
137
138 port@5 {
139 reg = <5>;
140 label = "lan5";
141 phy-mode = "2500base-x";
developer8b1069e2022-08-26 17:49:39 +0800142
143 fixed-link {
144 speed = <2500>;
145 full-duplex;
146 pause;
147 };
developercd6a1382022-01-11 15:45:19 +0800148 };
149
150 port@6 {
151 reg = <6>;
152 label = "cpu";
153 ethernet = <&gmac0>;
154 phy-mode = "2500base-x";
155
156 fixed-link {
157 speed = <2500>;
158 full-duplex;
159 pause;
160 };
161 };
162 };
163 };
164 };
165};
166
167&hnat {
168 mtketh-wan = "eth1";
169 mtketh-lan = "lan";
170 mtketh-max-gmac = <2>;
171 status = "okay";
172};
173
174&mmc0 {
175 pinctrl-names = "default", "state_uhs";
176 pinctrl-0 = <&mmc0_pins_default>;
177 pinctrl-1 = <&mmc0_pins_uhs>;
178 bus-width = <4>;
179 max-frequency = <52000000>;
180 cap-sd-highspeed;
181 vmmc-supply = <&reg_3p3v>;
182 vqmmc-supply = <&reg_3p3v>;
183 status = "okay";
184};
185
186&pio {
187 mmc0_pins_default: mmc0-pins-22-to-32-default {
188 mux {
189 function = "flash";
190 groups = "emmc_45";
191 };
192
193 conf-cmd-dat {
194 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
195 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
196 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
197 input-enable;
198 drive-strength = <MTK_DRIVE_4mA>;
199 mediatek,pull-up-adv = <1>; /* pull-up 10K */
200 };
201
202 conf-clk {
203 pins = "SPI1_CS";
204 drive-strength = <MTK_DRIVE_6mA>;
205 mediatek,pull-down-adv = <2>; /* pull-down 50K */
206 };
207
208 conf-rst {
209 pins = "PWM1";
210 drive-strength = <MTK_DRIVE_4mA>;
211 mediatek,pull-up-adv = <1>; /* pull-up 10K */
212 };
213 };
214
215 mmc0_pins_uhs: mmc0-pins-22-to-32-uhs {
216 mux {
217 function = "flash";
218 groups = "emmc_45";
219 };
220
221 conf-cmd-dat {
222 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
223 "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
224 "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
225 input-enable;
226 drive-strength = <MTK_DRIVE_4mA>;
227 mediatek,pull-up-adv = <1>; /* pull-up 10K */
228 };
229
230 conf-clk {
231 pins = "SPI1_CS";
232 drive-strength = <MTK_DRIVE_6mA>;
233 mediatek,pull-down-adv = <2>; /* pull-down 50K */
234 };
235
236 conf-rst {
237 pins = "PWM1";
238 drive-strength = <MTK_DRIVE_4mA>;
239 mediatek,pull-up-adv = <1>; /* pull-up 10K */
240 };
241 };
242
243 wf_2g_5g_pins: wf_2g_5g-pins {
244 mux {
245 function = "wifi";
246 groups = "wf_2g", "wf_5g";
247 };
248 conf {
249 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
250 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
251 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
252 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
253 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
254 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
255 "WF1_TOP_CLK", "WF1_TOP_DATA";
256 drive-strength = <MTK_DRIVE_4mA>;
257 };
258 };
259
260 wf_dbdc_pins: wf_dbdc-pins {
261 mux {
262 function = "wifi";
263 groups = "wf_dbdc";
264 };
265 conf {
266 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
267 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
268 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
269 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
270 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
271 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
272 "WF1_TOP_CLK", "WF1_TOP_DATA";
273 drive-strength = <MTK_DRIVE_4mA>;
274 };
275 };
276};