PRU pruss_uio: pins are not configured from the driver error

I am trying to toggle a GPIO pin (P8_11) using PRU0. I was able to load the uio_pruss driver by using the steps below, when I do lsmod this looks correct as well. I also am able to load a program successfully into the PRU using the prussdrv_xxx interface. However it looks like I do not have my overlay correct. I modified the uio_pruss_enable-A00.dts overlay file (see below) based on the most current posts I could find. Yet my dmesg output shows a “pins are not configured from the driver” error and
I do not see the correct value (6) for pin 15 in the pinmux file. I don’t understand when/how uio_pruss driver picks up the changes in the uio_pruss_enable file or whether I have it in the correct format. There seems to be multiple ways this file can be configured depending on kernel and kernel version.

modify uEnv.txt
dtb=am335x-boneblack-emmc-overlay.dtb
cape_enable=bone_capemgr.enable_partno=uio_pruss_enable

modify am335x-boneblack-emmc-overlay.dtb
#include “am33xx-pruss-uio.dtsi”

modify /etc/modprobe.d/pruss-blacklist.conf
blacklist pruss
blacklist pruss_intc
blacklist pru-rproc

root@beaglebone:~# lsmod | grep pru
uio_pruss 5504 0
uio 10524 2 uio_pruss,uio_pdrv_genirq

uname -a
4.4.30-ti-r64

/sys/kernel/debug/pinctrl/44e10800.pinmux/pins:
pin 15 (44e1083c.0) 00000027 pinctrl-single

modified /opt/source/bb.org-overlays/src/arm/uio_pruss_enable-00A0.dts
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”, “ti,beaglebone-green”;
// identification
part-number = “uio_pruss_enable”;
version = “00A0”;

exclusive-use =
“P8.11”, “pru0”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
pru_pru_pins: pinmux_pru_pru_pins {

pinctrl-single,pins = <
0x34 0x06

;
};
};
};

fragment@1 {
target = <&ocp>;
overlay {
test_helper: helper {
compatible = “bone-pinmux-helper”;
pinctrl-names = “default”;
pinctrl-0 = <&pru_pru_pins>;
status = “okay”;
};
};
};
};

compiled using: dtc -@ -O dtb -b 0 -o /lib/firmware/uio_pruss_enable-00A0.dtbo /opt/source/bb.org-overlays/src/arm/uio_pruss_enable-00A0.dts

dmesg
[ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 bone_capemgr.enable_partno=uio_pruss_enable root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
[ 2.531643] bone_capemgr bone_capemgr: enabled_partno PARTNO ‘uio_pruss_enable’ VER ‘N/A’ PR ‘0’
[ 2.531685] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,uio_pruss_enable’
[ 2.538684] bone_capemgr bone_capemgr: slot #4: dtbo ‘uio_pruss_enable-00A0.dtbo’ loaded; overlay id #0
[ 40.091997] pruss_uio 4a300000.pruss: pins are not configured from the driver

root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,uio_pruss_enable

there's no pruss node^ see

https://github.com/beagleboard/devicetree-source/blob/master/arch/arm/boot/dts/BB-BONE-PRU-01-00A0.dts

Regards,

Thank you Robert. I have previously tried that source with the pruss node. It’s where I started. When it didn’t work, I tried other variants from other people’s posts. Below is the decoded output of my dtbo file with the pruss node. I’ve also trued it with fragment@1 instead of fragment@2. I’ve also tried with both ocp node and pruss node.

dtc -I dts uio_pruss_enable-00A0.dts

/dts-v1/;

/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”, “ti,beaglebone-green”;
part-number = “uio_pruss_enable”;
version = “00A0”;
exclusive-use = “P8.11”, “pru0”, “pru1”;
fragment@0 {
target = <0xdeadbeef>;
overlay {
pinmux_pru_pru_pins {
pinctrl-single,pins = <0x34 0x6>;
linux,phandle = <0x1>;
phandle = <0x1>;
};
};
};
fragment@2 {
target = <0xdeadbeef>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <0x1>;
};
};
symbols {
pru_pru_pins = “/fragment@0/overlay/pinmux_pru_pru_pins”;
};
local_fixups {
fragment@2 {
overlay {
pinctrl-0 = <0x0>;
};
};
};
fixups {
am33xx_pinmux = “/fragment@0:target:0”;
pruss = “/fragment@2:target:0”;
};
};

ok, so I have a working PRU_gpioToggle example on PRU 1 using the uio_pruss driver. After some trial and error and alot of searching the forums I was able to create an overlay that worked:

modified the uio_pruss_enable.dts file to look like below, could have created a new file as well. I took most of everything below from /opt/source/bb.org-overlays/src/arm/cape-universal.dts. dtb=am335x-boneblack-emmc-overlay.dtb in /boot/uEnv.txt I believe, keeps cape-universal from loading which would interfere with my overlay.

/dts-v1/;
/plugin/;

/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”, “ti,beaglebone-green”;

// identification
part-number = “uio_pruss_enable”;
version = “00A0”;

exclusive-use =
“P8.11”, “pru0”, “pru1”, “pruss”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
P8_11_pruout_pin: pinmux_P8_11_pruout_pin { /* Mode 6, Pull-Down, RxActive */
pinctrl-single,pins = <0x034 0x26>;
};
};
};

fragment@1 {
target = <&ocp>;
overlay {
P8_11_pinmux {
compatible = “bone-pinmux-helper”;
status = “okay”;
pinctrl-names = “pruout”;
pinctrl-0 = <&P8_11_pruout_pin>;
};
};
};

};

Then using config-pin:

config-pin overlay uio_pruss_enable
config-pin P8_11 pruout

cat /sys/devices/platform/ocp/ocp:P8_11_pinmux/state
pruout

cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,uio_pruss_enable

Side note: if using PRU_gpioToggle example need to modify gpio=0x8000 to toggle P8_11.