Help with PRU on Beaglebone Black

Hello all,

I’m trying to get the PRU on the BBB working. I want to use it to drive two pairs of 4 select lines for a couple analog multiplexer/demultiplexers.

I’ve followed the instructions here with no success:
http://www.element14.com/community/community/knode/single-board_computers/next-gen_beaglebone/blog/2013/05/22/bbb--working-with-the-pru-icssprussv2

This is my device tree file:

/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “BB-BONE-PRU”;
version = “00A0”;
exclusive-use =
“P8.39”,
“P8.40”,
“P8.41”,
“P8.42”,
“P8.43”,
“P8.44”,
“P8.45”,
“P8.46”,
“pruss”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
pru_wcsp_pins: wcsp_select_lines {
pinctrl-single,pins = <
0xA0 0x05 // P8:45 (pr1_pru1_pru_r30_0)
0xA4 0x05 // P8:46 (pr1_pru1_pru_r30_1)
0xA8 0x05 // P8:43 (pr1_pru1_pru_r30_2)
0xAC 0x05 // P8:44 (pr1_pru1_pru_r30_3)
0xB0 0x05 // P8:41 (pr1_pru1_pru_r30_4)
0xB4 0x05 // P8:42 (pr1_pru1_pru_r30_5)
0xB8 0x05 // P8:39 (pr1_pru1_pru_r30_6)
0xBC 0x05 // P8:40 (pr1_pru1_pru_r30_7)

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

Since the pins I need conflict with the EMMC and the HDMI outputs, I’ve used the kernel command line option “capemgr.disable_partno” to prevent them from being loaded.

The PRU mapping appears to work using the TI library, but nothing whatsoever happens at the outputs.

The tree seems to apply:

[ 1367.507694] bone-capemgr bone_capemgr.9: part_number ‘BB-BONE-PRU-WCSP’, version ‘N/A’
[ 1367.516818] bone-capemgr bone_capemgr.9: slot #9: generic override
[ 1367.523347] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 9
[ 1367.531357] bone-capemgr bone_capemgr.9: slot #9: ‘Override Board Name,00A0,Override Manuf,BB-BONE-PRU-WCSP’
[ 1367.541824] bone-capemgr bone_capemgr.9: slot #9: Requesting part number/version based 'BB-BONE-PRU-WCSP-00A0.dtbo
[ 1367.552655] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware ‘BB-BONE-PRU-WCSP-00A0.dtbo’ for board-name ‘Override Board Name’, version ‘00A0’
[ 1367.568311] bone-capemgr bone_capemgr.9: slot #9: dtbo ‘BB-BONE-PRU-WCSP-00A0.dtbo’ loaded; converting to live tree
[ 1367.579926] bone-capemgr bone_capemgr.9: slot #9: #2 overlays
[ 1367.586354] bone-capemgr bone_capemgr.9: slot #9: Applied #2 overlays.

… but the content of /sys/kernel/debug/pinctrl/44e10800.pinmux/pins never changes, so it would seem something isn’t happening that is supposed to.

Any thoughts?

Thanks very much,
Calvin

I took care of that in the boot device tree. Forgot to specify that, sorry.

It was in the overlay as well; I saw a comment somewhere that re-enabling it could cause problems so I took it out.

you need to add a fragment that targets the pruss to enable it. Have a look at the BB-BONE- PRU*.dts files here -
https://github.com/beagleboard/cape-firmware/tree/master/dts

You’re absolutely right! Got it working with the following DTS:

/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “BB-BONE-PRU-WCSP”;
version = “00A0”;
exclusive-use =
“P8.39”,
“P8.40”,
“P8.41”,
“P8.42”,
“P8.43”,
“P8.44”,
“P8.45”,
“P8.46”,
“pru0”,
“pru1”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
pru_gpio_pins: pinmux_pru_gpio_pins {
pinctrl-single,pins = <
0xA0 0x0f /* P8:45 (pr1_pru1_pru_r30_0) /
0xA4 0x0f /
P8:46 (pr1_pru1_pru_r30_1) /
0xA8 0x0f /
P8:43 (pr1_pru1_pru_r30_2) /
0xAC 0x0f /
P8:44 (pr1_pru1_pru_r30_3) /
0xB0 0x0f /
P8:41 (pr1_pru1_pru_r30_4) /
0xB4 0x0f /
P8:42 (pr1_pru1_pru_r30_5) /
0xB8 0x0f /
P8:39 (pr1_pru1_pru_r30_6) /
0xBC 0x0f /
P8:40 (pr1_pru1_pru_r30_7) */

;
};
pru_pru_pins: pinmux_pru_pru_pins {
pinctrl-single,pins = <
0xA0 0x25 /* P8:45 (pr1_pru1_pru_r30_0) /
0xA4 0x25 /
P8:46 (pr1_pru1_pru_r30_1) /
0xA8 0x25 /
P8:43 (pr1_pru1_pru_r30_2) /
0xAC 0x25 /
P8:44 (pr1_pru1_pru_r30_3) /
0xB0 0x25 /
P8:41 (pr1_pru1_pru_r30_4) /
0xB4 0x25 /
P8:42 (pr1_pru1_pru_r30_5) /
0xB8 0x25 /
P8:39 (pr1_pru1_pru_r30_6) /
0xBC 0x25 /
P8:40 (pr1_pru1_pru_r30_7) */
;
};
};
};
fragment@2 {
target = <&pruss>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&pru_pru_pins>;
};
};
};

Thanks very much!