cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
790 Views
Registered: ‎05-28-2014

i2cdetect fails to detect device ?

Hello,

 

I am trying to access i2c device in bus 0, but it keeps failing with i2cdetect as following:

 

root@VP88x_2017_3_PRJ0191:/mnt# i2cdetect -r -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: [ 1052.082861] cdns-i2c ff020000.i2c: timeout waiting on completion
-- [ 1053.106845] cdns-i2c ff020000.i2c: timeout waiting on completion
.....

 

I've verified correct pinmux of  SDA,SDC. It also has a gpio which enable the i2c bus.

Before enable the i2c bus the i2cdetect returns immediately (but without any detection). After setting "1" on the enable gpio, it returns the timeout messages (again, without detection of any device).

 

I also then tried to use i2cget directly, but i2cget also fails:

root@VP88x_2017_3_PRJ0191:/mnt# i2cget -f -y 1 0x22 0xd1 w
Error: Read failed

I have also suspected in gpio pull-up/pull-down, but it seems to be OK .

It is pullup by default:

MIO54 - SCL

MIO55 - SDA

 

root@VP88x_2017_3_PRJ0191:/mnt# devmem 0xFF18017C
0x03FFFFFF
root@VP88x_2017_3_PRJ0191:/mnt# devmem 0xFF180180
0x03FFFFFF
root@VP88x_2017_3_PRJ0191:/mnt#

 

 

Thanks for any idea,

Ran

 

0 Kudos
2 Replies
Highlighted
Observer
Observer
621 Views
Registered: ‎08-10-2016

Re: i2cdetect fails to detect device ?

any update on this issue? did you figure out the problem?

0 Kudos
Highlighted
Moderator
Moderator
593 Views
Registered: ‎06-27-2017

Re: i2cdetect fails to detect device ?

Hi @sivaas,

 

Did you try verifying the slave in u-boot or bare-metal application?

 

What is the address width of your slave? is it 8-bit or 16-bit? can you please check this?

 

 

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

 

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos