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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

18 REPLIES 18
ArmandG
ST Employee

Hi @HMasu.1​,

Are you using the starter package image or a custom image ? If it is a custom image, could you list me what you added or removed from the default one ?

Best regards,

Armand

Hi @ArmandG​ 

Thank you for your reply.

It is a custom image that runs on custom board that STM32MP151C​AA3 mounted on.

I use OpenSTLinux Distribution Package for kernel, and have only modified device trees.

I attach the device trees.

Please check it.

Best Regards​

​H. Masuda

Hi @HMasu.1​ ,

Actually functions related to remoteproc in the device tree don't seem to be different as the one in the starter package...

By the way, can you check in your kernel configuration if CONFIG_STM32_IPCC is enabled ? Remoteproc needs it to access its mailbox.

Else, it is probably due to when you probe the modules, may I ask you to send a screenshot of modprobe traces ?

Best regards,

Armand

Hi @ArmandG​ ,

I checked that CONFIG_STM32_IPCC is enabled as modules.

I attach some screenshots of Kernel Configration and modprobe trace.

Please check it.

Best Regards​,

​H. Masuda

Hi @HMasu.1​ ,

It seems that you cannot enable CONFIG_STM32_IPCC by using modprobe, can you try to enable it via menuconfig ? (put a * instad of "M").

I got the same error as you if I modprobe it.

Best regards,

Armand

Hi @ArmandG​ ,

Thank you for your reply.

I enabled CONFIG_STM32_IPCC via menuconfig (put a * instad of "M").

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

Is there any other way to find out the cause?

Best Regards​,

​H. Masuda

Hello @HMasu.1​ ,

You should try to put also "Support for remote processor subsystem" as built-in (the 4 lines with *) in order to start from scratch and see if you still have this problem.

If you don't, the problem may be due to the sequencing of modules, so try to module it one by one after.

If you still have the problem we need to look further in the device tree.

Best regards,

Armand

Hi @ArmandG​ ,

I have put ​ "Support for remote processor subsystem" as built-in (the 4 lines with *), however, the same error occurs, I can't find "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory.

And, I have tried to module it one by one after, but I could only module "STM32 remoteproc support".

("Remoteproc System Resource Manager core" and "Remoteproc System Resource Manager device" could not be moduled Individually.)

In this configuration, the same error also occurs, I can't find "remoteprocX(e.g. remoteproc0)" directory in "/sys/class/remoteproc/" directory.

Should I investigate the differences between device trees in more detail?

Or is there another possible cause?

Best Regards​,

​H. Masuda

Hi @HMasu.1​ ,

Can you send me the kernel trace, the .config generated by menuconfig and the .dtb ?

I will try to reproduce with your set up.

Best regards,

Armand