Devicetree
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun8i: a33: Add the Cortex-A7 PMU
@ 2026-12-01  2:57 Tim Douglas
  2026-12-01  5:22 ` Jernej Škrabec
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Douglas @ 2026-12-01  2:57 UTC (permalink / raw)
  To: wens, jernej.skrabec, samuel
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-sunxi, Tim Douglas

Add the Cortex-A7 PMU with one interrupt per core, GIC SPI 120-123.
These match the arm-pmu IRQ resource (152-155) in the vendor 3.4 kernel
and the PMU node in sun8i-h3.dtsi.

Tested on a Miyoo A30 (R16) with perf stat.

Signed-off-by: Tim Douglas <me@timdoug.com>
---
 arch/arm/boot/dts/allwinner/sun8i-a33.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
index 36b2d78cd..7348fb110 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
@@ -180,6 +180,15 @@ opp-384000000 {
 		};
 	};
 
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+	};
+
 	sound: sound {
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "sun8i-a33-audio";

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
-- 
2.56.1


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

* Re: [PATCH] ARM: dts: sun8i: a33: Add the Cortex-A7 PMU
  2026-12-01  2:57 [PATCH] ARM: dts: sun8i: a33: Add the Cortex-A7 PMU Tim Douglas
@ 2026-12-01  5:22 ` Jernej Škrabec
  2026-12-02  0:07   ` Andre Przywara
  0 siblings, 1 reply; 3+ messages in thread
From: Jernej Škrabec @ 2026-12-01  5:22 UTC (permalink / raw)
  To: wens, samuel, Tim Douglas
  Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
	linux-sunxi, Tim Douglas

Dne torek, 1. december 2026 ob 03:57:41 Srednjeevropski standardni čas je Tim Douglas napisal(a):
> Add the Cortex-A7 PMU with one interrupt per core, GIC SPI 120-123.
> These match the arm-pmu IRQ resource (152-155) in the vendor 3.4 kernel
> and the PMU node in sun8i-h3.dtsi.

This also matches the A33 user manual, which lists PMU0-3 interrupts
at 152-155.

> 
> Tested on a Miyoo A30 (R16) with perf stat.
> 
> Signed-off-by: Tim Douglas <me@timdoug.com>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  arch/arm/boot/dts/allwinner/sun8i-a33.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> index 36b2d78cd..7348fb110 100644
> --- a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> +++ b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> @@ -180,6 +180,15 @@ opp-384000000 {
>  		};
>  	};
>  
> +	pmu {
> +		compatible = "arm,cortex-a7-pmu";
> +		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
> +		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
> +	};
> +
>  	sound: sound {
>  		compatible = "simple-audio-card";
>  		simple-audio-card,name = "sun8i-a33-audio";
> 
> base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
> 





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

* Re: [PATCH] ARM: dts: sun8i: a33: Add the Cortex-A7 PMU
  2026-12-01  5:22 ` Jernej Škrabec
@ 2026-12-02  0:07   ` Andre Przywara
  0 siblings, 0 replies; 3+ messages in thread
From: Andre Przywara @ 2026-12-02  0:07 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: wens, samuel, Tim Douglas, robh, krzk+dt, conor+dt, devicetree,
	linux-arm-kernel, linux-sunxi

On Tue, 01 Dec 2026 06:22:28 +0100
Jernej Škrabec <jernej.skrabec@gmail.com> wrote:

Hi,

> Dne torek, 1. december 2026 ob 03:57:41 Srednjeevropski standardni čas je Tim Douglas napisal(a):
> > Add the Cortex-A7 PMU with one interrupt per core, GIC SPI 120-123.
> > These match the arm-pmu IRQ resource (152-155) in the vendor 3.4 kernel
> > and the PMU node in sun8i-h3.dtsi.
> 
> This also matches the A33 user manual, which lists PMU0-3 interrupts
> at 152-155.

Since the manual was wrong before (A64), I briefly tested this for core
0 on U-Boot: a PMU overflow indeed triggers GIC IRQ 152 (SPI 120). So:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

> > 
> > Tested on a Miyoo A30 (R16) with perf stat.

Please note that "perf stat" does not use any interrupts, it would work
with the wrong IRQs as well (we have been there). "perf record" or
"perf top" use interrupts, on the other hand. Also please check
/proc/interrupts to see the counters increase (or not) when perf is
used.

Cheers,
Andre

> > 
> > Signed-off-by: Tim Douglas <me@timdoug.com>
> 
> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> 
> Best regards,
> Jernej
> 
> > ---
> >  arch/arm/boot/dts/allwinner/sun8i-a33.dtsi | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> > index 36b2d78cd..7348fb110 100644
> > --- a/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> > +++ b/arch/arm/boot/dts/allwinner/sun8i-a33.dtsi
> > @@ -180,6 +180,15 @@ opp-384000000 {
> >  		};
> >  	};
> >  
> > +	pmu {
> > +		compatible = "arm,cortex-a7-pmu";
> > +		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
> > +			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
> > +			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
> > +			     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
> > +		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
> > +	};
> > +
> >  	sound: sound {
> >  		compatible = "simple-audio-card";
> >  		simple-audio-card,name = "sun8i-a33-audio";
> > 
> > base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
> > 
> 
> 
> 
> 
> 


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

end of thread, other threads:[~2026-12-02  0:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  2:57 [PATCH] ARM: dts: sun8i: a33: Add the Cortex-A7 PMU Tim Douglas
2026-12-01  5:22 ` Jernej Škrabec
2026-12-02  0:07   ` Andre Przywara

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