4.4.x-ti kernel with rproc & uio (r34)

Okay, starting with r34, (4.4.14-ti-r34/4.4.14-ti-rt-r34)

You can swap between rproc and uio for the pruss...

while, uio can be loaded as an overlay, rproc was failing, so we need
to use the dtb-rebuilder...

Step 1:

upgrade to r34 and reboot:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#4.4.x-ti

Step 2:

Install dtb-rebuilder:

git clone -b 4.4-ti https://github.com/RobertCNelson/dtb-rebuilder
dtb-4.4-ti --depth=1
cd ./dtb-4.4-ti/

Step 3: (rproc)

Edit your device tree:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen.dts#L16-L22

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-rproc.dtsi" */ -> #include "am33xx-pruss-rproc.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist uio_pruss

and reboot..

debian@beaglebone:~$ dmesg | grep pru
[ 3.006675] ti-pruss 4a300000.pruss: creating PRU cores and other
child platform devices
[ 3.007791] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.008351] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.028561] remoteproc1: 4a334000.pru0 is available
[ 3.036995] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.037020] remoteproc1: failed to load am335x-pru0-fw
[ 3.042449] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 3.042463] remoteproc1: powering up 4a334000.pru0
[ 3.042529] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.047670] pru-rproc 4a334000.pru0: rproc_boot failed
[ 3.083760] remoteproc1: releasing 4a334000.pru0
[ 3.083905] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 3.084240] remoteproc1: 4a338000.pru1 is available
[ 3.084464] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.084482] remoteproc1: failed to load am335x-pru1-fw
[ 3.092879] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 3.092899] remoteproc1: powering up 4a338000.pru1
[ 3.092979] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.098136] pru-rproc 4a338000.pru1: rproc_boot failed
[ 3.135593] remoteproc1: releasing 4a338000.pru1
[ 3.135739] pru-rproc: probe of 4a338000.pru1 failed with error -2

Step 3: (uio)

Edit your device tree:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen.dts#L24-L32

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-uio.dtsi" */ -> #include "am33xx-pruss-uio.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist pruss
blacklist pruss_intc
blacklist pru-rproc

and reboot..

debian@beaglebone:~$ dmesg | grep pru
[ 11.582433] pruss_uio 4a300000.pruss: pins are not configured from the driver

debian@beaglebone:~$ lsmod | grep uio
uio_pruss 4928 0
uio_pdrv_genirq 3539 0
uio 8822 2 uio_pruss,uio_pdrv_genirq

Regards,

Okay, starting with r34, (4.4.14-ti-r34/4.4.14-ti-rt-r34)

You can swap between rproc and uio for the pruss...

while, uio can be loaded as an overlay, rproc was failing, so we need
to use the dtb-rebuilder...

Step 1:

upgrade to r34 and reboot:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#4.4.x-ti

Step 2:

Install dtb-rebuilder:

git clone -b 4.4-ti https://github.com/RobertCNelson/dtb-rebuilder
dtb-4.4-ti --depth=1
cd ./dtb-4.4-ti/

Step 3: (rproc)

Edit your device tree:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen.dts#L16-L22

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-rproc.dtsi" */ -> #include "am33xx-pruss-rproc.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist uio_pruss

and reboot..

debian@beaglebone:~$ dmesg | grep pru
[ 3.006675] ti-pruss 4a300000.pruss: creating PRU cores and other
child platform devices
[ 3.007791] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.008351] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.028561] remoteproc1: 4a334000.pru0 is available
[ 3.036995] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.037020] remoteproc1: failed to load am335x-pru0-fw
[ 3.042449] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 3.042463] remoteproc1: powering up 4a334000.pru0
[ 3.042529] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.047670] pru-rproc 4a334000.pru0: rproc_boot failed
[ 3.083760] remoteproc1: releasing 4a334000.pru0
[ 3.083905] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 3.084240] remoteproc1: 4a338000.pru1 is available
[ 3.084464] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.084482] remoteproc1: failed to load am335x-pru1-fw
[ 3.092879] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 3.092899] remoteproc1: powering up 4a338000.pru1
[ 3.092979] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.098136] pru-rproc 4a338000.pru1: rproc_boot failed
[ 3.135593] remoteproc1: releasing 4a338000.pru1
[ 3.135739] pru-rproc: probe of 4a338000.pru1 failed with error -2

I’m guessing you don’t have the PRU firmware loaded and that I why you are getting these errors?

Regards,
John

Excellent! UIO has been the only thing keeping me from migrating to Jessie. I’ll report on my findings. I trust this kernel will make its way into a new stable release on beagleboard.org/latest-images at some point?

Outstanding work, Robert. Thank you.

This is awesome, but shouldn’t one of them be enabled by default? Would be great to report an issue with rproc not loading as an overlay.

I think the consensus was not not have either installed as default and that way we keep both side happy. Also, most BBB users don’t use PRU. BTW, I added TJF to the list since his persistence lead us to this solutions.

Regards,
John

@John

BTW, I added TJF to the list since his persistence lead us to this solutions.

Thank you!

I forgot to mention: the line wrapping is confusing here

I managed to get uio working previously, but not anymore with latest image (uname -r: 4.4.54-ti-r93). I ended up here from another post. Did something change with respect to the above?

I can see my edited and compiled dtb did get loaded via uEnv.txt (and yes, I also blacklisted the remoteproc drivers), but still Remoteproc is loaded instead of uio. Per guide above, I also wonder if in the second step 3 the remoteproc dtsi should be disabled. I did, as in the latest image it seems to be enabled by default. My guess is some generic device tree is referring to Remoteproc?

Actually, I was making a web page explaining a generic way how to get uio working on newer kernels - for everybody to enjoy and quickly jump to programming the PRUs with uio instead of struggling to get the driver working in the first place, but my enthusiasm plummethed when I noticed the way to do it changes so often.

Yeah sorry about that, switch to:

4.4.62-ti-r99

both modules are enabled again.

on monday after sunday's snapshot get's pushed out, i'll have a new
easier way to switch between the two pru implementations, using u-boot
overlays and just one line in /boot/uEnv.txt..

Just got it working yesterday.

Regards,

Awesome.