How to enable all i2c

2,629 views
Skip to first unread message

ngocta...@gmail.com

unread,
Nov 13, 2014, 10:13:51 PM11/13/14
to beagl...@googlegroups.com
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

Richard-tx

unread,
Jan 2, 2015, 4:37:26 AM1/2/15
to beagl...@googlegroups.com, ngocta...@gmail.com
add the following to rc.local

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


der....@gmail.com

unread,
Feb 19, 2015, 4:12:27 AM2/19/15
to beagl...@googlegroups.com, ngocta...@gmail.com
I have the exact same problem and adding Richards recommended line to rc.local does nothing :(
I need the i2c2 bus in order to use the i2c-bus that is connected to the main expansion header. Please, please help me!

Tux Leonard

unread,
Feb 19, 2015, 2:07:30 PM2/19/15
to beagl...@googlegroups.com
Hi der.depp (lustiger Name),

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


2015-02-19 10:12 GMT+01:00 <der....@gmail.com>:
I have the exact same problem and adding Richards recommended line to rc.local does nothing :(
I need the i2c2 bus in order to use the i2c-bus that is connected to the main expansion header. Please, please help me!

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard-tx

unread,
Feb 24, 2015, 10:05:41 AM2/24/15
to beagl...@googlegroups.com, ngocta...@gmail.com
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


Lennart ohnenam

unread,
Feb 25, 2015, 6:49:53 AM2/25/15
to beagl...@googlegroups.com
@Tux: (Man muss das Kind ja beim Namen nennen ;) ) 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?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/xWr27ek18cs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Tux Leonard

unread,
Feb 25, 2015, 3:19:52 PM2/25/15
to beagl...@googlegroups.com
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

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Lennart ohnenam

unread,
Feb 25, 2015, 4:38:09 PM2/25/15
to beagl...@googlegroups.com
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!
Message has been deleted

Jon Peterson

unread,
Jun 7, 2015, 1:48:16 PM6/7/15
to beagl...@googlegroups.com, ngocta...@gmail.com
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.



Reply all
Reply to author
Forward
0 new messages