Skip to main content
Visitor II
September 3, 2020
Solved

How to use remoteproc on STM32MP151?

  • September 3, 2020
  • 2 replies
  • 4434 views

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

    This topic has been closed for replies.
    Best answer by Christophe Guibout

    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

    2 replies

    ST Employee
    September 3, 2020

    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

    HMasu.1Author
    Visitor II
    September 4, 2020

    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

    ST Employee
    September 8, 2020

    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

    HMasu.1Author
    Visitor II
    October 14, 2020

    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

    ST Employee
    October 15, 2020

    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