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.

AM5748: Disabling IPU2

Part Number: AM5748

How to disable ipu2 to reuse its CMA allocation on AM57xx ?

When we tried to disable ipu2 from DTS:

        ipu2_memory_region: ipu2-memory@95800000 {
            compatible = "shared-dma-pool";
            reg = <0x0 0x95800000 0x0 0x3800000>;
            reusable;
            status = "disabled";
        };

&ipu2 {
    status = "disabled";
    memory-region = <&ipu2_memory_region>;
};

dsp1 FW does not start as its (and others) mapping changed as:

total 0
lrwxrwxrwx    1 root     root             0 Dec 16 03:33 remoteproc0 -> ../../devices/platform/44000000.ocp/58820000.ipu/remoteproc/remoteproc0
lrwxrwxrwx    1 root     root             0 Dec 16 03:33 remoteproc1 -> ../../devices/platform/44000000.ocp/40800000.dsp/remoteproc/remoteproc1
lrwxrwxrwx    1 root     root             0 Dec 16 03:33 remoteproc2 -> ../../devices/platform/44000000.ocp/41000000.dsp/remoteproc/remoteproc2
lrwxrwxrwx    1 root     root             0 Dec 16 03:34 remoteproc3 -> ../../devices/platform/44000000.ocp/4b226004.pruss_soc_bus/4b200000.pruss/4b234000.pru/remoteproc/remoteproc3
lrwxrwxrwx    1 root     root             0 Dec 16 03:34 remoteproc4 -> ../../devices/platform/44000000.ocp/4b226004.pruss_soc_bus/4b200000.pruss/4b238000.pru/remoteproc/remoteproc4
lrwxrwxrwx    1 root     root             0 Dec 16 03:34 remoteproc5 -> ../../devices/platform/44000000.ocp/4b2a6004.pruss_soc_bus/4b280000.pruss/4b2b4000.pru/remoteproc/remoteproc5
lrwxrwxrwx    1 root     root             0 Dec 16 03:34 remoteproc6 -> ../../devices/platform/44000000.ocp/4b2a6004.pruss_soc_bus/4b280000.pruss/4b2b8000.pru/remoteproc/remoteproc6

Before disabling ipu2 in the DTS:

root@am57xx-evm:/sys/class/remoteproc# ls -l
total 0
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc0 -> ../../devices/platform/44000000.ocp/58820000.ipu/remoteproc/remoteproc0
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc1 -> ../../devices/platform/44000000.ocp/55020000.ipu/remoteproc/remoteproc1
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc2 -> ../../devices/platform/44000000.ocp/40800000.dsp/remoteproc/remoteproc2
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc3 -> ../../devices/platform/44000000.ocp/41000000.dsp/remoteproc/remoteproc3
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc4 -> ../../devices/platform/44000000.ocp/4b226004.pruss_soc_bus/4b200000.pruss/4b234000.pru/remoteproc/remoteproc4
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc5 -> ../../devices/platform/44000000.ocp/4b226004.pruss_soc_bus/4b200000.pruss/4b238000.pru/remoteproc/remoteproc5
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc6 -> ../../devices/platform/44000000.ocp/4b2a6004.pruss_soc_bus/4b280000.pruss/4b2b4000.pru/remoteproc/remoteproc6
lrwxrwxrwx    1 root     root             0 Dec 16  2018 remoteproc7 -> ../../devices/platform/44000000

What is the correct way of disabling ipu2 so that its CMA memory is freed to Linux ?

  • Hello Paritosh,

    Could you share terminal outputs of the dsp failing to load?

    To the best of my knowledge, the name "remoteprocX" is assigned at boot time, so it is not guaranteed that dsp1 will always have the same remoteprocX name. If you are scripting your dsp loading process, I would include checks to make sure "remoteproc2" is pointing to the core you think it is pointing to.

    Regards,

    Nick

  • Hi Nick,

    You are right. Issue is hardcoded scripts looking at wrong node...

    1. What is the right way to identify a note, for example dsp1, in scripts ?

    Is this a right path for dsp1 : /sys/devices/platform/44000000.ocp/40800000.dsp/remoteproc/remoteproc*/state

    2. Can we start/stop FW from C programs, i.e., does remoteproc exposes some ioctl interfaces to do so ?

    Thanks,

    Paritosh

  • Hello Paritosh,

    I am sorry for the delayed response. Please take a look at our documentation for IPC for AM57xx. In particular, see subsection "Running the Bundled IPC Examples" for steps to run bind and unbind for DSP1 in /sys/bus/platform/drivers/omap-rproc/.

    Regards,

    Nick