i2c on RPI-B not working

Winston Smith smith.winston.101 at gmail.com
Thu May 1 00:18:28 UTC 2014


On Wed, Apr 30, 2014 at 8:13 PM, Ian Lepore <ian at freebsd.org> wrote:
> I saw it mentioned on irc the other day that i2c(8) isn't very
> functional on most of our ARM systems.  It's expecting a different
> interface to the i2c hardware in which it sees all the low-level
> protocol events.  Most modern hardware has more of a "do this whole
> transaction for me" type interface.  We probably need to enhance i2c(8)
> to work (as much as it can) in such a mode.

i2c(8) being the user-mode utility; is the i2c kernel implementation functional?

> The i2c eeproms, on the other hand, should just work.  Add 'device icee'
> to the kernel config, and in the dts file make an icee entry that's a
> child of the i2c controller entry.  Something like this (this is for
> wandboard)...
>
>                 i2c at 021a4000
>                 {
>                         status = "okay";
>                         icee at a0 {
>                                 compatible = "atmel,24c256";
>                                 reg = <0xa0>;
>                                 status = "okay";
>                         };
>                 };
>
> You'll end up with a /dev/icee0 device which you can read and write and
> seek and so on.  Note that the device will show up even if the hardware
> isn't there or isn't responding, there's no actual probe for hardware.
> If you do "dd /dev/icee0 | hd" and it comes up all-bits-one that's
> usually a sign that there's no hardware (but it could also be a brand
> new eeprom with nothing written to it).

It sounds very similar to how Linux maps the BBB's EEPROM into
/sys/bus/i2c/devices/0-0050/eeprom

I also have a DS1307 compatible I2C RTC that I'm hoping to support!

Thanks

-W


More information about the freebsd-arm mailing list