Enabling the am335x-boneblack-prucape.dtsi overlay

893 views
Skip to first unread message

lucas

unread,
Feb 28, 2016, 10:24:01 AM2/28/16
to BeagleBoard
I am trying to figure out the how to configure the device tree overlay for the PRU-cape.

I am using the latest recommended image from http://beagleboard.org/latest-images (i.e. Debian 8.3 Linux beaglebone 4.1.15-ti-rt-r43) without any changes. 

I uncommented the following line in uEnv.txt because I read that the HDMI interface has to be disabled
##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
dtb=am335x-boneblack-overlay.dtb

This is what works:
1.) I can build and load the PRU_LED0.out from TI's software support package onto PRU0 with remoteproc
2.) Then I use the command "config-pin P9.30 pruout" and the led blinks

But I this only works with this particular pin. I would actually like is to enable all the pins for the PRU that are in defined "am335x-boneblack-prucape.dtsi". I have tried a myriad things (I don't really want to list all of them, but if it helps i will). 

Can anyone give me a hint on how to enable the overlay? 

There seem to be different ways to enable pins i.e. use "config-pin", loading adding an overlay to "/sys/devices/platform/bone_capemgr/slots", going to the "/opt/source/dtb-4.1-ti/" directory and changing and making the files there. What is the recommended way? 

Should I use a different image?




Robert Nelson

unread,
Feb 28, 2016, 10:43:12 AM2/28/16
to Beagle Board
On Sun, Feb 28, 2016 at 9:24 AM, lucas <lucas....@gmail.com> wrote:
> I am trying to figure out the how to configure the device tree overlay for
> the PRU-cape.
>
> I am using the latest recommended image from
> http://beagleboard.org/latest-images (i.e. Debian 8.3 Linux beaglebone
> 4.1.15-ti-rt-r43) without any changes.
>
> I uncommented the following line in uEnv.txt because I read that the HDMI
> interface has to be disabled
> ##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
> dtb=am335x-boneblack-overlay.dtb
>
> This is what works:
> 1.) I can build and load the PRU_LED0.out from TI's software support package
> onto PRU0 with remoteproc
> 2.) Then I use the command "config-pin P9.30 pruout" and the led blinks
>
> But I this only works with this particular pin. I would actually like is to
> enable all the pins for the PRU that are in defined
> "am335x-boneblack-prucape.dtsi". I have tried a myriad things (I don't
> really want to list all of them, but if it helps i will).

for reference:

https://git.ti.com/pru-software-support-package/pru-software-support-package/trees/dev/pru_cape

(i didn't realize this existed)

>
> Can anyone give me a hint on how to enable the overlay?

Oh that's not an overlay..

Using the "dtb-rebuilder" just add:

#include "am335x-boneblack-prucape.dtsi"

>
> There seem to be different ways to enable pins i.e. use "config-pin",
> loading adding an overlay to "/sys/devices/platform/bone_capemgr/slots",
> going to the "/opt/source/dtb-4.1-ti/" directory and changing and making the
> files there. What is the recommended way?

You do it anyway you want that works..

overlay is best for development,
config-pin is nice if your doing lots of dynamic changes
/opt/source/dtb-4.1-ti/ us nice if you just want to set and forget about it ;)

Regards,

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

lucas

unread,
Feb 28, 2016, 5:25:09 PM2/28/16
to BeagleBoard
Thank you for the quick response :)

> Using the "dtb-rebuilder" just add: 
>
> #include "am335x-boneblack-prucape.dtsi" 

So I added this to the end of am335x-boneblack-overlay.dts and compiled, but now I keep getting the following error:

[   16.995007] davinci-mcasp 4803c000.mcasp: invalid tdm slots: 0
[   20.377029] pinctrl-single 44e10800.pinmux: pin 44e1097c.0 already requested by 4819c000.i2c; cannot claim for 4a300000.pruss
[   20.764537] pinctrl-single 44e10800.pinmux: pin-95 (4a300000.pruss) status -22
[   21.041264] pinctrl-single 44e10800.pinmux: could not request pin 95 (44e1097c.0) from group pru_cape_bone_pins  on device pinctrl-single
[   21.526351] pruss-rproc 4a300000.pruss: Error applying setting, reverse things back

I assume that I have to somehow deactivate the i2c in some file. Could you give me some idea how to do that or where to look? 

John Syne

unread,
Feb 28, 2016, 6:33:53 PM2/28/16
to beagl...@googlegroups.com
In your overlay, you can add the following:

fragment@1 {
target = <&I2c2>;
__overlay__ {
status = “disabled”;
}
}

Regards,
John




--
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 beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
Feb 28, 2016, 8:48:00 PM2/28/16
to Beagle Board
On Sun, Feb 28, 2016 at 4:25 PM, lucas <lucas....@gmail.com> wrote:
> Thank you for the quick response :)
>
>> Using the "dtb-rebuilder" just add:
>>
>> #include "am335x-boneblack-prucape.dtsi"
>
> So I added this to the end of am335x-boneblack-overlay.dts and compiled, but
> now I keep getting the following error:
>
> [ 16.995007] davinci-mcasp 4803c000.mcasp: invalid tdm slots: 0
> [ 20.377029] pinctrl-single 44e10800.pinmux: pin 44e1097c.0 already
> requested by 4819c000.i2c; cannot claim for 4a300000.pruss
> [ 20.764537] pinctrl-single 44e10800.pinmux: pin-95 (4a300000.pruss)
> status -22
> [ 21.041264] pinctrl-single 44e10800.pinmux: could not request pin 95
> (44e1097c.0) from group pru_cape_bone_pins on device pinctrl-single
> [ 21.526351] pruss-rproc 4a300000.pruss: Error applying setting, reverse
> things back

also make sure in /boot/uEnv.txt

that cape_universal=enable is no longer enabled..

lucas

unread,
Mar 1, 2016, 6:54:32 AM3/1/16
to BeagleBoard
Wow, I think it works. Thanks a bunch :) 

This is what I did. 

In uEnv.txt:
1.) Uncomment "dtb=am335x-boneblack-overlay.dtb" 
2.) change the line: "cmdline=coherent_pool=1M quiet cape_universal=disable" (from enable to disable cape)

Inside /opt/source you'll find the dtb-rebuilder. It should already be there, but I cloned the latest one directly from Robert's github https://github.com/RobertCNelson/dtb-rebuilder.git

Inside /opt/source/dtb-rebuilder/src/arm
1.) open: am335x-boneblack-overlay.dts and add the following at the end of the file:

&i2c2 {
        status = "disabled";

};
#include "pru_cape-am335x-boneblack-prucape.dtsi"

2.) Get the file "pru_cape-am335x-boneblack-prucape.dtsi" from https://git.ti.com/pru-software-support-package/pru-software-support-package/trees/dev/pru_cape and copy it into the same directory

3.) make
4.) make install
5.) reboot
6.) be amazed :)

Eshaan Ghosh

unread,
Jun 28, 2016, 3:19:08 PM6/28/16
to BeagleBoard
I followed all the steps explained by lucas. But at make it is saying that there are no targets specified. which one should i specify?
Reply all
Reply to author
Forward
0 new messages