Re: [PATCH v2] i2c: qcom-cci: always enable SCL clock stretching
From: Andi Shyti
Date: Mon Sep 28 2026 - 19:37:49 EST
Hi Hitesh,
Please don't send next versions as --in-reply-to, it makes life
difficult.
On Mon, Sep 21, 2026 at 06:49:54PM +0530, Hitesh Patel wrote:
> Every CCI timing table except the msm8953 fast-plus one leaves SCL
> clock stretching disabled in MISC_CTL. 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, SC7280 CCI v2 at 100 kHz). The deserializer acknowledges
> the address locally, forwards the transaction over the coax link and
> stretches SCL until the remote side has completed it, which takes well
> over one clock period. 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 it, so there
> is no reason to make it a per-table parameter. Set the bit
> unconditionally and drop the scl_stretch_en field.
>
> Signed-off-by: Hitesh Patel <hitesh@xxxxxxxxxxxxxx>
I'll wait for an ack from Konrad here.
Thanks,
Andi