Enabling the am335x-boneblack-prucape.dtsi overlay

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?

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
Latest Software Images - BeagleBoard (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 :wink:

Regards,

Thank you for the quick response :slight_smile:

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?

In your overlay, you can add the following:

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

Regards,
John

also make sure in /boot/uEnv.txt

that cape_universal=enable is no longer enabled..

Regards,

Wow, I think it works. Thanks a bunch :slight_smile:

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 :slight_smile:

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?