Skip to contentSkip to conversation

ARM: mstar: wire up interrupt controllers

PATCH Superseded Daniel Palmer 2 participants 6 messages Sep 18, 2020

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: mstar: wire up interrupt controllers

Mark-PK Tsai's driver for the MStar interrupt controller should be going into 5.10[0].

This small series selects the driver when building support for MStar/SigmaStar Arm v7 SoCs, adds the instances of it to the base dtsi and wires up the interrupt for pm_uart.

0 - https://lore.kernel.org/linux-arm-kernel/[email protected]/

Daniel Palmer (3):
ARM: mstar: Select MStar intc
ARM: mstar: Add interrupt controller to base dtsi
ARM: mstar: Add interrupt to pm_uart

 arch/arm/boot/dts/mstar-v7.dtsi | 20 ++++++++++++++++++++
 arch/arm/mach-mstar/Kconfig     |  1 +
 2 files changed, 21 insertions(+)
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/3 ARM: mstar: Select MStar intc

MediaTek recently introduced support for the MStar interrupt controller that is also present in some of their chips as well as the MStar/Sigmastar chips.

Almost all of the peripheral interrupts go through an instance of this controller in MStar/SigmaStar Arm v7 chips so we want to select it if CONFIG_ARCH_MSTARV7 is selected.

---
 arch/arm/mach-mstar/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-mstar/Kconfig +1 -0
index 52744fe32368..576d1ab293c8 100644
@@ -3,6 +3,7 @@ menuconfig ARCH_MSTARV7
 	depends on ARCH_MULTI_V7
 	select ARM_GIC
 	select ARM_HEAVY_MB
+	select MST_IRQ
 	help
 	  Support for newer MStar/Sigmastar SoC families that are
 	  based on Armv7 cores like the Cortex A7 and share the same
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/3 ARM: mstar: Add interrupt controller to base dtsi

In reply to Daniel Palmer

Add the IRQ and FIQ intc instances to the base MStar/SigmaStar v7 dtsi. All of the known SoCs have both and at the same place with their common IPs using the same interrupt lines.

---
 arch/arm/boot/dts/mstar-v7.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/mstar-v7.dtsi +19 -0
index 3b7b9b793736..aec841b52ca4 100644
@@ -85,6 +85,25 @@ reboot {
 				mask = <0x79>;
 			};
 
+			intc_fiq: interrupt-controller@201310 {
+				compatible = "mstar,mst-intc";
+				reg = <0x201310 0x40>;
+				#interrupt-cells = <3>;
+				interrupt-controller;
+				interrupt-parent = <&gic>;
+				mstar,irqs-map-range = <96 127>;
+			};
+
+			intc_irq: interrupt-controller@201350 {
+				compatible = "mstar,mst-intc";
+				reg = <0x201350 0x40>;
+				#interrupt-cells = <3>;
+				interrupt-controller;
+				interrupt-parent = <&gic>;
+				mstar,irqs-map-range = <32 95>;
+				mstar,intc-no-eoi;
+			};
+
 			l3bridge: l3bridge@204400 {
 				compatible = "mstar,l3bridge";
 				reg = <0x204400 0x200>;
Signature · 1 line
2.27.0
#3 lore raw

PATCH 3/3 ARM: mstar: Add interrupt to pm_uart

In reply to Daniel Palmer

Since we now have support for the interrupt controller pm_uart's interrupt is routed through it make sense to wire up it's interrupt in the device tree.

The interrupt is the same for all known chips so it goes in the base dtsi.

---
 arch/arm/boot/dts/mstar-v7.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/mstar-v7.dtsi +1 -0
index aec841b52ca4..f07880561e11 100644
@@ -113,6 +113,7 @@ pm_uart: uart@221000 {
 				compatible = "ns16550a";
 				reg = <0x221000 0x100>;
 				reg-shift = <3>;
+				interrupts-extended = <&intc_irq GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
 				clock-frequency = <172000000>;
 				status = "disabled";
 			};
Signature · 1 line
2.27.0
Acked-by on the v1 series
#4 lore raw
In reply to Daniel Palmer
Quoted 10 lines · Daniel Palmer

Mark-PK Tsai's driver for the MStar interrupt controller should be going into 5.10[0].

This small series selects the driver when building support for MStar/SigmaStar Arm v7 SoCs, adds the instances of it to the base dtsi and wires up the interrupt for pm_uart.

0 - https://lore.kernel.org/linux-arm-kernel/[email protected]/

Whole series,

Please send these to [email protected] for inclusion.

On a different note: I realized too late that the dts files should have been named more consistently when we originally merged them. Can you also add patches to rename the infinity and mercury files to start with "mstar-"?

Arnd

#5 lore raw

Hi Arnd,

Quoted 1 line · Arnd Bergmann

Thanks,

Quoted 1 line

Please send these to [email protected] for inclusion.

Ok will do.

Quoted 4 lines

On a different note: I realized too late that the dts files should have been named more consistently when we originally merged them. Can you also add patches to rename the infinity and mercury files to start with "mstar-"?

That makes sense. I will add an extra patch to the series when I send the v2.

Thanks,

Daniel