Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1618572 > unrolled thread

[PATCH v4 0/3] Add Mediatek CIRQ interrupt controller

Started byYoulin Pei <youlin.pei@mediatek.com>
First post2017-04-07 10:20 +0200
Last post2017-04-07 12:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/3] Add Mediatek CIRQ interrupt controller Youlin Pei <youlin.pei@mediatek.com> - 2017-04-07 10:20 +0200
    [PATCH v4 1/3] binding: irqchip: mtk-cirq: Add binding document Youlin Pei <youlin.pei@mediatek.com> - 2017-04-07 10:20 +0200
    Re: [PATCH v4 0/3] Add Mediatek CIRQ interrupt controller Marc Zyngier <marc.zyngier@arm.com> - 2017-04-07 11:00 +0200
      Re: [PATCH v4 0/3] Add Mediatek CIRQ interrupt controller Youlin Pei <youlin.pei@mediatek.com> - 2017-04-07 12:00 +0200

#1618572 — [PATCH v4 0/3] Add Mediatek CIRQ interrupt controller

FromYoulin Pei <youlin.pei@mediatek.com>
Date2017-04-07 10:20 +0200
Subject[PATCH v4 0/3] Add Mediatek CIRQ interrupt controller
Message-ID<ttxhD-4AV-5@gated-at.bofh.it>
In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to
works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC.

The CIRQ controller is integrated in between MCUSYS and interrupt sources
as the second level interrupt controller. The external interrupts which 
outside MCUSYS will feed through CIRQ then bypass to GIC.

In normal mode(where MCUSYS is active), CIRQ is disabled and interrupts
will directly issue to MCUSYS. When MCUSYS enters sleep mode, where GIC
is power downed. CIRQ will be enabled and monitor all edge trigger
interrupts(only edge trigger interrupts will be lost in this scenario).
When an edge interrupt is triggered, CIRQ will record the status and
generated a pulse signal to GIC when flush command is executed. 

With CIRQ, MCUSYS can be completely turned off to improve the system 
power consumption without losing interrupts.

change in v4:
1. add some comment to explain CIRQ suspend callback.
2. rebase on 4.11

change in v3:
1. add an explicit cirq range in DT and do the range check in driver.
2. change the option "mediatek,ext-irq-start" to s"mediatek,ext-irq-range".
3. remove mtk_cirq_eoi and clear the irq status in suspend callback.
4. remove some pure copy code.
5. rebase on 4.10-rc2.

change in v2:
1. fix coding style issue.
2. change the compatible string.
3. resolve IRQ offset at alloc time.
4. clear irq status in irq_eoi function.
5. rebase on 4.9-rc1.

v1:
http://lists.infradead.org/pipermail/linux-mediatek/2016-October/007213.html
v2:
http://lists.infradead.org/pipermail/linux-mediatek/2016-November/007350.html
v3:
http://lists.infradead.org/pipermail/linux-mediatek/2017-February/008134.html

Youlin Pei (3):
  binding: irqchip: mtk-cirq: Add binding document
  irqchip: mtk-cirq: Add mediatek mtk-cirq implement
  ARM: dts: mt2701: Add mtk-cirq node for mt2701 

[toc] | [next] | [standalone]


#1618578 — [PATCH v4 1/3] binding: irqchip: mtk-cirq: Add binding document

FromYoulin Pei <youlin.pei@mediatek.com>
Date2017-04-07 10:20 +0200
Subject[PATCH v4 1/3] binding: irqchip: mtk-cirq: Add binding document
Message-ID<ttxhF-4AV-43@gated-at.bofh.it>
In reply to#1618572
This commit adds the device tree binding document for
the mediatek cirq.

Signed-off-by: Youlin Pei <youlin.pei@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../interrupt-controller/mediatek,cirq.txt         |   35 ++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mediatek,cirq.txt

diff --git a/Documentation/devicetree/bindings/interrupt-controller/mediatek,cirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,cirq.txt
new file mode 100644
index 0000000..a7efdbc
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,cirq.txt
@@ -0,0 +1,35 @@
+* Mediatek 27xx cirq
+
+In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to
+work outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC.
+The external interrupts (outside MCUSYS) will feed through CIRQ and connect
+to GIC in MCUSYS. When CIRQ is enabled, it will record the edge-sensitive
+interrupts and generate a pulse signal to parent interrupt controller when
+flush command is executed. With CIRQ, MCUSYS can be completely turned off
+to improve the system power consumption without losing interrupts.
+
+Required properties:
+- compatible: should be one of
+  - "mediatek,mt2701-cirq" for mt2701 CIRQ
+  - "mediatek,mt8135-cirq" for mt8135 CIRQ
+  - "mediatek,mt8173-cirq" for mt8173 CIRQ
+  and "mediatek,cirq" as a fallback.
+- interrupt-controller : Identifies the node as an interrupt controller.
+- #interrupt-cells : Use the same format as specified by GIC in arm,gic.txt.
+- interrupt-parent: phandle of irq parent for cirq. The parent must
+  use the same interrupt-cells format as GIC.
+- reg: Physical base address of the cirq registers and length of memory
+  mapped region.
+- mediatek,ext-irq-range: Identifies external irq number range in different
+  SOCs.
+
+Example:
+	cirq: interrupt-controller@10204000 {
+		compatible = "mediatek,mt2701-cirq",
+			     "mediatek,mtk-cirq";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		interrupt-parent = <&sysirq>;
+		reg = <0 0x10204000 0 0x400>;
+		mediatek,ext-irq-start = <32 200>;
+	};
-- 
1.7.9.5

[toc] | [prev] | [next] | [standalone]


#1618610

FromMarc Zyngier <marc.zyngier@arm.com>
Date2017-04-07 11:00 +0200
Message-ID<ttxUl-4RH-13@gated-at.bofh.it>
In reply to#1618572
On 07/04/17 09:06, Youlin Pei wrote:
> In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to
> works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC.
> 
> The CIRQ controller is integrated in between MCUSYS and interrupt sources
> as the second level interrupt controller. The external interrupts which 
> outside MCUSYS will feed through CIRQ then bypass to GIC.
> 
> In normal mode(where MCUSYS is active), CIRQ is disabled and interrupts
> will directly issue to MCUSYS. When MCUSYS enters sleep mode, where GIC
> is power downed. CIRQ will be enabled and monitor all edge trigger
> interrupts(only edge trigger interrupts will be lost in this scenario).
> When an edge interrupt is triggered, CIRQ will record the status and
> generated a pulse signal to GIC when flush command is executed. 
> 
> With CIRQ, MCUSYS can be completely turned off to improve the system 
> power consumption without losing interrupts.
> 
> change in v4:
> 1. add some comment to explain CIRQ suspend callback.
> 2. rebase on 4.11

Hi Youlin,

I'm happy to take the first two patches through the irq tree. How do we
deal with the third one? It seems to me that it'd be better routed via
armsoc.

Let me know what you and Matthias want to do.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

[toc] | [prev] | [next] | [standalone]


#1618643

FromYoulin Pei <youlin.pei@mediatek.com>
Date2017-04-07 12:00 +0200
Message-ID<ttyQq-5pF-5@gated-at.bofh.it>
In reply to#1618610
On Fri, 2017-04-07 at 09:52 +0100, Marc Zyngier wrote:
> On 07/04/17 09:06, Youlin Pei wrote:
> > In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to
> > works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC.
> > 
> > The CIRQ controller is integrated in between MCUSYS and interrupt sources
> > as the second level interrupt controller. The external interrupts which 
> > outside MCUSYS will feed through CIRQ then bypass to GIC.
> > 
> > In normal mode(where MCUSYS is active), CIRQ is disabled and interrupts
> > will directly issue to MCUSYS. When MCUSYS enters sleep mode, where GIC
> > is power downed. CIRQ will be enabled and monitor all edge trigger
> > interrupts(only edge trigger interrupts will be lost in this scenario).
> > When an edge interrupt is triggered, CIRQ will record the status and
> > generated a pulse signal to GIC when flush command is executed. 
> > 
> > With CIRQ, MCUSYS can be completely turned off to improve the system 
> > power consumption without losing interrupts.
> > 
> > change in v4:
> > 1. add some comment to explain CIRQ suspend callback.
> > 2. rebase on 4.11
> 
> Hi Youlin,
> 
> I'm happy to take the first two patches through the irq tree. How do we
> deal with the third one? It seems to me that it'd be better routed via
> armsoc.
> 
> Let me know what you and Matthias want to do.

Hi Marc,

Thanks for your review. I think that driver and dtsi can merged
separately.

Hi Matthias,
Could you help to review the dtsi patch?
Thanks a lot!

> 
> Thanks,
> 
> 	M.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web