Hi Bas,
I know it has been a while since you’ve talked about this topic, but I came across it while searching for a solution for my problem. (beaglebone black with Debian wheezy kernel 3.8.13)
I also want to drive some pins with the “heartbeat” and “cpu0” events, and I succeeded, however, by changing the Data Tree Blob ( /boot/uboot/dts/am335x-boneblack.dtb ); converting to .dts, modifying and converting back to .dtb. But I wanted to create a Overlay that so I could load and unload at my taste.
I’ve created the overlay as follows in file /lib/firmware/activityOnPins-00A0.dts:
`
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
/* identification */
part-number = “activityOnPins”;
version = “V1”;
exclusive-use =
“P9.14”,
“P9.16”,
“ehrpwm1a”,
“ehrpwm1b”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
act_leds: pin_mux_act_leds_pins {
pinctrl-single,pins = <
0x48 0x7
0x4c 0x7
;
};
};
};
fragment@1 {
target = <&ocp>;
overlay {
activity_leds {
compatible = “gpio-leds”;
pinctrl-names = “default”;
pinctrl-0 = <&act_leds>;
actled_heartbeat {
label = “beaglebone:actled:heartbeat”;
gpios = <&gpio1 18 0>;
linux,default-trigger = “heartbeat”;
default-state = “off”;
};
actled_cpu {
label = “beaglebone:actled:cpu”;
gpios = <&gpio1 19 0>;
linux,default-trigger = “cpu0”;
default-state = “off”;
};
};
};
};
};
`
I compile it with:
root@beaglebone:/lib/firmware# dtc -O dtb -o activityOnPins-00A0.dtbo -b 0 -@ activityOnPins-00A0.dts
without any problems; then I load it with:
root@beaglebone:/lib/firmware# echo activityOnPins > /sys/devices/bone_capemgr.9/slots
And I can confirm it it appears on the slot. However checking dmesg I get:
[ 165.034412] bone-capemgr bone_capemgr.9: part_number ‘activityOnPins’, version ‘N/A’
[ 165.034605] bone-capemgr bone_capemgr.9: slot #8: generic override
[ 165.034657] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 8
[ 165.034709] bone-capemgr bone_capemgr.9: slot #8: ‘Override Board Name,00A0,Override Manuf,activityOnPins’
[ 165.037350] bone-capemgr bone_capemgr.9: slot #8: Requesting part number/version based 'activityOnPins-00A0.dtbo
[ 165.037418] bone-capemgr bone_capemgr.9: slot #8: Requesting firmware ‘activityOnPins-00A0.dtbo’ for board-name ‘Override Board Name’, version ‘00A0’
[ 165.043234] bone-capemgr bone_capemgr.9: slot #8: dtbo ‘activityOnPins-00A0.dtbo’ loaded; converting to live tree
[ 165.044391] bone-capemgr bone_capemgr.9: slot #8: #2 overlays
[ 165.053464] of_get_named_gpio_flags exited with status 19
[ 165.053518] of_get_named_gpio_flags exited with status 18
[ 165.053561] of_get_named_gpio_flags exited with status 19
[ 165.054122] of_get_named_gpio_flags exited with status 18
[ 165.059018] bone-capemgr bone_capemgr.9: slot #8: Applied #2 overlays.
is it normal? I also see that the directories /sys/class/leds/beaglebone:actled:cpu and /sys/class/leds/beaglebone:actled:heartbeat are created.
My problem is, after loading the dtbo the pins don’t start indicating the CPU’s and Heartbeat, and I can’t even control them manually by writing to “brightness” file. Do you know where I’m doing the mistake?
I hope you can help me. Thank you a lot.
cumps,
JCBastos Portela