Other Parts Discussed in Thread: AMIC110
Hello there!
We are trying to enable I2C test mode as described in section 21.4.1.25 of "AM335x and AMIC110 Sitara™ Processors Technical Reference Manual".
Here is our code:
omap_i2c_write_reg(_dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); dev_info(_dev->dev, "Going to write SYSTEST"); omap_i2c_write_reg(omap_i2c_test_dev, OMAP_I2C_SYSTEST_REG, reg); dev_info(_dev->dev, "Wrote SYSTEST : 0x%08x", reg); dev_info(_dev->dev, "Going to read SYSTEST"); reg = omap_i2c_read_reg(_dev, OMAP_I2C_SYSTEST_REG); dev_info(_dev->dev, "SYSTEST is 0x%08x", reg);
The value we are trying to write is 0x0000f001.
Unfortunately, the read always returns value 0x000001e0 which indicates no test mode has been enabled.
[ 318.074813] omap_i2c 4819c000.i2c: Going to write SYSTEST [ 318.080545] omap_i2c 4819c000.i2c: Wrote SYSTEST : 0x0000f001 [ 318.086557] omap_i2c 4819c000.i2c: Going to read SYSTEST [ 318.092112] omap_i2c 4819c000.i2c: SYSTEST is 0x000001e0
What is the correct flow to enable I2C test mode?