From: Xiaolei Wang <xiaoleiwangxiaolei@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: hverkuil+cisco@kernel.org, mehdi.djait@linux.intel.com,
u.kleine-koenig@baylibre.com, laurent.pinchart@ideasonboard.com,
jacopo@jmondi.org, p.zabel@pengutronix.de,
ezequiel@vanguardiasur.com.ar, mchehab+samsung@kernel.org,
festevam@gmail.com, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: i2c: ov5645: Fix CSI-2 CRC errors on RK3576 after init sequence
Date: Wed, 9 Sep 2026 11:24:02 +0800 [thread overview]
Message-ID: <323da6bf-1e7b-476b-8369-a64f1a707778@gmail.com> (raw)
In-Reply-To: <ap_gCH1AnciFIEoa@kekkonen.localdomain>
Hi Sakari,
Thank you so much for your review.
在 2026/9/8 18:14, Sakari Ailus 写道:
> Hi Xiaolei,
>
> On Wed, Aug 26, 2026 at 08:54:32AM +0000, Xiaolei Wang wrote:
>> On the RK3576 platform, after ov5645_global_init_setting completes and
>> before stream on, the CSI host reports a high rate of CRC errors:
>>
>> MIPI_CSI2 ERR1:0x1000000 (crc,vc: 0)
>>
>> These errors occur exclusively in the window between init completion and
>> stream on. Once preview starts and the sensor outputs valid HS data, no
>> further CRC errors are observed.
>>
>> Commit 092e8eb90a7d ("media: i2c: ov5645: Fix power sequence") reworked
>> the power sequence to properly enter LP-11 during power-up. As part of
>> this change, the SYSTEM_CTRL0_STOP (0x42) write in s_power() was replaced
>> with usleep_range(500, 1000), leaving the sensor in wake state (0x3008 =
>> 0x02) from init through to s_stream. Reverting this commit resolves the
>> CRC errors, confirming it as the triggering change.
>>
>> Restore the power-down state after init by appending { 0x3008, 0x42 } to
>> the end of ov5645_global_init_setting[]. This powers down the sensor core
>> after MIPI configuration is complete, while keeping the MIPI PHY active in
>> LP-11. The sensor is then woken up only at s_stream time.
>>
>> This preserves all LP-11 compliance improvements from
>> commit 092e8eb90a7d ("media: i2c: ov5645: Fix power sequence") while
>> eliminating the CRC errors on RK3576.
>>
>> Fixes: 092e8eb90a7d ("media: i2c: ov5645: Fix power sequence")
>> Signed-off-by: Xiaolei Wang <xiaoleiwangxiaolei@gmail.com>
>> ---
>> drivers/media/i2c/ov5645.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
>> index c772ef6e51d2..be85e0155b81 100644
>> --- a/drivers/media/i2c/ov5645.c
>> +++ b/drivers/media/i2c/ov5645.c
>> @@ -351,7 +351,8 @@ static const struct reg_value ov5645_global_init_setting[] = {
>> { 0x3008, 0x02 },
>> { OV5645_IO_MIPI_CTRL00, 0x40 },
>> { OV5645_MIPI_CTRL00, 0x24 },
>> - { OV5645_PAD_OUTPUT00, 0x70 }
>> + { OV5645_PAD_OUTPUT00, 0x70 },
>> + { 0x3008, 0x42 }
> Is the earlier write of 0x3008 still appropriate?
You're right, I tested removing the { 0x3008, 0x02 } write
and the MIPI PHY still enters LP-11 correctly without it. The CRC errors
are also gone.
The 0x02 was a leftover introduced by commit 092e8eb90a7d when it moved
the 0x42 stop out of s_power() — the sensor doesn't need to be explicitly
woken in the init table since s_stream handles that later.
thanks
xiaolei
>> };
>>
>> static const struct reg_value ov5645_setting_sxga[] = {
prev parent reply other threads:[~2026-09-09 3:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 8:54 [PATCH] media: i2c: ov5645: Fix CSI-2 CRC errors on RK3576 after init sequence Xiaolei Wang
2026-09-08 2:01 ` Xiaolei Wang
2026-09-08 10:14 ` Sakari Ailus
2026-09-08 10:36 ` Laurent Pinchart
2026-09-09 3:24 ` Xiaolei Wang
2026-09-09 3:24 ` Xiaolei Wang [this message]
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=323da6bf-1e7b-476b-8369-a64f1a707778@gmail.com \
--to=xiaoleiwangxiaolei@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=festevam@gmail.com \
--cc=hverkuil+cisco@kernel.org \
--cc=jacopo@jmondi.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=p.zabel@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=u.kleine-koenig@baylibre.com \
/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