1 From a4df3e7e4e906a4e9dac1f8c43f6192f22ef6242 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/81] 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 | 510 +++++++++++++++++++++++++++++++++++++
13 arch/arm/mach-mediatek/Kconfig | 4 +
14 arch/arm/mach-mediatek/mediatek.c | 1 +
15 5 files changed, 975 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..c53c10d
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>;
533 + enable-method = "mediatek,mt6589-smp";
536 + device_type = "cpu";
537 + compatible = "arm,cortex-a7";
541 + device_type = "cpu";
542 + compatible = "arm,cortex-a7";
546 + device_type = "cpu";
547 + compatible = "arm,cortex-a7";
551 + device_type = "cpu";
552 + compatible = "arm,cortex-a7";
557 + system_clk: dummy13m {
558 + compatible = "fixed-clock";
559 + clock-frequency = <13000000>;
560 + #clock-cells = <0>;
563 + rtc_clk: dummy32k {
564 + compatible = "fixed-clock";
565 + clock-frequency = <32000>;
566 + #clock-cells = <0>;
567 + clock-output-names = "clk32k";
571 + compatible = "fixed-clock";
572 + clock-frequency = <26000000>;
573 + #clock-cells = <0>;
574 + clock-output-names = "clk26m";
578 + compatible = "arm,armv7-timer";
579 + interrupt-parent = <&gic>;
580 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
581 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
582 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
583 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
586 + topckgen: power-controller@10000000 {
587 + compatible = "mediatek,mt7623-topckgen",
588 + "mediatek,mt2701-topckgen",
590 + reg = <0 0x10000000 0 0x1000>;
591 + #clock-cells = <1>;
594 + infracfg: power-controller@10001000 {
595 + compatible = "mediatek,mt7623-infracfg",
596 + "mediatek,mt2701-infracfg",
598 + reg = <0 0x10001000 0 0x1000>;
599 + #clock-cells = <1>;
600 + #reset-cells = <1>;
603 + pericfg: pericfg@10003000 {
604 + compatible = "mediatek,mt7623-pericfg",
605 + "mediatek,mt2701-pericfg",
607 + reg = <0 0x10003000 0 0x1000>;
608 + #clock-cells = <1>;
609 + #reset-cells = <1>;
612 + pio: pinctrl@10005000 {
613 + compatible = "mediatek,mt7623-pinctrl";
614 + reg = <0 0x1000b000 0 0x1000>;
615 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
619 + interrupt-controller;
620 + interrupt-parent = <&gic>;
621 + #interrupt-cells = <2>;
622 + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
623 + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
626 + syscfg_pctl_a: syscfg@10005000 {
627 + compatible = "mediatek,mt7623-pctl-a-syscfg", "syscon";
628 + reg = <0 0x10005000 0 0x1000>;
631 + scpsys: scpsys@10006000 {
632 + #power-domain-cells = <1>;
633 + compatible = "mediatek,mt7623-scpsys",
634 + "mediatek,mt2701-scpsys";
635 + reg = <0 0x10006000 0 0x1000>;
636 + infracfg = <&infracfg>;
637 + clocks = <&clk26m>,
638 + <&topckgen CLK_TOP_MM_SEL>;
639 + clock-names = "mfg", "mm";
642 + watchdog: watchdog@10007000 {
643 + compatible = "mediatek,mt7623-wdt",
644 + "mediatek,mt6589-wdt";
645 + reg = <0 0x10007000 0 0x100>;
648 + timer: timer@10008000 {
649 + compatible = "mediatek,mt7623-timer",
650 + "mediatek,mt6577-timer";
651 + reg = <0 0x10008000 0 0x80>;
652 + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>;
653 + clocks = <&system_clk>, <&rtc_clk>;
654 + clock-names = "system-clk", "rtc-clk";
657 + pwrap: pwrap@1000d000 {
658 + compatible = "mediatek,mt7623-pwrap",
659 + "mediatek,mt2701-pwrap";
660 + reg = <0 0x1000d000 0 0x1000>;
661 + reg-names = "pwrap";
662 + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
663 + resets = <&infracfg MT2701_INFRA_PMIC_WRAP_RST>;
664 + reset-names = "pwrap";
665 + clocks = <&infracfg CLK_INFRA_PMICSPI>,
666 + <&infracfg CLK_INFRA_PMICWRAP>;
667 + clock-names = "spi", "wrap";
670 + sysirq: interrupt-controller@10200100 {
671 + compatible = "mediatek,mt7623-sysirq",
672 + "mediatek,mt6577-sysirq";
673 + interrupt-controller;
674 + #interrupt-cells = <3>;
675 + interrupt-parent = <&gic>;
676 + reg = <0 0x10200100 0 0x1c>;
679 + apmixedsys: apmixedsys@10209000 {
680 + compatible = "mediatek,mt7623-apmixedsys",
681 + "mediatek,mt2701-apmixedsys";
682 + reg = <0 0x10209000 0 0x1000>;
683 + #clock-cells = <1>;
686 + gic: interrupt-controller@10211000 {
687 + compatible = "arm,cortex-a7-gic";
688 + interrupt-controller;
689 + #interrupt-cells = <3>;
690 + interrupt-parent = <&gic>;
691 + reg = <0 0x10211000 0 0x1000>,
692 + <0 0x10212000 0 0x1000>,
693 + <0 0x10214000 0 0x2000>,
694 + <0 0x10216000 0 0x2000>;
697 + i2c0: i2c@11007000 {
698 + compatible = "mediatek,mt7623-i2c",
699 + "mediatek,mt6577-i2c";
700 + reg = <0 0x11007000 0 0x70>,
701 + <0 0x11000200 0 0x80>;
702 + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
704 + clocks = <&pericfg CLK_PERI_I2C0>,
705 + <&pericfg CLK_PERI_AP_DMA>;
706 + clock-names = "main", "dma";
707 + #address-cells = <1>;
709 + status = "disabled";
712 + i2c1: i2c@11008000 {
713 + compatible = "mediatek,mt7623-i2c",
714 + "mediatek,mt6577-i2c";
715 + reg = <0 0x11008000 0 0x70>,
716 + <0 0x11000280 0 0x80>;
717 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_LOW>;
719 + clocks = <&pericfg CLK_PERI_I2C1>,
720 + <&pericfg CLK_PERI_AP_DMA>;
721 + clock-names = "main", "dma";
722 + #address-cells = <1>;
724 + status = "disabled";
727 + i2c2: i2c@11009000 {
728 + compatible = "mediatek,mt7623-i2c",
729 + "mediatek,mt6577-i2c";
730 + reg = <0 0x11009000 0 0x70>,
731 + <0 0x11000300 0 0x80>;
732 + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_LOW>;
734 + clocks = <&pericfg CLK_PERI_I2C2>,
735 + <&pericfg CLK_PERI_AP_DMA>;
736 + clock-names = "main", "dma";
737 + #address-cells = <1>;
739 + status = "disabled";
742 + uart0: serial@11002000 {
743 + compatible = "mediatek,mt7623-uart",
744 + "mediatek,mt6577-uart";
745 + reg = <0 0x11002000 0 0x400>;
746 + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
747 + clocks = <&pericfg CLK_PERI_UART0_SEL>,
748 + <&pericfg CLK_PERI_UART0>;
749 + clock-names = "baud", "bus";
750 + status = "disabled";
753 + uart1: serial@11003000 {
754 + compatible = "mediatek,mt7623-uart",
755 + "mediatek,mt6577-uart";
756 + reg = <0 0x11003000 0 0x400>;
757 + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
758 + clocks = <&pericfg CLK_PERI_UART1_SEL>,
759 + <&pericfg CLK_PERI_UART1>;
760 + clock-names = "baud", "bus";
761 + status = "disabled";
764 + uart2: serial@11004000 {
765 + compatible = "mediatek,mt7623-uart",
766 + "mediatek,mt6577-uart";
767 + reg = <0 0x11004000 0 0x400>;
768 + interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
769 + clocks = <&pericfg CLK_PERI_UART2_SEL>,
770 + <&pericfg CLK_PERI_UART2>;
771 + clock-names = "baud", "bus";
772 + status = "disabled";
775 + uart3: serial@11005000 {
776 + compatible = "mediatek,mt7623-uart",
777 + "mediatek,mt6577-uart";
778 + reg = <0 0x11005000 0 0x400>;
779 + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
780 + clocks = <&pericfg CLK_PERI_UART3_SEL>,
781 + <&pericfg CLK_PERI_UART3>;
782 + clock-names = "baud", "bus";
783 + status = "disabled";
786 + spi: spi@1100a000 {
787 + compatible = "mediatek,mt7623-spi", "mediatek,mt6589-spi";
788 + reg = <0 0x1100a000 0 0x1000>;
789 + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
790 + clocks = <&pericfg CLK_PERI_SPI0>;
791 + clock-names = "main";
793 + status = "disabled";
796 + mmc0: mmc@11230000 {
797 + compatible = "mediatek,mt7623-mmc",
798 + "mediatek,mt8135-mmc";
799 + reg = <0 0x11230000 0 0x1000>;
800 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
801 + clocks = <&pericfg CLK_PERI_MSDC30_0>,
802 + <&topckgen CLK_TOP_MSDC30_0_SEL>;
803 + clock-names = "source", "hclk";
804 + status = "disabled";
807 + mmc1: mmc@11240000 {
808 + compatible = "mediatek,mt7623-mmc",
809 + "mediatek,mt8135-mmc";
810 + reg = <0 0x11240000 0 0x1000>;
811 + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
812 + clocks = <&pericfg CLK_PERI_MSDC30_1>,
813 + <&topckgen CLK_TOP_MSDC30_1_SEL>;
814 + clock-names = "source", "hclk";
815 + status = "disabled";
818 + usb1: usb@1a1c0000 {
819 + compatible = "mediatek,mt2701-xhci",
820 + "mediatek,mt8173-xhci";
821 + reg = <0 0x1a1c0000 0 0x1000>,
822 + <0 0x1a1c4700 0 0x0100>;
823 + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_LOW>;
824 + clocks = <&hifsys CLK_HIFSYS_USB0PHY>,
825 + <&topckgen CLK_TOP_ETHIF_SEL>;
826 + clock-names = "sys_ck", "ethif";
827 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
828 + phys = <&phy_port0 PHY_TYPE_USB3>;
829 + status = "disabled";
832 + u3phy1: usb-phy@1a1c4000 {
833 + compatible = "mediatek,mt2701-u3phy",
834 + "mediatek,mt8173-u3phy";
835 + reg = <0 0x1a1c4000 0 0x0700>;
836 + clocks = <&clk26m>;
837 + clock-names = "u3phya_ref";
839 + #address-cells = <2>;
842 + status = "disabled";
844 + phy_port0: phy_port0: port@1a1c4800 {
845 + reg = <0 0x1a1c4800 0 0x800>;
851 + usb2: usb@1a240000 {
852 + compatible = "mediatek,mt2701-xhci",
853 + "mediatek,mt8173-xhci";
854 + reg = <0 0x1a240000 0 0x1000>,
855 + <0 0x1a244700 0 0x0100>;
856 + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_LOW>;
857 + clocks = <&hifsys CLK_HIFSYS_USB1PHY>,
858 + <&topckgen CLK_TOP_ETHIF_SEL>;
859 + clock-names = "sys_ck", "ethif";
860 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
861 + phys = <&u3phy2 0>;
862 + status = "disabled";
865 + u3phy2: usb-phy@1a244000 {
866 + compatible = "mediatek,mt2701-u3phy",
867 + "mediatek,mt8173-u3phy";
868 + reg = <0 0x1a244000 0 0x0700>,
869 + <0 0x1a244800 0 0x0800>;
870 + clocks = <&clk26m>;
871 + clock-names = "u3phya_ref";
873 + status = "disabled";
876 + hifsys: clock-controller@1a000000 {
877 + compatible = "mediatek,mt7623-hifsys",
878 + "mediatek,mt2701-hifsys",
880 + reg = <0 0x1a000000 0 0x1000>;
881 + #clock-cells = <1>;
882 + #reset-cells = <1>;
885 + pcie: pcie@1a140000 {
886 + compatible = "mediatek,mt7623-pcie";
887 + device_type = "pci";
888 + reg = <0 0x1a140000 0 0x8000>, /* PCI-Express registers */
889 + <0 0x1a149000 0 0x1000>, /* PCI-Express PHY0 */
890 + <0 0x1a14a000 0 0x1000>, /* PCI-Express PHY1 */
891 + <0 0x1a244000 0 0x1000>; /* PCI-Express PHY2 */
892 + reg-names = "pcie", "pcie phy0", "pcie phy1", "pcie phy2";
893 + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
894 + <GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
895 + <GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
896 + interrupt-names = "pcie0", "pcie1", "pcie2";
897 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
898 + clock-names = "pcie";
899 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
900 + resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
901 + <&hifsys MT2701_HIFSYS_PCIE1_RST>,
902 + <&hifsys MT2701_HIFSYS_PCIE2_RST>;
903 + reset-names = "pcie0", "pcie1", "pcie2";
905 + mediatek,hifsys = <&hifsys>;
907 + bus-range = <0x00 0xff>;
908 + #address-cells = <3>;
911 + ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000 /* io space */
912 + 0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* pci memory */
914 + status = "disabled";
917 + device_type = "pci";
918 + reg = <0x0800 0 0 0 0>;
920 + #address-cells = <3>;
926 + device_type = "pci";
927 + reg = <0x1000 0 0 0 0>;
929 + #address-cells = <3>;
935 + device_type = "pci";
936 + reg = <0x1800 0 0 0 0>;
938 + #address-cells = <3>;
944 + ethsys: syscon@1b000000 {
945 + #address-cells = <1>;
947 + compatible = "mediatek,mt2701-ethsys", "syscon";
948 + reg = <0 0x1b000000 0 0x1000>;
949 + #clock-cells = <1>;
952 + eth: ethernet@1b100000 {
953 + compatible = "mediatek,mt7623-eth";
954 + reg = <0 0x1b100000 0 0x10000>;
956 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
957 + clock-names = "ethif";
958 + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW
959 + GIC_SPI 199 IRQ_TYPE_LEVEL_LOW
960 + GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
961 + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
963 + mediatek,ethsys = <ðsys>;
964 + mediatek,switch = <&gsw>;
966 + #address-cells = <1>;
969 + status = "disabled";
972 + compatible = "mediatek,eth-mac";
975 + status = "disabled";
979 + compatible = "mediatek,eth-mac";
982 + status = "disabled";
986 + #address-cells = <1>;
989 + phy1f: ethernet-phy@1f {
991 + phy-mode = "rgmii";
996 + gsw: switch@1b100000 {
997 + compatible = "mediatek,mt7623-gsw";
998 + reg = <0 0x1b110000 0 0x300000>;
999 + interrupt-parent = <&pio>;
1000 + interrupts = <168 IRQ_TYPE_EDGE_RISING>;
1001 + clocks = <&apmixedsys CLK_APMIXED_TRGPLL>,
1002 + <ðsys CLK_ETHSYS_ESW>,
1003 + <ðsys CLK_ETHSYS_GP2>,
1004 + <ðsys CLK_ETHSYS_GP1>;
1005 + clock-names = "trgpll", "esw", "gp2", "gp1";
1006 + mt7530-supply = <&mt6323_vpa_reg>;
1007 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
1008 + mediatek,ethsys = <ðsys>;
1009 + status = "disabled";
1012 diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
1013 index 37dd438..7fb605e 100644
1014 --- a/arch/arm/mach-mediatek/Kconfig
1015 +++ b/arch/arm/mach-mediatek/Kconfig
1016 @@ -21,6 +21,10 @@ config MACH_MT6592
1017 bool "MediaTek MT6592 SoCs support"
1018 default ARCH_MEDIATEK
1021 + bool "MediaTek MT7623 SoCs support"
1022 + default ARCH_MEDIATEK
1025 bool "MediaTek MT8127 SoCs support"
1026 default ARCH_MEDIATEK
1027 diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
1028 index d019a08..bcfca37 100644
1029 --- a/arch/arm/mach-mediatek/mediatek.c
1030 +++ b/arch/arm/mach-mediatek/mediatek.c
1031 @@ -46,6 +46,7 @@ static void __init mediatek_timer_init(void)
1032 static const char * const mediatek_board_dt_compat[] = {
1035 + "mediatek,mt7623",