Skip to content

Commit 2f5b93c

Browse files
committed
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>
2 parents b288ca4 + 4727a6f commit 2f5b93c

File tree

9 files changed

+228
-1
lines changed

9 files changed

+228
-1
lines changed

Documentation/devicetree/bindings/arm/mediatek.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ compatible: Must contain one of
99
"mediatek,mt6592"
1010
"mediatek,mt8127"
1111
"mediatek,mt8135"
12+
"mediatek,mt8173"
1213

1314

1415
Supported boards:
@@ -25,3 +26,6 @@ Supported boards:
2526
- MTK mt8135 tablet EVB:
2627
Required root node properties:
2728
- compatible = "mediatek,mt8135-evbp1", "mediatek,mt8135";
29+
- MTK mt8173 tablet EVB:
30+
Required root node properties:
31+
- compatible = "mediatek,mt8173-evb", "mediatek,mt8173";

Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ interrupt.
55

66
Required properties:
77
- compatible: should be one of:
8+
"mediatek,mt8173-sysirq"
89
"mediatek,mt8135-sysirq"
910
"mediatek,mt8127-sysirq"
1011
"mediatek,mt6589-sysirq"

Documentation/devicetree/bindings/serial/mtk-uart.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
Required properties:
44
- compatible should contain:
5+
* "mediatek,mt8173-uart" for MT8173 compatible UARTS
56
* "mediatek,mt6589-uart" for MT6589 compatible UARTS
67
* "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)
810

911
- reg: The base address of the UART register bank.
1012

arch/arm64/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ config ARCH_EXYNOS7
165165
help
166166
This enables support for Samsung Exynos7 SoC family
167167

168+
config ARCH_MEDIATEK
169+
bool "Mediatek MT65xx & MT81xx ARMv8 SoC"
170+
select ARM_GIC
171+
help
172+
Support for Mediatek MT65xx & MT81xx ARMv8 SoCs
173+
168174
config ARCH_SEATTLE
169175
bool "AMD Seattle SoC Family"
170176
help

arch/arm64/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dts-dirs += arm
44
dts-dirs += cavium
55
dts-dirs += exynos
66
dts-dirs += freescale
7+
dts-dirs += mediatek
78

89
always := $(dtb-y)
910
subdir-y := $(dts-dirs)

arch/arm64/boot/dts/mediatek/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
2+
3+
always := $(dtb-y)
4+
subdir-y := $(dts-dirs)
5+
clean-files := *.dtb
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
};
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+

arch/arm64/configs/defconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ CONFIG_MODULE_UNLOAD=y
3232
# CONFIG_BLK_DEV_BSG is not set
3333
# CONFIG_IOSCHED_DEADLINE is not set
3434
CONFIG_ARCH_FSL_LS2085A=y
35+
CONFIG_ARCH_MEDIATEK=y
3536
CONFIG_ARCH_THUNDER=y
3637
CONFIG_ARCH_VEXPRESS=y
3738
CONFIG_ARCH_XGENE=y
@@ -87,6 +88,7 @@ CONFIG_SERIO_AMBAKMI=y
8788
CONFIG_LEGACY_PTY_COUNT=16
8889
CONFIG_SERIAL_8250=y
8990
CONFIG_SERIAL_8250_CONSOLE=y
91+
CONFIG_SERIAL_8250_MT6577=y
9092
CONFIG_SERIAL_AMBA_PL011=y
9193
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
9294
CONFIG_SERIAL_OF_PLATFORM=y

0 commit comments

Comments
 (0)