Re: [PATCH v3] i2c: qcom-cci: always enable SCL clock stretching
From: Andi Shyti
Date: Fri Oct 09 2026 - 05:07:49 EST
Hi Hitesh,
On Wed, Oct 07, 2026 at 10:31:46AM +0530, Hitesh Patel wrote:
> The CCI timing tables leave SCL clock stretching disabled. A slave that
> holds SCL low is then not waited for: the master keeps its own clock
> timing and the transfer fails with a NACK or returns corrupt data.
>
> This is hit with a camera reached through a GMSL serializer/deserializer
> I2C tunnel (MAX9296A/MAX96717 on the RB3 Gen2 vision mezzanine). The
> deserializer acknowledges the address locally, but forwards the
> transaction over the coax link and stretches SCL until the remote side
> has completed it, which takes well over one clock period at 100 kHz.
> Without stretching the register reads of the sensor behind the link
> intermittently return garbage and writes are dropped, which shows up as
> random sensor init failures.
>
> Clock stretching is part of the I2C specification for every speed mode
> and a device that does not stretch is unaffected by enabling it, so set
> the bit unconditionally in cci_init() and drop the per-table
> scl_stretch_en field, which is zero in every table.
>
> Signed-off-by: Hitesh Patel <hitesh@xxxxxxxxxxxxxx>
> Reviewed-by: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
pushed to i2c/i2c.
Thanks,
Andi