Enabling CoreSight on S32G2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enabling CoreSight on S32G2

2,036 Views
Marin
Contributor I

Hi,

We are trying to enable CoreSight for hardware assisted tracing on S32G-VNP-RDB2 running a Linux BSP 38.0 build.
Although compiling the kernel with CoreSight features enabled adds the required modules, there are no CoreSight devices available in '/sys/bus/coresight/devices/'.
Looking at the used device tree configuration, it doesn't contain any CoreSight components.
Can someone provide us with an updated device tree configuration file or recommend a compatible platform we can use as a base to implement the changes ourselves?

Thank you in advance.

0 Kudos
Reply
4 Replies

1,923 Views
Miodrag
Contributor I
we are trying to do this for the S32G3 based on the BSP-41. 
I was able to extend the dtsi tree with the etms, funnels, etrs.
 
find . -name "*etm*
./usr/bin/setmetamode
./lib/modules/5.15.153-rt75+gadceb7e8fa72/kernel/drivers/hwtracing/coresight/coresight-etm4x.ko
./sys/class/devlink/platform:firmware:scmi--amba:51440000.etm
./sys/class/devlink/platform:firmware:scmi--amba:51540000.etm
./sys/class/devlink/platform:firmware:scmi--amba:51640000.etm
./sys/class/devlink/platform:firmware:scmi--amba:51740000.etm
./sys/devices/platform/51440000.etm
./sys/devices/platform/51540000.etm
./sys/devices/platform/51640000.etm
./sys/devices/platform/51740000.etm
./sys/devices/platform/firmware:scmi/consumer:amba:51740000.etm
./sys/devices/platform/firmware:scmi/consumer:amba:51440000.etm
./sys/devices/platform/firmware:scmi/consumer:amba:51540000.etm
./sys/devices/platform/firmware:scmi/consumer:amba:51640000.etm
./sys/devices/cs_etm
./sys/devices/virtual/devlink/platform:firmware:scmi--amba:51440000.etm
./sys/devices/virtual/devlink/platform:firmware:scmi--amba:51540000.etm
./sys/devices/virtual/devlink/platform:firmware:scmi--amba:51640000.etm
./sys/devices/virtual/devlink/platform:firmware:scmi--amba:51740000.etm
./sys/bus/amba/devices/51440000.etm
./sys/bus/amba/devices/51540000.etm
./sys/bus/amba/devices/51640000.etm
./sys/bus/amba/devices/51740000.etm
./sys/bus/amba/drivers/coresight-etm4x
./sys/bus/platform/drivers/coresight-etm4x
./sys/bus/event_source/devices/cs_etm
./sys/firmware/devicetree/base/etm@51740000
./sys/firmware/devicetree/base/etm@51640000
./sys/firmware/devicetree/base/etm@51540000
./sys/firmware/devicetree/base/etm@51440000
./sys/module/coresight/holders/coresight_etm4x
./sys/module/coresight_etm4x
./sys/module/coresight_etm4x/drivers/platform:coresight-etm4x
./sys/module/coresight_etm4x/drivers/amba:coresight-etm4x
 
but unfortunately I cannot see any device running on the coresight bus.
 
 
ls -la /sys/bus/coresight/devices/
total 0
drwxr-xr-x 2 root root 0 Apr 28 18:53 .
drwxr-xr-x 4 root root 0 Apr 28 17:42 ..
 
The etms, funnels, etrs are enabled in the device tree:
status = "okay";
 
What is unclear in the documentation (reference manual S32G3) is what clocks should be used for the CoreSight and each of the devices?
RM mentions in the chapter 77.6.1 that the clocks used are sys2_clk and core2_clk, but these are nowhere described that they are. Can you please provide information what clocks these are? and how the following should be configured
cpu = <&clks>;
clocks = <&clks S32G_SCMI_CLK_PFE_AXI>; //Find a correct clock - core2_clk
clock-names = "core2_clk"; //Find a correct clock - core2_clk
 
Thank you for the support. 
0 Kudos
Reply

1,919 Views
Miodrag
Contributor I
PS: we enabled the coresight features in the kernel menuconfig.
0 Kudos
Reply

1,907 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. As told before, all the available features for the BSP version you are using should be provided in the "Linux BSP 41.0 User Manual", given CoreSight is not mentioned as a feature, there is no explanation on enablement. We do apologize.

We can recommend contacting your local NXP FAE/DFAE/representative, for them to channel this request adequately.

Again, we do apologize.

Please, let us know.

0 Kudos
Reply

2,012 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

As to this moment, we understand that the current BSP software does not support coresight, and no plans to support it in a short term.

All the available features for the BSP version you are using should be provided in the "Linux BSP vxx.x User Manual", given CoreSight is not mentioned as a feature, there is no explanation on enablement.

We do apologize for this inconvenience.

Please let us know.

0 Kudos
Reply