public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: mstar: wire up interrupt controllers
@ 2020-09-18 10:49 Daniel Palmer
  2020-09-18 10:49 ` [PATCH 1/3] ARM: mstar: Select MStar intc Daniel Palmer
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Daniel Palmer @ 2020-09-18 10:49 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, mark-pk.tsai, arnd, maz, linux-kernel, 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/87lfhdr7l6.wl-maz@kernel.org/

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(+)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] ARM: mstar: Select MStar intc
  2020-09-18 10:49 [PATCH 0/3] ARM: mstar: wire up interrupt controllers Daniel Palmer
@ 2020-09-18 10:49 ` Daniel Palmer
  2020-09-18 10:49 ` [PATCH 2/3] ARM: mstar: Add interrupt controller to base dtsi Daniel Palmer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Daniel Palmer @ 2020-09-18 10:49 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, mark-pk.tsai, arnd, maz, linux-kernel, Daniel Palmer

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.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/mach-mstar/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-mstar/Kconfig b/arch/arm/mach-mstar/Kconfig
index 52744fe32368..576d1ab293c8 100644
--- a/arch/arm/mach-mstar/Kconfig
+++ b/arch/arm/mach-mstar/Kconfig
@@ -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
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: mstar: Add interrupt controller to base dtsi
  2020-09-18 10:49 [PATCH 0/3] ARM: mstar: wire up interrupt controllers Daniel Palmer
  2020-09-18 10:49 ` [PATCH 1/3] ARM: mstar: Select MStar intc Daniel Palmer
@ 2020-09-18 10:49 ` Daniel Palmer
  2020-09-18 10:49 ` [PATCH 3/3] ARM: mstar: Add interrupt to pm_uart Daniel Palmer
  2020-09-18 11:34 ` [PATCH 0/3] ARM: mstar: wire up interrupt controllers Arnd Bergmann
  3 siblings, 0 replies; 6+ messages in thread
From: Daniel Palmer @ 2020-09-18 10:49 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, mark-pk.tsai, arnd, maz, linux-kernel, 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.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index 3b7b9b793736..aec841b52ca4 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -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>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] ARM: mstar: Add interrupt to pm_uart
  2020-09-18 10:49 [PATCH 0/3] ARM: mstar: wire up interrupt controllers Daniel Palmer
  2020-09-18 10:49 ` [PATCH 1/3] ARM: mstar: Select MStar intc Daniel Palmer
  2020-09-18 10:49 ` [PATCH 2/3] ARM: mstar: Add interrupt controller to base dtsi Daniel Palmer
@ 2020-09-18 10:49 ` Daniel Palmer
  2020-09-18 11:34 ` [PATCH 0/3] ARM: mstar: wire up interrupt controllers Arnd Bergmann
  3 siblings, 0 replies; 6+ messages in thread
From: Daniel Palmer @ 2020-09-18 10:49 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, mark-pk.tsai, arnd, maz, linux-kernel, 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.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index aec841b52ca4..f07880561e11 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -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";
 			};
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] ARM: mstar: wire up interrupt controllers
  2020-09-18 10:49 [PATCH 0/3] ARM: mstar: wire up interrupt controllers Daniel Palmer
                   ` (2 preceding siblings ...)
  2020-09-18 10:49 ` [PATCH 3/3] ARM: mstar: Add interrupt to pm_uart Daniel Palmer
@ 2020-09-18 11:34 ` Arnd Bergmann
  2020-09-18 11:43   ` Daniel Palmer
  3 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2020-09-18 11:34 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Linux ARM, DTML, mark-pk.tsai, Marc Zyngier,
	linux-kernel@vger.kernel.org

On Fri, Sep 18, 2020 at 12:49 PM Daniel Palmer <daniel@0x0f.com> wrote:
>
> 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/87lfhdr7l6.wl-maz@kernel.org/

Whole series,

Acked-by: Arnd Bergmann <arnd@arndb.de>

Please send these to soc@kernel.org 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] ARM: mstar: wire up interrupt controllers
  2020-09-18 11:34 ` [PATCH 0/3] ARM: mstar: wire up interrupt controllers Arnd Bergmann
@ 2020-09-18 11:43   ` Daniel Palmer
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Palmer @ 2020-09-18 11:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux ARM, DTML, Mark-PK Tsai, Marc Zyngier,
	linux-kernel@vger.kernel.org

Hi Arnd,

On Fri, 18 Sep 2020 at 20:34, Arnd Bergmann <arnd@arndb.de> wrote:
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Thanks,

> Please send these to soc@kernel.org for inclusion.

Ok will do.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-18 11:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-18 10:49 [PATCH 0/3] ARM: mstar: wire up interrupt controllers Daniel Palmer
2020-09-18 10:49 ` [PATCH 1/3] ARM: mstar: Select MStar intc Daniel Palmer
2020-09-18 10:49 ` [PATCH 2/3] ARM: mstar: Add interrupt controller to base dtsi Daniel Palmer
2020-09-18 10:49 ` [PATCH 3/3] ARM: mstar: Add interrupt to pm_uart Daniel Palmer
2020-09-18 11:34 ` [PATCH 0/3] ARM: mstar: wire up interrupt controllers Arnd Bergmann
2020-09-18 11:43   ` Daniel Palmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox