How to enable all i2c

I use I2C-Tools to detect the i2c like:

root@android:/ # i2cdetect -l
i2c-1 i2c OMAP I2C adapter I2C adapter
i2c-3 i2c OMAP I2C adapter I2C adapter

but in beablebone black(ver C), it has 3 i2c, so how to enable all.
please give me some advices

add the following to rc.local

echo BB-I2C1 > /sys/devices/bone_capemgr.9/slots

I have the exact same problem and adding Richards recommended line to rc.local does nothing :frowning:
I need the i2c2 bus in order to use the i2c-bus that is connected to the main expansion header. Please, please help me!

Hi der.depp (lustiger Name),

is /sys/devices/bone_capemgr.9/ present in your file system?

I think that the issue stems from older versions of debian based linux and the newer version that use a device tree.

If the echo statement fails then:

To enable the I2c-1 on the BeagleBone Black Rev A, B and C:

  1. Rev A/B: Open the file /media/BEAGLEBONE/uEnv.txt in an editor (vim/nano)
  2. Rec C: Open the file /boot/uboot/uEnv.txt in an editor (vim/nano)
  3. Add the key “capemgr.enable_partno=”
  4. Add the ports you want to enable, comma separated (BB-I2C0, BB-I2C1, etc)
  5. Reboot
    An example line looks like this:

root@beaglebone:/dev# cat /media/BEAGLEBONE/uEnv.txt
optargs=quiet drm.debug=7 capemgr.enable_partno=BB-I2C1

@Tux: (Man muss das Kind ja beim Namen nennen :wink: ) I don’t have the entire path. I’m missing the bone_capemgr.9

@Richard: I am using ubuntu on the Beagleboard xM. Any chance you know where to find it on this configuration?

I had the same problem (missing cape-manager ) in the newer kernel versions a few weeks ago.
Needed to switch back to kernel 3.8.13 to get the cape-manager working. I haven’t had time to investigate more.

If you want to give it a try:

sudo apt-get update
sudo apt-get install linux-image-3.8.13-bone67
sudo reboot

Sounds interesting. I was able to change the i2c on the hardware. Just took a stiff cable to connect to the LCD Header of the BBxM, which has the i2c3 interface. If I downgrade the kernel I’m not sure whether all the other stuff on the Board still works. Is that made for the Beagleboard or would I have to worry?

Thanks for the advice!

My experience is that the echo only works if you are logged on as root. it never worked with sudo for me.
I found uEnv.txt at /boot/uEnv.txt

For fear of opening a “can of worms”, the numbering of the three I2C buses is, for lack of a better term, illogical. From the aspect of an engineer, programmer or human – especially someone new to BB and/or to embedded systems.

debian@beaglebone:/$ ls /sys/class/i2c-dev/ -l
total 0
lrwxrwxrwx 1 root root 0 Mar 3 19:03 i2c-0 → …/…/devices/ocp.3/44e0b000.i2c/i2c-0/i2c-dev/i2c-0
lrwxrwxrwx 1 root root 0 Mar 3 19:03 i2c-1 → …/…/devices/ocp.3/4819c000.i2c/i2c-1/i2c-dev/i2c-1
lrwxrwxrwx 1 root root 0 Mar 3 19:03 i2c-2 → …/…/devices/ocp.3/4802a000.i2c/i2c-2/i2c-dev/i2c-2

so:
i2c-0 is hardware bus 0
i2c-1 is hardware bus 2
i2c-2 is hardware bus 1

Both having to find and edit uEnv.txt and then having to deal with the mixed up numbering just doesn’t make any sense to me…
There you have it, my bias.