# I2C Interface (Header P22) - I can\`t use this interface.

**URL:** <https://forums.digi.com/t/i2c-interface-header-p22-i-can-t-use-this-interface/11179>\
**Category:** Linux\
**Tags:** hardware\
**Created:** [September 14, 2010, 10:05am UTC](https://forums.digi.com/t/i2c-interface-header-p22-i-can-t-use-this-interface/11179 "2010-09-14T10:05:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![song0369](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@song0369](https://forums.digi.com/u/song0369)\
**Post date:** [September 14, 2010, 10:05am UTC](https://forums.digi.com/t/i2c-interface-header-p22-i-can-t-use-this-interface/11179/1 "2010-09-14T10:05:41Z")

</div>

Hi. nice to meet you.

I don`t speak english very well.  
please, understand it.

I use Digi ConnectCore i.mx51.

I want use I2C interface(Header P22).  
(Connect to PCA9554 expander)

I have next setting setp.

1)setting to kernel config.  
device driver -\> GPIO support -\> PCA953x, PCA955x, TCA64xx, and MAX7310 I/O ports  
device driver -\> i2c support -\> i2c system bus driver -\> mxc i2c support  
device driver -\> i2c support -\> i2c device interface  
system type -\> Freescale MXC Implementations -\> I2C interface optoin -\> Enable I2C1 module  
system type -\> Freescale MXC Implementations -\> I2C interface optoin -\> Enable I2C2 module

2)testing in board.(I use i2c-tools)  
Explan to english is very hard.  
so, See you that I input command.

[root /]# ls /dev/i2c-\* -al  
crw-rw---- 1 root root 89, 0 Jan 4 23:26 /dev/i2c-0  
crw-rw---- 1 root root 89, 1 Jan 4 23:26 /dev/i2c-1

[root /]# i2cdetect -l  
i2c-0 i2c mxc\_i2c I2C adapter  
i2c-1 i2c mxc\_i2c I2C adapter

[root /]# i2cdetect 0  
WARNING! This program can confuse your I2C bus, cause data loss and worse!  
I will probe file /dev/i2c-0.  
I will probe address range 0x03-0x77.

Continue? [Y/n]  
0 1 2 3 4 5 6 7 8 i2c-adapter i2c-0: Bus Arbitration lost  
9 a b c d e f  
00: i2c-adapter i2c-0: Could not grab Bus ownership  
– i2c-adapter i2c-0: Bus Arbitration lost  
i2c-adapter i2c-0: Could not grab Bus ownership  
– i2c-adapter i2c-0: Bus Arbitration lost  
…  
– i2c-adapter i2c-0: Bus Arbitration lost  
i2c-adapter i2c-0: Could not grab Bus ownership  
– i2c-adapter i2c-0: Bus Arbitration lost  
i2c-adapter i2c-0: Could not grab Bus ownership

[root /]# i2cdetect 1  
WARNING! This program can confuse your I2C bus, cause data loss and worse!  
I will probe file /dev/i2c-1.  
I will probe address range 0x03-0x77.  
Continue? [Y/n] y  
0 1 2 3 4 5 6 7 8 i2c-adapter i2c-1: Could not grab Bus ownership  
9 a b c d e f  
00: i2c-adapter i2c-1: Could not grab Bus ownership  
– – i2c-adapter i2c-1: Could not grab Bus ownership  
– i2c-adapter i2c-1: Could not grab Bus ownership  
…  
– i2c-adapter i2c-1: Could not grab Bus ownership

[root /]# find /sys/bus/i2c/drivers  
/sys/bus/i2c/drivers  
/sys/bus/i2c/drivers/dummy  
/sys/bus/i2c/drivers/dummy/uevent  
/sys/bus/i2c/drivers/dummy/unbind  
/sys/bus/i2c/drivers/dummy/bind  
/sys/bus/i2c/drivers/dev\_driver  
/sys/bus/i2c/drivers/dev\_driver/uevent  
/sys/bus/i2c/drivers/dev\_driver/unbind  
/sys/bus/i2c/drivers/dev\_driver/bind  
/sys/bus/i2c/drivers/pca953x  
/sys/bus/i2c/drivers/pca953x/module  
/sys/bus/i2c/drivers/pca953x/uevent  
/sys/bus/i2c/drivers/pca953x/unbind  
/sys/bus/i2c/drivers/pca953x/bind

[root /]# find /sys/bus/i2c/devices/  
/sys/bus/i2c/devices/

[root /]# cat /proc/devices  
Character devices:  
1 mem  
4 /dev/vc/0  
4 tty  
5 /dev/tty  
5 /dev/console  
5 /dev/ptmx  
7 vcs  
10 misc  
13 input  
29 fb  
89 i2c  
90 mtd  
108 ppp  
128 ptm  
136 pts  
153 spi  
180 usb  
189 usb\_device  
207 ttymxc  
252 mxc\_vpu  
253 mxc\_ipu  
254 rtc

Block devices:  
259 blkext  
7 loop  
8 sd  
31 mtdblock  
65 sd  
66 sd  
67 sd  
68 sd  
69 sd  
70 sd  
71 sd  
128 sd  
129 sd  
130 sd  
131 sd  
132 sd  
133 sd  
134 sd  
135 sd  
179 mmc

[root /]# i2cset 1 0x40 0x00 0x00  
WARNING! This program can confuse your I2C bus, cause data loss and worse!  
I will write to device file /dev/i2c-1, chip address 0x40, data address  
0x00, data 0x00, mode byte.  
Continue? [Y/n] y  
i2c-adapter i2c-1: Could not grab Bus ownership  
Error: Write failed

and, I tested next module. but not work.  
kernel/drivers/i2c/busses/i2c-gpio.ko  
kernel/drivers/i2c/busses/mxc\_i2c.ko  
kernel/drivers/i2c/algos/i2c-algo-bit.ko  
kernel/drivers/i2c/i2c-dev.ko  
kernel/drivers/i2c-slave/i2c\_slave.ko  
kernel/drivers/i2c-slave/mxc\_i2c\_slave.ko  
kernel/drivers/i2c-slave/i2c\_slave\_client.ko

I think,  
I2C interface(header P22) setting is GPIO.  
so,can`t connect PCA9554 expander.  
(it is Just my think)

I want really it!  
(PCA9554 expander connect to I2C interface header P22, and PCA9554 control.)

do you any have idea?

help me please~~
