On Thursday, October 31, 2013 7:49:27 AM UTC-4, Will Kostelecky wrote:
>
> It's on i2c-1.   The frustrating thing is that the HW works with another 
> image that I built a while ago.  I am now trying to build a clean new image 
> (post all my development messing around) and it is not working with the new 
> build.   I am pretty sure I did not have to do anything other than what I 
> am doing now but obviously I have missed something in the new build.
>

Newer builds require the use of a device tree overlay to ensure the 
hardware you need is available, in older builds, you had to rebuild the 
kernel if what you wanted wasn't available.  Although recent builds have 
had the dto support, I have found various issues here and there.

So i2c-1 is the enumeration linux gave one of the i2c buses and does not 
necessarily correspond to the i2c pins you are using.  The BBB has two 
usable i2c devices [1], as follows:

   - i2c0: Not exposed in the expansion headers
   - i2c1: pins P9 17,18 (and 24,26)
   - i2c2: pins P9 19,20 (and 21,22)

The i2c devices appear in the AM335x memory map [2] at the following 
locations:

   - i2c0: 0x44E0_B000
   - i2c1: 0x4802_A000
   - i2c2: 0x4819_C000

Linux creates mappings in the /sys/bus/i2c/devices pseudo-filesystem that 
indicates the mappings from the i2c-* devices to the underlying hardware:

root@beaglebone:~# ls -l /sys/bus/i2c/devices/i2c-*
lrwxrwxrwx    1 root     root             0 Jan  1  2000 
/sys/bus/i2c/devices/i2c-0 -> ../../../devices/ocp.2/*44e0b000*.i2c/i2c-0
lrwxrwxrwx    1 root     root             0 Jan  1  2000 
/sys/bus/i2c/devices/i2c-1 -> ../../../devices/ocp.2/*4819c000*.i2c/i2c-1

So you can see here, that on my BBB, i2c0 is mapped to /dev/i2c-0 and i2c2 
is mapped to /dev/i2c-1.

You can check your system, but I suspect that i2c-1 is actually i2c2 on 
pins P9_19,20.


-W.



[1] BBB I2C Ports.  See 
http://circuitco.com/support/index.php?title=Cape_Expansion_Headers#2_I2C_Ports
[2] TI Sitara AM335x SRM, page 211, 212. See 
http://elinux.org/images/6/65/Spruh73c.pdf
 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to