Skip to contentSkip to conversation

ARM: dts: microchip: sama7d65: add Cortex-A7 PMU node

PATCH Superseded Mihai Sain 2 participants 2 messages Jan 26 – Mar 23

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Mihai Sain

author
#0 lore raw

PATCH 1/1 ARM: dts: microchip: sama7d65: add Cortex-A7 PMU node

Add the Performance Monitoring Unit (PMU) node with the appropriate compatible string, interrupt line, and affinity so that perf and other PMU‑based tooling can function correctly on this SoC.

[root@SAMA7D65 ~]$ dmesg | grep -i pmu

[    1.487869] hw-perfevents: enabled with armv7_cortex_a7 PMU driver, 5 (8000000f) counters available

[root@SAMA7D65 ~]$ perf list hw
List of pre-defined events (to be used in -e or -M):

branch-instructions OR branches                    [Hardware event]
branch-misses                                      [Hardware event]
bus-cycles                                         [Hardware event]
cache-misses                                       [Hardware event]
cache-references                                   [Hardware event]
cpu-cycles OR cycles                               [Hardware event]
instructions                                       [Hardware event]
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/microchip/sama7d65.dtsi +6 -0
index 868045c650a7..1e1ca4f93969 100644
@@ -45,6 +45,12 @@ L2: l2-cache {
 		};
 	};
 
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>;
+	};
+
 	clocks {
 		main_xtal: clock-mainxtal {
 			compatible = "fixed-clock";

base-commit: 63804fed149a6750ffd28610c5c1c98cce6bd377

Signature · 1 line
2.52.0
maintainer
#1 lore raw

Hi, Mihai,

Quoted 28 lines · Mihai Sain

Add the Performance Monitoring Unit (PMU) node with the appropriate compatible string, interrupt line, and affinity so that perf and other PMU‑based tooling can function correctly on this SoC.

[root@SAMA7D65 ~]$ dmesg | grep -i pmu

[    1.487869] hw-perfevents: enabled with armv7_cortex_a7 PMU driver, 5 (8000000f) counters available

[root@SAMA7D65 ~]$ perf list hw
List of pre-defined events (to be used in -e or -M):

branch-instructions OR branches                    [Hardware event]
branch-misses                                      [Hardware event]
bus-cycles                                         [Hardware event]
cache-misses                                       [Hardware event]
cache-references                                   [Hardware event]
cpu-cycles OR cycles                               [Hardware event]
instructions                                       [Hardware event]
---
  arch/arm/boot/dts/microchip/sama7d65.dtsi | 6 ++++++
  1 file changed, 6 insertions(+)
arch/arm/boot/dts/microchip/sama7d65.dtsi +0 -0
index 868045c650a7..1e1ca4f93969 100644

arch/arm/boot/dts/microchip/sama7d65.dtsi L2: l2-cache { · line 51

Quoted 7 lines
arch/arm/boot/dts/microchip/sama7d65.dtsi +4 -0
@@ -45,6 +45,12 @@ L2: l2-cache {
  		};
  	};
 
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>;

According to the documentation [1] interrupt-affinity is not needed here. Could you please check?

[1] https://elixir.bootlin.com/linux/v7.0-rc4/source/Documentation/devicetree/bindings/arm/pmu.yaml#L107

Thank you,
Claudiu