This page provides information about the Cadence I2C driver which can be found on Xilinx Git and mainline as i2c-cadence.c Zynq has two I2C hard IP. I2C can be used as a master with this linux driver. There is support for repeated start with some limitations.
HW IP Features
Support 16 bytes FIFO
Programmable normal and fast bus data rates
Repeated start support using HOLD bit
FIFO control using HOLD bit
Slave monitoring support in Master mode.
Known issues and limitations
Repeated start after a read transfer is not supported by this controller. A warning is given when this condition is detected by the driver.
The following are the controller errata:
Missing glitch filter.
I2C Master Generates Invalid Read Transactions
Missing I2C Master Completion Interrupt.
Timing requirement violations
I2C - Standard Mode running faster than 90 kHz violates tHD; STA timing requirement.
I2C - Fast Mode running faster than 384kHz violates tLOW; STA timing requirement.
I2C - Fast Mode running faster than 384 kHz violates tBUF; STA timing requirement.
I2C Missing Arbitration On Repeated Start.
Important AR links
Zynq-7000 AP SoC, I2C - Missing Glitch Filter Implementation in Zynq PS I2C Controller AR# 61861
Zynq-7000 AP SoC, I2C - I2C Missing Arbitration on Repeated Start AR# 60695
Zynq-7000 AP SoC, I2C - Standard Mode running faster than 90 kHz violates tHD; STA timing requirement AR# 59366
Zynq-7000 AP SoC, I2C - Fast Mode running faster than 384kHz violates tLOW; STA timing requirement AR# 60693
Zynq-7000 AP SoC, I2C - Fast Mode running faster than 384 kHz violates tBUF; STA timing requirement AR# 60694
The following config options need to be enabled: CONFIG_I2C_CADENCE
It depends on I2C and ARCH_ZYNQ
Refer to Documentation/devicetree/bindings/i2c/i2c-cadence.txt for complete description. Example The following example shows adding an I2C node to the devicetree with the various interfaces connected to i2c on zynq zc702 board:
This section details i2c tests with various interfaces: Eeprom Test helper script Writes different patterns to the I2C EEPROM, reads back the contents of the EEPROM and performs data verification. Inputs expected by the helper script (i2c_eeprom_helper.sh), in that order: 1. The EEPROM to test in the /sys filesystem, a full path 2. Offset from the start of the EEPROM 3. The number of bytes to read/write at the offset from the start of the EEPROM.
I2C eeprom helper script & test logs:
EEPROM Stress Test The following test can be used for performing eeprom stress test:
Testing UCD9248 TI's UCD9248 PWM controllers are commonly used on Xilinx platforms like the zc702. The Linux driver for these controllers allows voltage and current monitoring through a sysfs interface exposed in /sys/bus/i2c/devices/*. The driver is documented in Documentation/hwmon/ucd9200