Skip to contentSkip to conversation

arm64: r8a7795 INTC-EX support using RENESAS_IRQC

PATCH New Magnus Damm 1 participant 3 messages Feb 16, 2016

Subsystems (3)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

cover arm64: r8a7795 INTC-EX support using RENESAS_IRQC

arm64: r8a7795 INTC-EX support using RENESAS_IRQC

[PATCH 01/02] arm64: dts: r8a7795: Add INTC-EX device node [PATCH 02/02] arm64: renesas: Enable RENESAS_IRQC

These two patches add the INTC-EX device node to the r8a7795 DTSI file and selects RENESAS_IRQC to enable the irqchip driver. Those two together allow r8a7795 based platforms to use external interrupt pins IRQ0 -> IRQ5.

The patches in this series can be merged independently in any order, but for complete run time support the following two patches are also required:

[PATCH] pinctrl: sh-pfc: r8a7795: Add support for INTC-EX IRQ pins [PATCH] clk: shmobile: r8a7795: Add INTC-EX clock

The DT compat string "renesas,intc-ex-r8a7795" is already included in Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt

Tested on r8a7795 Salvator-X by toggling IRQ2 using an external GPIO connected via a loop back adapter on EXIO_D.

---

Developed on top of renesas-drivers-2016-02-09-v4.5-rc3

 arch/arm64/Kconfig.platforms             |    1 +
 arch/arm64/boot/dts/renesas/r8a7795.dtsi |   15 +++++++++++++++
 2 files changed, 16 insertions(+)
author maintainer
#1 lore raw

PATCH 1/2 arm64: dts: r8a7795: Add INTC-EX device node

From: Magnus Damm <[email protected]>

Add a single r8a7795 INTC-EX device node to support external IRQ pins IRQ0 -> IRQ5.

---

 arch/arm64/boot/dts/renesas/r8a7795.dtsi |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +15 -0
@@ -357,6 +357,21 @@
 			reg = <0 0xe6060000 0 0x50c>;
 		};
 
+		intc_ex: interrupt-controller@e61c0000 {
+			compatible = "renesas,intc-ex-r8a7795", "renesas,irqc";
+			#interrupt-cells = <2>;
+			interrupt-controller;
+			reg = <0 0xe61c0000 0 0x200>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 407>;
+			power-domains = <&cpg>;
+		};
+
 		dmac0: dma-controller@e6700000 {
 			compatible = "renesas,dmac-r8a7795",
 				     "renesas,rcar-dmac";
author maintainer
#2 lore raw

PATCH 2/2 arm64: renesas: Enable RENESAS_IRQC

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Select RENESAS_IRQC for Arm64 SoCs from Renesas to enable build of drivers/irqchip/irq-renesas-irqc.c.

---

 arch/arm64/Kconfig.platforms |    1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
@@ -77,6 +77,7 @@ config ARCH_RENESAS
 	select ARCH_SHMOBILE
 	select PINCTRL
 	select PM_GENERIC_DOMAINS if PM
+	select RENESAS_IRQC
 	help
 	  This enables support for the ARMv8 based Renesas SoCs.