This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM572x Linux SDK IPU1 Example

Other Parts Discussed in Thread: AM5728

AM5728 EVM

Processor SDK Linux 2.00.02

I see that there is an example file present at /lib/firmware/dra7-ipu1-fw.xem4, i.e. that file name precisely matches what is expected as defined in drivers/remoteproc/omap_remoteproc.c.  When I try to execute "bind" from the file system I get an error:

root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > bind
-sh: echo: write error: No such device

The corresponding command for IPU2 seems to be working:

root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > unbind
[  652.878636] omap-iommu 55082000.mmu: 55082000.mmu: version 2.100.ipu > unbind
[  652.904591] omap_hwmod: mmu_ipu2: _wait_target_disable failed
[  652.916647]  remoteproc1: stopped remote processor 55020000.ipu
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > bind
[  659.118717] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
[  659.126564]  remoteproc1: 55020000.ipu is available
[  659.131705]  remoteproc1: Note: remoteproc is still under development and considered experimental.
[  659.140754]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [  659.159172]  remoteproc1: powering up 55020000.ipu
[  659.167939]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3493264
[  659.175137] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
[  659.240145]  remoteproc1: remote processor 55020000.ipu is now up
[  659.246704] virtio_rpmsg_bus virtio1: rpmsg host is online
[  659.252306]  remoteproc1: registered virtio1 (type 7)
[  659.261730] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x65
[  659.270089] rpmsg_rpc rpmsg12: probing service dce-callback with src 1024 dst 101
[  659.279519] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x66
[  659.287552] rpmsg_rpc rpmsg13: probing service rpmsg-dce with src 1025 dst 102
[  659.296595] rpmsg_rpc rpmsg12: published functions = 4
[  659.302007] rpmsg_rpc rpmsg13: published functions = 8

Is there something that needs to be changed in either the dts or the kernel config?

  • Brad,

    There are no separate configuration options per IPU or DSP remote processors. As long as the driver is enabled, the deciding factor is based on whether the corresponding remoteproc device is enabled in DT or not.

    Your above error is expected, since you are attempting a bind on a device that is already bound to the driver. On IPU2, you did an unbind before you attempted a bind, so you can see the unloading and the reloading. At any point of time, you can see what all devices are bound by just executing ls -l in the corresponding platform driver folder.

    root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc# pwd
    /sys/bus/platform/drivers/omap-rproc
    root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc# ls -l
    lrwxrwxrwx 1 root root 0 Jun 20 22:10 40800000.dsp -> ../../../../devices/platform/44000000.ocp/40800000.dsp
    lrwxrwxrwx 1 root root 0 Jun 20 22:10 41000000.dsp -> ../../../../devices/platform/44000000.ocp/41000000.dsp
    lrwxrwxrwx 1 root root 0 Jun 20 22:10 55020000.ipu -> ../../../../devices/platform/44000000.ocp/55020000.ipu
    lrwxrwxrwx 1 root root 0 Jun 20 22:10 58820000.ipu -> ../../../../devices/platform/44000000.ocp/58820000.ipu
    --w------- 1 root root 4096 Jun 20 23:34 bind
    lrwxrwxrwx 1 root root 0 Jun 20 22:10 module -> ../../../../module/omap_remoteproc
    --w------- 1 root root 4096 Jun 20 22:10 uevent
    --w------- 1 root root 4096 Jun 20 22:10 unbind
    root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc# cat /sys/kernel/debug/remoteproc/remoteproc*/name
    58820000.ipu
    55020000.ipu
    40800000.dsp
    41000000.dsp
    root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc# cat /sys/kernel/debug/remoteproc/remoteproc*/state
    suspended (1)
    suspended (1)
    suspended (1)
    suspended (1)
    root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc#

    The ProcSDK should have all processors enabled and loading a sample image (except for IPU2 which is running the MM image). You will see IPU2, IPU2, DSP1 and DSP2 on AM572x; and the first three on AM571x SoCs/boards.
  • Oh cripes... Yes, I needed to do the unbind first. That was the issue. Here's what I see now:

    root@am57xx-evm:~# cd /sys/bus/platform/drivers/omap-rproc/
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > unbind
    [ 284.938716] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 284.956671] omap_hwmod: mmu_ipu1: _wait_target_disable failed
    [ 284.962561] remoteproc0: stopped remote processor 58820000.ipu
    [ 284.968798] remoteproc0: releasing 58820000.ipu
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > bind
    [ 294.888803] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9d000000
    [ 294.896643] remoteproc0: 58820000.ipu is available
    [ 294.901665] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [ 294.910686] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [ 294.928696] remoteproc0: powering up 58820000.ipu
    [ 294.938592] remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 4917392
    [ 294.945598] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 294.957501] remoteproc0: remote processor 58820000.ipu is now up
    [ 294.964334] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 294.969902] remoteproc0: registered virtio0 (type 7)
    [ 294.979901] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x32
    [ 294.989002] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x33
    [ 294.998305] virtio_rpmsg_bus virtio0: creating channel rpmsg-omx addr 0x3c
    [ 295.006708] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
    [ 295.015165] rpmsg_rpc rpmsg15: probing service rpc_example_2 with src 1024 dst 101
    [ 295.025083] rpmsg_rpc rpmsg15: published functions = 8
    [ 305.053513] omap_hwmod: mmu_ipu1: _wait_target_disable failed
  • As an extra tidbit, my goal was to use JTAG to connect to the running M4.  Initially I was having issues due to power management because by default the remote cores are suspended after inactivity.  There is a command that enables you to force them on though:

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc0/name

    58820000.ipu

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc0/state

    suspended (1)

    root@am57xx-evm:~# echo on > /sys/bus/platform/devices/58820000.ipu/power/control

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc0/state

    running (2)

    After running the command in bold, you can see the state transitioned from "suspended" to "running" and that enabled me to then connect to IPU1_C0 with CCS.