How enable pruss uio with 4.4.x TI kernel

778 views
Skip to first unread message

Alexander Rössler

unread,
Aug 31, 2017, 11:55:54 AM8/31/17
to BeagleBoard
How can I enable the pruss uio driver for the 4.4 TI kernels (RT to be exact)?

It looks like the pru_rproc driver is always loaded at boot time and blocks the uio from working correctly. I have tried to enable/disable the cape_overlays in the uEnv.txt without success.

I'm using the IoT Stretch Snapshot image right now, as this the only one where the PRU driver does not make problems during boot.

What I have tried so far:
* Blacklisting pru_rproc - did not work, pru_rproc still loads
* enabling/disabling the uEnv.txt settings
* loading uio_pruss manually via modprobe
* loading the uio_pruss_enable overlay manually

dmesg does not show anything suspicious. I checked for anything to show up in /sys/class/uio and /dev/uio*

Any ideas what could be the problem?


Robert Nelson

unread,
Aug 31, 2017, 12:00:29 PM8/31/17
to Beagle Board
first make sure u-boot overlays are enabled, run:

sudo /opt/scripts/tools/version.sh

With v4.4.x-ti allow u-boot overlays to enable/disable these:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_PRU_Options

ti's v4.4.x-remote_proc pru select:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo

for classicuio_pruss:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

Regards,

--
Robert Nelson
https://rcn-ee.com/

Alexander Rössler

unread,
Aug 31, 2017, 12:22:06 PM8/31/17
to BeagleBoard
Does not help, even if I enable pru overlay in the the uEnv.txt nothing shows up.

git:/opt/scripts/:[2ce750d881941c5189db9e189af90517e11c079f]
eeprom:[A335BNLT00C02814BBBK6438]
dogtag:[BeagleBoard.org Debian Image 2017-08-21]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-rc2-00002-g84a7f2]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2015.01-00001-gb2412df]
kernel:[4.4.84-ti-rt-r120]
nodejs:[v6.11.2]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=0]
pkg:[bb-cape-overlays]:[4.4.20170728.0-0rcnee1~stretch+20170728]
pkg:[bb-wl18xx-firmware]:[1.20170821-0rcnee1~stretch+20170821]
pkg:[firmware-ti-connectivity]:[20161130-3]

machinekit@beaglebone:~$ sudo dmesg | grep pru
[    4.687027] ti-pruss 4a300000.pruss: creating PRU cores and other child platform devices
[    4.688454] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[    4.718049] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !

 machinekit@beaglebone:~$ lsmod 
Module                  Size  Used by
uio_pruss               4629  0
snd_soc_hdmi_codec      7016  1
pvrsrvkm              442075  0
snd_soc_simple_card    10188  0
omap_sham              27604  0
omap_aes_driver        24545  0
snd_soc_davinci_mcasp    21016  2
snd_soc_edma            1482  1 snd_soc_davinci_mcasp
snd_soc_omap            4317  1 snd_soc_davinci_mcasp
omap_rng                5800  0
snd_soc_core          193427  5 snd_soc_hdmi_codec,snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap,snd_soc_simple_card
rng_core                9073  1 omap_rng
tilcdc                 33205  0
snd_pcm_dmaengine       6022  2 snd_soc_core,snd_soc_omap
snd_pcm               104606  5 snd_soc_hdmi_codec,snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
snd_timer              24319  1 snd_pcm
snd                    74611  3 snd_soc_core,snd_timer,snd_pcm
soundcore               8644  1 snd
evdev                  13972  1
tda998x                16533  0
uio_pdrv_genirq         4301  0
uio                    11073  2 uio_pruss,uio_pdrv_genirq
usb_f_mass_storage     50607  2
8021q                  24326  0
garp                    7715  1 8021q
mrp                     9531  1 8021q
stp                     2533  1 garp
usb_f_acm               8601  2
llc                     6405  2 stp,garp
u_serial               13567  3 usb_f_acm
usb_f_ecm              11598  2
usb_f_rndis            26699  2
u_ether                14779  2 usb_f_ecm,usb_f_rndis
libcomposite           54797  16 usb_f_acm,usb_f_ecm,usb_f_rndis,usb_f_mass_storage
iptable_nat             2336  0
nf_conntrack_ipv4      18312  1
nf_defrag_ipv4          1997  1 nf_conntrack_ipv4
nf_nat_ipv4             6966  1 iptable_nat
nf_nat                 18982  1 nf_nat_ipv4
nf_conntrack          138629  3 nf_nat,nf_nat_ipv4,nf_conntrack_ipv4
iptable_mangle          2060  0
iptable_filter          2061  0
spidev                  9251  0
tieqep                 10422  0
pwm_tiehrpwm            6241  0
ip_tables              16062  3 iptable_filter,iptable_mangle,iptable_nat
x_tables               21051  3 ip_tables,iptable_filter,iptable_mangle
pruss_intc              9031  0
pruss                  12557  0

Robert Nelson

unread,
Aug 31, 2017, 12:26:57 PM8/31/17
to Beagle Board
On Thu, Aug 31, 2017 at 11:22 AM, Alexander Rössler
<mail.ar...@gmail.com> wrote:
> Does not help, even if I enable pru overlay in the the uEnv.txt nothing
> shows up.
>
>> git:/opt/scripts/:[2ce750d881941c5189db9e189af90517e11c079f]
>> eeprom:[A335BNLT00C02814BBBK6438]
>> dogtag:[BeagleBoard.org Debian Image 2017-08-21]
>> bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot
>> 2017.09-rc2-00002-g84a7f2]
>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2015.01-00001-gb2412df]

So, your eMMC's bootloader is getting in the way, hence your not
booting what you expect:

so kill the MLO file via:

sudo dd if=/dev/zero of=/dev/mmcblk1 count=1 seek=1 bs=128k

Alexander Rössler

unread,
Aug 31, 2017, 2:11:56 PM8/31/17
to BeagleBoard
Thanks, that looks very promising.

Alexander Rössler

unread,
Sep 1, 2017, 3:40:46 AM9/1/17
to BeagleBoard
Good, loading the correct PRU driver works now.

However, now I face another problem: When I try to load a device tree overlay from the command line:

echo cape-unversalh > /sys/devices/platform/bone_capemgr/slots

my terminal gets stuck. Running dmesg from another terminal I get:

[  275.976817] bone_capemgr bone_capemgr: part_number 'cape-unversalh', version 'N/A'
[  275.976866] bone_capemgr bone_capemgr: slot #4: override
[  275.976885] bone_capemgr bone_capemgr: slot #4: auto loading handled by U-Boot

Cat reveals:
machinekit@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots
0: ------  -1  
1: ------  -1  
2: ------  -1  
3: ---l--  -1  
4: --O---  -1
 
I get the same result when disabling uboot overlays in the uEnv.txt

Robert Nelson

unread,
Sep 1, 2017, 9:43:50 AM9/1/17
to Beagle Board, Alexander Rössler
On Fri, Sep 1, 2017 at 2:40 AM, Alexander Rössler
<mail.ar...@gmail.com> wrote:
> Good, loading the correct PRU driver works now.
>
> However, now I face another problem: When I try to load a device tree
> overlay from the command line:
>
>> echo cape-unversalh > /sys/devices/platform/bone_capemgr/slots
>
>
> my terminal gets stuck. Running dmesg from another terminal I get:
>
>> [ 275.976817] bone_capemgr bone_capemgr: part_number 'cape-unversalh',
>> version 'N/A'
>> [ 275.976866] bone_capemgr bone_capemgr: slot #4: override
>> [ 275.976885] bone_capemgr bone_capemgr: slot #4: auto loading handled by
>> U-Boot
>
>
> Cat reveals:
> machinekit@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots
> 0: ------ -1
> 1: ------ -1
> 2: ------ -1
> 3: ---l-- -1
> 4: --O--- -1
>
> I get the same result when disabling uboot overlays in the uEnv.txt

cape-universal is also enabled by default with u-boot overlays..

To switch between the 3 different cape-universal overlays, utilize
these 4 variables:

To Disable eMMC:

disable_uboot_overlay_emmc=1

To Disable HDMI VIDEO & AUDIO:

disable_uboot_overlay_video=1

To Disable HDMI AUDIO:

disable_uboot_overlay_audio=1

To Disable WL1835:

disable_uboot_overlay_wireless=1

ps, if you plug in a usb-serial adapter, you'll see exactly what
u-boot is loading. ;)

erich...@gmail.com

unread,
Jun 13, 2019, 4:51:24 PM6/13/19
to BeagleBoard
I have had the same problem, but cannot use the solution (wiping the eMMC's bootloader) because we use that for other purposes. What did you mean by the eMMC uboot getting  in the way?
Reply all
Reply to author
Forward
0 new messages