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.
On Tuesday, January 17, 2017 at 12:14:40 PM UTC-5, Kevin Cox wrote:
>
> 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.dt*b
> #include "am33xx-pruss-uio.dtsi"
>
> *modify /etc/modprobe.d/pruss-blacklist.con*f
> 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
>
>
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/4b4f06cb-db84-49db-8014-9b2dd86508d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.