@@ -466,7 +466,21 @@ static const struct ov5640_reg init_params_dvp[] = {
466
466
{0x3a15 , 0xae },
467
467
};
468
468
469
- static const struct ov5640_reg csi2_low_res_params [] = {
469
+ static const struct ov5640_reg csi2_qqvga_res_params [] = {
470
+ {0x3800 , 0x00 }, {0x3801 , 0x10 }, {0x3802 , 0x00 }, {0x3803 , 0x0E }, {0x3804 , 0x0a },
471
+ {0x3805 , 0x2f }, {0x3806 , 0x07 }, {0x3807 , 0xa5 }, {0x3808 , 0x00 }, {0x3809 , 0xa0 },
472
+ {0x380a , 0x00 }, {0x380b , 0x78 }, {0x380c , 0x06 }, {0x380d , 0x40 }, {0x380e , 0x03 },
473
+ {0x380f , 0xe6 }, {0x3810 , 0x00 }, {0x3811 , 0x02 }, {0x3812 , 0x00 }, {0x3813 , 0x04 },
474
+ {0x3814 , 0x31 }, {0x3815 , 0x31 }, {0x3824 , 0x02 }, {0x460c , 0x22 }};
475
+
476
+ static const struct ov5640_reg csi2_qvga_res_params [] = {
477
+ {0x3800 , 0x00 }, {0x3801 , 0x10 }, {0x3802 , 0x00 }, {0x3803 , 0x0E }, {0x3804 , 0x0a },
478
+ {0x3805 , 0x2f }, {0x3806 , 0x07 }, {0x3807 , 0xa5 }, {0x3808 , 0x01 }, {0x3809 , 0x40 },
479
+ {0x380a , 0x00 }, {0x380b , 0xf0 }, {0x380c , 0x06 }, {0x380d , 0x40 }, {0x380e , 0x03 },
480
+ {0x380f , 0xe8 }, {0x3810 , 0x00 }, {0x3811 , 0x02 }, {0x3812 , 0x00 }, {0x3813 , 0x04 },
481
+ {0x3814 , 0x31 }, {0x3815 , 0x31 }, {0x3824 , 0x02 }, {0x460c , 0x22 }};
482
+
483
+ static const struct ov5640_reg csi2_vga_res_params [] = {
470
484
{0x3800 , 0x00 }, {0x3801 , 0x00 }, {0x3802 , 0x00 }, {0x3803 , 0x04 }, {0x3804 , 0x0a },
471
485
{0x3805 , 0x3f }, {0x3806 , 0x07 }, {0x3807 , 0x9b }, {0x3808 , 0x02 }, {0x3809 , 0x80 },
472
486
{0x380a , 0x01 }, {0x380b , 0xe0 }, {0x380c , 0x07 }, {0x380d , 0x68 }, {0x380e , 0x03 },
@@ -486,12 +500,36 @@ static const struct ov5640_mipi_frmrate_config mipi_hd_frmrate_params[] = {
486
500
static const struct ov5640_mipi_frmrate_config mipi_vga_frmrate_params [] = {
487
501
{15 , 0x22 , 0x38 , 24000000 }, {30 , 0x14 , 0x38 , 24000000 }, {60 , 0x14 , 0x70 , 48000000 }};
488
502
503
+ static const struct ov5640_mipi_frmrate_config mipi_qvga_frmrate_params [] = {
504
+ {15 , 0x22 , 0x30 , 24000000 }, {30 , 0x14 , 0x30 , 24000000 }, {60 , 0x14 , 0x60 , 48000000 }};
505
+
506
+ static const struct ov5640_mipi_frmrate_config mipi_qqvga_frmrate_params [] = {
507
+ {15 , 0x22 , 0x30 , 24000000 }, {30 , 0x14 , 0x30 , 24000000 }, {60 , 0x14 , 0x60 , 48000000 }};
508
+
489
509
static const struct ov5640_mode_config csi2_modes [] = {
510
+ {
511
+ .width = 160 ,
512
+ .height = 120 ,
513
+ .array_size_res_params = ARRAY_SIZE (csi2_qqvga_res_params ),
514
+ .res_params = csi2_qqvga_res_params ,
515
+ .mipi_frmrate_config = mipi_qqvga_frmrate_params ,
516
+ .max_frmrate = OV5640_60_FPS ,
517
+ .def_frmrate = OV5640_30_FPS ,
518
+ },
519
+ {
520
+ .width = 320 ,
521
+ .height = 240 ,
522
+ .array_size_res_params = ARRAY_SIZE (csi2_qvga_res_params ),
523
+ .res_params = csi2_qvga_res_params ,
524
+ .mipi_frmrate_config = mipi_qvga_frmrate_params ,
525
+ .max_frmrate = OV5640_60_FPS ,
526
+ .def_frmrate = OV5640_30_FPS ,
527
+ },
490
528
{
491
529
.width = 640 ,
492
530
.height = 480 ,
493
- .array_size_res_params = ARRAY_SIZE (csi2_low_res_params ),
494
- .res_params = csi2_low_res_params ,
531
+ .array_size_res_params = ARRAY_SIZE (csi2_vga_res_params ),
532
+ .res_params = csi2_vga_res_params ,
495
533
.mipi_frmrate_config = mipi_vga_frmrate_params ,
496
534
.max_frmrate = OV5640_60_FPS ,
497
535
.def_frmrate = OV5640_30_FPS ,
@@ -575,6 +613,8 @@ static const struct video_format_cap csi2_fmts[] = {
575
613
OV5640_VIDEO_FORMAT_CAP (1280 , 720 , VIDEO_PIX_FMT_YUYV ),
576
614
OV5640_VIDEO_FORMAT_CAP (640 , 480 , VIDEO_PIX_FMT_RGB565 ),
577
615
OV5640_VIDEO_FORMAT_CAP (640 , 480 , VIDEO_PIX_FMT_YUYV ),
616
+ OV5640_VIDEO_FORMAT_CAP (320 , 240 , VIDEO_PIX_FMT_RGB565 ),
617
+ OV5640_VIDEO_FORMAT_CAP (160 , 120 , VIDEO_PIX_FMT_RGB565 ),
578
618
{0 }};
579
619
580
620
static const struct video_format_cap dvp_fmts [] = {
0 commit comments