PMU setting in bcm2387 dtsi file

Stefan Wahren stefan.wahren at i2se.com
Sun Aug 13 01:34:19 PDT 2017


Hi Vince,

> Vince Weaver <vincent.weaver at maine.edu> hat am 11. August 2017 um 21:08 geschrieben:
> 
> 
> Hello
> 
> I managed to get an upstream git kernel booted on my pi3 (minus USB of 
> course).

unfortunately there is a regression in 4.13. You could try this [1] to fix it.
If you still have problems try multi_v7_defconfig.

[1] - https://patchwork.kernel.org/patch/9896283/

> 
> I noticed that the upstream dts file doesn't have PMU (performance 
> monitoring unit) support.

Correct, this file is still imcomplete and patches are welcome.

> 
> I got simple support working with the below patch, but it doesn't properly 
> hook up the PMU interrupt (so no sampling support).  Does anyone know the 
> proper interrupt setting?

No, i don't but you could ask your question at the "Bare metal" board on the Raspberry Pi forum.  

> Should I just copy the bcm2386 one, or did 
> things change enough that that won't work?

Please do not this. I like to see the correct values in the dts files. The bcm2836 ones doesn't look suitable to me. I think the rockchip/rk3328.dtsi is similiar to the bcm2837 and it defines one irq for each core.

I think we need something like this (please don't use it, it's only a example):

arm-pmu {
	compatible = "arm,cortex-a53-pmu";
	interrupts = <9>, // IRQ_TYPE_LEVEL_HIGH
		     <10>, // IRQ_TYPE_LEVEL_HIGH
		     <11>, // IRQ_TYPE_LEVEL_HIGH
		     <12>; // IRQ_TYPE_LEVEL_HIGH
	interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
};

In case you asking about the related irqs at the rpi forum please do it for the irq type, too.
We will need it in the near future.

Thanks
Stefan

> 
> Thanks,
> 
> Vince
> 
> diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi 
> b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi
> index 2d5de6f0..099cb16 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi
> @@ -63,6 +63,12 @@
>                         cpu-release-addr = <0x0 0x000000f0>;
>                 };
>         };
> +
> +       pmu {
> +               compatible = "arm,armv8-pmuv3";
> +       };
> +
> +
>  };
>  
>  /* Make the BCM2835-style global interrupt controller be a child of the
> 
> 
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel



More information about the linux-rpi-kernel mailing list