2020-09-18 10:51:12

by Daniel Palmer

[permalink] [raw]
Subject: [PATCH 0/3] 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(+)

--
2.27.0


2020-09-18 10:51:16

by Daniel Palmer

[permalink] [raw]
Subject: [PATCH 2/3] ARM: mstar: Add interrupt controller to base dtsi

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 <[email protected]>
---
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

2020-09-18 10:51:31

by Daniel Palmer

[permalink] [raw]
Subject: [PATCH 3/3] ARM: mstar: Add interrupt to pm_uart

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 <[email protected]>
---
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

2020-09-18 10:51:49

by Daniel Palmer

[permalink] [raw]
Subject: [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.

Signed-off-by: Daniel Palmer <[email protected]>
---
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

2020-09-18 11:37:12

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: mstar: wire up interrupt controllers

On Fri, Sep 18, 2020 at 12:49 PM Daniel Palmer <[email protected]> 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/[email protected]/

Whole series,

Acked-by: Arnd Bergmann <[email protected]>

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

2020-09-18 11:46:50

by Daniel Palmer

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: mstar: wire up interrupt controllers

Hi Arnd,

On Fri, 18 Sep 2020 at 20:34, Arnd Bergmann <[email protected]> wrote:
> Acked-by: Arnd Bergmann <[email protected]>

Thanks,

> Please send these to [email protected] 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