mediatek: update the ethernet compat string
[openwrt/openwrt.git] / target / linux / mediatek / files / arch / arm / boot / dts / mt7623-eMMC.dts
1 /*
2 * Copyright (c) 2016 MediaTek Inc.
3 * Author: John Crispin <blogic@openwrt.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15 /dts-v1/;
16
17 #include "_mt7623.dtsi"
18 #include <dt-bindings/gpio/gpio.h>
19
20 / {
21 model = "MediaTek MT7623 eMMC evaluation board";
22 compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
23
24 chosen {
25 stdout-path = &uart2;
26 };
27
28 memory {
29 reg = <0 0x80000000 0 0x20000000>;
30 };
31
32 usb_p1_vbus: regulator@0 {
33 compatible = "regulator-fixed";
34 regulator-name = "usb_vbus";
35 regulator-min-microvolt = <5000000>;
36 regulator-max-microvolt = <5000000>;
37 gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
38 enable-active-high;
39 };
40 };
41
42 &cpu0 {
43 proc-supply = <&mt6323_vproc_reg>;
44 };
45
46 &cpu1 {
47 proc-supply = <&mt6323_vproc_reg>;
48 };
49
50 &cpu2 {
51 proc-supply = <&mt6323_vproc_reg>;
52 };
53
54 &cpu3 {
55 proc-supply = <&mt6323_vproc_reg>;
56 };
57
58 &pwrap {
59 pmic: mt6323 {
60 compatible = "mediatek,mt6323";
61 interrupt-parent = <&pio>;
62 interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
63 interrupt-controller;
64 #interrupt-cells = <2>;
65
66 mt6323regulator: mt6323regulator{
67 compatible = "mediatek,mt6323-regulator";
68
69 mt6323_vproc_reg: buck_vproc{
70 regulator-name = "vproc";
71 regulator-min-microvolt = < 700000>;
72 regulator-max-microvolt = <1350000>;
73 regulator-ramp-delay = <12500>;
74 regulator-always-on;
75 regulator-boot-on;
76 };
77
78 mt6323_vsys_reg: buck_vsys{
79 regulator-name = "vsys";
80 regulator-min-microvolt = <1400000>;
81 regulator-max-microvolt = <2987500>;
82 regulator-ramp-delay = <25000>;
83 regulator-always-on;
84 regulator-boot-on;
85 };
86
87 mt6323_vpa_reg: buck_vpa{
88 regulator-name = "vpa";
89 regulator-min-microvolt = < 500000>;
90 regulator-max-microvolt = <3650000>;
91 };
92
93 mt6323_vtcxo_reg: ldo_vtcxo{
94 regulator-name = "vtcxo";
95 regulator-min-microvolt = <2800000>;
96 regulator-max-microvolt = <2800000>;
97 regulator-enable-ramp-delay = <90>;
98 regulator-always-on;
99 regulator-boot-on;
100 };
101
102 mt6323_vcn28_reg: ldo_vcn28{
103 regulator-name = "vcn28";
104 regulator-min-microvolt = <2800000>;
105 regulator-max-microvolt = <2800000>;
106 regulator-enable-ramp-delay = <185>;
107 };
108
109 mt6323_vcn33_bt_reg: ldo_vcn33_bt{
110 regulator-name = "vcn33_bt";
111 regulator-min-microvolt = <3300000>;
112 regulator-max-microvolt = <3600000>;
113 regulator-enable-ramp-delay = <185>;
114 };
115
116 mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
117 regulator-name = "vcn33_wifi";
118 regulator-min-microvolt = <3300000>;
119 regulator-max-microvolt = <3600000>;
120 regulator-enable-ramp-delay = <185>;
121 };
122
123 mt6323_va_reg: ldo_va{
124 regulator-name = "va";
125 regulator-min-microvolt = <2800000>;
126 regulator-max-microvolt = <2800000>;
127 regulator-enable-ramp-delay = <216>;
128 regulator-always-on;
129 regulator-boot-on;
130 };
131
132 mt6323_vcama_reg: ldo_vcama{
133 regulator-name = "vcama";
134 regulator-min-microvolt = <1500000>;
135 regulator-max-microvolt = <2800000>;
136 regulator-enable-ramp-delay = <216>;
137 };
138
139 mt6323_vio28_reg: ldo_vio28{
140 regulator-name = "vio28";
141 regulator-min-microvolt = <2800000>;
142 regulator-max-microvolt = <2800000>;
143 regulator-enable-ramp-delay = <216>;
144 regulator-always-on;
145 regulator-boot-on;
146 };
147
148 mt6323_vusb_reg: ldo_vusb{
149 regulator-name = "vusb";
150 regulator-min-microvolt = <3300000>;
151 regulator-max-microvolt = <3300000>;
152 regulator-enable-ramp-delay = <216>;
153 regulator-boot-on;
154 };
155
156 mt6323_vmc_reg: ldo_vmc{
157 regulator-name = "vmc";
158 regulator-min-microvolt = <1800000>;
159 regulator-max-microvolt = <3300000>;
160 regulator-enable-ramp-delay = <36>;
161 regulator-boot-on;
162 };
163
164 mt6323_vmch_reg: ldo_vmch{
165 regulator-name = "vmch";
166 regulator-min-microvolt = <3000000>;
167 regulator-max-microvolt = <3300000>;
168 regulator-enable-ramp-delay = <36>;
169 regulator-boot-on;
170 };
171
172 mt6323_vemc3v3_reg: ldo_vemc3v3{
173 regulator-name = "vemc3v3";
174 regulator-min-microvolt = <3000000>;
175 regulator-max-microvolt = <3300000>;
176 regulator-enable-ramp-delay = <36>;
177 regulator-boot-on;
178 };
179
180 mt6323_vgp1_reg: ldo_vgp1{
181 regulator-name = "vgp1";
182 regulator-min-microvolt = <1200000>;
183 regulator-max-microvolt = <3300000>;
184 regulator-enable-ramp-delay = <216>;
185 };
186
187 mt6323_vgp2_reg: ldo_vgp2{
188 regulator-name = "vgp2";
189 regulator-min-microvolt = <1200000>;
190 regulator-max-microvolt = <3000000>;
191 regulator-enable-ramp-delay = <216>;
192 };
193
194 mt6323_vgp3_reg: ldo_vgp3{
195 regulator-name = "vgp3";
196 regulator-min-microvolt = <1200000>;
197 regulator-max-microvolt = <1800000>;
198 regulator-enable-ramp-delay = <216>;
199 };
200
201 mt6323_vcn18_reg: ldo_vcn18{
202 regulator-name = "vcn18";
203 regulator-min-microvolt = <1800000>;
204 regulator-max-microvolt = <1800000>;
205 regulator-enable-ramp-delay = <216>;
206 };
207
208 mt6323_vsim1_reg: ldo_vsim1{
209 regulator-name = "vsim1";
210 regulator-min-microvolt = <1800000>;
211 regulator-max-microvolt = <3000000>;
212 regulator-enable-ramp-delay = <216>;
213 };
214
215 mt6323_vsim2_reg: ldo_vsim2{
216 regulator-name = "vsim2";
217 regulator-min-microvolt = <1800000>;
218 regulator-max-microvolt = <3000000>;
219 regulator-enable-ramp-delay = <216>;
220 };
221
222 mt6323_vrtc_reg: ldo_vrtc{
223 regulator-name = "vrtc";
224 regulator-min-microvolt = <2800000>;
225 regulator-max-microvolt = <2800000>;
226 regulator-always-on;
227 regulator-boot-on;
228 };
229
230 mt6323_vcamaf_reg: ldo_vcamaf{
231 regulator-name = "vcamaf";
232 regulator-min-microvolt = <1200000>;
233 regulator-max-microvolt = <3300000>;
234 regulator-enable-ramp-delay = <216>;
235 };
236
237 mt6323_vibr_reg: ldo_vibr{
238 regulator-name = "vibr";
239 regulator-min-microvolt = <1200000>;
240 regulator-max-microvolt = <3300000>;
241 regulator-enable-ramp-delay = <36>;
242 };
243
244 mt6323_vrf18_reg: ldo_vrf18{
245 regulator-name = "vrf18";
246 regulator-min-microvolt = <1825000>;
247 regulator-max-microvolt = <1825000>;
248 regulator-enable-ramp-delay = <187>;
249 };
250
251 mt6323_vm_reg: ldo_vm{
252 regulator-name = "vm";
253 regulator-min-microvolt = <1200000>;
254 regulator-max-microvolt = <1800000>;
255 regulator-enable-ramp-delay = <216>;
256 regulator-always-on;
257 regulator-boot-on;
258 };
259
260 mt6323_vio18_reg: ldo_vio18{
261 regulator-name = "vio18";
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
264 regulator-enable-ramp-delay = <216>;
265 regulator-always-on;
266 regulator-boot-on;
267 };
268
269 mt6323_vcamd_reg: ldo_vcamd{
270 regulator-name = "vcamd";
271 regulator-min-microvolt = <1200000>;
272 regulator-max-microvolt = <1800000>;
273 regulator-enable-ramp-delay = <216>;
274 };
275
276 mt6323_vcamio_reg: ldo_vcamio{
277 regulator-name = "vcamio";
278 regulator-min-microvolt = <1800000>;
279 regulator-max-microvolt = <1800000>;
280 regulator-enable-ramp-delay = <216>;
281 };
282 };
283 };
284 };
285
286 &uart2 {
287 status = "okay";
288 };
289
290 &mmc0 {
291 status = "okay";
292 pinctrl-names = "default", "state_uhs";
293 pinctrl-0 = <&mmc0_pins_default>;
294 pinctrl-1 = <&mmc0_pins_uhs>;
295 bus-width = <8>;
296 max-frequency = <50000000>;
297 cap-mmc-highspeed;
298 vmmc-supply = <&mt6323_vemc3v3_reg>;
299 vqmmc-supply = <&mt6323_vio18_reg>;
300 non-removable;
301 };
302
303 &mmc1 {
304 status = "okay";
305 pinctrl-names = "default", "state_uhs";
306 pinctrl-0 = <&mmc1_pins_default>;
307 pinctrl-1 = <&mmc1_pins_uhs>;
308 bus-width = <4>;
309 max-frequency = <50000000>;
310 cap-sd-highspeed;
311 sd-uhs-sdr25;
312 // cd-gpios = <&pio 132 0>;
313 vmmc-supply = <&mt6323_vmch_reg>;
314 vqmmc-supply = <&mt6323_vmc_reg>;
315 };
316
317 &pio {
318 mmc0_pins_default: mmc0default {
319 pins_cmd_dat {
320 pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
321 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
322 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
323 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
324 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
325 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
326 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
327 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
328 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
329 input-enable;
330 bias-pull-up;
331 };
332
333 pins_clk {
334 pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
335 bias-pull-down;
336 };
337
338 pins_rst {
339 pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
340 bias-pull-up;
341 };
342 };
343
344 mmc0_pins_uhs: mmc0 {
345 pins_cmd_dat {
346 pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
347 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
348 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
349 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
350 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
351 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
352 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
353 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
354 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
355 input-enable;
356 drive-strength = <MTK_DRIVE_2mA>;
357 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
358 };
359
360 pins_clk {
361 pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
362 drive-strength = <MTK_DRIVE_2mA>;
363 bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
364 };
365
366 pins_rst {
367 pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
368 bias-pull-up;
369 };
370 };
371
372 mmc1_pins_default: mmc1default {
373 pins_cmd_dat {
374 pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
375 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
376 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
377 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
378 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
379 input-enable;
380 drive-strength = <MTK_DRIVE_4mA>;
381 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
382 };
383
384 pins_clk {
385 pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
386 bias-pull-down;
387 drive-strength = <MTK_DRIVE_4mA>;
388 };
389
390 // pins_insert {
391 // pinmux = <MT8173_PIN_132_I2S0_DATA1_FUNC_GPIO132>;
392 // bias-pull-up;
393 // };
394 };
395
396 mmc1_pins_uhs: mmc1 {
397 pins_cmd_dat {
398 pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
399 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
400 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
401 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
402 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
403 input-enable;
404 drive-strength = <MTK_DRIVE_4mA>;
405 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
406 };
407
408 pins_clk {
409 pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
410 drive-strength = <MTK_DRIVE_4mA>;
411 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
412 };
413 };
414
415 eth_default: eth {
416 pins_eth {
417 pinmux = <MT7623_PIN_275_G2_MDC_FUNC_MDC>,
418 <MT7623_PIN_276_G2_MDIO_FUNC_MDIO>,
419 <MT7623_PIN_262_G2_TXEN_FUNC_G2_TXEN>,
420 <MT7623_PIN_263_G2_TXD3_FUNC_G2_TXD3>,
421 <MT7623_PIN_264_G2_TXD2_FUNC_G2_TXD2>,
422 <MT7623_PIN_265_G2_TXD1_FUNC_G2_TXD1>,
423 <MT7623_PIN_266_G2_TXD0_FUNC_G2_TXD0>,
424 <MT7623_PIN_267_G2_TXCLK_FUNC_G2_TXC>,
425 <MT7623_PIN_268_G2_RXCLK_FUNC_G2_RXC>,
426 <MT7623_PIN_269_G2_RXD0_FUNC_G2_RXD0>,
427 <MT7623_PIN_270_G2_RXD1_FUNC_G2_RXD1>,
428 <MT7623_PIN_271_G2_RXD2_FUNC_G2_RXD2>,
429 <MT7623_PIN_272_G2_RXD3_FUNC_G2_RXD3>,
430 <MT7623_PIN_273_ESW_INT_FUNC_ESW_INT>,
431 <MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV>;
432 };
433
434 pins_eth_rst {
435 pinmux = <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
436 output-low;
437 };
438 };
439
440 pwm_pins: pwm {
441 pins_pwm1 {
442 pinmux = <MT7623_PIN_204_PWM1_FUNC_PWM1>;
443 };
444
445 pins_pwm2 {
446 pinmux = <MT7623_PIN_205_PWM2_FUNC_PWM2>;
447 };
448 };
449 };
450
451 &usb1 {
452 vusb33-supply = <&mt6323_vusb_reg>;
453 vbus-supply = <&usb_p1_vbus>;
454 status = "okay";
455 };
456
457 &u3phy1 {
458 status = "okay";
459 };
460
461 &pcie {
462 status = "okay";
463 };
464
465 &eth {
466 status = "okay";
467 };
468
469 &gmac1 {
470 mac-address = [00 11 22 33 44 56];
471 status = "okay";
472 };
473
474 &gmac2 {
475 mac-address = [00 11 22 33 44 55];
476 status = "okay";
477 phy-handle = <&phy5>;
478 };
479
480 &gsw {
481 pinctrl-names = "default";
482 pinctrl-0 = <&eth_default>;
483 mediatek,reset-pin = <&pio 15 0>;
484 status = "okay";
485 };
486
487 &pwm {
488 pinctrl-names = "default";
489 pinctrl-0 = <&pwm_pins>;
490 status = "okay";
491 };