aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-01-05 11:24:27 -0500
committerMatthias Brugger <matthias.bgg@gmail.com>2016-02-11 05:39:54 -0500
commit31ac0d69a1d40e0ac71f3b5f59f39b8070c4cae1 (patch)
tree3ae9951573bb9d09022bf4809ebcdfe1e0765ea2
parent0c92241328ef427e23cbfababe1842aea9637146 (diff)
ARM: dts: mediatek: add MT7623 basic support
This adds basic chip support for Mediatek MT7623. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/mt7623-evb.dts33
-rw-r--r--arch/arm/boot/dts/mt7623.dtsi146
-rw-r--r--arch/arm/mach-mediatek/Kconfig4
-rw-r--r--arch/arm/mach-mediatek/mediatek.c1
5 files changed, 185 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a4a6d70e8b26..00d2826e0d69 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -809,6 +809,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
809 mt6580-evbp1.dtb \ 809 mt6580-evbp1.dtb \
810 mt6589-aquaris5.dtb \ 810 mt6589-aquaris5.dtb \
811 mt6592-evb.dtb \ 811 mt6592-evb.dtb \
812 mt7623-evb.dtb \
812 mt8127-moose.dtb \ 813 mt8127-moose.dtb \
813 mt8135-evbp1.dtb 814 mt8135-evbp1.dtb
814dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb 815dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
diff --git a/arch/arm/boot/dts/mt7623-evb.dts b/arch/arm/boot/dts/mt7623-evb.dts
new file mode 100644
index 000000000000..a9ee2d64c6f7
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623-evb.dts
@@ -0,0 +1,33 @@
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#include "mt7623.dtsi"
17
18/ {
19 model = "MediaTek MT7623 evaluation board";
20 compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
21
22 chosen {
23 stdout-path = &uart2;
24 };
25
26 memory {
27 reg = <0 0x80000000 0 0x40000000>;
28 };
29};
30
31&uart2 {
32 status = "okay";
33};
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
new file mode 100644
index 000000000000..53c4268ec874
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -0,0 +1,146 @@
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#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/interrupt-controller/arm-gic.h>
17#include "skeleton64.dtsi"
18
19/ {
20 compatible = "mediatek,mt7623";
21 interrupt-parent = <&sysirq>;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 cpu@0 {
28 device_type = "cpu";
29 compatible = "arm,cortex-a7";
30 reg = <0x0>;
31 };
32 cpu@1 {
33 device_type = "cpu";
34 compatible = "arm,cortex-a7";
35 reg = <0x1>;
36 };
37 cpu@2 {
38 device_type = "cpu";
39 compatible = "arm,cortex-a7";
40 reg = <0x2>;
41 };
42 cpu@3 {
43 device_type = "cpu";
44 compatible = "arm,cortex-a7";
45 reg = <0x3>;
46 };
47 };
48
49 system_clk: dummy13m {
50 compatible = "fixed-clock";
51 clock-frequency = <13000000>;
52 #clock-cells = <0>;
53 };
54
55 rtc_clk: dummy32k {
56 compatible = "fixed-clock";
57 clock-frequency = <32000>;
58 #clock-cells = <0>;
59 };
60
61 uart_clk: dummy26m {
62 compatible = "fixed-clock";
63 clock-frequency = <26000000>;
64 #clock-cells = <0>;
65 };
66
67 timer {
68 compatible = "arm,armv7-timer";
69 interrupt-parent = <&gic>;
70 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
71 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
72 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
73 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
74 };
75
76 watchdog: watchdog@10007000 {
77 compatible = "mediatek,mt7623-wdt",
78 "mediatek,mt6589-wdt";
79 reg = <0 0x10007000 0 0x100>;
80 };
81
82 timer: timer@10008000 {
83 compatible = "mediatek,mt7623-timer",
84 "mediatek,mt6577-timer";
85 reg = <0 0x10008000 0 0x80>;
86 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>;
87 clocks = <&system_clk>, <&rtc_clk>;
88 clock-names = "system-clk", "rtc-clk";
89 };
90
91 sysirq: interrupt-controller@10200100 {
92 compatible = "mediatek,mt7623-sysirq",
93 "mediatek,mt6577-sysirq";
94 interrupt-controller;
95 #interrupt-cells = <3>;
96 interrupt-parent = <&gic>;
97 reg = <0 0x10200100 0 0x1c>;
98 };
99
100 gic: interrupt-controller@10211000 {
101 compatible = "arm,cortex-a7-gic";
102 interrupt-controller;
103 #interrupt-cells = <3>;
104 interrupt-parent = <&gic>;
105 reg = <0 0x10211000 0 0x1000>,
106 <0 0x10212000 0 0x1000>,
107 <0 0x10214000 0 0x2000>,
108 <0 0x10216000 0 0x2000>;
109 };
110
111 uart0: serial@11002000 {
112 compatible = "mediatek,mt7623-uart",
113 "mediatek,mt6577-uart";
114 reg = <0 0x11002000 0 0x400>;
115 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
116 clocks = <&uart_clk>;
117 status = "disabled";
118 };
119
120 uart1: serial@11003000 {
121 compatible = "mediatek,mt7623-uart",
122 "mediatek,mt6577-uart";
123 reg = <0 0x11003000 0 0x400>;
124 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
125 clocks = <&uart_clk>;
126 status = "disabled";
127 };
128
129 uart2: serial@11004000 {
130 compatible = "mediatek,mt7623-uart",
131 "mediatek,mt6577-uart";
132 reg = <0 0x11004000 0 0x400>;
133 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
134 clocks = <&uart_clk>;
135 status = "disabled";
136 };
137
138 uart3: serial@11005000 {
139 compatible = "mediatek,mt7623-uart",
140 "mediatek,mt6577-uart";
141 reg = <0 0x11005000 0 0x400>;
142 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
143 clocks = <&uart_clk>;
144 status = "disabled";
145 };
146};
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index 0abcc51afff5..8ced4ad94af0 100644
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
@@ -18,6 +18,10 @@ config MACH_MT6592
18 bool "MediaTek MT6592 SoCs support" 18 bool "MediaTek MT6592 SoCs support"
19 default ARCH_MEDIATEK 19 default ARCH_MEDIATEK
20 20
21config MACH_MT7623
22 bool "MediaTek MT7623 SoCs support"
23 default ARCH_MEDIATEK
24
21config MACH_MT8127 25config MACH_MT8127
22 bool "MediaTek MT8127 SoCs support" 26 bool "MediaTek MT8127 SoCs support"
23 default ARCH_MEDIATEK 27 default ARCH_MEDIATEK
diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
index 2f9f09ac51bd..9c2e38d30f47 100644
--- a/arch/arm/mach-mediatek/mediatek.c
+++ b/arch/arm/mach-mediatek/mediatek.c
@@ -47,6 +47,7 @@ static const char * const mediatek_board_dt_compat[] = {
47 "mediatek,mt2701", 47 "mediatek,mt2701",
48 "mediatek,mt6589", 48 "mediatek,mt6589",
49 "mediatek,mt6592", 49 "mediatek,mt6592",
50 "mediatek,mt7623",
50 "mediatek,mt8127", 51 "mediatek,mt8127",
51 "mediatek,mt8135", 52 "mediatek,mt8135",
52 NULL, 53 NULL,