pru_rproc on Linux 4.4

I just put together some notes from my testing of pru_rproc on the BeagleBone running Linux 4.4 here:

https://gist.github.com/alexanderhiam/2c4187c710b2c409d8dde8c4015fe007

I’ll probably expand on that as I play with it more, but that should be enough to get you up and running.

Unfortunately, it looks to me like TI has removed the ability to trigger firmware loading from Device Tree(?):

https://github.com/beagleboard/linux/blob/4.4/Documentation/devicetree/bindings/remoteproc/ti%2Cpruss-remoteproc.txt

Note that the base DT does trigger the loading the the pru_rproc module:

https://github.com/beagleboard/linux/blob/4.4/arch/arm/boot/dts/am33xx.dtsi#L973
https://github.com/beagleboard/linux/blob/4.4/drivers/remoteproc/pru_rproc.c#L897

However, this seems to happen before the filesystem is populated, so no firmware gets loaded:

[ 3.622936] ti-pruss 4a300000.pruss: creating PRU cores and other child platform devices
[ 3.651714] remoteproc1: 4a334000.pru0 is available
[ 3.651740] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 3.651750] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn’t yet guaranteed.
[ 3.652029] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 3.652050] remoteproc1: failed to load am335x-pru0-fw
[ 3.660836] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 3.660863] remoteproc1: powering up 4a334000.pru0
[ 3.660998] remoteproc1: Direct firmware load for am335x-pru0-fw failed with error -2
[ 3.661016] remoteproc1: request_firmware failed: -2
[ 3.676161] pru-rproc 4a334000.pru0: rproc_boot failed
[ 3.699719] remoteproc1: releasing 4a334000.pru0
[ 3.699953] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 3.704799] remoteproc1: 4a338000.pru1 is available
[ 3.704824] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 3.704835] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn’t yet guaranteed.
[ 3.705080] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 3.705102] remoteproc1: failed to load am335x-pru1-fw
[ 3.711287] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 3.711310] remoteproc1: powering up 4a338000.pru1
[ 3.711426] remoteproc1: Direct firmware load for am335x-pru1-fw failed with error -2
[ 3.711443] remoteproc1: request_firmware failed: -2
[ 3.722784] pru-rproc 4a338000.pru1: rproc_boot failed
[ 3.752492] remoteproc1: releasing 4a338000.pru1
[ 3.755009] pru-rproc: probe of 4a338000.pru1 failed with error -2

(/lib/firmware/am335x-pru0-fw does exist, and probing pru_rproc after booting does load it just fine).

So I guess there’s more to figure out…