diff options
author | Andrew Chew <achew@nvidia.com> | 2011-06-23 19:19:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:27 -0400 |
commit | c4fdce56968dcd78481808fd2ce8f5a192322028 (patch) | |
tree | 26aaa6f87a258dedf7b26369e393dd874eedfac5 /drivers/media | |
parent | 5fec8b900237ecc8ba1bbc3d051a655d43b6881c (diff) |
[media] V4L: ov9740: Fixed some settings
Based on vendor feedback, should issue a software reset at start of day.
Also, OV9740_ANALOG_CTRL15 needs to be changed so the sensor does not begin
streaming until it is ready (otherwise, results in a nonsense frame for the
initial frame).
Added a comment on using discontinuous clock.
Finally, OV9740_ISP_CTRL19 needs to be changed to really use YUYV ordering
(the previous value was for VYUY).
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/ov9740.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/video/ov9740.c b/drivers/media/video/ov9740.c index d5c906147e78..72c6ac1d767c 100644 --- a/drivers/media/video/ov9740.c +++ b/drivers/media/video/ov9740.c | |||
@@ -68,6 +68,7 @@ | |||
68 | #define OV9740_ANALOG_CTRL04 0x3604 | 68 | #define OV9740_ANALOG_CTRL04 0x3604 |
69 | #define OV9740_ANALOG_CTRL10 0x3610 | 69 | #define OV9740_ANALOG_CTRL10 0x3610 |
70 | #define OV9740_ANALOG_CTRL12 0x3612 | 70 | #define OV9740_ANALOG_CTRL12 0x3612 |
71 | #define OV9740_ANALOG_CTRL15 0x3615 | ||
71 | #define OV9740_ANALOG_CTRL20 0x3620 | 72 | #define OV9740_ANALOG_CTRL20 0x3620 |
72 | #define OV9740_ANALOG_CTRL21 0x3621 | 73 | #define OV9740_ANALOG_CTRL21 0x3621 |
73 | #define OV9740_ANALOG_CTRL22 0x3622 | 74 | #define OV9740_ANALOG_CTRL22 0x3622 |
@@ -222,6 +223,9 @@ struct ov9740_priv { | |||
222 | }; | 223 | }; |
223 | 224 | ||
224 | static const struct ov9740_reg ov9740_defaults[] = { | 225 | static const struct ov9740_reg ov9740_defaults[] = { |
226 | /* Software Reset */ | ||
227 | { OV9740_SOFTWARE_RESET, 0x01 }, | ||
228 | |||
225 | /* Banding Filter */ | 229 | /* Banding Filter */ |
226 | { OV9740_AEC_B50_STEP_HI, 0x00 }, | 230 | { OV9740_AEC_B50_STEP_HI, 0x00 }, |
227 | { OV9740_AEC_B50_STEP_LO, 0xe8 }, | 231 | { OV9740_AEC_B50_STEP_LO, 0xe8 }, |
@@ -333,6 +337,7 @@ static const struct ov9740_reg ov9740_defaults[] = { | |||
333 | { OV9740_ANALOG_CTRL10, 0xa1 }, | 337 | { OV9740_ANALOG_CTRL10, 0xa1 }, |
334 | { OV9740_ANALOG_CTRL12, 0x24 }, | 338 | { OV9740_ANALOG_CTRL12, 0x24 }, |
335 | { OV9740_ANALOG_CTRL22, 0x9f }, | 339 | { OV9740_ANALOG_CTRL22, 0x9f }, |
340 | { OV9740_ANALOG_CTRL15, 0xf0 }, | ||
336 | 341 | ||
337 | /* Sensor Control */ | 342 | /* Sensor Control */ |
338 | { OV9740_SENSOR_CTRL03, 0x42 }, | 343 | { OV9740_SENSOR_CTRL03, 0x42 }, |
@@ -385,7 +390,7 @@ static const struct ov9740_reg ov9740_defaults[] = { | |||
385 | { OV9740_LN_LENGTH_PCK_LO, 0x62 }, | 390 | { OV9740_LN_LENGTH_PCK_LO, 0x62 }, |
386 | 391 | ||
387 | /* MIPI Control */ | 392 | /* MIPI Control */ |
388 | { OV9740_MIPI_CTRL00, 0x44 }, | 393 | { OV9740_MIPI_CTRL00, 0x44 }, /* 0x64 for discontinuous clk */ |
389 | { OV9740_MIPI_3837, 0x01 }, | 394 | { OV9740_MIPI_3837, 0x01 }, |
390 | { OV9740_MIPI_CTRL01, 0x0f }, | 395 | { OV9740_MIPI_CTRL01, 0x0f }, |
391 | { OV9740_MIPI_CTRL03, 0x05 }, | 396 | { OV9740_MIPI_CTRL03, 0x05 }, |
@@ -393,6 +398,9 @@ static const struct ov9740_reg ov9740_defaults[] = { | |||
393 | { OV9740_VFIFO_RD_CTRL, 0x16 }, | 398 | { OV9740_VFIFO_RD_CTRL, 0x16 }, |
394 | { OV9740_MIPI_CTRL_3012, 0x70 }, | 399 | { OV9740_MIPI_CTRL_3012, 0x70 }, |
395 | { OV9740_SC_CMMM_MIPI_CTR, 0x01 }, | 400 | { OV9740_SC_CMMM_MIPI_CTR, 0x01 }, |
401 | |||
402 | /* YUYV order */ | ||
403 | { OV9740_ISP_CTRL19, 0x02 }, | ||
396 | }; | 404 | }; |
397 | 405 | ||
398 | static const struct ov9740_reg ov9740_regs_vga[] = { | 406 | static const struct ov9740_reg ov9740_regs_vga[] = { |