Cape manager on linux 4.1: can't load bone_eqep2b cape

Hello. I installed the Ubuntu 14.04 on my BBB with kernel 4.1. After that I updated dtc according to this https://github.com/RobertCNelson/bb.org-overlays.
Everything works except the eqep2b device:

root@arm:~# echo bone_eqep2 > /sys/devices/platform/bone_capemgr/slots
root@arm:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-BONE-BACONE
6: P-O-L- 1 Override Board Name,00A0,Override Manuf,bone_eqep2

root@arm:~# echo bone_eqep2b > /sys/devices/platform/bone_capemgr/slots
bash: echo: write error: No such file or directory

dmesg | grep bone

to see what's going on behind the scenes..

Regards,

looks like noise as it loaded fine:

[ 44.754529] bone_capemgr bone_capemgr: part_number 'bone_eqep2b',
version 'N/A'
[ 44.754568] bone_capemgr bone_capemgr: slot #5: override
[ 44.754586] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 44.754605] bone_capemgr bone_capemgr: slot #5: 'Override Board
Name,00A0,Override Manuf,bone_eqep2b'

Regards,

[ 2219.151241] bone_capemgr bone_capemgr: part_number ‘bone_eqep2b’, version ‘N/A’
[ 2219.151335] bone_capemgr bone_capemgr: slot #7: override
[ 2219.151386] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[ 2219.151442] bone_capemgr bone_capemgr: slot #7: ‘Override Board Name,00A0,Override Manuf,bone_eqep2b’

grep part-number bone_eqep2-00A0.dts

part-number = “bone_eqep2”;

grep part-number bone_eqep2b.dts

part-number = “bone_eqep2”;

The source files for eqep2 and eqep2b both have the same part number?
The dts files are in

/opt/source/bb.org-overlays/src/arm

Good point, we can't do that:

https://github.com/beagleboard/bb.org-overlays/commit/cc5c45529402f5e8cea86b703c6e148cf10c0ffc

use "bone_eqep2b" for the one that doesn't conflict with hdmi..

Regards,

much better:

[ 75.725122] bone_capemgr bone_capemgr: part_number 'bone_eqep2b',
version 'N/A'
[ 75.725174] bone_capemgr bone_capemgr: slot #5: override
[ 75.725200] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 75.725229] bone_capemgr bone_capemgr: slot #5: 'Override Board
Name,00A0,Override Manuf,bone_eqep2b'
[ 75.744587] bone_capemgr bone_capemgr: slot #5: dtbo
'bone_eqep2b-00A0.dtbo' loaded; overlay id #1
[ 75.770147] eqep 48304180.eqep: ver. 1.0

and we want to see eqep loaded too..

Regards,

Robert, thank so much.

I tried to run another devices, and I found that all the encoders conflict with somewhat. So, I add encoder 1:

`
root@arm: # echo bone_eqep1 > /sys/devices/platform/bone_capemgr/slots
root@arm: # cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,bone_eqep1

`

There is no error, but actually eqep1 doesn’t work. I looked at syslog:

`
root@arm: # dmesg
[ 73.259486] bone_capemgr bone_capemgr: part_number ‘bone_eqep1’, version ‘N/A’
[ 73.259580] bone_capemgr bone_capemgr: slot #4: override
[ 73.259632] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 73.259687] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,bone_eqep1’
[ 73.283359] bone_capemgr bone_capemgr: slot #4: dtbo ‘bone_eqep1-00A0.dtbo’ loaded; overlay id #0
[ 73.340888] pinctrl-single 44e10800.pinmux: pin 44e108d0.0 already requested by 0-0070; cannot claim for 48302180.eqep
[ 73.359630] pinctrl-single 44e10800.pinmux: pin-52 (48302180.eqep) status -22
[ 73.378359] pinctrl-single 44e10800.pinmux: could not request pin 52 (44e108d0.0) from group pinctrl_eqep1_pins on device pinctrl-single
[ 73.392369] eqep 48302180.eqep: Error applying setting, reverse things back
[ 73.400930] eqep 48302180.eqep: ver. 1.0
[ 73.401220] pinctrl-single 44e10800.pinmux: pin 44e108d0.0 already requested by 0-0070; cannot claim for 48302180.eqep
[ 73.416060] pinctrl-single 44e10800.pinmux: pin-52 (48302180.eqep) status -22
[ 73.424119] pinctrl-single 44e10800.pinmux: could not request pin 52 (44e108d0.0) from group pinctrl_eqep1_pins on device pinctrl-single
[ 73.437039] eqep 48302180.eqep: Error applying setting, reverse things back
[ 73.444534] eqep 48302180.eqep: unable to select pin group

`

The same happens with eqep2.

That would be expected...

It shares pins are already muxed with the hdmi output..

So use one of the dtb= overrides in /boot/uEnv.txt

dtb=am335x-boneblack-emmc-overlay.dtb

or

dtb=am335x-boneblack-overlay.dtb

BBB compatibility issues:

https://github.com/beagleboard/bb.org-overlays/blob/master/readme.md

Regards,

I had used : sh -c “echo 'RMS-BBBCAPE> /sys/devices/platform/bone_capemgr/slots”
Now I want to get rid of it from eeprom override, how can I do that?

Best regards,
Kevin

Simple, solder an i2c eeprom to your board..

See the step by step here:

http://papermint-designs.com/community/node/331

Regards,

Thanks Robert,

But seems like BBB memorized the previous setting, how can it be erase it by adding a eeprom?

Regards,
Kevin

There is no memorization...

Either it has an eeprom, or somewhere you setup the kernel to autoload it..

start with:

cat /proc/cmdline

and look in /boot/uEnv.txt

Regards,

Thank you Robert!
Found the issue, my ex-colleague made the BBB reload it in a system service

Regards,
Kevin

Good point, we can’t do that:

https://github.com/beagleboard/bb.org-overlays/commit/cc5c45529402f5e8cea86b703c6e148cf10c0ffc

use “bone_eqep2b” for the one that doesn’t conflict with hdmi…

Regards,


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

Hi - is this important ?? not really sure myself, I’m a noob

root@beaglebone:~/bb.org-overlays# grep ‘part-number = “cape-bone-universal”’ src/arm/*.dts
src/arm/cape-univ-emmc-00A0.dts: part-number = “cape-bone-universal”;
src/arm/cape-universal-00A0.dts: part-number = “cape-bone-universal”;
src/arm/cape-universaln-00A0.dts: part-number = “cape-bone-universal”;

uname -a
Linux beaglebone 4.4.1-bone5 #1 Fri Feb 5 21:57:55 UTC 2016 armv7l GNU/Linux