iMX8MPlus M7 firmware loaded in TCM doesn't work with remoteproc

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

iMX8MPlus M7 firmware loaded in TCM doesn't work with remoteproc

1,203 Views
mirkoardinghi1
Contributor IV

Hi, I'm trying to run the rpmsg_lite_str_echo_rtos by remoteproc but the firmware freezes into rpmsg_lite_wait_for_link_up function

echo stop > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state
echo -n tcm.elf > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/firmware
echo start > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state

If I load the same software from u-boot all work,

fatload mmc 1:1 0x48000000 tcm.bin;cp.b 0x48000000 0x7e0000 20000; bootaux 0x7e0000

at boot the firmware enter into rpmsg_lite_wait_for_link_up and when the imx_rproc kernel module is loaded the firmware continue correctly

I followed AN5317 and patched the kernel/u-boot to enable the M7 clock

 

under my dts m7 section

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
 
m4_reserved: m4@0x80000000 {
no-map;
reg = <0 0x80000000 0 0x9000000>;
};
 
m7_ddr_alias: m4@0x10000000 {
no-map;
reg = <0 0x10000000 0 0x1000000>;
};
 
m7_itcm: m4@0x7E0000 {
no-map;
reg = <0 0x7E0000 0 0x20000>;
};
 
m7_dtcm: m4@0x800000 {
no-map;
reg = <0 0x800000 0 0x20000>;
};
 
vdev0vring0: vdev0vring0@55000000 {
reg = <0 0x55000000 0 0x8000>;
no-map;
};
 
vdev0vring1: vdev0vring1@55008000 {
reg = <0 0x55008000 0 0x8000>;
no-map;
};
 
vdevbuffer: vdevbuffer@55400000 {
compatible = "shared-dma-pool";
reg = <0 0x55400000 0 0x100000>;
no-map;
};
 
rsc_table: rsc_table@550ff000 {
reg = <0 0x550ff000 0 0x1000>;
no-map;
};
 
};
 
imx8mp-cm7 {
compatible = "fsl,imx8mn-cm7";
rsc-da = <0x55000000>;
clocks = <&clk IMX8MP_CLK_M7_DIV>;
mbox-names = "tx", "rx", "rxdb";
mboxes = <&mu 0 1
&mu 1 1
&mu 3 1>;
memory-region = <&vdev0vring0>, <&vdev0vring1>, <&vdevbuffer>, <&m4_reserved>, <&rsc_table>,
<&m7_itcm>, <&m7_dtcm>, <&m7_ddr_alias>;//, <&fileSharing>;
// fsl,rproc-auto-boot = <1>;
// fsl,rproc-fw-name="imx8mp_m7_TCM_sai_low_power_audio.elf";
status = "okay";
};
Tags (3)
0 Kudos
Reply
4 Replies

1,160 Views
mirkoardinghi1
Contributor IV

Hi, 

I'm using yocto honister (kernel 5.15.71) with SDK _2_13_EVK-MIMX8MP

0 Kudos
Reply

1,143 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @mirkoardinghi1 ,

I was trying to replicate your issue but unsuccessfully, have you tried to do it loading the imx8mp-evk-rpmsg.dts?

That device tree has the RPROC node. Only I want to confirm if only occurs with your custom dts or also with a tested dts.

 

Best regards! 

0 Kudos
Reply

1,058 Views
mirkoardinghi1
Contributor IV
Hi, I solved. Thanks

1,166 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @mirkoardinghi1 ,

 

Could you please share what BSP and SDK version are you using?

I would like try to replicate your issue exactly as you.

 

Best regards!

0 Kudos
Reply