blob: 6de3edcf43149a6204aa5c2d1c7571e794daf119 [file] [log] [blame]
developercd6a1382022-01-11 15:45:19 +08001/dts-v1/;
2#include "mt7986a.dtsi"
3#include "mt7986a-pinctrl.dtsi"
4/ {
5 model = "MediaTek MT7986a RFB";
6 compatible = "mediatek,mt7986a-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 sound {
18 compatible = "mediatek,mt7986-wm8960-machine";
19 mediatek,platform = <&afe>;
20 audio-routing = "Headphone", "HP_L",
21 "Headphone", "HP_R",
22 "LINPUT1", "AMIC",
23 "RINPUT1", "AMIC";
24 mediatek,audio-codec = <&wm8960>;
25 status = "okay";
26 };
27
28 reg_3p3v: regulator-3p3v {
29 compatible = "regulator-fixed";
30 regulator-name = "fixed-3.3V";
31 regulator-min-microvolt = <3300000>;
32 regulator-max-microvolt = <3300000>;
33 regulator-boot-on;
34 regulator-always-on;
35 };
36};
37
developer209e52d2022-06-30 11:32:57 +080038&fan {
39 pwms = <&pwm 1 50000 0>;
40 status = "disabled";
41};
42
developercd6a1382022-01-11 15:45:19 +080043&pwm {
44 pinctrl-names = "default";
45 pinctrl-0 = <&pwm0_pin &pwm1_pin_g1>;
46 status = "okay";
47};
48
49&uart0 {
50 status = "okay";
51};
52
53&uart1 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&uart1_pins>;
56 status = "okay";
57};
58
59&uart2 {
60 pinctrl-names = "default";
61 pinctrl-0 = <&uart2_pins>;
developera2613e62022-07-01 18:29:37 +080062 status = "disabled";
developercd6a1382022-01-11 15:45:19 +080063};
64
65&i2c0 {
66 pinctrl-names = "default";
67 pinctrl-0 = <&i2c_pins>;
68 status = "okay";
69
70 wm8960: wm8960@1a {
71 compatible = "wlf,wm8960";
72 reg = <0x1a>;
73 };
74};
75
76&auxadc {
77 status = "okay";
78};
79
80&watchdog {
81 status = "okay";
82};
83
84&eth {
85 status = "okay";
86
87 gmac0: mac@0 {
88 compatible = "mediatek,eth-mac";
89 reg = <0>;
90 phy-mode = "2500base-x";
developer283fc452022-08-18 19:50:33 +080091
92 fixed-link {
93 speed = <2500>;
94 full-duplex;
95 pause;
96 link-gpio = <&pio 47 0>;
97 phy-handle = <&phy5>;
98 label = "lan5";
99 };
developercd6a1382022-01-11 15:45:19 +0800100 };
101
102 gmac1: mac@1 {
103 compatible = "mediatek,eth-mac";
104 reg = <1>;
105 phy-mode = "2500base-x";
developerf0a1e452022-08-15 12:06:11 +0800106 phy-handle = <&phy6>;
developercd6a1382022-01-11 15:45:19 +0800107 };
108
109 mdio: mdio-bus {
110 #address-cells = <1>;
111 #size-cells = <0>;
112
developerf0a1e452022-08-15 12:06:11 +0800113 reset-gpios = <&pio 6 1>;
114 reset-delay-us = <600>;
115
developercd6a1382022-01-11 15:45:19 +0800116 phy5: phy@5 {
developer283fc452022-08-18 19:50:33 +0800117 compatible = "ethernet-phy-id67c9.de0a";
developercd6a1382022-01-11 15:45:19 +0800118 reg = <5>;
developercd6a1382022-01-11 15:45:19 +0800119 };
120
121 phy6: phy@6 {
developerf0a1e452022-08-15 12:06:11 +0800122 compatible = "ethernet-phy-ieee802.3-c45";
developercd6a1382022-01-11 15:45:19 +0800123 reg = <6>;
developercd6a1382022-01-11 15:45:19 +0800124 };
125
126 switch@0 {
127 compatible = "mediatek,mt7531";
128 reg = <31>;
129 reset-gpios = <&pio 5 0>;
130
131 ports {
132 #address-cells = <1>;
133 #size-cells = <0>;
134
135 port@0 {
136 reg = <0>;
137 label = "lan0";
138 };
139
140 port@1 {
141 reg = <1>;
142 label = "lan1";
143 };
144
145 port@2 {
146 reg = <2>;
147 label = "lan2";
148 };
149
150 port@3 {
151 reg = <3>;
152 label = "lan3";
153 };
154
155 port@4 {
156 reg = <4>;
157 label = "lan4";
158 };
159
160 port@5 {
161 reg = <5>;
162 label = "lan5";
163 phy-mode = "2500base-x";
164
165 fixed-link {
166 speed = <2500>;
167 full-duplex;
168 pause;
169 };
170 };
171
172 port@6 {
173 reg = <6>;
174 label = "cpu";
175 ethernet = <&gmac0>;
176 phy-mode = "2500base-x";
177
178 fixed-link {
179 speed = <2500>;
180 full-duplex;
181 pause;
182 };
183 };
184 };
185 };
186 };
187};
188
189&hnat {
190 mtketh-wan = "eth1";
191 mtketh-lan = "lan";
192 mtketh-max-gmac = <2>;
193 status = "okay";
194};
195
196&mmc0 {
197 pinctrl-names = "default", "state_uhs";
198 pinctrl-0 = <&mmc0_pins_default>;
199 pinctrl-1 = <&mmc0_pins_uhs>;
200 bus-width = <4>;
201 max-frequency = <52000000>;
202 cap-sd-highspeed;
203 vmmc-supply = <&reg_3p3v>;
204 vqmmc-supply = <&reg_3p3v>;
205 status = "okay";
206};
207
208&pcie0 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&pcie0_pins>;
211 status = "okay";
212};
213
214&pio {
215 mmc0_pins_default: mmc0-pins-50-to-61-default {
216 mux {
217 function = "flash";
218 groups = "emmc_51";
219 };
220 conf-cmd-dat {
221 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
222 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
223 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
224 input-enable;
225 drive-strength = <MTK_DRIVE_4mA>;
226 mediatek,pull-up-adv = <1>; /* pull-up 10K */
227 };
228 conf-clk {
229 pins = "EMMC_CK";
230 drive-strength = <MTK_DRIVE_6mA>;
231 mediatek,pull-down-adv = <2>; /* pull-down 50K */
232 };
233 conf-ds {
234 pins = "EMMC_DSL";
235 mediatek,pull-down-adv = <2>; /* pull-down 50K */
236 };
237 conf-rst {
238 pins = "EMMC_RSTB";
239 drive-strength = <MTK_DRIVE_4mA>;
240 mediatek,pull-up-adv = <1>; /* pull-up 10K */
241 };
242 };
243
244 mmc0_pins_uhs: mmc0-pins-50-to-61-uhs {
245 mux {
246 function = "flash";
247 groups = "emmc_51";
248 };
249 conf-cmd-dat {
250 pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
251 "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
252 "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
253 input-enable;
254 drive-strength = <MTK_DRIVE_4mA>;
255 mediatek,pull-up-adv = <1>; /* pull-up 10K */
256 };
257 conf-clk {
258 pins = "EMMC_CK";
259 drive-strength = <MTK_DRIVE_6mA>;
260 mediatek,pull-down-adv = <2>; /* pull-down 50K */
261 };
262 conf-ds {
263 pins = "EMMC_DSL";
264 mediatek,pull-down-adv = <2>; /* pull-down 50K */
265 };
266 conf-rst {
267 pins = "EMMC_RSTB";
268 drive-strength = <MTK_DRIVE_4mA>;
269 mediatek,pull-up-adv = <1>; /* pull-up 10K */
270 };
271 };
272
273 wf_2g_5g_pins: wf_2g_5g-pins {
274 mux {
275 function = "wifi";
276 groups = "wf_2g", "wf_5g";
277 };
278 conf {
279 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
280 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
281 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
282 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
283 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
284 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
285 "WF1_TOP_CLK", "WF1_TOP_DATA";
286 drive-strength = <MTK_DRIVE_4mA>;
287 };
288 };
289
290 wf_dbdc_pins: wf_dbdc-pins {
291 mux {
292 function = "wifi";
293 groups = "wf_dbdc";
294 };
295 conf {
296 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
297 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
298 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
299 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
300 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
301 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
302 "WF1_TOP_CLK", "WF1_TOP_DATA";
303 drive-strength = <MTK_DRIVE_4mA>;
304 };
305 };
306};