1 From cfe366d7a20f88c7fc92faaf8b25c24e730bd40b Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 5 Jan 2016 12:16:17 +0100
4 Subject: [PATCH 23/53] ARM: dts: mediatek: add MT7623 basic support
6 This adds basic chip support for Mediatek MT7623.
8 Signed-off-by: John Crispin <blogic@openwrt.org>
10 arch/arm/boot/dts/Makefile | 1 +
11 arch/arm/boot/dts/mt7623-evb.dts | 459 +++++++++++++++++++++++++++++++++
12 arch/arm/boot/dts/mt7623.dtsi | 507 +++++++++++++++++++++++++++++++++++++
13 arch/arm/mach-mediatek/Kconfig | 4 +
14 arch/arm/mach-mediatek/mediatek.c | 1 +
15 5 files changed, 972 insertions(+)
16 create mode 100644 arch/arm/boot/dts/mt7623-evb.dts
17 create mode 100644 arch/arm/boot/dts/mt7623.dtsi
19 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
20 index 30bbc37..2bce370 100644
21 --- a/arch/arm/boot/dts/Makefile
22 +++ b/arch/arm/boot/dts/Makefile
23 @@ -774,6 +774,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
30 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
31 diff --git a/arch/arm/boot/dts/mt7623-evb.dts b/arch/arm/boot/dts/mt7623-evb.dts
33 index 0000000..5e9381d
35 +++ b/arch/arm/boot/dts/mt7623-evb.dts
38 + * Copyright (c) 2016 MediaTek Inc.
39 + * Author: John Crispin <blogic@openwrt.org>
41 + * This program is free software; you can redistribute it and/or modify
42 + * it under the terms of the GNU General Public License version 2 as
43 + * published by the Free Software Foundation.
45 + * This program is distributed in the hope that it will be useful,
46 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 + * GNU General Public License for more details.
53 +#include "mt7623.dtsi"
54 +#include <dt-bindings/gpio/gpio.h>
57 + model = "MediaTek MT7623 evaluation board";
58 + compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
61 + stdout-path = &uart2;
65 + reg = <0 0x80000000 0 0x20000000>;
68 + usb_p1_vbus: regulator@0 {
69 + compatible = "regulator-fixed";
70 + regulator-name = "usb_vbus";
71 + regulator-min-microvolt = <5000000>;
72 + regulator-max-microvolt = <5000000>;
73 + gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
80 + compatible = "mediatek,mt6323";
81 + interrupt-parent = <&pio>;
82 + interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
83 + interrupt-controller;
84 + #interrupt-cells = <2>;
86 + mt6323regulator: mt6323regulator{
87 + compatible = "mediatek,mt6323-regulator";
89 + mt6323_vproc_reg: buck_vproc{
90 + regulator-name = "vproc";
91 + regulator-min-microvolt = < 700000>;
92 + regulator-max-microvolt = <1350000>;
93 + regulator-ramp-delay = <12500>;
94 + regulator-always-on;
98 + mt6323_vsys_reg: buck_vsys{
99 + regulator-name = "vsys";
100 + regulator-min-microvolt = <1400000>;
101 + regulator-max-microvolt = <2987500>;
102 + regulator-ramp-delay = <25000>;
103 + regulator-always-on;
107 + mt6323_vpa_reg: buck_vpa{
108 + regulator-name = "vpa";
109 + regulator-min-microvolt = < 500000>;
110 + regulator-max-microvolt = <3650000>;
113 + mt6323_vtcxo_reg: ldo_vtcxo{
114 + regulator-name = "vtcxo";
115 + regulator-min-microvolt = <2800000>;
116 + regulator-max-microvolt = <2800000>;
117 + regulator-enable-ramp-delay = <90>;
118 + regulator-always-on;
122 + mt6323_vcn28_reg: ldo_vcn28{
123 + regulator-name = "vcn28";
124 + regulator-min-microvolt = <2800000>;
125 + regulator-max-microvolt = <2800000>;
126 + regulator-enable-ramp-delay = <185>;
129 + mt6323_vcn33_bt_reg: ldo_vcn33_bt{
130 + regulator-name = "vcn33_bt";
131 + regulator-min-microvolt = <3300000>;
132 + regulator-max-microvolt = <3600000>;
133 + regulator-enable-ramp-delay = <185>;
136 + mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
137 + regulator-name = "vcn33_wifi";
138 + regulator-min-microvolt = <3300000>;
139 + regulator-max-microvolt = <3600000>;
140 + regulator-enable-ramp-delay = <185>;
143 + mt6323_va_reg: ldo_va{
144 + regulator-name = "va";
145 + regulator-min-microvolt = <2800000>;
146 + regulator-max-microvolt = <2800000>;
147 + regulator-enable-ramp-delay = <216>;
148 + regulator-always-on;
152 + mt6323_vcama_reg: ldo_vcama{
153 + regulator-name = "vcama";
154 + regulator-min-microvolt = <1500000>;
155 + regulator-max-microvolt = <2800000>;
156 + regulator-enable-ramp-delay = <216>;
159 + mt6323_vio28_reg: ldo_vio28{
160 + regulator-name = "vio28";
161 + regulator-min-microvolt = <2800000>;
162 + regulator-max-microvolt = <2800000>;
163 + regulator-enable-ramp-delay = <216>;
164 + regulator-always-on;
168 + mt6323_vusb_reg: ldo_vusb{
169 + regulator-name = "vusb";
170 + regulator-min-microvolt = <3300000>;
171 + regulator-max-microvolt = <3300000>;
172 + regulator-enable-ramp-delay = <216>;
176 + mt6323_vmc_reg: ldo_vmc{
177 + regulator-name = "vmc";
178 + regulator-min-microvolt = <1800000>;
179 + regulator-max-microvolt = <3300000>;
180 + regulator-enable-ramp-delay = <36>;
184 + mt6323_vmch_reg: ldo_vmch{
185 + regulator-name = "vmch";
186 + regulator-min-microvolt = <3000000>;
187 + regulator-max-microvolt = <3300000>;
188 + regulator-enable-ramp-delay = <36>;
192 + mt6323_vemc3v3_reg: ldo_vemc3v3{
193 + regulator-name = "vemc3v3";
194 + regulator-min-microvolt = <3000000>;
195 + regulator-max-microvolt = <3300000>;
196 + regulator-enable-ramp-delay = <36>;
200 + mt6323_vgp1_reg: ldo_vgp1{
201 + regulator-name = "vgp1";
202 + regulator-min-microvolt = <1200000>;
203 + regulator-max-microvolt = <3300000>;
204 + regulator-enable-ramp-delay = <216>;
207 + mt6323_vgp2_reg: ldo_vgp2{
208 + regulator-name = "vgp2";
209 + regulator-min-microvolt = <1200000>;
210 + regulator-max-microvolt = <3000000>;
211 + regulator-enable-ramp-delay = <216>;
214 + mt6323_vgp3_reg: ldo_vgp3{
215 + regulator-name = "vgp3";
216 + regulator-min-microvolt = <1200000>;
217 + regulator-max-microvolt = <1800000>;
218 + regulator-enable-ramp-delay = <216>;
221 + mt6323_vcn18_reg: ldo_vcn18{
222 + regulator-name = "vcn18";
223 + regulator-min-microvolt = <1800000>;
224 + regulator-max-microvolt = <1800000>;
225 + regulator-enable-ramp-delay = <216>;
228 + mt6323_vsim1_reg: ldo_vsim1{
229 + regulator-name = "vsim1";
230 + regulator-min-microvolt = <1800000>;
231 + regulator-max-microvolt = <3000000>;
232 + regulator-enable-ramp-delay = <216>;
235 + mt6323_vsim2_reg: ldo_vsim2{
236 + regulator-name = "vsim2";
237 + regulator-min-microvolt = <1800000>;
238 + regulator-max-microvolt = <3000000>;
239 + regulator-enable-ramp-delay = <216>;
242 + mt6323_vrtc_reg: ldo_vrtc{
243 + regulator-name = "vrtc";
244 + regulator-min-microvolt = <2800000>;
245 + regulator-max-microvolt = <2800000>;
246 + regulator-always-on;
250 + mt6323_vcamaf_reg: ldo_vcamaf{
251 + regulator-name = "vcamaf";
252 + regulator-min-microvolt = <1200000>;
253 + regulator-max-microvolt = <3300000>;
254 + regulator-enable-ramp-delay = <216>;
257 + mt6323_vibr_reg: ldo_vibr{
258 + regulator-name = "vibr";
259 + regulator-min-microvolt = <1200000>;
260 + regulator-max-microvolt = <3300000>;
261 + regulator-enable-ramp-delay = <36>;
264 + mt6323_vrf18_reg: ldo_vrf18{
265 + regulator-name = "vrf18";
266 + regulator-min-microvolt = <1825000>;
267 + regulator-max-microvolt = <1825000>;
268 + regulator-enable-ramp-delay = <187>;
271 + mt6323_vm_reg: ldo_vm{
272 + regulator-name = "vm";
273 + regulator-min-microvolt = <1200000>;
274 + regulator-max-microvolt = <1800000>;
275 + regulator-enable-ramp-delay = <216>;
276 + regulator-always-on;
280 + mt6323_vio18_reg: ldo_vio18{
281 + regulator-name = "vio18";
282 + regulator-min-microvolt = <1800000>;
283 + regulator-max-microvolt = <1800000>;
284 + regulator-enable-ramp-delay = <216>;
285 + regulator-always-on;
289 + mt6323_vcamd_reg: ldo_vcamd{
290 + regulator-name = "vcamd";
291 + regulator-min-microvolt = <1200000>;
292 + regulator-max-microvolt = <1800000>;
293 + regulator-enable-ramp-delay = <216>;
296 + mt6323_vcamio_reg: ldo_vcamio{
297 + regulator-name = "vcamio";
298 + regulator-min-microvolt = <1800000>;
299 + regulator-max-microvolt = <1800000>;
300 + regulator-enable-ramp-delay = <216>;
312 + pinctrl-names = "default", "state_uhs";
313 + pinctrl-0 = <&mmc0_pins_default>;
314 + pinctrl-1 = <&mmc0_pins_uhs>;
316 + max-frequency = <50000000>;
318 + vmmc-supply = <&mt6323_vemc3v3_reg>;
319 + vqmmc-supply = <&mt6323_vio18_reg>;
325 + pinctrl-names = "default", "state_uhs";
326 + pinctrl-0 = <&mmc1_pins_default>;
327 + pinctrl-1 = <&mmc1_pins_uhs>;
329 + max-frequency = <50000000>;
332 +// cd-gpios = <&pio 132 0>;
333 + vmmc-supply = <&mt6323_vmch_reg>;
334 + vqmmc-supply = <&mt6323_vmc_reg>;
338 + mmc0_pins_default: mmc0default {
340 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
341 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
342 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
343 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
344 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
345 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
346 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
347 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
348 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
354 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
359 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
364 + mmc0_pins_uhs: mmc0 {
366 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
367 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
368 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
369 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
370 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
371 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
372 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
373 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
374 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
376 + drive-strength = <MTK_DRIVE_2mA>;
377 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
381 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
382 + drive-strength = <MTK_DRIVE_2mA>;
383 + bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
387 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
392 + mmc1_pins_default: mmc1default {
394 + pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
395 + <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
396 + <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
397 + <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
398 + <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
400 + drive-strength = <MTK_DRIVE_4mA>;
401 + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
405 + pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
407 + drive-strength = <MTK_DRIVE_4mA>;
411 +// pinmux = <MT8173_PIN_132_I2S0_DATA1_FUNC_GPIO132>;
416 + mmc1_pins_uhs: mmc1 {
418 + pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
419 + <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
420 + <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
421 + <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
422 + <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
424 + drive-strength = <MTK_DRIVE_4mA>;
425 + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
429 + pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
430 + drive-strength = <MTK_DRIVE_4mA>;
431 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
437 + pinmux = <MT7623_PIN_275_G2_MDC_FUNC_MDC>,
438 + <MT7623_PIN_276_G2_MDIO_FUNC_MDIO>,
439 + <MT7623_PIN_262_G2_TXEN_FUNC_G2_TXEN>,
440 + <MT7623_PIN_263_G2_TXD3_FUNC_G2_TXD3>,
441 + <MT7623_PIN_264_G2_TXD2_FUNC_G2_TXD2>,
442 + <MT7623_PIN_265_G2_TXD1_FUNC_G2_TXD1>,
443 + <MT7623_PIN_266_G2_TXD0_FUNC_G2_TXD0>,
444 + <MT7623_PIN_267_G2_TXCLK_FUNC_G2_TXC>,
445 + <MT7623_PIN_268_G2_RXCLK_FUNC_G2_RXC>,
446 + <MT7623_PIN_269_G2_RXD0_FUNC_G2_RXD0>,
447 + <MT7623_PIN_270_G2_RXD1_FUNC_G2_RXD1>,
448 + <MT7623_PIN_271_G2_RXD2_FUNC_G2_RXD2>,
449 + <MT7623_PIN_272_G2_RXD3_FUNC_G2_RXD3>,
450 + <MT7623_PIN_273_ESW_INT_FUNC_ESW_INT>,
451 + <MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV>;
455 + pinmux = <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
462 + vusb33-supply = <&mt6323_vusb_reg>;
463 + vbus-supply = <&usb_p1_vbus>;
464 +// mediatek,wakeup-src = <1>;
481 + mac-address = [00 11 22 33 44 56];
486 + mac-address = [00 11 22 33 44 55];
491 + pinctrl-names = "default";
492 + pinctrl-0 = <ð_default>;
493 + mediatek,reset-pin = <&pio 15 0>;
496 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
498 index 0000000..1ba7790
500 +++ b/arch/arm/boot/dts/mt7623.dtsi
503 + * Copyright (c) 2016 MediaTek Inc.
504 + * Author: John Crispin <blogic@openwrt.org>
506 + * This program is free software; you can redistribute it and/or modify
507 + * it under the terms of the GNU General Public License version 2 as
508 + * published by the Free Software Foundation.
510 + * This program is distributed in the hope that it will be useful,
511 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
512 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
513 + * GNU General Public License for more details.
516 +#include <dt-bindings/interrupt-controller/irq.h>
517 +#include <dt-bindings/interrupt-controller/arm-gic.h>
518 +#include <dt-bindings/clock/mt2701-clk.h>
519 +#include <dt-bindings/power/mt2701-power.h>
520 +#include <dt-bindings/phy/phy.h>
521 +#include <dt-bindings/reset-controller/mt2701-resets.h>
522 +#include <dt-bindings/pinctrl/mt7623-pinfunc.h>
523 +#include "skeleton64.dtsi"
527 + compatible = "mediatek,mt7623";
528 + interrupt-parent = <&sysirq>;
531 + #address-cells = <1>;
535 + device_type = "cpu";
536 + compatible = "arm,cortex-a7";
540 + device_type = "cpu";
541 + compatible = "arm,cortex-a7";
545 + device_type = "cpu";
546 + compatible = "arm,cortex-a7";
550 + device_type = "cpu";
551 + compatible = "arm,cortex-a7";
556 + system_clk: dummy13m {
557 + compatible = "fixed-clock";
558 + clock-frequency = <13000000>;
559 + #clock-cells = <0>;
562 + rtc_clk: dummy32k {
563 + compatible = "fixed-clock";
564 + clock-frequency = <32000>;
565 + #clock-cells = <0>;
566 + clock-output-names = "clk32k";
570 + compatible = "fixed-clock";
571 + clock-frequency = <26000000>;
572 + #clock-cells = <0>;
573 + clock-output-names = "clk26m";
577 + compatible = "arm,armv7-timer";
578 + interrupt-parent = <&gic>;
579 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
580 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
581 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
582 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
585 + topckgen: power-controller@10000000 {
586 + compatible = "mediatek,mt7623-topckgen",
587 + "mediatek,mt2701-topckgen",
589 + reg = <0 0x10000000 0 0x1000>;
590 + #clock-cells = <1>;
593 + infracfg: power-controller@10001000 {
594 + compatible = "mediatek,mt7623-infracfg",
595 + "mediatek,mt2701-infracfg",
597 + reg = <0 0x10001000 0 0x1000>;
598 + #clock-cells = <1>;
599 + #reset-cells = <1>;
602 + pericfg: pericfg@10003000 {
603 + compatible = "mediatek,mt7623-pericfg",
604 + "mediatek,mt2701-pericfg",
606 + reg = <0 0x10003000 0 0x1000>;
607 + #clock-cells = <1>;
608 + #reset-cells = <1>;
611 + pio: pinctrl@10005000 {
612 + compatible = "mediatek,mt7623-pinctrl";
613 + reg = <0 0x1000b000 0 0x1000>;
614 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
618 + interrupt-controller;
619 + interrupt-parent = <&gic>;
620 + #interrupt-cells = <2>;
621 + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
622 + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
625 + syscfg_pctl_a: syscfg@10005000 {
626 + compatible = "mediatek,mt7623-pctl-a-syscfg", "syscon";
627 + reg = <0 0x10005000 0 0x1000>;
630 + scpsys: scpsys@10006000 {
631 + #power-domain-cells = <1>;
632 + compatible = "mediatek,mt7623-scpsys",
633 + "mediatek,mt2701-scpsys";
634 + reg = <0 0x10006000 0 0x1000>;
635 + infracfg = <&infracfg>;
636 + clocks = <&clk26m>,
637 + <&topckgen CLK_TOP_MM_SEL>;
638 + clock-names = "mfg", "mm";
641 + watchdog: watchdog@10007000 {
642 + compatible = "mediatek,mt7623-wdt",
643 + "mediatek,mt6589-wdt";
644 + reg = <0 0x10007000 0 0x100>;
647 + timer: timer@10008000 {
648 + compatible = "mediatek,mt7623-timer",
649 + "mediatek,mt6577-timer";
650 + reg = <0 0x10008000 0 0x80>;
651 + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>;
652 + clocks = <&system_clk>, <&rtc_clk>;
653 + clock-names = "system-clk", "rtc-clk";
656 + pwrap: pwrap@1000d000 {
657 + compatible = "mediatek,mt7623-pwrap",
658 + "mediatek,mt2701-pwrap";
659 + reg = <0 0x1000d000 0 0x1000>;
660 + reg-names = "pwrap";
661 + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
662 + resets = <&infracfg MT2701_INFRA_PMIC_WRAP_RST>;
663 + reset-names = "pwrap";
664 + clocks = <&infracfg CLK_INFRA_PMICSPI>,
665 + <&infracfg CLK_INFRA_PMICWRAP>;
666 + clock-names = "spi", "wrap";
669 + sysirq: interrupt-controller@10200100 {
670 + compatible = "mediatek,mt7623-sysirq",
671 + "mediatek,mt6577-sysirq";
672 + interrupt-controller;
673 + #interrupt-cells = <3>;
674 + interrupt-parent = <&gic>;
675 + reg = <0 0x10200100 0 0x1c>;
678 + apmixedsys: apmixedsys@10209000 {
679 + compatible = "mediatek,mt7623-apmixedsys",
680 + "mediatek,mt2701-apmixedsys";
681 + reg = <0 0x10209000 0 0x1000>;
682 + #clock-cells = <1>;
685 + gic: interrupt-controller@10211000 {
686 + compatible = "arm,cortex-a7-gic";
687 + interrupt-controller;
688 + #interrupt-cells = <3>;
689 + interrupt-parent = <&gic>;
690 + reg = <0 0x10211000 0 0x1000>,
691 + <0 0x10212000 0 0x1000>,
692 + <0 0x10214000 0 0x2000>,
693 + <0 0x10216000 0 0x2000>;
696 + i2c0: i2c@11007000 {
697 + compatible = "mediatek,mt7623-i2c",
698 + "mediatek,mt6577-i2c";
699 + reg = <0 0x11007000 0 0x70>,
700 + <0 0x11000200 0 0x80>;
701 + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
703 + clocks = <&pericfg CLK_PERI_I2C0>,
704 + <&pericfg CLK_PERI_AP_DMA>;
705 + clock-names = "main", "dma";
706 + #address-cells = <1>;
708 + status = "disabled";
711 + i2c1: i2c@11008000 {
712 + compatible = "mediatek,mt7623-i2c",
713 + "mediatek,mt6577-i2c";
714 + reg = <0 0x11008000 0 0x70>,
715 + <0 0x11000280 0 0x80>;
716 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_LOW>;
718 + clocks = <&pericfg CLK_PERI_I2C1>,
719 + <&pericfg CLK_PERI_AP_DMA>;
720 + clock-names = "main", "dma";
721 + #address-cells = <1>;
723 + status = "disabled";
726 + i2c2: i2c@11009000 {
727 + compatible = "mediatek,mt7623-i2c",
728 + "mediatek,mt6577-i2c";
729 + reg = <0 0x11009000 0 0x70>,
730 + <0 0x11000300 0 0x80>;
731 + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_LOW>;
733 + clocks = <&pericfg CLK_PERI_I2C2>,
734 + <&pericfg CLK_PERI_AP_DMA>;
735 + clock-names = "main", "dma";
736 + #address-cells = <1>;
738 + status = "disabled";
741 + uart0: serial@11002000 {
742 + compatible = "mediatek,mt7623-uart",
743 + "mediatek,mt6577-uart";
744 + reg = <0 0x11002000 0 0x400>;
745 + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
746 + clocks = <&pericfg CLK_PERI_UART0_SEL>,
747 + <&pericfg CLK_PERI_UART0>;
748 + clock-names = "baud", "bus";
749 + status = "disabled";
752 + uart1: serial@11003000 {
753 + compatible = "mediatek,mt7623-uart",
754 + "mediatek,mt6577-uart";
755 + reg = <0 0x11003000 0 0x400>;
756 + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
757 + clocks = <&pericfg CLK_PERI_UART1_SEL>,
758 + <&pericfg CLK_PERI_UART1>;
759 + clock-names = "baud", "bus";
760 + status = "disabled";
763 + uart2: serial@11004000 {
764 + compatible = "mediatek,mt7623-uart",
765 + "mediatek,mt6577-uart";
766 + reg = <0 0x11004000 0 0x400>;
767 + interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
768 + clocks = <&pericfg CLK_PERI_UART2_SEL>,
769 + <&pericfg CLK_PERI_UART2>;
770 + clock-names = "baud", "bus";
771 + status = "disabled";
774 + uart3: serial@11005000 {
775 + compatible = "mediatek,mt7623-uart",
776 + "mediatek,mt6577-uart";
777 + reg = <0 0x11005000 0 0x400>;
778 + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
779 + clocks = <&pericfg CLK_PERI_UART3_SEL>,
780 + <&pericfg CLK_PERI_UART3>;
781 + clock-names = "baud", "bus";
782 + status = "disabled";
785 + spi: spi@1100a000 {
786 + compatible = "mediatek,mt7623-spi", "mediatek,mt6589-spi";
787 + reg = <0 0x1100a000 0 0x1000>;
788 + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
789 + clocks = <&pericfg CLK_PERI_SPI0>;
790 + clock-names = "main";
792 + status = "disabled";
795 + mmc0: mmc@11230000 {
796 + compatible = "mediatek,mt7623-mmc",
797 + "mediatek,mt8135-mmc";
798 + reg = <0 0x11230000 0 0x1000>;
799 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
800 + clocks = <&pericfg CLK_PERI_MSDC30_0>,
801 + <&topckgen CLK_TOP_MSDC30_0_SEL>;
802 + clock-names = "source", "hclk";
803 + status = "disabled";
806 + mmc1: mmc@11240000 {
807 + compatible = "mediatek,mt7623-mmc",
808 + "mediatek,mt8135-mmc";
809 + reg = <0 0x11240000 0 0x1000>;
810 + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
811 + clocks = <&pericfg CLK_PERI_MSDC30_1>,
812 + <&topckgen CLK_TOP_MSDC30_1_SEL>;
813 + clock-names = "source", "hclk";
814 + status = "disabled";
817 + usb1: usb@1a1c0000 {
818 + compatible = "mediatek,mt2701-xhci",
819 + "mediatek,mt8173-xhci";
820 + reg = <0 0x1a1c0000 0 0x1000>,
821 + <0 0x1a1c4700 0 0x0100>;
822 + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_LOW>;
823 + clocks = <&hifsys CLK_HIFSYS_USB0PHY>,
824 + <&topckgen CLK_TOP_ETHIF_SEL>;
825 + clock-names = "sys_ck", "ethif";
826 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
827 + phys = <&phy_port0 PHY_TYPE_USB3>;
828 + status = "disabled";
831 + u3phy1: usb-phy@1a1c4000 {
832 + compatible = "mediatek,mt2701-u3phy",
833 + "mediatek,mt8173-u3phy";
834 + reg = <0 0x1a1c4000 0 0x0700>;
835 + clocks = <&clk26m>;
836 + clock-names = "u3phya_ref";
838 + #address-cells = <2>;
841 + status = "disabled";
843 + phy_port0: phy_port0: port@1a1c4800 {
844 + reg = <0 0x1a1c4800 0 0x800>;
850 + usb2: usb@1a240000 {
851 + compatible = "mediatek,mt2701-xhci",
852 + "mediatek,mt8173-xhci";
853 + reg = <0 0x1a240000 0 0x1000>,
854 + <0 0x1a244700 0 0x0100>;
855 + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_LOW>;
856 + clocks = <&hifsys CLK_HIFSYS_USB1PHY>,
857 + <&topckgen CLK_TOP_ETHIF_SEL>;
858 + clock-names = "sys_ck", "ethif";
859 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
860 + phys = <&u3phy2 0>;
861 + status = "disabled";
864 + u3phy2: usb-phy@1a244000 {
865 + compatible = "mediatek,mt2701-u3phy",
866 + "mediatek,mt8173-u3phy";
867 + reg = <0 0x1a244000 0 0x0700>,
868 + <0 0x1a244800 0 0x0800>;
869 + clocks = <&clk26m>;
870 + clock-names = "u3phya_ref";
872 + status = "disabled";
875 + hifsys: clock-controller@1a000000 {
876 + compatible = "mediatek,mt7623-hifsys",
877 + "mediatek,mt2701-hifsys",
879 + reg = <0 0x1a000000 0 0x1000>;
880 + #clock-cells = <1>;
881 + #reset-cells = <1>;
884 + pcie: pcie@1a140000 {
885 + compatible = "mediatek,mt7623-pcie";
886 + device_type = "pci";
887 + reg = <0 0x1a140000 0 0x8000>, /* PCI-Express registers */
888 + <0 0x1a149000 0 0x1000>, /* PCI-Express PHY0 */
889 + <0 0x1a14a000 0 0x1000>, /* PCI-Express PHY1 */
890 + <0 0x1a244000 0 0x1000>; /* PCI-Express PHY2 */
891 + reg-names = "pcie", "pcie phy0", "pcie phy1", "pcie phy2";
892 + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
893 + <GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
894 + <GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
895 + interrupt-names = "pcie0", "pcie1", "pcie2";
896 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
897 + clock-names = "pcie";
898 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
899 + resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
900 + <&hifsys MT2701_HIFSYS_PCIE1_RST>,
901 + <&hifsys MT2701_HIFSYS_PCIE2_RST>;
902 + reset-names = "pcie0", "pcie1", "pcie2";
904 + mediatek,hifsys = <&hifsys>;
906 + bus-range = <0x00 0xff>;
907 + #address-cells = <3>;
910 + ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000 /* io space */
911 + 0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* pci memory */
913 + status = "disabled";
916 + device_type = "pci";
917 + reg = <0x0800 0 0 0 0>;
919 + #address-cells = <3>;
925 + device_type = "pci";
926 + reg = <0x1000 0 0 0 0>;
928 + #address-cells = <3>;
934 + device_type = "pci";
935 + reg = <0x1800 0 0 0 0>;
937 + #address-cells = <3>;
943 + ethsys: syscon@1b000000 {
944 + #address-cells = <1>;
946 + compatible = "mediatek,mt2701-ethsys", "syscon";
947 + reg = <0 0x1b000000 0 0x1000>;
948 + #clock-cells = <1>;
951 + eth: ethernet@1b100000 {
952 + compatible = "mediatek,mt7623-eth";
953 + reg = <0 0x1b100000 0 0x10000>;
955 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
956 + clock-names = "ethif";
957 + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW>;
958 + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
960 + mediatek,ethsys = <ðsys>;
961 + mediatek,switch = <&gsw>;
963 + #address-cells = <1>;
966 + status = "disabled";
969 + compatible = "mediatek,eth-mac";
972 + status = "disabled";
976 + compatible = "mediatek,eth-mac";
979 + status = "disabled";
983 + #address-cells = <1>;
986 + phy1f: ethernet-phy@1f {
988 + phy-mode = "rgmii";
993 + gsw: switch@1b100000 {
994 + compatible = "mediatek,mt7623-gsw";
995 + reg = <0 0x1b110000 0 0x300000>;
996 + interrupt-parent = <&pio>;
997 + interrupts = <168 IRQ_TYPE_EDGE_RISING>;
998 + clocks = <&apmixedsys CLK_APMIXED_TRGPLL>,
999 + <ðsys CLK_ETHSYS_ESW>,
1000 + <ðsys CLK_ETHSYS_GP2>,
1001 + <ðsys CLK_ETHSYS_GP1>;
1002 + clock-names = "trgpll", "esw", "gp2", "gp1";
1003 + mt7530-supply = <&mt6323_vpa_reg>;
1004 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
1005 + mediatek,ethsys = <ðsys>;
1006 + status = "disabled";
1009 diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
1010 index 37dd438..7fb605e 100644
1011 --- a/arch/arm/mach-mediatek/Kconfig
1012 +++ b/arch/arm/mach-mediatek/Kconfig
1013 @@ -21,6 +21,10 @@ config MACH_MT6592
1014 bool "MediaTek MT6592 SoCs support"
1015 default ARCH_MEDIATEK
1018 + bool "MediaTek MT7623 SoCs support"
1019 + default ARCH_MEDIATEK
1022 bool "MediaTek MT8127 SoCs support"
1023 default ARCH_MEDIATEK
1024 diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
1025 index d019a08..bcfca37 100644
1026 --- a/arch/arm/mach-mediatek/mediatek.c
1027 +++ b/arch/arm/mach-mediatek/mediatek.c
1028 @@ -46,6 +46,7 @@ static void __init mediatek_timer_init(void)
1029 static const char * const mediatek_board_dt_compat[] = {
1032 + "mediatek,mt7623",