Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1479082 > unrolled thread
| Started by | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| First post | 2016-09-08 13:00 +0200 |
| Last post | 2016-09-08 16:40 +0200 |
| Articles | 9 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/4] Add MT6797 SoC basic support Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 13:00 +0200
[PATCH 2/4] irqchip: mtk-sysirq: support second intpol base Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 13:00 +0200
[PATCH 3/4] arm64: dts: mediatek: add mt6797 support Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 13:00 +0200
Re: [PATCH 3/4] arm64: dts: mediatek: add mt6797 support Marc Zyngier <marc.zyngier@arm.com> - 2016-09-08 15:20 +0200
Re: [PATCH 3/4] arm64: dts: mediatek: add mt6797 support Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 16:20 +0200
[PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 13:00 +0200
Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform Marc Zyngier <marc.zyngier@arm.com> - 2016-09-08 14:40 +0200
Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform Mars Cheng <mars.cheng@mediatek.com> - 2016-09-08 16:10 +0200
Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform Marc Zyngier <marc.zyngier@arm.com> - 2016-09-08 16:40 +0200
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 13:00 +0200 |
| Subject | [PATCH 0/4] Add MT6797 SoC basic support |
| Message-ID | <sf5dM-4La-7@gated-at.bofh.it> |
This patch set adds basic chip support for mediatek's first 10-core chip, X20, also known as MT6797. - Based on 4.8-rc1 - Based on the MT2701 patch by Erin Lo[1] - Modify irq-mtk-sysirq to support 2 base address [1] https://lkml.org/lkml/2016/8/22/128 Mars Cheng (4): Document: DT: Add bindings for mediatek MT6797 SoC Platform irqchip: mtk-sysirq: support second intpol base arm64: dts: mediatek: add mt6797 support clk: mediatek: Add MT6797 clock support Documentation/devicetree/bindings/arm/mediatek.txt | 4 + .../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + .../bindings/arm/mediatek/mediatek,imgsys.txt | 1 + .../bindings/arm/mediatek/mediatek,infracfg.txt | 1 + .../bindings/arm/mediatek/mediatek,mmsys.txt | 1 + .../bindings/arm/mediatek/mediatek,topckgen.txt | 1 + .../bindings/arm/mediatek/mediatek,vdecsys.txt | 1 + .../bindings/arm/mediatek/mediatek,vencsys.txt | 3 +- .../interrupt-controller/mediatek,sysirq.txt | 4 +- .../devicetree/bindings/serial/mtk-uart.txt | 1 + arch/arm64/boot/dts/mediatek/Makefile | 1 + arch/arm64/boot/dts/mediatek/mt6797-evb.dts | 36 + arch/arm64/boot/dts/mediatek/mt6797.dtsi | 237 +++++++ drivers/clk/mediatek/Kconfig | 36 + drivers/clk/mediatek/Makefile | 5 + drivers/clk/mediatek/clk-mt6797-img.c | 87 +++ drivers/clk/mediatek/clk-mt6797-mm.c | 146 ++++ drivers/clk/mediatek/clk-mt6797-vdec.c | 102 +++ drivers/clk/mediatek/clk-mt6797-venc.c | 86 +++ drivers/clk/mediatek/clk-mt6797.c | 716 ++++++++++++++++++++ drivers/irqchip/irq-mtk-sysirq.c | 42 +- include/dt-bindings/clock/mt6797-clk.h | 281 ++++++++ 22 files changed, 1784 insertions(+), 9 deletions(-) create mode 100644 arch/arm64/boot/dts/mediatek/mt6797-evb.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt6797.dtsi create mode 100644 drivers/clk/mediatek/clk-mt6797-img.c create mode 100644 drivers/clk/mediatek/clk-mt6797-mm.c create mode 100644 drivers/clk/mediatek/clk-mt6797-vdec.c create mode 100644 drivers/clk/mediatek/clk-mt6797-venc.c create mode 100644 drivers/clk/mediatek/clk-mt6797.c create mode 100644 include/dt-bindings/clock/mt6797-clk.h -- 1.7.9.5
[toc] | [next] | [standalone]
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 13:00 +0200 |
| Subject | [PATCH 2/4] irqchip: mtk-sysirq: support second intpol base |
| Message-ID | <sf5dM-4La-27@gated-at.bofh.it> |
| In reply to | #1479082 |
Original mtk-sysirq does not support multiple intpol bases. However,
there are some mtk chips need it.
Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
---
drivers/irqchip/irq-mtk-sysirq.c | 42 +++++++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 7 deletions(-)
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 63ac73b..20f488a 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -24,7 +24,10 @@
struct mtk_sysirq_chip_data {
spinlock_t lock;
+ unsigned int intpol_num;
+ unsigned int intpol_num_ex;
void __iomem *intpol_base;
+ void __iomem *intpol_base_ex;
};
static int mtk_sysirq_set_type(struct irq_data *data, unsigned int type)
@@ -32,14 +35,22 @@ static int mtk_sysirq_set_type(struct irq_data *data, unsigned int type)
irq_hw_number_t hwirq = data->hwirq;
struct mtk_sysirq_chip_data *chip_data = data->chip_data;
u32 offset, reg_index, value;
+ void __iomem *intpol_base;
unsigned long flags;
int ret;
+ if (hwirq >= (chip_data->intpol_num)) {
+ intpol_base = chip_data->intpol_base_ex;
+ reg_index = (hwirq - chip_data->intpol_num) >> 5;
+ } else {
+ intpol_base = chip_data->intpol_base;
+ reg_index = hwirq >> 5;
+ }
+
offset = hwirq & 0x1f;
- reg_index = hwirq >> 5;
spin_lock_irqsave(&chip_data->lock, flags);
- value = readl_relaxed(chip_data->intpol_base + reg_index * 4);
+ value = readl_relaxed(intpol_base + reg_index * 4);
if (type == IRQ_TYPE_LEVEL_LOW || type == IRQ_TYPE_EDGE_FALLING) {
if (type == IRQ_TYPE_LEVEL_LOW)
type = IRQ_TYPE_LEVEL_HIGH;
@@ -49,7 +60,7 @@ static int mtk_sysirq_set_type(struct irq_data *data, unsigned int type)
} else {
value &= ~(1 << offset);
}
- writel(value, chip_data->intpol_base + reg_index * 4);
+ writel(value, intpol_base + reg_index * 4);
data = data->parent_data;
ret = data->chip->irq_set_type(data, type);
@@ -124,7 +135,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
{
struct irq_domain *domain, *domain_parent;
struct mtk_sysirq_chip_data *chip_data;
- int ret, size, intpol_num;
+ int ret, size, total_intpol_num;
struct resource res;
domain_parent = irq_find_host(parent);
@@ -142,7 +153,8 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
return -ENOMEM;
size = resource_size(&res);
- intpol_num = size * 8;
+ chip_data->intpol_num = size * 8;
+ total_intpol_num = chip_data->intpol_num;
chip_data->intpol_base = ioremap(res.start, size);
if (!chip_data->intpol_base) {
pr_err("mtk_sysirq: unable to map sysirq register\n");
@@ -150,8 +162,22 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
goto out_free;
}
- domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node,
- &sysirq_domain_ops, chip_data);
+ /* if we get the second base, handle it, or just go on */
+ ret = of_address_to_resource(node, 1, &res);
+ if (!ret) { /* if we get the second base, handle it */
+ size = resource_size(&res);
+ chip_data->intpol_num_ex = size * 8;
+ total_intpol_num += chip_data->intpol_num_ex;
+ chip_data->intpol_base_ex = ioremap(res.start, size);
+ if (!chip_data->intpol_base_ex) {
+ pr_err("mtk_sysirq: unable to map sysirq register\n");
+ ret = -ENXIO;
+ goto out_free_ex;
+ }
+ }
+
+ domain = irq_domain_add_hierarchy(domain_parent, 0, total_intpol_num,
+ node, &sysirq_domain_ops, chip_data);
if (!domain) {
ret = -ENOMEM;
goto out_unmap;
@@ -161,6 +187,8 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
return 0;
out_unmap:
+ iounmap(chip_data->intpol_base_ex);
+out_free_ex:
iounmap(chip_data->intpol_base);
out_free:
kfree(chip_data);
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 13:00 +0200 |
| Subject | [PATCH 3/4] arm64: dts: mediatek: add mt6797 support |
| Message-ID | <sf5dM-4La-13@gated-at.bofh.it> |
| In reply to | #1479082 |
This adds basic chip support for MT6797 SoC.
Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
arch/arm64/boot/dts/mediatek/mt6797-evb.dts | 36 +++++
arch/arm64/boot/dts/mediatek/mt6797.dtsi | 193 +++++++++++++++++++++++++++
3 files changed, 230 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6797-evb.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt6797.dtsi
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 9fbfd32..015eb07 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -1,5 +1,6 @@
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
always := $(dtb-y)
diff --git a/arch/arm64/boot/dts/mediatek/mt6797-evb.dts b/arch/arm64/boot/dts/mediatek/mt6797-evb.dts
new file mode 100644
index 0000000..7314a14
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6797-evb.dts
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2016 MediaTek Inc.
+ * Author: Mars.C <mars.cheng@mediatek.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+#include "mt6797.dtsi"
+
+/ {
+ model = "MediaTek MT6797 Evaluation Board";
+ compatible = "mediatek,mt6797-evb", "mediatek,mt6797";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x1e800000>;
+ };
+
+ chosen {};
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt6797.dtsi b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
new file mode 100644
index 0000000..66f6442
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
@@ -0,0 +1,193 @@
+/* Copyright (c) 2016 MediaTek Inc.
+ * Author: Mars.C <mars.cheng@mediatek.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ compatible = "mediatek,mt6797";
+ interrupt-parent = <&sysirq>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ psci {
+ compatible = "arm,psci-0.2";
+ method = "smc";
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x000>;
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x001>;
+ };
+
+ cpu2: cpu@2 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x002>;
+ };
+
+ cpu3: cpu@3 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x003>;
+ };
+
+ cpu4: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x100>;
+ };
+
+ cpu5: cpu@101 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x101>;
+ };
+
+ cpu6: cpu@102 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x102>;
+ };
+
+ cpu7: cpu@103 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ enable-method = "psci";
+ reg = <0x103>;
+ };
+
+ cpu8: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ enable-method = "psci";
+ reg = <0x200>;
+ };
+
+ cpu9: cpu@201 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ enable-method = "psci";
+ reg = <0x201>;
+ };
+ };
+
+ clk26m: oscillator@0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ clock-output-names = "clk26m";
+ };
+
+ clk32k: oscillator@1 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32000>;
+ clock-output-names = "clk32k";
+ };
+
+ uart_clk: dummy26m {
+ compatible = "fixed-clock";
+ clock-frequency = <26000000>;
+ #clock-cells = <0>;
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 13
+ (GIC_CPU_MASK_SIMPLE(10) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14
+ (GIC_CPU_MASK_SIMPLE(10) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11
+ (GIC_CPU_MASK_SIMPLE(10) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10
+ (GIC_CPU_MASK_SIMPLE(10) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+
+ sysirq: intpol-controller@10200620 {
+ compatible = "mediatek,mt6797-sysirq",
+ "mediatek,mt6577-sysirq";
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ #intpol-bases = <2>;
+ interrupt-parent = <&gic>;
+ reg = <0 0x10220620 0 0x20>,
+ <0 0x10220690 0 0x10>;
+ };
+
+ uart0: serial@11002000 {
+ compatible = "mediatek,mt6797-uart",
+ "mediatek,mt6577-uart";
+ reg = <0 0x11002000 0 0x400>;
+ interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&uart_clk>;
+ status = "disabled";
+ };
+
+ uart1: serial@11003000 {
+ compatible = "mediatek,mt6797-uart",
+ "mediatek,mt6577-uart";
+ reg = <0 0x11003000 0 0x400>;
+ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&uart_clk>;
+ status = "disabled";
+ };
+
+ uart2: serial@11004000 {
+ compatible = "mediatek,mt6797-uart",
+ "mediatek,mt6577-uart";
+ reg = <0 0x11004000 0 0x400>;
+ interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&uart_clk>;
+ status = "disabled";
+ };
+
+ uart3: serial@11005000 {
+ compatible = "mediatek,mt6797-uart",
+ "mediatek,mt6577-uart";
+ reg = <0 0x11005000 0 0x400>;
+ interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&uart_clk>;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@19000000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <3>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ reg = <0 0x19000000 0 0x10000>, /* GICD */
+ <0 0x19200000 0 0x200000>, /* GICR */
+ <0 0x10240000 0 0x2000>; /* GICC */
+ };
+
+};
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Date | 2016-09-08 15:20 +0200 |
| Subject | Re: [PATCH 3/4] arm64: dts: mediatek: add mt6797 support |
| Message-ID | <sf7pg-6h3-41@gated-at.bofh.it> |
| In reply to | #1479085 |
On 08/09/16 11:49, Mars Cheng wrote:
> This adds basic chip support for MT6797 SoC.
>
> Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> arch/arm64/boot/dts/mediatek/mt6797-evb.dts | 36 +++++
> arch/arm64/boot/dts/mediatek/mt6797.dtsi | 193 +++++++++++++++++++++++++++
> 3 files changed, 230 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt6797-evb.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt6797.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index 9fbfd32..015eb07 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -1,5 +1,6 @@
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
>
> always := $(dtb-y)
[...]
> diff --git a/arch/arm64/boot/dts/mediatek/mt6797.dtsi b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
> new file mode 100644
> index 0000000..66f6442
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
> @@ -0,0 +1,193 @@
[...]
> + gic: interrupt-controller@19000000 {
> + compatible = "arm,gic-v3";
> + #interrupt-cells = <3>;
> + interrupt-parent = <&gic>;
> + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + reg = <0 0x19000000 0 0x10000>, /* GICD */
> + <0 0x19200000 0 0x200000>, /* GICR */
> + <0 0x10240000 0 0x2000>; /* GICC */
Where are the GICV and GICH regions? No ITS?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
[toc] | [prev] | [next] | [standalone]
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 16:20 +0200 |
| Subject | Re: [PATCH 3/4] arm64: dts: mediatek: add mt6797 support |
| Message-ID | <sf8lj-6Sl-25@gated-at.bofh.it> |
| In reply to | #1479216 |
On Thu, 2016-09-08 at 14:15 +0100, Marc Zyngier wrote:
> On 08/09/16 11:49, Mars Cheng wrote:
> > This adds basic chip support for MT6797 SoC.
> >
> > Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
> > ---
[...]
>
> > + gic: interrupt-controller@19000000 {
> > + compatible = "arm,gic-v3";
> > + #interrupt-cells = <3>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-controller;
> > + reg = <0 0x19000000 0 0x10000>, /* GICD */
> > + <0 0x19200000 0 0x200000>, /* GICR */
> > + <0 0x10240000 0 0x2000>; /* GICC */
>
> Where are the GICV and GICH regions? No ITS?
Have confirmed with our HW guys, there is no GICV, GICH, nor ITS in our
GIC design.
Thanks.
>
> Thanks,
>
> M.
[toc] | [prev] | [next] | [standalone]
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 13:00 +0200 |
| Subject | [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform |
| Message-ID | <sf5dM-4La-37@gated-at.bofh.it> |
| In reply to | #1479082 |
This adds DT binding documentation for Mediatek MT6797.
Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
---
Documentation/devicetree/bindings/arm/mediatek.txt | 4 ++++
.../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,imgsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,infracfg.txt | 1 +
.../bindings/arm/mediatek/mediatek,mmsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,topckgen.txt | 1 +
.../bindings/arm/mediatek/mediatek,vdecsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,vencsys.txt | 3 ++-
.../interrupt-controller/mediatek,sysirq.txt | 4 +++-
.../devicetree/bindings/serial/mtk-uart.txt | 1 +
10 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
index c860b24..2d3344d 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -12,6 +12,7 @@ compatible: Must contain one of
"mediatek,mt6592"
"mediatek,mt6755"
"mediatek,mt6795"
+ "mediatek,mt6797"
"mediatek,mt7623"
"mediatek,mt8127"
"mediatek,mt8135"
@@ -38,6 +39,9 @@ Supported boards:
- Evaluation board for MT6795(Helio X10):
Required root node properties:
- compatible = "mediatek,mt6795-evb", "mediatek,mt6795";
+- Evaluation board for MT6797(Helio X20):
+ Required root node properties:
+ - compatible = "mediatek,mt6797-evb", "mediatek,mt6797";
- Evaluation board for MT7623:
Required root node properties:
- compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
index cb0054a..cd977db 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-apmixedsys"
+ - "mediatek,mt6797-apmixedsys"
- "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
index f6a9166..047b11a 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-imgsys", "syscon"
+ - "mediatek,mt6797-imgsys", "syscon"
- "mediatek,mt8173-imgsys", "syscon"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
index 1620ec2..58d58e2 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -8,6 +8,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-infracfg", "syscon"
+ - "mediatek,mt6797-infracfg", "syscon"
- "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
index 67dd2e4..70529e0 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-mmsys", "syscon"
+ - "mediatek,mt6797-mmsys", "syscon"
- "mediatek,mt8173-mmsys", "syscon"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
index 9f2fe78..ec93ecb 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-topckgen"
+ - "mediatek,mt6797-topckgen"
- "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
index 2440f73..d150104 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-vdecsys", "syscon"
+ - "mediatek,mt6797-vdecsys", "syscon"
- "mediatek,mt8173-vdecsys", "syscon"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
index 5bb2866..8a93be6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
@@ -5,7 +5,8 @@ The Mediatek vencsys controller provides various clocks to the system.
Required Properties:
-- compatible: Should be:
+- compatible: Should be one of:
+ - "mediatek,mt6797-vencsys", "syscon"
- "mediatek,mt8173-vencsys", "syscon"
- #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
index 9d1d72c..3d97eb4 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
@@ -8,6 +8,7 @@ Required properties:
"mediatek,mt8173-sysirq"
"mediatek,mt8135-sysirq"
"mediatek,mt8127-sysirq"
+ "mediatek,mt6797-sysirq"
"mediatek,mt6795-sysirq"
"mediatek,mt6755-sysirq"
"mediatek,mt6592-sysirq"
@@ -21,7 +22,8 @@ Required properties:
- interrupt-parent: phandle of irq parent for sysirq. The parent must
use the same interrupt-cells format as GIC.
- reg: Physical base address of the intpol registers and length of memory
- mapped region.
+ mapped region. Could be up to 2 registers here at max. Ex: 6797 needs 2 reg,
+ others need 1.
Example:
sysirq: interrupt-controller@10200100 {
diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
index 0015c72..a1dbb62 100644
--- a/Documentation/devicetree/bindings/serial/mtk-uart.txt
+++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
@@ -8,6 +8,7 @@ Required properties:
* "mediatek,mt6589-uart" for MT6589 compatible UARTS
* "mediatek,mt6755-uart" for MT6755 compatible UARTS
* "mediatek,mt6795-uart" for MT6795 compatible UARTS
+ * "mediatek,mt6797-uart" for MT6795 compatible UARTS
* "mediatek,mt7623-uart" for MT7623 compatible UARTS
* "mediatek,mt8127-uart" for MT8127 compatible UARTS
* "mediatek,mt8135-uart" for MT8135 compatible UARTS
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Date | 2016-09-08 14:40 +0200 |
| Subject | Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform |
| Message-ID | <sf6My-5OD-29@gated-at.bofh.it> |
| In reply to | #1479091 |
On 08/09/16 11:49, Mars Cheng wrote: > This adds DT binding documentation for Mediatek MT6797. > > Signed-off-by: Mars Cheng <mars.cheng@mediatek.com> > --- > Documentation/devicetree/bindings/arm/mediatek.txt | 4 ++++ > .../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + > .../bindings/arm/mediatek/mediatek,imgsys.txt | 1 + > .../bindings/arm/mediatek/mediatek,infracfg.txt | 1 + > .../bindings/arm/mediatek/mediatek,mmsys.txt | 1 + > .../bindings/arm/mediatek/mediatek,topckgen.txt | 1 + > .../bindings/arm/mediatek/mediatek,vdecsys.txt | 1 + > .../bindings/arm/mediatek/mediatek,vencsys.txt | 3 ++- > .../interrupt-controller/mediatek,sysirq.txt | 4 +++- > .../devicetree/bindings/serial/mtk-uart.txt | 1 + > 10 files changed, 16 insertions(+), 2 deletions(-) [...] > diff --git a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > index 9d1d72c..3d97eb4 100644 > --- a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > +++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > @@ -8,6 +8,7 @@ Required properties: > "mediatek,mt8173-sysirq" > "mediatek,mt8135-sysirq" > "mediatek,mt8127-sysirq" > + "mediatek,mt6797-sysirq" > "mediatek,mt6795-sysirq" > "mediatek,mt6755-sysirq" > "mediatek,mt6592-sysirq" > @@ -21,7 +22,8 @@ Required properties: > - interrupt-parent: phandle of irq parent for sysirq. The parent must > use the same interrupt-cells format as GIC. > - reg: Physical base address of the intpol registers and length of memory > - mapped region. > + mapped region. Could be up to 2 registers here at max. Ex: 6797 needs 2 reg, > + others need 1. Two things: - Please make this a separate patch that can be reviewed independently of the rest of the changes, which are just adding new compatible identifiers. - Why can't you simply expose it as a separate controller? Looking at the way you're changing the corresponding driver, it looks like you're simply adding an extra base/size. If you simply had a base for the corresponding GIC interrupts, you could handle as many region as you want, and have a more generic driver. Thanks, M. -- Jazz is not dead. It just smells funny...
[toc] | [prev] | [next] | [standalone]
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Date | 2016-09-08 16:10 +0200 |
| Subject | Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform |
| Message-ID | <sf8bD-6MK-7@gated-at.bofh.it> |
| In reply to | #1479173 |
Hi Marc Thanks for your review. the response inlined. On Thu, 2016-09-08 at 13:37 +0100, Marc Zyngier wrote: > On 08/09/16 11:49, Mars Cheng wrote: > > This adds DT binding documentation for Mediatek MT6797. > > > > Signed-off-by: Mars Cheng <mars.cheng@mediatek.com> > > --- [...] > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > > index 9d1d72c..3d97eb4 100644 > > --- a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > > +++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt > > @@ -8,6 +8,7 @@ Required properties: > > "mediatek,mt8173-sysirq" > > "mediatek,mt8135-sysirq" > > "mediatek,mt8127-sysirq" > > + "mediatek,mt6797-sysirq" > > "mediatek,mt6795-sysirq" > > "mediatek,mt6755-sysirq" > > "mediatek,mt6592-sysirq" > > @@ -21,7 +22,8 @@ Required properties: > > - interrupt-parent: phandle of irq parent for sysirq. The parent must > > use the same interrupt-cells format as GIC. > > - reg: Physical base address of the intpol registers and length of memory > > - mapped region. > > + mapped region. Could be up to 2 registers here at max. Ex: 6797 needs 2 reg, > > + others need 1. > > Two things: > > - Please make this a separate patch that can be reviewed independently > of the rest of the changes, which are just adding new compatible > identifiers. Will fix this in the next patch set. > > - Why can't you simply expose it as a separate controller? Looking at > the way you're changing the corresponding driver, it looks like you're > simply adding an extra base/size. If you simply had a base for the > corresponding GIC interrupts, you could handle as many region as you > want, and have a more generic driver. > May I know the meaning of "simply expose it as a separate controller"? Or you might like to suggest me any similar driver as a reference? I will examine it. Current design is based on the fact: We expect irq-mtk-sysirq needs the optional second base but the third one will not happen. If we really need more than 2 bases, we can figure out a more generic driver at the time, right? Thanks. > Thanks, > > M.
[toc] | [prev] | [next] | [standalone]
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Date | 2016-09-08 16:40 +0200 |
| Subject | Re: [PATCH 1/4] Document: DT: Add bindings for mediatek MT6797 SoC Platform |
| Message-ID | <sf8EF-6YA-1@gated-at.bofh.it> |
| In reply to | #1479257 |
On 08/09/16 15:08, Mars Cheng wrote:
> Hi Marc
>
> Thanks for your review. the response inlined.
>
> On Thu, 2016-09-08 at 13:37 +0100, Marc Zyngier wrote:
>> On 08/09/16 11:49, Mars Cheng wrote:
>>> This adds DT binding documentation for Mediatek MT6797.
>>>
>>> Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
>>> ---
> [...]
>>
>>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
>>> index 9d1d72c..3d97eb4 100644
>>> --- a/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
>>> +++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
>>> @@ -8,6 +8,7 @@ Required properties:
>>> "mediatek,mt8173-sysirq"
>>> "mediatek,mt8135-sysirq"
>>> "mediatek,mt8127-sysirq"
>>> + "mediatek,mt6797-sysirq"
>>> "mediatek,mt6795-sysirq"
>>> "mediatek,mt6755-sysirq"
>>> "mediatek,mt6592-sysirq"
>>> @@ -21,7 +22,8 @@ Required properties:
>>> - interrupt-parent: phandle of irq parent for sysirq. The parent must
>>> use the same interrupt-cells format as GIC.
>>> - reg: Physical base address of the intpol registers and length of memory
>>> - mapped region.
>>> + mapped region. Could be up to 2 registers here at max. Ex: 6797 needs 2 reg,
>>> + others need 1.
>>
>> Two things:
>>
>> - Please make this a separate patch that can be reviewed independently
>> of the rest of the changes, which are just adding new compatible
>> identifiers.
>
> Will fix this in the next patch set.
>
>>
>> - Why can't you simply expose it as a separate controller? Looking at
>> the way you're changing the corresponding driver, it looks like you're
>> simply adding an extra base/size. If you simply had a base for the
>> corresponding GIC interrupts, you could handle as many region as you
>> want, and have a more generic driver.
>>
>
> May I know the meaning of "simply expose it as a separate controller"?
At the moment, you have something like this:
sysirq: intpol-controller@10200620 {
compatible = "mediatek,mt6755-sysirq",
"mediatek,mt6577-sysirq";
interrupt-controller;
#interrupt-cells = <3>;
interrupt-parent = <&gic>;
reg = <0 0x10200620 0 0x20>;
};
I suggest that, when you have a second base (which is effectively
another controller), you add:
sysirq2: intpol-controller@10201620 {
compatible = "mediatek,mt6755-sysirq",
"mediatek,mt6577-sysirq";
interrupt-controller;
#interrupt-cells = <3>;
interrupt-parent = <&gic>;
irq-base = <32>;
reg = <0 0x10201620 0 0x20>;
};
Where irq-base is the first SPI this is connected to (the lack of
property indicates implies that irq-base is 0). This becomes a very
simple change in the driver.
> Or you might like to suggest me any similar driver as a reference? I
> will examine it. Current design is based on the fact: We expect
> irq-mtk-sysirq needs the optional second base but the third one will not
> happen.
>
> If we really need more than 2 bases, we can figure out a more generic
> driver at the time, right?
I'd rather fix the driver and the binding to do the right thing once and
for all. In my experience, you will need to add a third base in six
months, and a fourth soon after. I'd rather either support an arbitrary
number of bases, or a single one per controller (and have multiple
controllers).
Thanks,
M.
--
Jazz is not dead. It just smells funny...
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web