Hi Wolfram, Thanks for the feedback. On Tue, Feb 13, 2024 at 10:27 PM Wolfram Sang <wsa@xxxxxxxxxx> wrote: > > Hi Biju, > > I couldn't find a datasheet for the OV5645 but the one for OV5642 looked > pretty similar when it comes to the issues mentioned here. I don't have the data sheet. I am just debugging with a picoscope. > > > Testing OV5645 with i2c bus frequency @400kHz on RZ/G2L SMARC EVL platform > > shows issues like the captured image is either greenish or it is not > > capturing the image at all. However, It is working ok when the i2c > > frequency is 100kHz. From this, it is clear that we have a timing issue > > at high speed. The testing also shows that if we add a delay >= 1 msec > > That could match the "VDD stable to sensor stable" delay in the > datasheet. I think it is different here. That 1 msec is delay associated with applying hardware power see [1] [1] https://elixir.bootlin.com/linux/latest/source/drivers/media/i2c/ov5645.c#L667 > > > after register write {0x3008, 0x82}, then the captured image is always > > good. So, move the register 0x3008 and 0x3103 from ov5645_*_init_setting > > to a new table ov5645_global_init_setting. > > > > Drop the unnecessary entry { 0x3008, 0x42 } from ov5645_*init_setting > > table at the start. > > It seems this is not needed to fix your issue? Then, this would be a > seperate change with a dedicated reason, I'd think. There is another > pair of activating power-down mode and immediately disabling it again. > Either we simplify it, too, or we leave both in place. Or at least make > sure there wasn't a reason for them. I'd just leave them. My bad. I thought as per [2], there are 2 writes for 0x3008, so I should take out the redundant one. I will restore it. [2] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20240126133116.121981-6-biju.das.jz@xxxxxxxxxxxxxx/#25706558 Cheers, Biju