PRU cape overlay fails to load on latest IOT Stretch image

PRU cape overlay fails to load due to pin conflicts on latest image. I have tried various setups of overlays, none seem to work. I am not sure what am I missing.

Setup 1: [Highlighted section identifies the difference in the setup]

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[0726131c362e3adfcf359f3e1debf5ff156e5bec]
eeprom:[A335BNLTEIA04816BBBK2982]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-09-16]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.69-ti-r75]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-PRUCAPE-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20180914.0-0rcnee0~stretch+20180914]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.111222] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 78.184300] pinctrl-single 44e10800.pinmux: pin PIN107 already requested by 48038000.mcasp; cannot claim for 4a300000.pruss
[ 78.293835] pinctrl-single 44e10800.pinmux: pin-107 (4a300000.pruss) status -22
[ 78.381767] pinctrl-single 44e10800.pinmux: could not request pin 107 (PIN107) from group pru_cape_bone_pins on device pinctrl-single
dmesg | grep gpio-of-helper
[ 1.122976] gpio-of-helper ocp:cape-universal: ready
END

Setup 2: [Highlighted section identifies the difference in the setup]

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[0726131c362e3adfcf359f3e1debf5ff156e5bec]
eeprom:[A335BNLTEIA04816BBBK2982]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-09-16]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.69-ti-r75]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-PRUCAPE-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20180914.0-0rcnee0~stretch+20180914]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.104064] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 78.558755] pinctrl-single 44e10800.pinmux: pin PIN107 already requested by 48038000.mcasp; cannot claim for 4a300000.pruss
[ 78.662225] pinctrl-single 44e10800.pinmux: pin-107 (4a300000.pruss) status -22
[ 78.756633] pinctrl-single 44e10800.pinmux: could not request pin 107 (PIN107) from group pru_cape_bone_pins on device pinctrl-single
dmesg | grep gpio-of-helper
[ 1.116205] gpio-of-helper ocp:cape-universal: ready
END

Setup 3:[Highlighted section identifies the difference in the setup]

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[0726131c362e3adfcf359f3e1debf5ff156e5bec]
eeprom:[A335BNLTEIA04816BBBK2982]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-09-16]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.69-ti-r75]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-PRUCAPE-00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20180914.0-0rcnee0~stretch+20180914]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.040353] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 27.561174] pinctrl-single 44e10800.pinmux: pin PIN107 already requested by 48038000.mcasp; cannot claim for 4a300000.pruss
[ 27.891600] pinctrl-single 44e10800.pinmux: pin-107 (4a300000.pruss) status -22
[ 28.055568] pinctrl-single 44e10800.pinmux: could not request pin 107 (PIN107) from group pru_cape_bone_pins on device pinctrl-single
dmesg | grep gpio-of-helper
[ 1.041567] gpio-of-helper ocp:cape-universal: ready
END

In general, I am unable to figure out how to map pru pins using overlay files.

Any help/suggestions would be appreciated

Thanks
Gaurav

Your answer is right here ^ "48038000.mcasp; cannot claim for
4a300000.pruss", you seem to be trying to use the same pru pins as the
hdmi-audio..

see:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

and do:

disable_uboot_overlay_audio=1

Also, for the "pru" only do the "uboot_overlay_pru=" option..

Finally, any pin your define the PRU, make sure to "disable" from
cape-universal in a special node as one example shown here:

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-SPI0-ADS8688-0A00.dts#L36-L47

Regards,

I should also point out, you don't need to actually define the pru
pin's in the overlay, instead you can use config-pin to setup the pins
you are using for the pru.

Or Jason's pru example for v4.14.x kernel's also pre-loads the pinmux values.

Regards,

Documented here:

https://markayoder.github.io/PRUCookbook/06io/io.html

Regards,

Thanks, Robert. I dont know how i missed that.
Just to make sure I understand your second point correctly, if I write my own overlay file while completely disabling universal cape, I should still be using “uboot_overlay_pru=” option?

Thanks again

Sorry I meant if I write my own PRU overlay file while completely disabling universal cape, I should still be using “uboot_overlay_pru=” option?

Really, you can use any of them, the variable uboot_overlay_pru has
less other logic, so it's couple calls faster in u-boot's shell
script...

Regards,