cancel
Showing results for 
Search instead for 
Did you mean: 

How to use remoteproc on STM32MP151?

HMasu.1
Senior

I want to use remoteproc to load and start firmware on Coretex-M4 from Cortex-A7.

I refer to the following Wiki page.

https://wiki.st.com/stm32mpu/wiki/Linux_remoteproc_framework_overview

In above Wiki page, I have tried [4.1.1 Remote processor boot through sysfs].

However, I can't find "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory.

("/sys/class/remoteproc/" directory has no any sub-directory or files at all)

What should I do to create "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory?

Do I have to modify Linux kernel configuration or Device Tree? 

For the reference, [Support for Remote Processor subsystem] and [STM32 remoteproc support] is enabled in Linux kernel configuration as modules , and these have being loaded by "modprobe" command.

Best regards.

H. Masuda

18 REPLIES 18

Hi, @ArmandG​ 

I send the .config and .dtb.

.config is located in /tmp-glibc/work/stm32mp1_eval-ostl-linux-gnueabi/linux-stm32mp/4.19-r0/build/

And, is the kernel trace dmesg?

I send dmesg log, so please let me know if I'm misunderstanding.

Best Regards​,

​H. Masuda

Hello @HMasu.1​ ,

In your .config file I can see that config_remoteproc and config_rpmsg parameters are still equal to "m" and not "y".

Are you sure you saved or cross compiled again the kernel as it is written here:

https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel

It seems that no changes have occured.

Best regards,

Armand

Hi @ArmandG​ 

Sorry. I had reverted the kernel config (CONFIG_STM32_IPCC, CONFIG_REMOTEPROC and CONFIG_RPMSG parameters equal to "m") because the same error occurs when CONFIG_STM32_IPCC, CONFIG_REMOTEPROC and CONFIG_RPMSG parameters are changed to "y".

I have set ​CONFIG_STM32_IPCC, CONFIG_REMOTEPROC and CONFIG_RPMSG to "y" again.

( The same error occurs, I can't find "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory.)​

I send the .config, dmesg log and .dtb again in above setting.

please check it.

Best Regards​, 

​H. Masuda

Hi @ArmandG​ ,

​Can you reproduce with my setup?

Please let me know if you have any information.

Best Regards​, 

​H. Masuda

Hi @HMasu.1​ ,

Sorry for the late reply.

I escalated your question to the development team.

I keep you posted.

Best regards,

Armand

Hi @ArmandG​ ,

Thank you for your confirmation.

​After modifying my description of memory section used by rpmsg (e.g. vdev or shared memory) in the Device Tree, I was able to create "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory.

Thank you for your support.

​H. Masuda

Hi @HMasu.1​ ,

Good to see that you fixed the issue !

Could you please share the patch you did ? We continuously improve our solution and all contributions are welcome :)

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
HMasu.1
Senior

Hi, @Christophe Guibout​ 

Thank you for your message.

Sorry, I haven't created the proper patch yet.

I could solve the problem by following way.

1) Add following sub node in both root node and reserved-memory node of root node in my kernel device tree.

-rsctbl

-vring0

-vring1

-shm0

-shm1

-shm10

-shm11

-shm12

-shm13

​2) Add following m4_rproc node in addons user code area in my device tree.

&m4_rproc {

memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vedv0buffer>;

};

Best Regards.

H. Masuda

Hi @HMasu.1​ ,

So, you need to have at least <&vdev0vring1> and <&vdev0buffer> in « memory-region » property, otherwise, it will not work as expected.

In case of non functionnal feature, I would recommand to look into one of the ST reference board device tree (example of m4_rproc entry in stm32mp15xx-dkx.dtsi) in order to cross-check that everything in fine in your own DT.

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.