cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jackfrye11
Explorer
Explorer
1,272 Views
Registered: ‎10-19-2017

Cadence I2C Driver Write Timeout

Hey I am trying to use the Cadence I2C Linux Driver to write to I2C Bus in the PS. The file is attached. The functionality is pretty basic and is based off of the documentation found here:

 

Kernel I2C Dev Interface: https://github.com/Xilinx/linux-xlnx/blob/629041605b93343ad2e8971ceaac3edcef0b043b/Documentation/i2c/dev-interface

 

Documentation for the driver can be found here

Cadence Driver: http://www.wiki.xilinx.com/Cadence+I2C+Driver

 

I think I am getting a timeout error from here in the driver:

https://github.com/Xilinx/linux-xlnx/blob/3f3c7b60919d56119a68813998d3005bca501a40/drivers/i2c/busses/i2c-cadence.c#L825

 

Here is my output when I run on a zc706 QEMU emulated device

root@plnx_arm:~# /usr/bin/i2ctest
funcs & I2C_FUNC_I2C:   1
funcs & I2C_FUNC_SMBUS_WORD_DATA:   6291456
Attempting to read from I2C bus via I2C protocol...
cdns-i2c e0004000.i2c: timeout waiting on completion
        Failed to do I2C read from Bus

 

I have also attached the PetaLinux PS device tree and system device tree.

 

This issue could be software based, insofar as the specified register addresses are wrong. It could be an issue with the device tree and setup of the I2C bus. It also could be a QEMU quirk, although that is pretty unlikely.

 

I have been struggling with this issue. Any help is greatly appreciated.

0 Kudos
0 Replies