From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Hitesh Patel <hitesh@ebytelogic.com>, Andi Shyti <andi.shyti@kernel.org>
Cc: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Robert Foss <rfoss@kernel.org>,
linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, ravi@ebytelogic.com
Subject: Re: [PATCH] i2c: qcom-cci: enable SCL clock stretching in standard mode on CCI v2
Date: Mon, 21 Sep 2026 13:34:00 +0200 [thread overview]
Message-ID: <c73b2ae0-e138-4472-8acd-b0ae3dcd742d@oss.qualcomm.com> (raw)
In-Reply-To: <20260914132328.976902-1-hitesh@ebytelogic.com>
On 9/14/26 3:23 PM, Hitesh Patel wrote:
> The CCI v2 standard-mode (100 kHz) timing table leaves SCL clock
> stretching disabled, unlike the fast-plus table for the same block.
> 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 enable it for standard mode as it already is for fast-plus.
>
> Signed-off-by: Hitesh Patel <hitesh@ebytelogic.com>
> ---
> drivers/i2c/busses/i2c-qcom-cci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
> index 25b6e4e9e..327efa86f 100644
> --- a/drivers/i2c/busses/i2c-qcom-cci.c
> +++ b/drivers/i2c/busses/i2c-qcom-cci.c
> @@ -723,7 +723,7 @@ static const struct cci_data cci_v2_data = {
> .thd_dat = 22,
> .thd_sta = 162,
> .tbuf = 227,
> - .scl_stretch_en = 0,
> + .scl_stretch_en = 1,
Would it make sense to keep it enabled unconditionally then?
Konrad
next prev parent reply other threads:[~2026-09-21 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 13:23 Hitesh Patel
2026-09-21 11:34 ` Konrad Dybcio [this message]
2026-09-21 12:36 ` Hitesh Patel
2026-09-21 13:19 ` [PATCH v2] i2c: qcom-cci: always enable SCL clock stretching Hitesh Patel
2026-09-28 23:37 ` Andi Shyti
2026-10-05 4:27 ` Hitesh Patel
2026-10-05 8:30 ` Loic Poulain
2026-10-06 13:58 ` Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c73b2ae0-e138-4472-8acd-b0ae3dcd742d@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=hitesh@ebytelogic.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=ravi@ebytelogic.com \
--cc=rfoss@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®