I current have PRU code working on Linux 3.8.13-bone73, and now
want to move to Linux 4.1.x
Having troubles - here is what I have done so far:
-
apt-get install linux-image-4.1.4-ti-r9
(good, or should I use linux-image-4.1.4-bone15 ?) -
Add dtb=am335x-boneblack-overlay.dtb to uEnv.txt
-
Update dtc per GitHub - beagleboard/bb.org-overlays: Device Tree Overlays for bb.org boards
-
Rebuild my dt overlay:
dtc -O dtb -o bbb-k-pru-00A0.dtbo -b 0 -@ bbb-k-pru.dts
cp bbb-k-pru-00A0.dtbo /lib/firmware/ -
Loading the overlay with:
echo “bbb-k-pru” > /sys/devices/platform/bone_capemgr/slots
Which produces this:
[ 43.410941] bone_capemgr bone_capemgr: part_number ‘bbb-k-pru’, version ‘N/A’
[ 43.421476] bone_capemgr bone_capemgr: slot #4: override
[ 43.426969] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 43.434081] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,bbb-k-pru’
[ 43.458733] gpio-of-helper ocp:gpio_helper: ready
[ 43.474759] bone_capemgr bone_capemgr: slot #4: dtbo ‘bbb-k-pru-00A0.dtbo’ loaded; overlay id #0
[ 43.543242] pruss_uio 4a300000.pruss: No children
Now Attempting to run my PRU app produces:
“Failed to open the PRU-ICSS, have you loaded the overlay?”
But, lsmod shows uio_pruss loaded.
Any ideas about what is wrong?
(One thing I was wondering is if I need a new version of the libprussdrv
which I link with for the PRU app. If so, how/where would I get this?)
Thanks.
BTW, For reference my bbb-k-pru.dts is below:
-----cut-----
// Device Tree Overlay for enabling PRU stuff
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “bbb-k-pru”;
version = “00A0”;
/* This overlay uses the following resources */
exclusive-use =
“P9.11”, “P9.13”, “P9.27”, “P9.28”, “P9.25”, “P9.29”, “P9.30”, “pru0”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
gpio_pins: pinmux_gpio_pins { // The GPIO pins
pinctrl-single,pins = <
0x070 0x07 // P9_11 MODE7 | OUTPUT | GPIO pull-down
0x074 0x27 // P9_13 MODE7 | INPUT | GPIO pull-down
;
};
pru_pru_pins: pinmux_pru_pru_pins { // The PRU pin modes
pinctrl-single,pins = <
0x1a4 0x05 // P9_27 pr1_pru0_pru_r31_5, MODE5 | OUTPUT | PRU
0x19c 0x26 // P9_28 pr1_pru0_pru_r30_3, MODE6 | INPUT | PRU
0x1ac 0x26 // P9_25 pr1_pru0_pru_r30_7, MODE6 | INPUT | PRU
0x194 0x26 // P9_29 pr1_pru0_pru_r30_1, MODE6 | INPUT | PRU
0x198 0x26 // P9_30 pr1_pru0_pru_r30_2, MODE6 | INPUT | PRU
;
};
};
};
fragment@1 { // Enable the PRUSS
target = <&pruss>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&pru_pru_pins>;
};
};
fragment@2 { // Enable the GPIOs
target = <&ocp>;
overlay {
gpio_helper {
compatible = “gpio-of-helper”;
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&gpio_pins>;
};
};
};
};
-----cut-----