Skip to content

Commit 25a3c0c

Browse files
bijudasHans Verkuil
authored andcommitted
media: i2c: ov5645: Remove software reset entry from ov5645_global_init_setting
The SYSTEM_CTRL0 register in ov5645 is almost similar to ov5640. But the hard reset control is mandatory for the ov5645 device, so there is no need for soft reset in the driver. Add a 1msec delay for the software power up (OV5645_SYSTEM_CTRL0_START) register in ov5645_global_init_setting. Without this delay sometimes the image is not captured at all when the i2c frequency is 400kHz. The changes are fixing both the greenish issue and image capture at 400kHz i2c frequency on Renesas RZ/G2L SMARC EVK platforms. Signed-off-by: Biju Das <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 188d2ff commit 25a3c0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/media/i2c/ov5645.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ static inline struct ov5645 *to_ov5645(struct v4l2_subdev *sd)
118118

119119
static const struct reg_value ov5645_global_init_setting[] = {
120120
{ 0x3103, 0x11 },
121-
{ 0x3008, 0x82 },
122121
{ 0x3008, 0x42 },
123122
{ 0x3103, 0x03 },
124123
{ 0x3503, 0x07 },
@@ -627,6 +626,10 @@ static int ov5645_set_register_array(struct ov5645 *ov5645,
627626
ret = ov5645_write_reg(ov5645, settings->reg, settings->val);
628627
if (ret < 0)
629628
return ret;
629+
630+
if (settings->reg == OV5645_SYSTEM_CTRL0 &&
631+
settings->val == OV5645_SYSTEM_CTRL0_START)
632+
usleep_range(1000, 2000);
630633
}
631634

632635
return 0;

0 commit comments

Comments
 (0)