05-29-2018 09:19 AM - edited 05-30-2018 08:16 AM
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
root@VP88x_2017_3_PRJ0191:/mnt# devmem 0xFF180180
Thanks for any idea,
10-28-2018 09:54 PM
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?
Don't forget to reply, kudo, and accept as solution.