1 From 5536a546755527a862cb2494814c5244d3d8e30a 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/91] 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 | 474 ++++++++++++++++++++++++++++++
12 arch/arm/boot/dts/mt7623.dtsi | 583 +++++++++++++++++++++++++++++++++++++
13 arch/arm/mach-mediatek/Kconfig | 4 +
14 arch/arm/mach-mediatek/mediatek.c | 1 +
15 5 files changed, 1063 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..70b92a4
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>;
79 + proc-supply = <&mt6323_vproc_reg>;
83 + proc-supply = <&mt6323_vproc_reg>;
87 + proc-supply = <&mt6323_vproc_reg>;
91 + proc-supply = <&mt6323_vproc_reg>;
96 + compatible = "mediatek,mt6323";
97 + interrupt-parent = <&pio>;
98 + interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
99 + interrupt-controller;
100 + #interrupt-cells = <2>;
102 + mt6323regulator: mt6323regulator{
103 + compatible = "mediatek,mt6323-regulator";
105 + mt6323_vproc_reg: buck_vproc{
106 + regulator-name = "vproc";
107 + regulator-min-microvolt = < 700000>;
108 + regulator-max-microvolt = <1350000>;
109 + regulator-ramp-delay = <12500>;
110 + regulator-always-on;
114 + mt6323_vsys_reg: buck_vsys{
115 + regulator-name = "vsys";
116 + regulator-min-microvolt = <1400000>;
117 + regulator-max-microvolt = <2987500>;
118 + regulator-ramp-delay = <25000>;
119 + regulator-always-on;
123 + mt6323_vpa_reg: buck_vpa{
124 + regulator-name = "vpa";
125 + regulator-min-microvolt = < 500000>;
126 + regulator-max-microvolt = <3650000>;
129 + mt6323_vtcxo_reg: ldo_vtcxo{
130 + regulator-name = "vtcxo";
131 + regulator-min-microvolt = <2800000>;
132 + regulator-max-microvolt = <2800000>;
133 + regulator-enable-ramp-delay = <90>;
134 + regulator-always-on;
138 + mt6323_vcn28_reg: ldo_vcn28{
139 + regulator-name = "vcn28";
140 + regulator-min-microvolt = <2800000>;
141 + regulator-max-microvolt = <2800000>;
142 + regulator-enable-ramp-delay = <185>;
145 + mt6323_vcn33_bt_reg: ldo_vcn33_bt{
146 + regulator-name = "vcn33_bt";
147 + regulator-min-microvolt = <3300000>;
148 + regulator-max-microvolt = <3600000>;
149 + regulator-enable-ramp-delay = <185>;
152 + mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
153 + regulator-name = "vcn33_wifi";
154 + regulator-min-microvolt = <3300000>;
155 + regulator-max-microvolt = <3600000>;
156 + regulator-enable-ramp-delay = <185>;
159 + mt6323_va_reg: ldo_va{
160 + regulator-name = "va";
161 + regulator-min-microvolt = <2800000>;
162 + regulator-max-microvolt = <2800000>;
163 + regulator-enable-ramp-delay = <216>;
164 + regulator-always-on;
168 + mt6323_vcama_reg: ldo_vcama{
169 + regulator-name = "vcama";
170 + regulator-min-microvolt = <1500000>;
171 + regulator-max-microvolt = <2800000>;
172 + regulator-enable-ramp-delay = <216>;
175 + mt6323_vio28_reg: ldo_vio28{
176 + regulator-name = "vio28";
177 + regulator-min-microvolt = <2800000>;
178 + regulator-max-microvolt = <2800000>;
179 + regulator-enable-ramp-delay = <216>;
180 + regulator-always-on;
184 + mt6323_vusb_reg: ldo_vusb{
185 + regulator-name = "vusb";
186 + regulator-min-microvolt = <3300000>;
187 + regulator-max-microvolt = <3300000>;
188 + regulator-enable-ramp-delay = <216>;
192 + mt6323_vmc_reg: ldo_vmc{
193 + regulator-name = "vmc";
194 + regulator-min-microvolt = <1800000>;
195 + regulator-max-microvolt = <3300000>;
196 + regulator-enable-ramp-delay = <36>;
200 + mt6323_vmch_reg: ldo_vmch{
201 + regulator-name = "vmch";
202 + regulator-min-microvolt = <3000000>;
203 + regulator-max-microvolt = <3300000>;
204 + regulator-enable-ramp-delay = <36>;
208 + mt6323_vemc3v3_reg: ldo_vemc3v3{
209 + regulator-name = "vemc3v3";
210 + regulator-min-microvolt = <3000000>;
211 + regulator-max-microvolt = <3300000>;
212 + regulator-enable-ramp-delay = <36>;
216 + mt6323_vgp1_reg: ldo_vgp1{
217 + regulator-name = "vgp1";
218 + regulator-min-microvolt = <1200000>;
219 + regulator-max-microvolt = <3300000>;
220 + regulator-enable-ramp-delay = <216>;
223 + mt6323_vgp2_reg: ldo_vgp2{
224 + regulator-name = "vgp2";
225 + regulator-min-microvolt = <1200000>;
226 + regulator-max-microvolt = <3000000>;
227 + regulator-enable-ramp-delay = <216>;
230 + mt6323_vgp3_reg: ldo_vgp3{
231 + regulator-name = "vgp3";
232 + regulator-min-microvolt = <1200000>;
233 + regulator-max-microvolt = <1800000>;
234 + regulator-enable-ramp-delay = <216>;
237 + mt6323_vcn18_reg: ldo_vcn18{
238 + regulator-name = "vcn18";
239 + regulator-min-microvolt = <1800000>;
240 + regulator-max-microvolt = <1800000>;
241 + regulator-enable-ramp-delay = <216>;
244 + mt6323_vsim1_reg: ldo_vsim1{
245 + regulator-name = "vsim1";
246 + regulator-min-microvolt = <1800000>;
247 + regulator-max-microvolt = <3000000>;
248 + regulator-enable-ramp-delay = <216>;
251 + mt6323_vsim2_reg: ldo_vsim2{
252 + regulator-name = "vsim2";
253 + regulator-min-microvolt = <1800000>;
254 + regulator-max-microvolt = <3000000>;
255 + regulator-enable-ramp-delay = <216>;
258 + mt6323_vrtc_reg: ldo_vrtc{
259 + regulator-name = "vrtc";
260 + regulator-min-microvolt = <2800000>;
261 + regulator-max-microvolt = <2800000>;
262 + regulator-always-on;
266 + mt6323_vcamaf_reg: ldo_vcamaf{
267 + regulator-name = "vcamaf";
268 + regulator-min-microvolt = <1200000>;
269 + regulator-max-microvolt = <3300000>;
270 + regulator-enable-ramp-delay = <216>;
273 + mt6323_vibr_reg: ldo_vibr{
274 + regulator-name = "vibr";
275 + regulator-min-microvolt = <1200000>;
276 + regulator-max-microvolt = <3300000>;
277 + regulator-enable-ramp-delay = <36>;
280 + mt6323_vrf18_reg: ldo_vrf18{
281 + regulator-name = "vrf18";
282 + regulator-min-microvolt = <1825000>;
283 + regulator-max-microvolt = <1825000>;
284 + regulator-enable-ramp-delay = <187>;
287 + mt6323_vm_reg: ldo_vm{
288 + regulator-name = "vm";
289 + regulator-min-microvolt = <1200000>;
290 + regulator-max-microvolt = <1800000>;
291 + regulator-enable-ramp-delay = <216>;
292 + regulator-always-on;
296 + mt6323_vio18_reg: ldo_vio18{
297 + regulator-name = "vio18";
298 + regulator-min-microvolt = <1800000>;
299 + regulator-max-microvolt = <1800000>;
300 + regulator-enable-ramp-delay = <216>;
301 + regulator-always-on;
305 + mt6323_vcamd_reg: ldo_vcamd{
306 + regulator-name = "vcamd";
307 + regulator-min-microvolt = <1200000>;
308 + regulator-max-microvolt = <1800000>;
309 + regulator-enable-ramp-delay = <216>;
312 + mt6323_vcamio_reg: ldo_vcamio{
313 + regulator-name = "vcamio";
314 + regulator-min-microvolt = <1800000>;
315 + regulator-max-microvolt = <1800000>;
316 + regulator-enable-ramp-delay = <216>;
328 + pinctrl-names = "default", "state_uhs";
329 + pinctrl-0 = <&mmc0_pins_default>;
330 + pinctrl-1 = <&mmc0_pins_uhs>;
332 + max-frequency = <50000000>;
334 + vmmc-supply = <&mt6323_vemc3v3_reg>;
335 + vqmmc-supply = <&mt6323_vio18_reg>;
341 + pinctrl-names = "default", "state_uhs";
342 + pinctrl-0 = <&mmc1_pins_default>;
343 + pinctrl-1 = <&mmc1_pins_uhs>;
345 + max-frequency = <50000000>;
348 +// cd-gpios = <&pio 132 0>;
349 + vmmc-supply = <&mt6323_vmch_reg>;
350 + vqmmc-supply = <&mt6323_vmc_reg>;
354 + mmc0_pins_default: mmc0default {
356 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
357 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
358 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
359 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
360 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
361 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
362 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
363 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
364 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
370 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
375 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
380 + mmc0_pins_uhs: mmc0 {
382 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
383 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
384 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
385 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
386 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
387 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
388 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
389 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
390 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
392 + drive-strength = <MTK_DRIVE_2mA>;
393 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
397 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
398 + drive-strength = <MTK_DRIVE_2mA>;
399 + bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
403 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
408 + mmc1_pins_default: mmc1default {
410 + pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
411 + <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
412 + <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
413 + <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
414 + <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
416 + drive-strength = <MTK_DRIVE_4mA>;
417 + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
421 + pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
423 + drive-strength = <MTK_DRIVE_4mA>;
427 +// pinmux = <MT8173_PIN_132_I2S0_DATA1_FUNC_GPIO132>;
432 + mmc1_pins_uhs: mmc1 {
434 + pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
435 + <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
436 + <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
437 + <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
438 + <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
440 + drive-strength = <MTK_DRIVE_4mA>;
441 + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
445 + pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
446 + drive-strength = <MTK_DRIVE_4mA>;
447 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
453 + pinmux = <MT7623_PIN_275_G2_MDC_FUNC_MDC>,
454 + <MT7623_PIN_276_G2_MDIO_FUNC_MDIO>,
455 + <MT7623_PIN_262_G2_TXEN_FUNC_G2_TXEN>,
456 + <MT7623_PIN_263_G2_TXD3_FUNC_G2_TXD3>,
457 + <MT7623_PIN_264_G2_TXD2_FUNC_G2_TXD2>,
458 + <MT7623_PIN_265_G2_TXD1_FUNC_G2_TXD1>,
459 + <MT7623_PIN_266_G2_TXD0_FUNC_G2_TXD0>,
460 + <MT7623_PIN_267_G2_TXCLK_FUNC_G2_TXC>,
461 + <MT7623_PIN_268_G2_RXCLK_FUNC_G2_RXC>,
462 + <MT7623_PIN_269_G2_RXD0_FUNC_G2_RXD0>,
463 + <MT7623_PIN_270_G2_RXD1_FUNC_G2_RXD1>,
464 + <MT7623_PIN_271_G2_RXD2_FUNC_G2_RXD2>,
465 + <MT7623_PIN_272_G2_RXD3_FUNC_G2_RXD3>,
466 + <MT7623_PIN_273_ESW_INT_FUNC_ESW_INT>,
467 + <MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV>;
471 + pinmux = <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
478 + vusb33-supply = <&mt6323_vusb_reg>;
479 + vbus-supply = <&usb_p1_vbus>;
496 + mac-address = [00 11 22 33 44 56];
501 + mac-address = [00 11 22 33 44 55];
506 + pinctrl-names = "default";
507 + pinctrl-0 = <ð_default>;
508 + mediatek,reset-pin = <&pio 15 0>;
511 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
513 index 0000000..0536b2c
515 +++ b/arch/arm/boot/dts/mt7623.dtsi
518 + * Copyright (c) 2016 MediaTek Inc.
519 + * Author: John Crispin <blogic@openwrt.org>
521 + * This program is free software; you can redistribute it and/or modify
522 + * it under the terms of the GNU General Public License version 2 as
523 + * published by the Free Software Foundation.
525 + * This program is distributed in the hope that it will be useful,
526 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
527 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
528 + * GNU General Public License for more details.
531 +#include <dt-bindings/interrupt-controller/irq.h>
532 +#include <dt-bindings/interrupt-controller/arm-gic.h>
533 +#include <dt-bindings/clock/mt2701-clk.h>
534 +#include <dt-bindings/power/mt2701-power.h>
535 +#include <dt-bindings/phy/phy.h>
536 +#include <dt-bindings/reset-controller/mt2701-resets.h>
537 +#include <dt-bindings/pinctrl/mt7623-pinfunc.h>
538 +#include "skeleton64.dtsi"
542 + compatible = "mediatek,mt7623";
543 + interrupt-parent = <&sysirq>;
546 + #address-cells = <1>;
548 + enable-method = "mediatek,mt6589-smp";
551 + device_type = "cpu";
552 + compatible = "arm,cortex-a7";
554 + clocks = <&infracfg CLK_INFRA_CPUSEL>,
555 + <&apmixedsys CLK_APMIXED_MAINPLL>;
556 + clock-names = "cpu", "intermediate";
557 + operating-points = <
566 + device_type = "cpu";
567 + compatible = "arm,cortex-a7";
569 + clocks = <&infracfg CLK_INFRA_CPUSEL>,
570 + <&apmixedsys CLK_APMIXED_MAINPLL>;
571 + clock-names = "cpu", "intermediate";
572 + operating-points = <
581 + device_type = "cpu";
582 + compatible = "arm,cortex-a7";
584 + clocks = <&infracfg CLK_INFRA_CPUSEL>,
585 + <&apmixedsys CLK_APMIXED_MAINPLL>;
586 + clock-names = "cpu", "intermediate";
587 + operating-points = <
596 + device_type = "cpu";
597 + compatible = "arm,cortex-a7";
599 + clocks = <&infracfg CLK_INFRA_CPUSEL>,
600 + <&apmixedsys CLK_APMIXED_MAINPLL>;
601 + clock-names = "cpu", "intermediate";
602 + operating-points = <
612 + system_clk: dummy13m {
613 + compatible = "fixed-clock";
614 + clock-frequency = <13000000>;
615 + #clock-cells = <0>;
618 + rtc_clk: dummy32k {
619 + compatible = "fixed-clock";
620 + clock-frequency = <32000>;
621 + #clock-cells = <0>;
622 + clock-output-names = "clk32k";
626 + compatible = "fixed-clock";
627 + clock-frequency = <26000000>;
628 + #clock-cells = <0>;
629 + clock-output-names = "clk26m";
633 + compatible = "arm,armv7-timer";
634 + interrupt-parent = <&gic>;
635 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
636 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
637 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
638 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
639 + clock-frequency = <13000000>;
640 + arm,cpu-registers-not-fw-configured;
643 + topckgen: power-controller@10000000 {
644 + compatible = "mediatek,mt7623-topckgen",
645 + "mediatek,mt2701-topckgen",
647 + reg = <0 0x10000000 0 0x1000>;
648 + #clock-cells = <1>;
651 + infracfg: power-controller@10001000 {
652 + compatible = "mediatek,mt7623-infracfg",
653 + "mediatek,mt2701-infracfg",
655 + reg = <0 0x10001000 0 0x1000>;
656 + #clock-cells = <1>;
657 + #reset-cells = <1>;
660 + pericfg: pericfg@10003000 {
661 + compatible = "mediatek,mt7623-pericfg",
662 + "mediatek,mt2701-pericfg",
664 + reg = <0 0x10003000 0 0x1000>;
665 + #clock-cells = <1>;
666 + #reset-cells = <1>;
669 + pio: pinctrl@10005000 {
670 + compatible = "mediatek,mt7623-pinctrl";
671 + reg = <0 0x1000b000 0 0x1000>;
672 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
676 + interrupt-controller;
677 + interrupt-parent = <&gic>;
678 + #interrupt-cells = <2>;
679 + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
680 + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
683 + syscfg_pctl_a: syscfg@10005000 {
684 + compatible = "mediatek,mt7623-pctl-a-syscfg", "syscon";
685 + reg = <0 0x10005000 0 0x1000>;
688 + scpsys: scpsys@10006000 {
689 + #power-domain-cells = <1>;
690 + compatible = "mediatek,mt7623-scpsys",
691 + "mediatek,mt2701-scpsys";
692 + reg = <0 0x10006000 0 0x1000>;
693 + infracfg = <&infracfg>;
694 + clocks = <&clk26m>,
695 + <&topckgen CLK_TOP_MM_SEL>;
696 + clock-names = "mfg", "mm";
699 + watchdog: watchdog@10007000 {
700 + compatible = "mediatek,mt7623-wdt",
701 + "mediatek,mt6589-wdt";
702 + reg = <0 0x10007000 0 0x100>;
705 + timer: timer@10008000 {
706 + compatible = "mediatek,mt7623-timer",
707 + "mediatek,mt6577-timer";
708 + reg = <0 0x10008000 0 0x80>;
709 + interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>;
710 + clocks = <&system_clk>, <&rtc_clk>;
711 + clock-names = "system-clk", "rtc-clk";
714 + pwrap: pwrap@1000d000 {
715 + compatible = "mediatek,mt7623-pwrap",
716 + "mediatek,mt2701-pwrap";
717 + reg = <0 0x1000d000 0 0x1000>;
718 + reg-names = "pwrap";
719 + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
720 + resets = <&infracfg MT2701_INFRA_PMIC_WRAP_RST>;
721 + reset-names = "pwrap";
722 + clocks = <&infracfg CLK_INFRA_PMICSPI>,
723 + <&infracfg CLK_INFRA_PMICWRAP>;
724 + clock-names = "spi", "wrap";
727 + sysirq: interrupt-controller@10200100 {
728 + compatible = "mediatek,mt7623-sysirq",
729 + "mediatek,mt6577-sysirq";
730 + interrupt-controller;
731 + #interrupt-cells = <3>;
732 + interrupt-parent = <&gic>;
733 + reg = <0 0x10200100 0 0x1c>;
736 + apmixedsys: apmixedsys@10209000 {
737 + compatible = "mediatek,mt7623-apmixedsys",
738 + "mediatek,mt2701-apmixedsys";
739 + reg = <0 0x10209000 0 0x1000>;
740 + #clock-cells = <1>;
743 + gic: interrupt-controller@10211000 {
744 + compatible = "arm,cortex-a7-gic";
745 + interrupt-controller;
746 + #interrupt-cells = <3>;
747 + interrupt-parent = <&gic>;
748 + reg = <0 0x10211000 0 0x1000>,
749 + <0 0x10212000 0 0x1000>,
750 + <0 0x10214000 0 0x2000>,
751 + <0 0x10216000 0 0x2000>;
754 + i2c0: i2c@11007000 {
755 + compatible = "mediatek,mt7623-i2c",
756 + "mediatek,mt6577-i2c";
757 + reg = <0 0x11007000 0 0x70>,
758 + <0 0x11000200 0 0x80>;
759 + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
761 + clocks = <&pericfg CLK_PERI_I2C0>,
762 + <&pericfg CLK_PERI_AP_DMA>;
763 + clock-names = "main", "dma";
764 + #address-cells = <1>;
766 + status = "disabled";
769 + i2c1: i2c@11008000 {
770 + compatible = "mediatek,mt7623-i2c",
771 + "mediatek,mt6577-i2c";
772 + reg = <0 0x11008000 0 0x70>,
773 + <0 0x11000280 0 0x80>;
774 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_LOW>;
776 + clocks = <&pericfg CLK_PERI_I2C1>,
777 + <&pericfg CLK_PERI_AP_DMA>;
778 + clock-names = "main", "dma";
779 + #address-cells = <1>;
781 + status = "disabled";
784 + i2c2: i2c@11009000 {
785 + compatible = "mediatek,mt7623-i2c",
786 + "mediatek,mt6577-i2c";
787 + reg = <0 0x11009000 0 0x70>,
788 + <0 0x11000300 0 0x80>;
789 + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_LOW>;
791 + clocks = <&pericfg CLK_PERI_I2C2>,
792 + <&pericfg CLK_PERI_AP_DMA>;
793 + clock-names = "main", "dma";
794 + #address-cells = <1>;
796 + status = "disabled";
799 + uart0: serial@11002000 {
800 + compatible = "mediatek,mt7623-uart",
801 + "mediatek,mt6577-uart";
802 + reg = <0 0x11002000 0 0x400>;
803 + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
804 + clocks = <&pericfg CLK_PERI_UART0_SEL>,
805 + <&pericfg CLK_PERI_UART0>;
806 + clock-names = "baud", "bus";
807 + status = "disabled";
810 + uart1: serial@11003000 {
811 + compatible = "mediatek,mt7623-uart",
812 + "mediatek,mt6577-uart";
813 + reg = <0 0x11003000 0 0x400>;
814 + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
815 + clocks = <&pericfg CLK_PERI_UART1_SEL>,
816 + <&pericfg CLK_PERI_UART1>;
817 + clock-names = "baud", "bus";
818 + status = "disabled";
821 + uart2: serial@11004000 {
822 + compatible = "mediatek,mt7623-uart",
823 + "mediatek,mt6577-uart";
824 + reg = <0 0x11004000 0 0x400>;
825 + interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
826 + clocks = <&pericfg CLK_PERI_UART2_SEL>,
827 + <&pericfg CLK_PERI_UART2>;
828 + clock-names = "baud", "bus";
829 + status = "disabled";
832 + uart3: serial@11005000 {
833 + compatible = "mediatek,mt7623-uart",
834 + "mediatek,mt6577-uart";
835 + reg = <0 0x11005000 0 0x400>;
836 + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
837 + clocks = <&pericfg CLK_PERI_UART3_SEL>,
838 + <&pericfg CLK_PERI_UART3>;
839 + clock-names = "baud", "bus";
840 + status = "disabled";
843 + spi: spi@1100a000 {
844 + compatible = "mediatek,mt7623-spi", "mediatek,mt6589-spi";
845 + reg = <0 0x1100a000 0 0x1000>;
846 + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
847 + clocks = <&pericfg CLK_PERI_SPI0>;
848 + clock-names = "main";
850 + status = "disabled";
853 + nand: nfi@1100d000 {
854 + compatible = "mediatek,mt2701-nfc";
855 + reg = <0 0x1100d000 0 0x1000>, <0 0x1100e000 0 0x1000>;
856 + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_LOW>,
857 + <GIC_SPI 55 IRQ_TYPE_LEVEL_LOW>;
858 + clocks = <&pericfg CLK_PERI_NFI>, <&pericfg CLK_PERI_NFI_ECC>,
859 + <&pericfg CLK_PERI_NFI_PAD>;
860 + clock-names = "nfi_clk", "nfiecc_clk", "pad_clk";
861 + // nand-on-flash-bbt;
862 + status = "disabled";
865 + mmc0: mmc@11230000 {
866 + compatible = "mediatek,mt7623-mmc",
867 + "mediatek,mt8135-mmc";
868 + reg = <0 0x11230000 0 0x1000>;
869 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
870 + clocks = <&pericfg CLK_PERI_MSDC30_0>,
871 + <&topckgen CLK_TOP_MSDC30_0_SEL>;
872 + clock-names = "source", "hclk";
873 + status = "disabled";
876 + mmc1: mmc@11240000 {
877 + compatible = "mediatek,mt7623-mmc",
878 + "mediatek,mt8135-mmc";
879 + reg = <0 0x11240000 0 0x1000>;
880 + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
881 + clocks = <&pericfg CLK_PERI_MSDC30_1>,
882 + <&topckgen CLK_TOP_MSDC30_1_SEL>;
883 + clock-names = "source", "hclk";
884 + status = "disabled";
887 + usb1: usb@1a1c0000 {
888 + compatible = "mediatek,mt2701-xhci",
889 + "mediatek,mt8173-xhci";
890 + reg = <0 0x1a1c0000 0 0x1000>,
891 + <0 0x1a1c4700 0 0x0100>;
892 + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_LOW>;
893 + clocks = <&hifsys CLK_HIFSYS_USB0PHY>,
894 + <&topckgen CLK_TOP_ETHIF_SEL>;
895 + clock-names = "sys_ck", "ethif";
896 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
897 + phys = <&phy_port0 PHY_TYPE_USB3>;
898 + status = "disabled";
901 + u3phy1: usb-phy@1a1c4000 {
902 + compatible = "mediatek,mt2701-u3phy",
903 + "mediatek,mt8173-u3phy";
904 + reg = <0 0x1a1c4000 0 0x0700>;
905 + clocks = <&clk26m>;
906 + clock-names = "u3phya_ref";
908 + #address-cells = <2>;
911 + status = "disabled";
913 + phy_port0: phy_port0: port@1a1c4800 {
914 + reg = <0 0x1a1c4800 0 0x800>;
920 + usb2: usb@1a240000 {
921 + compatible = "mediatek,mt2701-xhci",
922 + "mediatek,mt8173-xhci";
923 + reg = <0 0x1a240000 0 0x1000>,
924 + <0 0x1a244700 0 0x0100>;
925 + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_LOW>;
926 + clocks = <&hifsys CLK_HIFSYS_USB1PHY>,
927 + <&topckgen CLK_TOP_ETHIF_SEL>;
928 + clock-names = "sys_ck", "ethif";
929 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
930 + phys = <&u3phy2 0>;
931 + status = "disabled";
934 + u3phy2: usb-phy@1a244000 {
935 + compatible = "mediatek,mt2701-u3phy",
936 + "mediatek,mt8173-u3phy";
937 + reg = <0 0x1a244000 0 0x0700>,
938 + <0 0x1a244800 0 0x0800>;
939 + clocks = <&clk26m>;
940 + clock-names = "u3phya_ref";
942 + status = "disabled";
945 + hifsys: clock-controller@1a000000 {
946 + compatible = "mediatek,mt7623-hifsys",
947 + "mediatek,mt2701-hifsys",
949 + reg = <0 0x1a000000 0 0x1000>;
950 + #clock-cells = <1>;
951 + #reset-cells = <1>;
954 + pcie: pcie@1a140000 {
955 + compatible = "mediatek,mt7623-pcie";
956 + device_type = "pci";
957 + reg = <0 0x1a140000 0 0x8000>, /* PCI-Express registers */
958 + <0 0x1a149000 0 0x1000>, /* PCI-Express PHY0 */
959 + <0 0x1a14a000 0 0x1000>, /* PCI-Express PHY1 */
960 + <0 0x1a244000 0 0x1000>; /* PCI-Express PHY2 */
961 + reg-names = "pcie", "pcie phy0", "pcie phy1", "pcie phy2";
962 + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
963 + <GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
964 + <GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
965 + interrupt-names = "pcie0", "pcie1", "pcie2";
966 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
967 + clock-names = "pcie";
968 + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
969 + resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
970 + <&hifsys MT2701_HIFSYS_PCIE1_RST>,
971 + <&hifsys MT2701_HIFSYS_PCIE2_RST>;
972 + reset-names = "pcie0", "pcie1", "pcie2";
974 + mediatek,hifsys = <&hifsys>;
976 + bus-range = <0x00 0xff>;
977 + #address-cells = <3>;
980 + ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000 /* io space */
981 + 0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* pci memory */
983 + status = "disabled";
986 + device_type = "pci";
987 + reg = <0x0800 0 0 0 0>;
989 + #address-cells = <3>;
995 + device_type = "pci";
996 + reg = <0x1000 0 0 0 0>;
998 + #address-cells = <3>;
1004 + device_type = "pci";
1005 + reg = <0x1800 0 0 0 0>;
1007 + #address-cells = <3>;
1008 + #size-cells = <2>;
1013 + ethsys: syscon@1b000000 {
1014 + compatible = "mediatek,mt2701-ethsys", "syscon";
1015 + reg = <0 0x1b000000 0 0x1000>;
1016 + #reset-cells = <1>;
1017 + #clock-cells = <1>;
1020 + eth: ethernet@1b100000 {
1021 + compatible = "mediatek,mt7623-eth";
1022 + reg = <0 0x1b100000 0 0x20000>;
1024 + clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
1025 + <ðsys CLK_ETHSYS_ESW>,
1026 + <ðsys CLK_ETHSYS_GP2>,
1027 + <ðsys CLK_ETHSYS_GP1>;
1028 + clock-names = "ethif", "esw", "gp2", "gp1";
1029 + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW
1030 + GIC_SPI 199 IRQ_TYPE_LEVEL_LOW
1031 + GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
1032 + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
1034 + resets = <ðsys 6>;
1035 + reset-names = "eth";
1037 + mediatek,ethsys = <ðsys>;
1038 + mediatek,pctl = <&syscfg_pctl_a>;
1040 + mediatek,switch = <&gsw>;
1042 + #address-cells = <1>;
1043 + #size-cells = <0>;
1045 + status = "disabled";
1048 + compatible = "mediatek,eth-mac";
1051 + status = "disabled";
1053 + phy-mode = "rgmii";
1063 + compatible = "mediatek,eth-mac";
1066 + phy-handle = <&phy5>;
1067 + status = "disabled";
1071 + #address-cells = <1>;
1072 + #size-cells = <0>;
1074 + phy5: ethernet-phy@5 {
1076 + phy-mode = "rgmii-rxid";
1079 + phy1f: ethernet-phy@1f {
1081 + phy-mode = "rgmii";
1086 + gsw: switch@1b100000 {
1087 + compatible = "mediatek,mt7623-gsw";
1088 + interrupt-parent = <&pio>;
1089 + interrupts = <168 IRQ_TYPE_EDGE_RISING>;
1090 + resets = <ðsys 2>;
1091 + reset-names = "eth";
1092 + clocks = <&apmixedsys CLK_APMIXED_TRGPLL>;
1093 + clock-names = "trgpll";
1094 + mt7530-supply = <&mt6323_vpa_reg>;
1095 + mediatek,pctl-regmap = <&syscfg_pctl_a>;
1096 + mediatek,ethsys = <ðsys>;
1097 + status = "disabled";
1100 diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
1101 index 37dd438..7fb605e 100644
1102 --- a/arch/arm/mach-mediatek/Kconfig
1103 +++ b/arch/arm/mach-mediatek/Kconfig
1104 @@ -21,6 +21,10 @@ config MACH_MT6592
1105 bool "MediaTek MT6592 SoCs support"
1106 default ARCH_MEDIATEK
1109 + bool "MediaTek MT7623 SoCs support"
1110 + default ARCH_MEDIATEK
1113 bool "MediaTek MT8127 SoCs support"
1114 default ARCH_MEDIATEK
1115 diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
1116 index d019a08..bcfca37 100644
1117 --- a/arch/arm/mach-mediatek/mediatek.c
1118 +++ b/arch/arm/mach-mediatek/mediatek.c
1119 @@ -46,6 +46,7 @@ static void __init mediatek_timer_init(void)
1120 static const char * const mediatek_board_dt_compat[] = {
1123 + "mediatek,mt7623",