i2c controller timed out

975 views
Skip to first unread message

Gina Glaser

unread,
Apr 14, 2011, 9:35:20 AM4/14/11
to pandaboard
I am running the Ubuntu release on Pandaboard, and I am getting a
timeout when I try to scan for I2C devices. I am using the
"i2cdetect" tool from http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.0.3.tar.bz2
Below is the log. Does anyone have any ideas?

Thanks,
Gina


gina@gina-desktop:/i2c-tools-3.0.3/tools$ sudo ./i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- [ 490.492431] i2c_omap i2c_omap.1: controller timed
out
-- -- [ 491.515838] i2c_omap i2c_omap.1: controller timed out
-- -- [ 492.539123] i2c_omap i2c_omap.1: controller timed out
-- -- [ 493.570709] i2c_omap i2c_omap.1: controller timed out
-- -- [ 494.678619] i2c_omap i2c_omap.1: controller timed out
-- -- [ 495.749389] i2c_omap i2c_omap.1: controller timed out
-- --

modyrater

unread,
Apr 14, 2011, 4:43:24 PM4/14/11
to panda...@googlegroups.com

Gina-desktop is on the Panda I am guessing?

Sent via Droid on Verizon Wireless

mike digioia

unread,
Apr 20, 2011, 2:25:51 PM4/20/11
to panda...@googlegroups.com
I am having some trouble with using i2cdetect on a different platform with ARM. Then I created my own src similar to the one I have on ubuntu, but does not take command line params. Since this code is an application, should one expect platform porting issues with linux 2.6.30UP kernls? 

prpplague

unread,
Apr 21, 2011, 2:00:25 PM4/21/11
to pandaboard
for recent kernels there is the need to apply the following patch:

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-
omap.c
index 58a58c7..bba0441 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -276,7 +276,7 @@ static void omap_i2c_unidle(struct omap_i2c_dev
*dev)

pm_runtime_get_sync(&pdev->dev);

- if (cpu_is_omap34xx()) {
+ if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
omap_i2c_write_reg(dev, OMAP_I2C_PSC_REG, dev->pscstate);
omap_i2c_write_reg(dev, OMAP_I2C_SCLL_REG, dev->scllstate);
@@ -493,7 +493,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
OMAP_I2C_IE_AL) | ((dev->fifo_size) ?
(OMAP_I2C_IE_RDR | OMAP_I2C_IE_XDR) : 0);
omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
- if (cpu_is_omap34xx()) {
+ if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
dev->pscstate = psc;
dev->scllstate = scll;
dev->sclhstate = sclh;



a long term fix is already making it's way through the mainline kernel
submission process:


http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=d98c94c1a6bef77554f893025a6d1c7869ac4736



thanks
Dave

On Apr 20, 1:25 pm, mike digioia <mpd...@gmail.com> wrote:
> I am having some trouble with using i2cdetect on a different platform with
> ARM. Then I created my own src similar to the one I have on ubuntu, but does
> not take command line params. Since this code is an application, should one
> expect platform porting issues with linux 2.6.30UP kernls?
>

Ricardo Salveti

unread,
Apr 22, 2011, 4:01:55 AM4/22/11
to panda...@googlegroups.com
On Thu, Apr 14, 2011 at 10:35 AM, Gina Glaser <g-gl...@ti.com> wrote:
> I am running the Ubuntu release on Pandaboard, and I am getting a
> timeout when I try to scan for I2C devices.  I am using the
> "i2cdetect" tool from  http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.0.3.tar.bz2
> Below is the log.  Does anyone have any ideas?

The timeout is fine because not every address have a device. Even with
the timeouts you still should get the following result:
http://paste.ubuntu.com/596705/

Cheers,
--
Ricardo Salveti de Araujo

Ricardo Salveti

unread,
Apr 22, 2011, 4:02:42 AM4/22/11
to panda...@googlegroups.com

Just to say that this patch is already included at the latest Ubuntu kernel.

prpplague

unread,
Apr 23, 2011, 1:41:22 PM4/23/11
to pandaboard
Ricardo,

actually without the patch, all applications using the i2cdev
character device will fail. the i2cdetect is just an easy case to
replicate the problem.

Dave

On Apr 22, 3:01 am, Ricardo Salveti <rsalv...@rsalveti.net> wrote:
Reply all
Reply to author
Forward
0 new messages