I’m trying to set up my iMX53 I2C1 as master using EIM_D21 as SCL and EIM_D28 as SDA. There’s only a MCP79410 RTC on the bus, so the mx53 will be the I2C master, and the RTC the I2C slave. EIM_D21 and D28 are of course configured as ALT5 with open-drain, 22k ohm pull up, HYS enable, and low drive strength.
I try to communicate with the RTC from user space using ioctl(), and debug the I2C code via the IMX I2C kernel module and a scope which is connected to both SCL and SDA. I verify with the scope that both SCL and SDA are high before i2c_imx_xfer() and i2c_imx_start() is called, but the code times out in i2c_imx_bus_busy(), because IBB is always 0. When I call the ioctl(), I see that SDA is pulled low (the I2C START signal), followed by SCL pulled low approximately 5 µs afterwards.
i2c i2c-0: ioctl, cmd=0x707, arg=0x7eecfcf0
i2c i2c-0: master_xfer[0] R, addr=0x57, len=1
i2c i2c-0: master_xfer[1] R, addr=0x6f, len=1
i2c i2c-0:
i2c i2c-0:
i2c i2c-0:
i2c i2c-0: CONTROL: IEN=1, IIEN=0, MSTA=1, MTX=0, TXAK=0, RSTA=0
i2c i2c-0: STATUS: ICF=1, IAAS=0, IBB=0, IAL=0, SRW=0, IIF=0, RXAK=1
i2c i2c-0: I2C bus is busy
i2c i2c-0: