aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-01-27 19:15:44 -0500
committerOlof Johansson <olof@lixom.net>2015-01-27 19:15:44 -0500
commit2f5b93c24a14880f211bd7f963c67d3d0accf977 (patch)
tree202f0e7be0bbf16ca3e85ea0bced64b6b32f334a
parentb288ca404761e65b1a5efab13719a16cee3a3032 (diff)
parent4727a6f631bf3ab2a0373acd27d40483446fcb8a (diff)
Merge tag 'v3.20-next-arm64' of https://github.com/mbgg/linux-mediatek into next/arm64
Merge "ARM: mediatek: arm64 changes for v3.20" from Matthias Brugger: Add support for mt8173 SoC from Mediatek. - add DT bindings documentation - add dts files for SoC and evaluation board - add to Kconfig and defconfig * tag 'v3.20-next-arm64' of https://github.com/mbgg/linux-mediatek: arm64: mediatek: Add MT8173 SoC Kconfig and defconfig arm64: dts: Add mediatek MT8173 SoC and evaluation board dts and Makefile Document: DT: Add bindings for mediatek MT8173 SoC Platform Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt1
-rw-r--r--Documentation/devicetree/bindings/serial/mtk-uart.txt4
-rw-r--r--arch/arm64/Kconfig6
-rw-r--r--arch/arm64/boot/dts/Makefile1
-rw-r--r--arch/arm64/boot/dts/mediatek/Makefile5
-rw-r--r--arch/arm64/boot/dts/mediatek/mt8173-evb.dts38
-rw-r--r--arch/arm64/boot/dts/mediatek/mt8173.dtsi168
-rw-r--r--arch/arm64/configs/defconfig2
9 files changed, 228 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
index 3be40139cfbb..dd7550a29db6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -9,6 +9,7 @@ compatible: Must contain one of
9 "mediatek,mt6592" 9 "mediatek,mt6592"
10 "mediatek,mt8127" 10 "mediatek,mt8127"
11 "mediatek,mt8135" 11 "mediatek,mt8135"
12 "mediatek,mt8173"
12 13
13 14
14Supported boards: 15Supported boards:
@@ -25,3 +26,6 @@ Supported boards:
25- MTK mt8135 tablet EVB: 26- MTK mt8135 tablet EVB:
26 Required root node properties: 27 Required root node properties:
27 - compatible = "mediatek,mt8135-evbp1", "mediatek,mt8135"; 28 - compatible = "mediatek,mt8135-evbp1", "mediatek,mt8135";
29- MTK mt8173 tablet EVB:
30 Required root node properties:
31 - compatible = "mediatek,mt8173-evb", "mediatek,mt8173";
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
index d680b07ec6e8..8794f8d14db5 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
@@ -5,6 +5,7 @@ interrupt.
5 5
6Required properties: 6Required properties:
7- compatible: should be one of: 7- compatible: should be one of:
8 "mediatek,mt8173-sysirq"
8 "mediatek,mt8135-sysirq" 9 "mediatek,mt8135-sysirq"
9 "mediatek,mt8127-sysirq" 10 "mediatek,mt8127-sysirq"
10 "mediatek,mt6589-sysirq" 11 "mediatek,mt6589-sysirq"
diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
index 48358a33ea7d..0e41b6ef2950 100644
--- a/Documentation/devicetree/bindings/serial/mtk-uart.txt
+++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
@@ -2,9 +2,11 @@
2 2
3Required properties: 3Required properties:
4- compatible should contain: 4- compatible should contain:
5 * "mediatek,mt8173-uart" for MT8173 compatible UARTS
5 * "mediatek,mt6589-uart" for MT6589 compatible UARTS 6 * "mediatek,mt6589-uart" for MT6589 compatible UARTS
6 * "mediatek,mt6582-uart" for MT6582 compatible UARTS 7 * "mediatek,mt6582-uart" for MT6582 compatible UARTS
7 * "mediatek,mt6577-uart" for all compatible UARTS (MT6589, MT6582, MT6577) 8 * "mediatek,mt6577-uart" for all compatible UARTS (MT8173, MT6589, MT6582,
9 MT6577)
8 10
9- reg: The base address of the UART register bank. 11- reg: The base address of the UART register bank.
10 12
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 9c6b93c86522..0d0c01c35dc3 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -165,6 +165,12 @@ config ARCH_EXYNOS7
165 help 165 help
166 This enables support for Samsung Exynos7 SoC family 166 This enables support for Samsung Exynos7 SoC family
167 167
168config ARCH_MEDIATEK
169 bool "Mediatek MT65xx & MT81xx ARMv8 SoC"
170 select ARM_GIC
171 help
172 Support for Mediatek MT65xx & MT81xx ARMv8 SoCs
173
168config ARCH_SEATTLE 174config ARCH_SEATTLE
169 bool "AMD Seattle SoC Family" 175 bool "AMD Seattle SoC Family"
170 help 176 help
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 68633e24e544..538c0c6bedf4 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -4,6 +4,7 @@ dts-dirs += arm
4dts-dirs += cavium 4dts-dirs += cavium
5dts-dirs += exynos 5dts-dirs += exynos
6dts-dirs += freescale 6dts-dirs += freescale
7dts-dirs += mediatek
7 8
8always := $(dtb-y) 9always := $(dtb-y)
9subdir-y := $(dts-dirs) 10subdir-y := $(dts-dirs)
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
new file mode 100644
index 000000000000..3ce24622b231
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -0,0 +1,5 @@
1dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
2
3always := $(dtb-y)
4subdir-y := $(dts-dirs)
5clean-files := *.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
new file mode 100644
index 000000000000..43d54017b779
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -0,0 +1,38 @@
1/*
2 * Copyright (c) 2014 MediaTek Inc.
3 * Author: Eddie Huang <eddie.huang@mediatek.com>
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 "mt8173.dtsi"
17
18/ {
19 model = "mediatek,mt8173-evb";
20
21 aliases {
22 serial0 = &uart0;
23 serial1 = &uart1;
24 serial2 = &uart2;
25 serial3 = &uart3;
26 };
27
28 memory@40000000 {
29 device_type = "memory";
30 reg = <0 0x40000000 0 0x80000000>;
31 };
32
33 chosen { };
34};
35
36&uart0 {
37 status = "okay";
38};
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
new file mode 100644
index 000000000000..8554ec31dd9e
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -0,0 +1,168 @@
1/*
2 * Copyright (c) 2014 MediaTek Inc.
3 * Author: Eddie Huang <eddie.huang@mediatek.com>
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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/interrupt-controller/arm-gic.h>
16
17/ {
18 compatible = "mediatek,mt8173";
19 interrupt-parent = <&sysirq>;
20 #address-cells = <2>;
21 #size-cells = <2>;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 cpu-map {
28 cluster0 {
29 core0 {
30 cpu = <&cpu0>;
31 };
32 core1 {
33 cpu = <&cpu1>;
34 };
35 };
36
37 cluster1 {
38 core0 {
39 cpu = <&cpu2>;
40 };
41 core1 {
42 cpu = <&cpu3>;
43 };
44 };
45 };
46
47 cpu0: cpu@0 {
48 device_type = "cpu";
49 compatible = "arm,cortex-a53";
50 reg = <0x000>;
51 };
52
53 cpu1: cpu@1 {
54 device_type = "cpu";
55 compatible = "arm,cortex-a53";
56 reg = <0x001>;
57 enable-method = "psci";
58 };
59
60 cpu2: cpu@100 {
61 device_type = "cpu";
62 compatible = "arm,cortex-a57";
63 reg = <0x100>;
64 enable-method = "psci";
65 };
66
67 cpu3: cpu@101 {
68 device_type = "cpu";
69 compatible = "arm,cortex-a57";
70 reg = <0x101>;
71 enable-method = "psci";
72 };
73 };
74
75 psci {
76 compatible = "arm,psci";
77 method = "smc";
78 cpu_suspend = <0x84000001>;
79 cpu_off = <0x84000002>;
80 cpu_on = <0x84000003>;
81 };
82
83 uart_clk: dummy26m {
84 compatible = "fixed-clock";
85 clock-frequency = <26000000>;
86 #clock-cells = <0>;
87 };
88
89 timer {
90 compatible = "arm,armv8-timer";
91 interrupt-parent = <&gic>;
92 interrupts = <GIC_PPI 13
93 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
94 <GIC_PPI 14
95 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
96 <GIC_PPI 11
97 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
98 <GIC_PPI 10
99 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
100 };
101
102 soc {
103 #address-cells = <2>;
104 #size-cells = <2>;
105 compatible = "simple-bus";
106 ranges;
107
108 sysirq: intpol-controller@10200620 {
109 compatible = "mediatek,mt8173-sysirq",
110 "mediatek,mt6577-sysirq";
111 interrupt-controller;
112 #interrupt-cells = <3>;
113 interrupt-parent = <&gic>;
114 reg = <0 0x10200620 0 0x20>;
115 };
116
117 gic: interrupt-controller@10220000 {
118 compatible = "arm,gic-400";
119 #interrupt-cells = <3>;
120 interrupt-parent = <&gic>;
121 interrupt-controller;
122 reg = <0 0x10221000 0 0x1000>,
123 <0 0x10222000 0 0x2000>,
124 <0 0x10224000 0 0x2000>,
125 <0 0x10226000 0 0x2000>;
126 interrupts = <GIC_PPI 9
127 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
128 };
129
130 uart0: serial@11002000 {
131 compatible = "mediatek,mt8173-uart",
132 "mediatek,mt6577-uart";
133 reg = <0 0x11002000 0 0x400>;
134 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>;
135 clocks = <&uart_clk>;
136 status = "disabled";
137 };
138
139 uart1: serial@11003000 {
140 compatible = "mediatek,mt8173-uart",
141 "mediatek,mt6577-uart";
142 reg = <0 0x11003000 0 0x400>;
143 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
144 clocks = <&uart_clk>;
145 status = "disabled";
146 };
147
148 uart2: serial@11004000 {
149 compatible = "mediatek,mt8173-uart",
150 "mediatek,mt6577-uart";
151 reg = <0 0x11004000 0 0x400>;
152 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
153 clocks = <&uart_clk>;
154 status = "disabled";
155 };
156
157 uart3: serial@11005000 {
158 compatible = "mediatek,mt8173-uart",
159 "mediatek,mt6577-uart";
160 reg = <0 0x11005000 0 0x400>;
161 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
162 clocks = <&uart_clk>;
163 status = "disabled";
164 };
165 };
166
167};
168
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 24c23341a181..d6a53e8fa8db 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -32,6 +32,7 @@ CONFIG_MODULE_UNLOAD=y
32# CONFIG_BLK_DEV_BSG is not set 32# CONFIG_BLK_DEV_BSG is not set
33# CONFIG_IOSCHED_DEADLINE is not set 33# CONFIG_IOSCHED_DEADLINE is not set
34CONFIG_ARCH_FSL_LS2085A=y 34CONFIG_ARCH_FSL_LS2085A=y
35CONFIG_ARCH_MEDIATEK=y
35CONFIG_ARCH_THUNDER=y 36CONFIG_ARCH_THUNDER=y
36CONFIG_ARCH_VEXPRESS=y 37CONFIG_ARCH_VEXPRESS=y
37CONFIG_ARCH_XGENE=y 38CONFIG_ARCH_XGENE=y
@@ -87,6 +88,7 @@ CONFIG_SERIO_AMBAKMI=y
87CONFIG_LEGACY_PTY_COUNT=16 88CONFIG_LEGACY_PTY_COUNT=16
88CONFIG_SERIAL_8250=y 89CONFIG_SERIAL_8250=y
89CONFIG_SERIAL_8250_CONSOLE=y 90CONFIG_SERIAL_8250_CONSOLE=y
91CONFIG_SERIAL_8250_MT6577=y
90CONFIG_SERIAL_AMBA_PL011=y 92CONFIG_SERIAL_AMBA_PL011=y
91CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 93CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
92CONFIG_SERIAL_OF_PLATFORM=y 94CONFIG_SERIAL_OF_PLATFORM=y