@@ -111,6 +111,7 @@ enum ov5640_frame_rate {
111
111
OV5640_15_FPS = 0 ,
112
112
OV5640_30_FPS ,
113
113
OV5640_60_FPS ,
114
+ OV5640_07_FPS ,
114
115
OV5640_NUM_FRAMERATES ,
115
116
};
116
117
@@ -352,7 +353,8 @@ static const struct reg_value ov5640_init_setting_30fps_VGA[] = {
352
353
{0x583b , 0x28 , 0 , 0 }, {0x583c , 0x42 , 0 , 0 }, {0x583d , 0xce , 0 , 0 },
353
354
{0x5025 , 0x00 , 0 , 0 }, {0x3a0f , 0x30 , 0 , 0 }, {0x3a10 , 0x28 , 0 , 0 },
354
355
{0x3a1b , 0x30 , 0 , 0 }, {0x3a1e , 0x26 , 0 , 0 }, {0x3a11 , 0x60 , 0 , 0 },
355
- {0x3a1f , 0x14 , 0 , 0 }, {0x3008 , 0x02 , 0 , 0 }, {0x3c00 , 0x04 , 0 , 300 },
356
+ {0x3a1f , 0x14 , 0 , 0 }, {0x3008 , 0x42 , 0 , 0 }, {0x3c00 , 0x04 , 0 , 300 },
357
+ {0x302c , 0xc2 , 0 , 0 },
356
358
};
357
359
358
360
static const struct reg_value ov5640_setting_VGA_640_480 [] = {
@@ -375,6 +377,7 @@ static const struct reg_value ov5640_setting_VGA_640_480[] = {
375
377
};
376
378
377
379
static const struct reg_value ov5640_setting_XGA_1024_768 [] = {
380
+ {0x3008 , 0x42 , 0 , 0 },
378
381
{0x3c07 , 0x08 , 0 , 0 },
379
382
{0x3c09 , 0x1c , 0 , 0 }, {0x3c0a , 0x9c , 0 , 0 }, {0x3c0b , 0x40 , 0 , 0 },
380
383
{0x3814 , 0x31 , 0 , 0 },
@@ -389,8 +392,9 @@ static const struct reg_value ov5640_setting_XGA_1024_768[] = {
389
392
{0x3a0a , 0x00 , 0 , 0 }, {0x3a0b , 0xf6 , 0 , 0 }, {0x3a0e , 0x03 , 0 , 0 },
390
393
{0x3a0d , 0x04 , 0 , 0 }, {0x3a14 , 0x03 , 0 , 0 }, {0x3a15 , 0xd8 , 0 , 0 },
391
394
{0x4001 , 0x02 , 0 , 0 }, {0x4004 , 0x02 , 0 , 0 },
392
- {0x4407 , 0x04 , 0 , 0 }, {0x460b , 0x35 , 0 , 0 }, {0x460c , 0x22 , 0 , 0 },
395
+ {0x4407 , 0x04 , 0 , 0 }, {0x460b , 0x35 , 0 , 0 }, {0x460c , 0x20 , 0 , 0 },
393
396
{0x3824 , 0x02 , 0 , 0 }, {0x5001 , 0xa3 , 0 , 0 },
397
+ {0x3008 , 0x02 , 0 , 10 }
394
398
};
395
399
396
400
static const struct reg_value ov5640_setting_QVGA_320_240 [] = {
@@ -470,6 +474,7 @@ static const struct reg_value ov5640_setting_PAL_720_576[] = {
470
474
};
471
475
472
476
static const struct reg_value ov5640_setting_720P_1280_720 [] = {
477
+ {0x3008 , 0x42 , 0 , 0 },
473
478
{0x3c07 , 0x07 , 0 , 0 },
474
479
{0x3c09 , 0x1c , 0 , 0 }, {0x3c0a , 0x9c , 0 , 0 }, {0x3c0b , 0x40 , 0 , 0 },
475
480
{0x3814 , 0x31 , 0 , 0 },
@@ -486,6 +491,7 @@ static const struct reg_value ov5640_setting_720P_1280_720[] = {
486
491
{0x4001 , 0x02 , 0 , 0 }, {0x4004 , 0x02 , 0 , 0 },
487
492
{0x4407 , 0x04 , 0 , 0 }, {0x460b , 0x37 , 0 , 0 }, {0x460c , 0x20 , 0 , 0 },
488
493
{0x3824 , 0x04 , 0 , 0 }, {0x5001 , 0x83 , 0 , 0 },
494
+ {0x3008 , 0x02 , 0 , 15 },
489
495
};
490
496
491
497
static const struct reg_value ov5640_setting_1080P_1920_1080 [] = {
@@ -521,6 +527,7 @@ static const struct reg_value ov5640_setting_1080P_1920_1080[] = {
521
527
};
522
528
523
529
static const struct reg_value ov5640_setting_QSXGA_2592_1944 [] = {
530
+ {0x3008 , 0x42 , 0 , 0 },
524
531
{0x3c07 , 0x08 , 0 , 0 },
525
532
{0x3c09 , 0x1c , 0 , 0 }, {0x3c0a , 0x9c , 0 , 0 }, {0x3c0b , 0x40 , 0 , 0 },
526
533
{0x3814 , 0x11 , 0 , 0 },
@@ -535,8 +542,9 @@ static const struct reg_value ov5640_setting_QSXGA_2592_1944[] = {
535
542
{0x3a0a , 0x00 , 0 , 0 }, {0x3a0b , 0xf6 , 0 , 0 }, {0x3a0e , 0x03 , 0 , 0 },
536
543
{0x3a0d , 0x04 , 0 , 0 }, {0x3a14 , 0x03 , 0 , 0 }, {0x3a15 , 0xd8 , 0 , 0 },
537
544
{0x4001 , 0x02 , 0 , 0 }, {0x4004 , 0x06 , 0 , 0 },
538
- {0x4407 , 0x04 , 0 , 0 }, {0x460b , 0x35 , 0 , 0 }, {0x460c , 0x22 , 0 , 0 },
545
+ {0x4407 , 0x04 , 0 , 0 }, {0x460b , 0x35 , 0 , 0 }, {0x460c , 0x20 , 0 , 0 },
539
546
{0x3824 , 0x02 , 0 , 0 }, {0x5001 , 0x83 , 0 , 70 },
547
+ {0x3008 , 0x02 , 0 , 20 },
540
548
};
541
549
542
550
/* power-on sensor init reg table */
@@ -1602,6 +1610,15 @@ ov5640_find_mode(struct ov5640_dev *sensor, enum ov5640_frame_rate fr,
1602
1610
hact , vact ,
1603
1611
width , height );
1604
1612
1613
+ /*
1614
+ * DVP mode support [email protected] , 1080P@15
1615
+ */
1616
+ if (sensor -> ep .bus_type != V4L2_MBUS_CSI2_DPHY ) {
1617
+ if (((mode -> id == OV5640_MODE_1080P_1920_1080 ) && (fr != OV5640_15_FPS )) ||
1618
+ ((mode -> id == OV5640_MODE_QSXGA_2592_1944 ) && (fr != OV5640_07_FPS )))
1619
+ return NULL ;
1620
+ }
1621
+
1605
1622
if (!mode ||
1606
1623
(!nearest && (mode -> hact != width || mode -> vact != height )))
1607
1624
return NULL ;
0 commit comments