Can't open PRU driver under 4.1

No matter what I do, under 4.1 I can't successfully call prussdrv_open(). I get:

  prussdrv_open open PRU_EVTOUT_0 failed -1: No such file or directory

dmesg has some errors around loading firmware on the PRUs, although I don't know why a stock boot wants to:

# dmesg | grep -i pru
[ 13.079959] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed
[ 13.080053] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e099c000
[ 13.080091] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e09a0000
[ 13.080112] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e09a4000
[ 13.080132] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e09a8000
[ 13.080151] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e09ac000
[ 13.080552] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores
[ 13.114942] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e09b0000
[ 13.114988] pru-rproc 4a334000.pru0: memory control: pa 0x4a322000 size 0x400 va e0876000
[ 13.115026] pru-rproc 4a334000.pru0: memory debug: pa 0x4a322400 size 0x100 va e099a400
[ 13.115255] remoteproc1: 4a334000.pru0 is available
[ 13.116745] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 13.116772] remoteproc1: failed to load am335x-pru0-fw
[ 13.128688] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 13.128725] remoteproc1: powering up 4a334000.pru0
[ 13.128806] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 13.133909] pru-rproc 4a334000.pru0: rproc_boot failed
[ 13.238678] remoteproc1: releasing 4a334000.pru0
[ 13.238894] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 13.239081] pru-rproc 4a338000.pru1: memory iram: pa 0x4a338000 size 0x2000 va e09b8000
[ 13.239117] pru-rproc 4a338000.pru1: memory control: pa 0x4a324000 size 0x400 va e09bc000
[ 13.239138] pru-rproc 4a338000.pru1: memory debug: pa 0x4a324400 size 0x100 va e09be400
[ 13.239361] remoteproc1: 4a338000.pru1 is available
[ 13.239689] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 13.239711] remoteproc1: failed to load am335x-pru1-fw
[ 13.252800] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 13.252834] remoteproc1: powering up 4a338000.pru1
[ 13.252911] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 13.258014] pru-rproc 4a338000.pru1: rproc_boot failed
[ 13.330118] remoteproc1: releasing 4a338000.pru1
[ 13.330314] pru-rproc: probe of 4a338000.pru1 failed with error -2
[ 333.090396] bone_capemgr bone_capemgr: part_number 'BB-ENABLE-PRU', version 'N/A'
[ 333.090472] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-ENABLE-PRU'
[ 333.092247] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; overlay id #0

The last bit is my attempt to enable the PRUs via overlay. Here's the overlay I loaded:

/dts-v1/;
/plugin/;

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";

    /* identification */
    part-number = "BB-ENABLE-PRU";

    /* version */
    version = "00A0";

  fragment@1 { // Enable the PRUSS
    target = <&pruss>;
    __overlay__ {
      status = "okay";
    };
  };
};

I don't know if an overlay is necessary to enable the PRUs, but this one doesn't seem to be it.

I'd sure appreciate some help with this. I've gone down so many google rabbit holes this weekend trying to figure it out, and I'm still no closer.

Thanks!

take a look at the replicape:

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BONE-REPLICAP-00B1.dts

Regards,

Hmm. Stripped of its pin-muxing, their file does the same thing as mine. I've been poring through the replicape site looking for additional instructions on enabling the PRU, but not finding it so far.

Hi,

I am facing exactly same issue. Could you resolve yours?

-Anuja

Same problem here, anyone please advice?

Hi,

No matter what I do, under 4.1 I can't successfully call prussdrv_open(). I get:

  prussdrv_open open PRU_EVTOUT_0 failed -1: No such file or directory

dmesg has some errors around loading firmware on the PRUs, although I don't know why a stock boot wants to:

# dmesg | grep -i pru
[ 13.079959] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed
[ 13.080053] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e099c000
[ 13.080091] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e09a0000
[ 13.080112] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e09a4000
[ 13.080132] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e09a8000
[ 13.080151] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e09ac000
[ 13.080552] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores
[ 13.114942] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e09b0000
[ 13.114988] pru-rproc 4a334000.pru0: memory control: pa 0x4a322000 size 0x400 va e0876000
[ 13.115026] pru-rproc 4a334000.pru0: memory debug: pa 0x4a322400 size 0x100 va e099a400
[ 13.115255] remoteproc1: 4a334000.pru0 is available
[ 13.116745] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 13.116772] remoteproc1: failed to load am335x-pru0-fw
[ 13.128688] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 13.128725] remoteproc1: powering up 4a334000.pru0
[ 13.128806] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 13.133909] pru-rproc 4a334000.pru0: rproc_boot failed
[ 13.238678] remoteproc1: releasing 4a334000.pru0
[ 13.238894] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 13.239081] pru-rproc 4a338000.pru1: memory iram: pa 0x4a338000 size 0x2000 va e09b8000
[ 13.239117] pru-rproc 4a338000.pru1: memory control: pa 0x4a324000 size 0x400 va e09bc000
[ 13.239138] pru-rproc 4a338000.pru1: memory debug: pa 0x4a324400 size 0x100 va e09be400
[ 13.239361] remoteproc1: 4a338000.pru1 is available
[ 13.239689] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 13.239711] remoteproc1: failed to load am335x-pru1-fw
[ 13.252800] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 13.252834] remoteproc1: powering up 4a338000.pru1
[ 13.252911] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 13.258014] pru-rproc 4a338000.pru1: rproc_boot failed
[ 13.330118] remoteproc1: releasing 4a338000.pru1
[ 13.330314] pru-rproc: probe of 4a338000.pru1 failed with error -2
[ 333.090396] bone_capemgr bone_capemgr: part_number 'BB-ENABLE-PRU', version 'N/A'
[ 333.090472] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-ENABLE-PRU'
[ 333.092247] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; overlay id #0

Doesn't prussdrv depend on UIO kernel driver instead of PRUSS remoteproc driver?
Based on your kernel log the PRUSS remoteproc driver is being loaded for PRUSS.
You need to modify the DT so that PRUSS UIO kernel driver is loaded.

cheers,
-roger

See: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Kernel_Options

if you are using uio_pruss (aka same as 3.8's..)

--bone-kernel --lts-4_1

or:

--bone-rt-kernel --lts-4_1

If you are using the new remoteproc_pruss interface:

--ti-channel --lts-4_1

or:

--ti-rt-channel --lts-4_1

Regards,

if you are using uio_pruss (aka same as 3.8’s…)

–bone-kernel --lts-4_1

or:

–bone-rt-kernel --lts-4_1

Yes, installing the --bone-rt-kernel --lts-4_1 and using the old 3.8 api for using the PRU works.

Thank you!!! :slight_smile:

Yes, that's precisely what's going on. At the time I was unaware of the changes being made to how one uses PRUSS. Unfortunately, third-party code I rely on uses UIO, and that makes it much harder to switch to remoteproc. I'd like to eventually, but this project has fallen by the wayside for the last several months while more urgent things have come up.