ov8830: add first sensor mode for 800x600 resolution
authorTuukka Toivonen <tuukka.toivonen@intel.com>
Wed, 18 Jan 2012 13:15:09 +0000 (15:15 +0200)
committerbuildbot <buildbot@intel.com>
Thu, 26 Jan 2012 08:23:30 +0000 (00:23 -0800)
BZ: 16972

Add initial mode for the ov8830 sensor, 800x600 pixels,
2 lanes, 30 fps. Remove also settings and code which were
inherited from the mt9e013 driver.

Change-Id: Ia01e303a1b916595b79576a7b22d9cf4fcf89e4b
Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
Reviewed-on: http://android.intel.com:8080/32613
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/platform/mrst/mrst.c
drivers/media/video/ov8830.c
drivers/media/video/ov8830.h

index 36a792b..bcd8f1e 100644 (file)
@@ -1344,9 +1344,9 @@ static int ov8830_power_ctrl(struct v4l2_subdev *sd, int flag)
 
 static int ov8830_csi_configure(struct v4l2_subdev *sd, int flag)
 {
-       static const int LANES = 4;
+       static const int LANES = 2;
        return camera_sensor_csi(sd, ATOMISP_CAMERA_PORT_PRIMARY, LANES,
-               ATOMISP_INPUT_FORMAT_RAW_10, atomisp_bayer_order_grbg, flag);
+               ATOMISP_INPUT_FORMAT_RAW_10, atomisp_bayer_order_bggr, flag);
 }
 
 static struct camera_sensor_platform_data ov8830_sensor_platform_data = {
index 6ba600a..6287042 100644 (file)
 
 #define HOME_POS 255
 
+/* 816x612_2lane_30fps 100 99 816 612 */
+static const struct ov8830_reg ov8830_mode1[] = {
+       { OV8830_8BIT, { 0x0100 }, 0x00 },
+       { OV8830_8BIT, { 0x0103 }, 0x01 },
+       { OV8830_8BIT, { 0x0100 }, 0x00 },
+       { OV8830_8BIT, { 0x0100 }, 0x00 },
+       { OV8830_8BIT, { 0x0100 }, 0x00 },
+       { OV8830_8BIT, { 0x0100 }, 0x00 },
+       { OV8830_8BIT, { 0x0102 }, 0x01 },
+       { OV8830_8BIT, { 0x3001 }, 0x2a },
+       { OV8830_8BIT, { 0x3002 }, 0x88 },
+       { OV8830_8BIT, { 0x3005 }, 0x00 },
+       { OV8830_8BIT, { 0x3011 }, 0x21 },
+       { OV8830_8BIT, { 0x3015 }, 0xc8 },
+       { OV8830_8BIT, { 0x301b }, 0xb4 },
+       { OV8830_8BIT, { 0x301d }, 0x02 },
+       { OV8830_8BIT, { 0x3021 }, 0x00 },
+       { OV8830_8BIT, { 0x3022 }, 0x00 },
+       { OV8830_8BIT, { 0x3081 }, 0x02 },
+       { OV8830_8BIT, { 0x3083 }, 0x01 },
+       { OV8830_8BIT, { 0x3090 }, 0x02 },      /* PLL2_prediv: 2 */
+       { OV8830_8BIT, { 0x3091 }, 0x12 },      /* PLL2_multiplier: 18 */
+       { OV8830_8BIT, { 0x3092 }, 0x00 },      /* PLL2_divs: 0+1 */
+       { OV8830_8BIT, { 0x3093 }, 0x00 },      /* PLL2_seld5: 0 */
+       { OV8830_8BIT, { 0x3098 }, 0x03 },      /* PLL3_prediv: 3 */
+       { OV8830_8BIT, { 0x3099 }, 0x1e },      /* PLL3_mult2: 30 */
+       { OV8830_8BIT, { 0x309a }, 0x00 },      /* PLL3_divs: 0 */
+       { OV8830_8BIT, { 0x309b }, 0x00 },      /* PLL3_div: 0 */
+       { OV8830_8BIT, { 0x30a2 }, 0x01 },
+       { OV8830_8BIT, { 0x30b0 }, 0x05 },
+       { OV8830_8BIT, { 0x30b2 }, 0x00 },
+       { OV8830_8BIT, { 0x30b3 }, 0x4b },      /* PLL1_multiplier: 75 */
+       { OV8830_8BIT, { 0x30b4 }, 0x03 },      /* PLL1_prediv: 3 */
+       { OV8830_8BIT, { 0x30b5 }, 0x04 },      /* PLL1_op_pix_div: 4 *2  */
+       { OV8830_8BIT, { 0x30b6 }, 0x01 },      /* PLL1_op_sys_div: 1 */
+       { OV8830_8BIT, { 0x3104 }, 0xa1 },
+       { OV8830_8BIT, { 0x3106 }, 0x01 },
+       { OV8830_8BIT, { 0x3400 }, 0x04 },
+       { OV8830_8BIT, { 0x3401 }, 0x00 },
+       { OV8830_8BIT, { 0x3402 }, 0x04 },
+       { OV8830_8BIT, { 0x3403 }, 0x00 },
+       { OV8830_8BIT, { 0x3404 }, 0x04 },
+       { OV8830_8BIT, { 0x3405 }, 0x00 },
+       { OV8830_8BIT, { 0x3406 }, 0x01 },
+       { OV8830_8BIT, { 0x3500 }, 0x00 },
+       { OV8830_8BIT, { 0x3501 }, 0x7c },
+       { OV8830_8BIT, { 0x3502 }, 0x40 },
+       { OV8830_8BIT, { 0x3503 }, 0x07 },
+       { OV8830_8BIT, { 0x3504 }, 0x00 },
+       { OV8830_8BIT, { 0x3505 }, 0x30 },
+       { OV8830_8BIT, { 0x3506 }, 0x00 },
+       { OV8830_8BIT, { 0x3507 }, 0x04 },
+       { OV8830_8BIT, { 0x3508 }, 0x80 },
+       { OV8830_8BIT, { 0x3509 }, 0x10 },
+       { OV8830_8BIT, { 0x350a }, 0x00 },
+       { OV8830_8BIT, { 0x350b }, 0x38 },
+       { OV8830_8BIT, { 0x3600 }, 0x78 },
+       { OV8830_8BIT, { 0x3601 }, 0x02 },
+       { OV8830_8BIT, { 0x3602 }, 0x1c },
+       { OV8830_8BIT, { 0x3604 }, 0x38 },
+       { OV8830_8BIT, { 0x3620 }, 0x64 },
+       { OV8830_8BIT, { 0x3621 }, 0xb5 },
+       { OV8830_8BIT, { 0x3622 }, 0x03 },
+       { OV8830_8BIT, { 0x3625 }, 0x64 },
+       { OV8830_8BIT, { 0x3630 }, 0x55 },
+       { OV8830_8BIT, { 0x3631 }, 0xd2 },
+       { OV8830_8BIT, { 0x3632 }, 0x00 },
+       { OV8830_8BIT, { 0x3633 }, 0x34 },
+       { OV8830_8BIT, { 0x3634 }, 0x03 },
+       { OV8830_8BIT, { 0x3660 }, 0x80 },
+       { OV8830_8BIT, { 0x3662 }, 0x10 },
+       { OV8830_8BIT, { 0x3665 }, 0x00 },
+       { OV8830_8BIT, { 0x3666 }, 0x00 },
+       { OV8830_8BIT, { 0x3667 }, 0x00 },
+       { OV8830_8BIT, { 0x366a }, 0x80 },
+       { OV8830_8BIT, { 0x366c }, 0x00 },
+       { OV8830_8BIT, { 0x366d }, 0x00 },
+       { OV8830_8BIT, { 0x366e }, 0x00 },
+       { OV8830_8BIT, { 0x366f }, 0x20 },
+       { OV8830_8BIT, { 0x3680 }, 0xe0 },
+       { OV8830_8BIT, { 0x3681 }, 0x00 },
+       { OV8830_8BIT, { 0x3701 }, 0x14 },
+       { OV8830_8BIT, { 0x3702 }, 0xbf },
+       { OV8830_8BIT, { 0x3703 }, 0x8c },
+       { OV8830_8BIT, { 0x3704 }, 0x78 },
+       { OV8830_8BIT, { 0x3705 }, 0x02 },
+       { OV8830_8BIT, { 0x3708 }, 0xe8 },
+       { OV8830_8BIT, { 0x3709 }, 0x03 },
+       { OV8830_8BIT, { 0x370a }, 0x00 },
+       { OV8830_8BIT, { 0x370b }, 0x20 },
+       { OV8830_8BIT, { 0x370c }, 0x0c },
+       { OV8830_8BIT, { 0x370d }, 0x11 },
+       { OV8830_8BIT, { 0x370e }, 0x00 },
+       { OV8830_8BIT, { 0x370f }, 0x00 },
+       { OV8830_8BIT, { 0x3710 }, 0x00 },
+       { OV8830_8BIT, { 0x371c }, 0x01 },
+       { OV8830_8BIT, { 0x371f }, 0x0c },
+       { OV8830_8BIT, { 0x3721 }, 0x00 },
+       { OV8830_8BIT, { 0x3724 }, 0x10 },
+       { OV8830_8BIT, { 0x3726 }, 0x00 },
+       { OV8830_8BIT, { 0x372a }, 0x01 },
+       { OV8830_8BIT, { 0x3730 }, 0x18 },
+       { OV8830_8BIT, { 0x3738 }, 0x22 },
+       { OV8830_8BIT, { 0x3739 }, 0x08 },
+       { OV8830_8BIT, { 0x373a }, 0x51 },
+       { OV8830_8BIT, { 0x373b }, 0x02 },
+       { OV8830_8BIT, { 0x373c }, 0x20 },
+       { OV8830_8BIT, { 0x373f }, 0x02 },
+       { OV8830_8BIT, { 0x3740 }, 0x42 },
+       { OV8830_8BIT, { 0x3741 }, 0x02 },
+       { OV8830_8BIT, { 0x3742 }, 0x18 },
+       { OV8830_8BIT, { 0x3743 }, 0x01 },
+       { OV8830_8BIT, { 0x3744 }, 0x02 },
+       { OV8830_8BIT, { 0x3747 }, 0x10 },
+       { OV8830_8BIT, { 0x374c }, 0x04 },
+       { OV8830_8BIT, { 0x3751 }, 0xf0 },
+       { OV8830_8BIT, { 0x3752 }, 0x00 },
+       { OV8830_8BIT, { 0x3753 }, 0x00 },
+       { OV8830_8BIT, { 0x3754 }, 0xc0 },
+       { OV8830_8BIT, { 0x3755 }, 0x00 },
+       { OV8830_8BIT, { 0x3756 }, 0x1a },
+       { OV8830_8BIT, { 0x3758 }, 0x00 },
+       { OV8830_8BIT, { 0x3759 }, 0x0f },
+       { OV8830_8BIT, { 0x375c }, 0x04 },
+       { OV8830_8BIT, { 0x3767 }, 0x01 },
+       { OV8830_8BIT, { 0x376b }, 0x44 },
+       { OV8830_8BIT, { 0x3774 }, 0x10 },
+       { OV8830_8BIT, { 0x3776 }, 0x00 },
+       { OV8830_8BIT, { 0x377f }, 0x08 },
+       { OV8830_8BIT, { 0x3780 }, 0x22 },
+       { OV8830_8BIT, { 0x3781 }, 0x0c },
+       { OV8830_8BIT, { 0x3784 }, 0x2c },
+       { OV8830_8BIT, { 0x3785 }, 0x1e },
+       { OV8830_8BIT, { 0x378f }, 0xf5 },
+       { OV8830_8BIT, { 0x3791 }, 0xb0 },
+       { OV8830_8BIT, { 0x3795 }, 0x00 },
+       { OV8830_8BIT, { 0x3796 }, 0x64 },
+       { OV8830_8BIT, { 0x3797 }, 0x11 },
+       { OV8830_8BIT, { 0x3798 }, 0x30 },
+       { OV8830_8BIT, { 0x3799 }, 0x41 },
+       { OV8830_8BIT, { 0x379a }, 0x07 },
+       { OV8830_8BIT, { 0x379b }, 0xb0 },
+       { OV8830_8BIT, { 0x379c }, 0x0c },
+       { OV8830_8BIT, { 0x37c5 }, 0x00 },
+       { OV8830_8BIT, { 0x37c6 }, 0xa0 },
+       { OV8830_8BIT, { 0x37c7 }, 0x00 },
+       { OV8830_8BIT, { 0x37c9 }, 0x00 },
+       { OV8830_8BIT, { 0x37ca }, 0x00 },
+       { OV8830_8BIT, { 0x37cb }, 0x00 },
+       { OV8830_8BIT, { 0x37cc }, 0x00 },
+       { OV8830_8BIT, { 0x37cd }, 0x00 },
+       { OV8830_8BIT, { 0x37ce }, 0x01 },
+       { OV8830_8BIT, { 0x37cf }, 0x00 },
+       { OV8830_8BIT, { 0x37d1 }, 0x01 },
+       { OV8830_8BIT, { 0x37de }, 0x00 },
+       { OV8830_8BIT, { 0x37df }, 0x00 },
+       { OV8830_8BIT, { 0x3800 }, 0x00 },      /* TIMING_X_ADDR_START = 0 */
+       { OV8830_8BIT, { 0x3801 }, 0x00 },
+       { OV8830_8BIT, { 0x3802 }, 0x00 },      /* TIMING_Y_ADDR_START = 0 */
+       { OV8830_8BIT, { 0x3803 }, 0x00 },
+       { OV8830_8BIT, { 0x3804 }, 0x0c },
+       { OV8830_8BIT, { 0x3805 }, 0xdf },
+       { OV8830_8BIT, { 0x3806 }, 0x09 },
+       { OV8830_8BIT, { 0x3807 }, 0xaf },
+       { OV8830_8BIT, { 0x3808 }, 0x03 },      /* TIMING_X_OUTPUT_SIZE = 816 */
+       { OV8830_8BIT, { 0x3809 }, 0x30 },
+       { OV8830_8BIT, { 0x380a }, 0x02 },      /* TIMING_Y_OUTPUT_SIZE = 612 */
+       { OV8830_8BIT, { 0x380b }, 0x64 },
+       { OV8830_8BIT, { 0x380c }, 0x0e },      /* TIMING_HTS = 3608 */
+       { OV8830_8BIT, { 0x380d }, 0x18 },
+       { OV8830_8BIT, { 0x380e }, 0x07 },      /* TIMING_VTS = 1996 */
+       { OV8830_8BIT, { 0x380f }, 0xcc },
+       { OV8830_8BIT, { 0x3810 }, 0x00 },
+       { OV8830_8BIT, { 0x3811 }, 0x04 },
+       { OV8830_8BIT, { 0x3812 }, 0x00 },
+       { OV8830_8BIT, { 0x3813 }, 0x04 },
+       { OV8830_8BIT, { 0x3814 }, 0x71 },
+       { OV8830_8BIT, { 0x3815 }, 0x71 },
+       { OV8830_8BIT, { 0x3820 }, 0x11 },
+       { OV8830_8BIT, { 0x3821 }, 0x0f },
+       { OV8830_8BIT, { 0x3823 }, 0x00 },
+       { OV8830_8BIT, { 0x3824 }, 0x00 },
+       { OV8830_8BIT, { 0x3825 }, 0x00 },
+       { OV8830_8BIT, { 0x3826 }, 0x00 },
+       { OV8830_8BIT, { 0x3827 }, 0x00 },
+       { OV8830_8BIT, { 0x382a }, 0x04 },
+       { OV8830_8BIT, { 0x3a04 }, 0x02 },
+       { OV8830_8BIT, { 0x3a05 }, 0x69 },
+       { OV8830_8BIT, { 0x3a06 }, 0x00 },
+       { OV8830_8BIT, { 0x3a07 }, 0xf8 },
+       { OV8830_8BIT, { 0x3b00 }, 0x00 },
+       { OV8830_8BIT, { 0x3b02 }, 0x00 },
+       { OV8830_8BIT, { 0x3b03 }, 0x00 },
+       { OV8830_8BIT, { 0x3b04 }, 0x00 },
+       { OV8830_8BIT, { 0x3b05 }, 0x00 },
+       { OV8830_8BIT, { 0x3d00 }, 0x00 },
+       { OV8830_8BIT, { 0x3d01 }, 0x00 },
+       { OV8830_8BIT, { 0x3d02 }, 0x00 },
+       { OV8830_8BIT, { 0x3d03 }, 0x00 },
+       { OV8830_8BIT, { 0x3d04 }, 0x00 },
+       { OV8830_8BIT, { 0x3d05 }, 0x00 },
+       { OV8830_8BIT, { 0x3d06 }, 0x00 },
+       { OV8830_8BIT, { 0x3d07 }, 0x00 },
+       { OV8830_8BIT, { 0x3d08 }, 0x00 },
+       { OV8830_8BIT, { 0x3d09 }, 0x00 },
+       { OV8830_8BIT, { 0x3d0a }, 0x00 },
+       { OV8830_8BIT, { 0x3d0b }, 0x00 },
+       { OV8830_8BIT, { 0x3d0c }, 0x00 },
+       { OV8830_8BIT, { 0x3d0d }, 0x00 },
+       { OV8830_8BIT, { 0x3d0e }, 0x00 },
+       { OV8830_8BIT, { 0x3d0f }, 0x00 },
+       { OV8830_8BIT, { 0x3d80 }, 0x00 },
+       { OV8830_8BIT, { 0x3d81 }, 0x00 },
+       { OV8830_8BIT, { 0x3d84 }, 0x00 },
+       { OV8830_8BIT, { 0x4000 }, 0x18 },
+       { OV8830_8BIT, { 0x4001 }, 0x04 },
+       { OV8830_8BIT, { 0x4002 }, 0x45 },
+       { OV8830_8BIT, { 0x4004 }, 0x02 },
+       { OV8830_8BIT, { 0x4005 }, 0x1A },
+       { OV8830_8BIT, { 0x4006 }, 0x16 },
+       { OV8830_8BIT, { 0x4008 }, 0x20 },
+       { OV8830_8BIT, { 0x4009 }, 0x10 },
+       { OV8830_8BIT, { 0x4101 }, 0x12 },
+       { OV8830_8BIT, { 0x4104 }, 0x5b },
+       { OV8830_8BIT, { 0x4307 }, 0x30 },
+       { OV8830_8BIT, { 0x4315 }, 0x00 },
+       { OV8830_8BIT, { 0x4511 }, 0x05 },
+       { OV8830_8BIT, { 0x4512 }, 0x00 },
+       { OV8830_8BIT, { 0x4805 }, 0x01 },
+       { OV8830_8BIT, { 0x4806 }, 0x00 },
+       { OV8830_8BIT, { 0x481f }, 0x36 },
+       { OV8830_8BIT, { 0x4831 }, 0x6c },
+       { OV8830_8BIT, { 0x4837 }, 0x0d },
+       { OV8830_8BIT, { 0x4a00 }, 0xaa },
+       { OV8830_8BIT, { 0x4a03 }, 0x01 },
+       { OV8830_8BIT, { 0x4a05 }, 0x08 },
+       { OV8830_8BIT, { 0x4a0a }, 0x88 },
+       { OV8830_8BIT, { 0x5000 }, 0x06 },
+       { OV8830_8BIT, { 0x5001 }, 0x01 },
+       { OV8830_8BIT, { 0x5002 }, 0x80 },
+       { OV8830_8BIT, { 0x5003 }, 0x20 },
+       { OV8830_8BIT, { 0x5013 }, 0x00 },
+       { OV8830_8BIT, { 0x5046 }, 0x4a },
+       { OV8830_8BIT, { 0x5780 }, 0x1c },
+       { OV8830_8BIT, { 0x5786 }, 0x20 },
+       { OV8830_8BIT, { 0x5787 }, 0x10 },
+       { OV8830_8BIT, { 0x5788 }, 0x18 },
+       { OV8830_8BIT, { 0x578a }, 0x04 },
+       { OV8830_8BIT, { 0x578b }, 0x02 },
+       { OV8830_8BIT, { 0x578c }, 0x02 },
+       { OV8830_8BIT, { 0x578e }, 0x06 },
+       { OV8830_8BIT, { 0x578f }, 0x02 },
+       { OV8830_8BIT, { 0x5790 }, 0x02 },
+       { OV8830_8BIT, { 0x5791 }, 0xff },
+       { OV8830_8BIT, { 0x5a08 }, 0x02 },
+       { OV8830_8BIT, { 0x5e00 }, 0x00 },
+       { OV8830_8BIT, { 0x5e10 }, 0x0c },
+       { OV8830_TOK_TERM, {0}, 0}
+};
 
 /* divides a by b using half up rounding and div/0 prevention
  * (result is 0 if b == 0) */
@@ -80,59 +339,28 @@ MODULE_PARM_DESC(debug, "Enable debug messages");
 struct ov8830_resolution ov8830_res_preview[] = {
        {
                 .desc =        "PREVIEW_30fps" ,
-                .width =       820     ,
-                .height =      616     ,
+                .width =       816     ,
+                .height =      612     ,
                 .fps =         30      ,
                 .used =        0       ,
                 .pixels_per_line = 0x20F0, /* consistent with regs arrays */
                 .lines_per_frame = 0x02F7, /* consistent with regs arrays */
-                .regs =        ov8830_PREVIEW_30fps    ,
-       },
-       {
-                .desc =        "WIDE_PREVIEW_30fps"    ,
-                .width =       1640    ,
-                .height =      956     ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x16C2, /* consistent with regs arrays */
-                .lines_per_frame = 0x044F, /* consistent with regs arrays */
-                .regs =        ov8830_WIDE_PREVIEW_30fps       ,
+                .regs =        ov8830_mode1    ,
        },
-
 };
 
 #define N_RES_PREVIEW (ARRAY_SIZE(ov8830_res_preview))
 
 struct ov8830_resolution ov8830_res_still[] = {
        {
-                .desc =        "STILL_2M_15fps"        ,
-                .width =       1640    ,
-                .height =      1232    ,
-                .fps =         15      ,
-                .used =        0       ,
-                .pixels_per_line = 0x2460, /* consistent with regs arrays */
-                .lines_per_frame = 0x0563, /* consistent with regs arrays */
-                .regs =        ov8830_STILL_2M_15fps   ,
-       },
-       {
-                .desc =        "STILL_6M_15fps"        ,
-                .width =       3280    ,
-                .height =      1848    ,
-                .fps =         15      ,
-                .used =        0       ,
-                .pixels_per_line = 0x191C, /* consistent with regs arrays */
-                .lines_per_frame = 0x07C7, /* consistent with regs arrays */
-                .regs =        ov8830_STILL_6M_15fps   ,
-       },
-       {
-                .desc =        "STILL_8M_12fps"        ,
-                .width =       3280    ,
-                .height =      2464    ,
-                .fps =         12      ,
+                .desc =        "STILL_30fps"   ,
+                .width =       816     ,
+                .height =      612     ,
+                .fps =         30      ,
                 .used =        0       ,
-                .pixels_per_line = 0x17F8, /* consistent with regs arrays */
-                .lines_per_frame = 0x0A2F, /* consistent with regs arrays */
-                .regs =        ov8830_STILL_8M_12fps   ,
+                .pixels_per_line = 0x20F0, /* consistent with regs arrays */
+                .lines_per_frame = 0x02F7, /* consistent with regs arrays */
+                .regs =        ov8830_mode1    ,
        },
 };
 
@@ -140,64 +368,14 @@ struct ov8830_resolution ov8830_res_still[] = {
 
 struct ov8830_resolution ov8830_res_video[] = {
        {
-                .desc =        "QCIF_strong_dvs_30fps" ,
-                .width =       384     ,
-                .height =      292     ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x3978, /* consistent with regs arrays */
-                .lines_per_frame = 0x01B3, /* consistent with regs arrays */
-                .regs =        ov8830_QCIF_strong_dvs_30fps    ,
-       },
-       {
-                .desc =        "QVGA_strong_dvs_30fps" ,
-                .width =       384     ,
-                .height =      288     ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x3A00, /* consistent with regs arrays */
-                .lines_per_frame = 0x01AF, /* consistent with regs arrays */
-                .regs =        ov8830_QVGA_strong_dvs_30fps    ,
-       },
-       {
-                .desc =        "VGA_strong_dvs_30fps"  ,
-                .width =       820     ,
-                .height =      616     ,
+                .desc =        "VIDEO_30fps"   ,
+                .width =       816     ,
+                .height =      612     ,
                 .fps =         30      ,
                 .used =        0       ,
                 .pixels_per_line = 0x20F0, /* consistent with regs arrays */
                 .lines_per_frame = 0x02F7, /* consistent with regs arrays */
-                .regs =        ov8830_VGA_strong_dvs_30fps     ,
-       },
-       {
-                .desc =        "WVGA_strong_dvs_30fps" ,
-                .width =       1640    ,
-                .height =      1024    ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x156C, /* consistent with regs arrays */
-                .lines_per_frame = 0x048F, /* consistent with regs arrays */
-                .regs =        ov8830_WVGA_strong_dvs_30fps    ,
-       },
-       {
-                .desc =        "720p_strong_dvs_30fps" ,
-                .width =       1568    ,
-                .height =      876     ,
-                .fps =         30      ,
-                .used =        0       ,
-                .pixels_per_line = 0x188C, /* consistent with regs arrays */
-                .lines_per_frame = 0x03FF, /* consistent with regs arrays */
-                .regs =        ov8830_720p_strong_dvs_30fps    ,
-       },
-       {
-                .desc =        "1080p_strong_dvs_30fps",
-                .width =       2336,
-                .height =      1308,
-                .fps =         30,
-                .used =        0,
-                .pixels_per_line = 0x113A, /* consistent with regs arrays */
-                .lines_per_frame = 0x05AB, /* consistent with regs arrays */
-                .regs =        ov8830_1080p_strong_dvs_30fps,
+                .regs =        ov8830_mode1    ,
        },
 };
 
@@ -570,8 +748,6 @@ static int ov8830_q_focus_status(struct v4l2_subdev *sd, s32 *value)
        struct ov8830_device *dev = to_ov8830_sensor(sd);
        struct timeval current_time;
        bool stillmoving = false;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
 
        do_gettimeofday(&current_time);
        if (current_time.tv_sec == (dev->timestamp_t_focus_abs).tv_sec) {
@@ -609,46 +785,7 @@ static long ov8830_set_exposure(struct v4l2_subdev *sd, u16 coarse_itg,
                                 u16 fine_itg, u16 gain)
 
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       int ret;
-       u16 frame_length;
-       struct ov8830_device *dev = to_ov8830_sensor(sd);
-
-       if (ov8830_read_reg(client, OV8830_16BIT,
-                            OV8830_FRAME_LENGTH_LINES, &frame_length))
-               return -EINVAL;
-
-       /* enable group hold */
-       ret = ov8830_write_reg_array(client, ov8830_param_hold);
-       if (ret)
-               return ret;
-
-       /* set coarse integration time */
-       ret = ov8830_write_reg(client, OV8830_16BIT,
-                       OV8830_COARSE_INTEGRATION_TIME, coarse_itg);
-       if (ret)
-               goto error;
-
-       /* set fine integration time */
-       ret = ov8830_write_reg(client, OV8830_16BIT,
-                       OV8830_FINE_INTEGRATION_TIME, fine_itg);
-       if (ret)
-               goto error;
-
-       /* set global gain */
-       ret = ov8830_write_reg(client, OV8830_16BIT,
-                       OV8830_GLOBAL_GAIN, gain);
-
-       if (ret)
-               goto error;
-       dev->gain       = gain;
-       dev->coarse_itg = coarse_itg;
-       dev->fine_itg   = fine_itg;
-
-error:
-       /* disable group hold */
-       ov8830_write_reg_array(client, ov8830_param_update);
-       return ret;
+       return -ENXIO;          /* Not supported yet */
 }
 
 static long ov8830_s_exposure(struct v4l2_subdev *sd,
@@ -663,178 +800,11 @@ static long ov8830_s_exposure(struct v4l2_subdev *sd,
        return ov8830_set_exposure(sd, coarse_itg, fine_itg, gain);
 }
 
-static int ov8830_read_reg_array(struct i2c_client *client, u16 size, u16 addr,
-                                 void *data)
-{
-       u8 *buf = data;
-       u16 index;
-       int ret = 0;
-
-       for (index = 0; index + OV8830_BYTE_MAX <= size;
-            index += OV8830_BYTE_MAX) {
-               ret = ov8830_read_reg(client, OV8830_BYTE_MAX,
-                                      OV8830_OTP_START_ADDR + index,
-                                      (u16 *)&buf[index]);
-               if (ret)
-                       return ret;
-       }
-
-       if (size - index > 0)
-               ret = ov8830_read_reg(client, size - index,
-                                      OV8830_OTP_START_ADDR + index,
-                                      (u16 *)&buf[index]);
-
-       return ret;
-}
-
-static unsigned long
-ov8830_otp_sum(struct v4l2_subdev *sd, u8 *buf, u16 start, u16 end)
-{
-       unsigned long sum = 0;
-       u16 i;
-
-       for (i = start; i <= end; i++)
-               sum += buf[i];
-
-       return sum;
-}
-
-static int ov8830_otp_checksum(struct v4l2_subdev *sd, u8 *buf, int list_len,
-                               const struct ov8830_otp_checksum_format *list)
-{
-       unsigned long sum;
-       u8 checksum;
-       int i;
-
-       for (i = 0; i < list_len; i++) {
-               sum = ov8830_otp_sum(sd, buf, list[i].start, list[i].end);
-               checksum = sum % OV8830_OTP_MOD_CHECKSUM;
-               if (buf[list[i].checksum] != checksum)
-                       return -EINVAL;
-       }
-
-       return 0;
-}
-
-static int ov8830_otp_read(struct v4l2_subdev *sd,
-                           const struct ov8830_reg *type,
-                           void __user *data, u32 size)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       int ret;
-       int retry = 100;
-       void *buf;
-       u16 ready;
-
-       ret = ov8830_write_reg_array(client, type);
-       if (ret) {
-               v4l2_err(client, "%s: failed to prepare OTP memory\n",
-                        __func__);
-               return ret;
-       }
-
-       /*
-        * As we need to wait for sensor to prepare OTP memory, let's allocate
-        * buffer now to optimize time.
-        */
-       buf = kmalloc(OV8830_OTP_DATA_SIZE, GFP_KERNEL);
-       if (!buf)
-               return -ENOMEM;
-
-       do {
-               ret = ov8830_read_reg(client, OV8830_16BIT,
-                                      OV8830_OTP_READY_REG, &ready);
-               if (ret) {
-                       v4l2_err(client, "%s: failed to read OTP memory "
-                                        "status\n", __func__);
-                       goto out;
-               }
-               if (ready & OV8830_OTP_READY_REG_DONE)
-                       break;
-       } while (--retry);
-
-       if (!(ready & OV8830_OTP_READY_REG_OK)) {
-               v4l2_info(client, "%s: OTP memory was initialized with error\n",
-                         __func__);
-               ret = -EIO;
-               goto out;
-       }
-       ret = ov8830_read_reg_array(client, OV8830_OTP_DATA_SIZE,
-                                    OV8830_OTP_START_ADDR, buf);
-       if (ret) {
-               v4l2_err(client, "%s: failed to read OTP data\n", __func__);
-               goto out;
-       }
-       if (OV8830_OTP_CHECKSUM) {
-               ret = ov8830_otp_checksum(sd, buf,
-                               ARRAY_SIZE(ov8830_otp_checksum_list),
-                               ov8830_otp_checksum_list);
-               if (ret)
-                       goto out;
-       }
-       ret = copy_to_user(data, buf, size);
-       if (ret) {
-               v4l2_err(client, "%s: failed to copy OTP data to user\n",
-                        __func__);
-               ret = -EFAULT;
-       }
-
-out:
-       kfree(buf);
-       return ret;
-}
-
-static int ov8830_g_priv_int_data(struct v4l2_subdev *sd,
-                                  struct v4l2_private_int_data *priv)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       struct ov8830_device *dev = to_ov8830_sensor(sd);
-       u32 read_size = priv->size;
-       int ret;
-
-       if (!dev->power)
-               return -EIO;
-
-       if (dev->streaming)
-               return -EBUSY;
-
-       if (!priv)
-               return -EINVAL;
-
-       /* Return correct size */
-       priv->size = OV8830_OTP_DATA_SIZE;
-
-       /* No need to copy data if size is 0 */
-       if (!read_size)
-               return 0;
-
-       /* Correct read_size value only if bigger than maximum */
-       if (read_size > OV8830_OTP_DATA_SIZE)
-               read_size = OV8830_OTP_DATA_SIZE;
-
-       /* Try all banks, one by one, and return after first success */
-       ret = ov8830_otp_read(sd, ov8830_otp_type30, priv->data, read_size);
-       if (!ret)
-               return 0;
-       ret = ov8830_otp_read(sd, ov8830_otp_type31, priv->data, read_size);
-       if (!ret)
-               return 0;
-       ret = ov8830_otp_read(sd, ov8830_otp_type32, priv->data, read_size);
-       if (!ret)
-               return 0;
-
-       /* Driver has failed to find valid data */
-       v4l2_info(client, "%s: sensor found no valid OTP data\n", __func__);
-       return ret;
-}
-
 static long ov8830_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return ov8830_s_exposure(sd, (struct atomisp_exposure *)arg);
-       case ATOMISP_IOC_G_SENSOR_PRIV_INT_DATA:
-               return ov8830_g_priv_int_data(sd, arg);
        default:
                return -EINVAL;
        }
@@ -843,35 +813,17 @@ static long ov8830_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 
 static int ov8830_init_registers(struct v4l2_subdev *sd)
 {
-       int ret;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       ret  = ov8830_write_reg_array(client, ov8830_reset_register);
-       ret |= ov8830_write_reg_array(client, ov8830_pll_timing);
-       ret |= ov8830_write_reg_array(client, ov8830_raw_10);
-       ret |= ov8830_write_reg_array(client, ov8830_mipi_config);
-       ret |= ov8830_write_reg_array(client, ov8830_recommended_settings);
-       ret |= ov8830_write_reg_array(client, ov8830_mipi_timing);
-       ret |= ov8830_write_reg_array(client, ov8830_scaler);
-       ret |= ov8830_write_reg_array(client, ov8830_init_vcm);
-
-       return ret;
+       return 0;
 }
 
 static int ov8830_init(struct v4l2_subdev *sd, u32 val)
 {
-       int ret;
+       int ret = 0;
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
        /* set inital registers */
        ret = ov8830_init_registers(sd);
 
-       /*set VCM to home position */
-       ret |= ov8830_t_focus_abs(sd, HOME_POS);
-
-       /* Program shading table into sensor */
-       ret |= ov8830_write_reg_array(client, ov8830_lens_shading);
-
        /* restore settings */
        ov8830_res = ov8830_res_preview;
        N_RES = N_RES_PREVIEW;
@@ -895,22 +847,24 @@ static int power_up(struct v4l2_subdev *sd)
        struct ov8830_device *dev = to_ov8830_sensor(sd);
        int ret;
 
-       /* power control */
+       /* Enable power */
        ret = dev->platform_data->power_ctrl(sd, 1);
        if (ret)
                goto fail_power;
 
-       /* flis clock control */
-       ret = dev->platform_data->flisclk_ctrl(sd, 1);
-       if (ret)
-               goto fail_clk;
-
-       /* gpio ctrl */
+       /* Release reset */
        ret = dev->platform_data->gpio_ctrl(sd, 1);
        if (ret)
                dev_err(&client->dev, "gpio failed 1\n");
-       msleep(20);
 
+       /* Enable clock */
+       ret = dev->platform_data->flisclk_ctrl(sd, 1);
+       if (ret)
+               goto fail_clk;
+
+       /* Minumum delay is 8192 clock cycles before first i2c transaction,
+        * which is 1.37 ms at the lowest allowed clock rate 6 MHz */
+       msleep(2);
        return 0;
 
 fail_clk:
@@ -1099,20 +1053,7 @@ static int ov8830_test_pattern(struct v4l2_subdev *sd, s32 value)
 
 static int ov8830_v_flip(struct v4l2_subdev *sd, s32 value)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       int ret;
-
-       if (value > 1)
-               return -EINVAL;
-
-       ret = ov8830_write_reg_array(client, ov8830_param_hold);
-       if (ret)
-               return ret;
-       ret = ov8830_rmw_reg(client, OV8830_16BIT & ~OV8830_RMW,
-                              0x3040, 0x8000, value);
-       if (ret)
-               return ret;
-       return ov8830_write_reg_array(client, ov8830_param_update);
+       return -ENXIO;
 }
 
 
@@ -1490,7 +1431,7 @@ static int ov8830_s_mbus_fmt(struct v4l2_subdev *sd,
        dev->fps = ov8830_res[dev->fmt_idx].fps;
        dev->pixels_per_line = ov8830_res[dev->fmt_idx].pixels_per_line;
        dev->lines_per_frame = ov8830_res[dev->fmt_idx].lines_per_frame;
-
+#if 0
        ret = ov8830_get_intg_factor(client, ov8830_info, ov8830_def_reg);
        if (ret) {
                v4l2_err(sd, "failed to get integration_factor\n");
@@ -1501,7 +1442,7 @@ static int ov8830_s_mbus_fmt(struct v4l2_subdev *sd,
        if (dev->coarse_itg)
                ov8830_set_exposure(sd, dev->coarse_itg, dev->fine_itg,
                                     dev->gain);
-
+#endif
        return 0;
 }
 
@@ -1530,12 +1471,12 @@ static int ov8830_detect(struct i2c_client *client, u16 *id, u8 *revision)
                return -ENODEV;
 
        /* check sensor chip ID  */
-       if (ov8830_read_reg(client, OV8830_8BIT, OV8830_SC_CMMN_CHIP_ID_H,
+       if (ov8830_read_reg(client, OV8830_8BIT, 0x3001,
                             &high)) {
                v4l2_err(client, "sensor_id_high = 0x%x\n", high);
                return -ENODEV;
        }
-       if (ov8830_read_reg(client, OV8830_8BIT, OV8830_SC_CMMN_CHIP_ID_L,
+       if (ov8830_read_reg(client, OV8830_8BIT, 0x3002,
                             &low)) {
                v4l2_err(client, "sensor_id_low = 0x%x\n", high);
                return -ENODEV;
@@ -1544,7 +1485,7 @@ static int ov8830_detect(struct i2c_client *client, u16 *id, u8 *revision)
        v4l2_info(client, "sensor_id = 0x%x\n", *id);
        real_model_id = *id;
 
-       if (*id != OV8830_ID) {
+       if (*id != 0x0A08) {
                v4l2_err(client, "sensor ID error\n");
                return -ENODEV;
        }
@@ -1562,48 +1503,17 @@ static int ov8830_detect(struct i2c_client *client, u16 *id, u8 *revision)
  */
 static int ov8830_s_stream(struct v4l2_subdev *sd, int enable)
 {
-       int ret;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
        struct ov8830_device *dev = to_ov8830_sensor(sd);
-       u16 temp;
-
-       if (enable) {
-               if (dev->sensor_revision <= 0x0) {
-                       /* begin: vcm hack, needs to be removed when new camera module is availible */
-                       struct ov8830_reg ov8830_stream_enable[] = {
-                               ov8830_streaming[0],
-                               {OV8830_16BIT, {0x30F2}, 0x0000}, /* VCM_NEW_CODE */
-                               INIT_VCM_CONTROL,
-                               {OV8830_16BIT, {0x30F2}, 0x0000}, /* VCM_NEW_CODE */
-                               {OV8830_TOK_DELAY, {0}, 100},
-                               {OV8830_TOK_TERM, {0}, 0}
-                       };
-
-                       ov8830_stream_enable[1].val = (OV8830_MAX_FOCUS_POS - dev->focus) + 1;
-                       ov8830_stream_enable[3].val = (OV8830_MAX_FOCUS_POS - dev->focus);
-
-                       ret = ov8830_write_reg_array(client, ov8830_stream_enable);
-
-                       /* end: vcm hack, needs to be removed when new camera module is availible */
-               } else {
-                       ret = ov8830_write_reg_array(client, ov8830_streaming);
-               }
-
-               if (ret != 0) {
-                       v4l2_err(client, "write_reg_array err\n");
-                       return ret;
-               }
-               dev->streaming = 1;
-       } else {
+       struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-               ret = ov8830_write_reg_array(client, ov8830_soft_standby);
-               if (ret != 0) {
-                       v4l2_err(client, "write_reg_array err\n");
-                       return ret;
-               }
-               dev->streaming = 0;
+       int ret = ov8830_write_reg(client, OV8830_8BIT, 0x0100, enable ? 1 : 0);
+       if (ret != 0) {
+               v4l2_err(client, "failed to set streaming\n");
+               return ret;
        }
 
+       dev->streaming = enable;
+
        /* restore settings */
        ov8830_res = ov8830_res_preview;
        N_RES = N_RES_PREVIEW;
@@ -1824,7 +1734,7 @@ ov8830_g_frame_interval(struct v4l2_subdev *sd,
        struct ov8830_device *dev = to_ov8830_sensor(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        u16 lines_per_frame;
-       u8 fps;
+
        /*
         * if no specific information to calculate the fps,
         * just used the value in sensor settings
index 3053eb5..6b7eb27 100644 (file)
@@ -392,675 +392,9 @@ struct ov8830_write_ctrl {
        struct ov8830_write_buffer buffer;
 };
 
-#define OV8830_OTP_START_ADDR          0x3800
-#define OV8830_OTP_DATA_SIZE           456
-#define OV8830_OTP_READY_REG           0x304a
-#define OV8830_OTP_READY_REG_DONE      (1 << 5)
-#define OV8830_OTP_READY_REG_OK        (1 << 6)
-
-static const struct ov8830_reg ov8830_otp_type30[] = {
-       {OV8830_16BIT, {0x3134}, 0xcd95},
-       {OV8830_16BIT, {0x304c}, 0x3000},
-       {OV8830_16BIT, {0x304a}, 0x0010},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_otp_type31[] = {
-       {OV8830_16BIT, {0x3134}, 0xcd95},
-       {OV8830_16BIT, {0x304c}, 0x3100},
-       {OV8830_16BIT, {0x304a}, 0x0010},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_otp_type32[] = {
-       {OV8830_16BIT, {0x3134}, 0xcd95},
-       {OV8830_16BIT, {0x304c}, 0x3200},
-       {OV8830_16BIT, {0x304a}, 0x0010},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-#define OV8830_OTP_CHECKSUM            1
-#define OV8830_OTP_MOD_CHECKSUM        255
-
-/*
- * Checksum entries in OTP data:
- * @start: start offset of checksum's input data
- * @end: end offset of checksum's input data
- * @checksum: offset where checksum is placed
- */
-struct ov8830_otp_checksum_format {
-       u16 start;
-       u16 end;
-       u16 checksum;
-};
-
-static const struct ov8830_otp_checksum_format
-ov8830_otp_checksum_list[] = {
-       {0x0004, 0x00d7, 0x00e1},
-       {0x00d8, 0x00df, 0x00e0},
-       {0x00e4, 0x01b7, 0x01c1},
-       {0x01b8, 0x01bf, 0x01c0},
-       {0x0000, 0x01c3, 0x01c4},
-};
-
 #define MAX_FMTS 1
 
 #define OV8830_RES_WIDTH_MAX   3280
 #define OV8830_RES_HEIGHT_MAX  2464
 
-/* Recommended Settings 29 Mar 2011*/
-static const struct ov8830_reg ov8830_recommended_settings[] = {
-       {OV8830_16BIT, {0x3044}, 0x0590},
-       {OV8830_16BIT, {0x306E}, 0xFC80},
-       {OV8830_16BIT, {0x30B2}, 0xC000},
-       {OV8830_16BIT, {0x30D6}, 0x0800},
-       {OV8830_16BIT, {0x316C}, 0xB42F},
-       {OV8830_16BIT, {0x316E}, 0x869A},
-       {OV8830_16BIT, {0x3170}, 0x210E},
-       {OV8830_16BIT, {0x317A}, 0x010E},
-       {OV8830_16BIT, {0x31E0}, 0x1FB9},
-       {OV8830_16BIT, {0x31E6}, 0x07FC},
-       {OV8830_16BIT, {0x37C0}, 0x0000},
-       {OV8830_16BIT, {0x37C2}, 0x0000},
-       {OV8830_16BIT, {0x37C4}, 0x0000},
-       {OV8830_16BIT, {0x37C6}, 0x0000},
-       {OV8830_16BIT, {0x3E00}, 0x0011},
-       {OV8830_16BIT, {0x3E02}, 0x8801},
-       {OV8830_16BIT, {0x3E04}, 0x2801},
-       {OV8830_16BIT, {0x3E06}, 0x8449},
-       {OV8830_16BIT, {0x3E08}, 0x6841},
-       {OV8830_16BIT, {0x3E0A}, 0x400C},
-       {OV8830_16BIT, {0x3E0C}, 0x1001},
-       {OV8830_16BIT, {0x3E0E}, 0x2603},
-       {OV8830_16BIT, {0x3E10}, 0x4B41},
-       {OV8830_16BIT, {0x3E12}, 0x4B24},
-       {OV8830_16BIT, {0x3E14}, 0xA3CF},
-       {OV8830_16BIT, {0x3E16}, 0x8802},
-       {OV8830_16BIT, {0x3E18}, 0x84FF},
-       {OV8830_16BIT, {0x3E1A}, 0x8601},
-       {OV8830_16BIT, {0x3E1C}, 0x8401},
-       {OV8830_16BIT, {0x3E1E}, 0x840A},
-       {OV8830_16BIT, {0x3E20}, 0xFF00},
-       {OV8830_16BIT, {0x3E22}, 0x8401},
-       {OV8830_16BIT, {0x3E24}, 0x00FF},
-       {OV8830_16BIT, {0x3E26}, 0x0088},
-       {OV8830_16BIT, {0x3E28}, 0x2E8A},
-       {OV8830_16BIT, {0x3E30}, 0x0000},
-       {OV8830_16BIT, {0x3E32}, 0x8801},
-       {OV8830_16BIT, {0x3E34}, 0x4029},
-       {OV8830_16BIT, {0x3E36}, 0x00FF},
-       {OV8830_16BIT, {0x3E38}, 0x8469},
-       {OV8830_16BIT, {0x3E3A}, 0x00FF},
-       {OV8830_16BIT, {0x3E3C}, 0x2801},
-       {OV8830_16BIT, {0x3E3E}, 0x3E2A},
-       {OV8830_16BIT, {0x3E40}, 0x1C01},
-       {OV8830_16BIT, {0x3E42}, 0xFF84},
-       {OV8830_16BIT, {0x3E44}, 0x8401},
-       {OV8830_16BIT, {0x3E46}, 0x0C01},
-       {OV8830_16BIT, {0x3E48}, 0x8401},
-       {OV8830_16BIT, {0x3E4A}, 0x00FF},
-       {OV8830_16BIT, {0x3E4C}, 0x8402},
-       {OV8830_16BIT, {0x3E4E}, 0x8984},
-       {OV8830_16BIT, {0x3E50}, 0x6628},
-       {OV8830_16BIT, {0x3E52}, 0x8340},
-       {OV8830_16BIT, {0x3E54}, 0x00FF},
-       {OV8830_16BIT, {0x3E56}, 0x4A42},
-       {OV8830_16BIT, {0x3E58}, 0x2703},
-       {OV8830_16BIT, {0x3E5A}, 0x6752},
-       {OV8830_16BIT, {0x3E5C}, 0x3F2A},
-       {OV8830_16BIT, {0x3E5E}, 0x846A},
-       {OV8830_16BIT, {0x3E60}, 0x4C01},
-       {OV8830_16BIT, {0x3E62}, 0x8401},
-       {OV8830_16BIT, {0x3E66}, 0x3901},
-       {OV8830_16BIT, {0x3E90}, 0x2C01},
-       {OV8830_16BIT, {0x3E98}, 0x2B02},
-       {OV8830_16BIT, {0x3E92}, 0x2A04},
-       {OV8830_16BIT, {0x3E94}, 0x2509},
-       {OV8830_16BIT, {0x3E96}, 0x0000},
-       {OV8830_16BIT, {0x3E9A}, 0x2905},
-       {OV8830_16BIT, {0x3E9C}, 0x00FF},
-       {OV8830_16BIT, {0x3ECC}, 0x00EB},
-       {OV8830_16BIT, {0x3ED0}, 0x1E24},
-       {OV8830_16BIT, {0x3ED4}, 0xAFC4},
-       {OV8830_16BIT, {0x3ED6}, 0x909B},
-       {OV8830_16BIT, {0x3EE0}, 0x2424},
-       {OV8830_16BIT, {0x3EE2}, 0x9797},
-       {OV8830_16BIT, {0x3EE4}, 0xC100},
-       {OV8830_16BIT, {0x3EE6}, 0x0540},
-       {OV8830_16BIT, {0x3174}, 0x8000},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_pll_timing[] = {
-       /*                      pixelrate into the isp =        153.600.000 Hz           */
-       {OV8830_16BIT, {0x0300},        0x0004  }, /*   vt_pix_clk_div= 4       internal pixel clock freq =     192.000.000 Hz           */
-       {OV8830_16BIT, {0x0302},        0x0001  }, /*   vt_sys_clk_div= 1                                */
-       {OV8830_16BIT, {0x0304},        0x0002  }, /*   pre_pll_clk_div=        2       PLL input clock freq =  9.600.000 Hz             */
-       {OV8830_16BIT, {0x0306},        0x0050  }, /*   pll_multiplier= 80      mipi bus speed =        768.000.000 Hz           */
-       {OV8830_16BIT, {0x0308},        0x000A  }, /*   op_pix_clk_div= 10      output pixel clock freq =       76.800.000 Hz            */
-       {OV8830_16BIT, {0x030A},        0x0001  }, /*   op_sys_clk_div= 1                                */
-       {OV8830_16BIT, {0x3016},        0x111   }, /*   row_speed=      273                              */
-       {OV8830_TOK_DELAY, {0}, 1},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-
-/*2-lane MIPI Interface Configuration*/
-static const struct ov8830_reg ov8830_mipi_config[] = {
-       {OV8830_16BIT+OV8830_RMW, {0x3064}, 0x0100, 0x0000},
-       {OV8830_16BIT, {0x31AE}, 0x0202},
-       {OV8830_16BIT, {0x31B8}, 0x03EF},
-       /*{OV8830_16BIT, {0x31B8}, 0x2FEF}, */
-       {OV8830_TOK_DELAY, {0}, 5},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-/* MIPI Timing Settings */
-static const struct ov8830_reg ov8830_mipi_timing[] = {
-       {OV8830_16BIT, {0x31B0}, 0x0083},
-       {OV8830_16BIT, {0x31B2}, 0x004D},
-       {OV8830_16BIT, {0x31B4}, 0x0E88},
-       {OV8830_16BIT, {0x31B6}, 0x0D24},
-       {OV8830_16BIT, {0x31B8}, 0x020E},
-       {OV8830_16BIT, {0x31BA}, 0x0710},
-       {OV8830_16BIT, {0x31BC}, 0x2A0D},
-       {OV8830_16BIT, {0x31BE}, 0xC007},
-       {OV8830_TOK_DELAY, {0}, 5},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-/* Start Streaming
- * reset_register_restart_bad = 1
- * reset_register_mask_bad = 1
- * reset_register_lock_reg = 1
- * grouped_parameter_hold = 0
- * reset_register_stream = 1 */
-
-static const struct ov8830_reg ov8830_start_streaming[] = {
-       {OV8830_16BIT+OV8830_RMW, {0x301A}, 0x0200, 0x1},
-       {OV8830_16BIT+OV8830_RMW, {0x301A}, 0x0400, 0x1},
-       {OV8830_16BIT+OV8830_RMW, {0x301A}, 0x8, 0x1},
-       {OV8830_16BIT, {0x0104}, 0x0},
-       {OV8830_16BIT+OV8830_RMW, {0x301A}, 0x4, 0x1},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-#define GROUPED_PARAMETER_HOLD_ENABLE  {OV8830_8BIT, {0x0104}, 0x1}
-
-#define GROUPED_PARAMETER_HOLD_DISABLE {OV8830_8BIT, {0x0104}, 0x0}
-
-#define RESET_REGISTER {OV8830_16BIT, {0x301A}, 0x4A18}
-
-#define INIT_VCM_CONTROL       {OV8830_16BIT, {0x30F0}, 0x8004}  /* slew_rate[2:0] */
-static const struct ov8830_reg ov8830_init_vcm[] = {
-       INIT_VCM_CONTROL,                                  /* VCM_CONTROL */
-       {OV8830_16BIT, {0x30F2}, 0x0000}, /* VCM_NEW_CODE */
-       {OV8830_16BIT, {0x30F4}, 0x0080}, /* VCM_STEP_TIME */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-static const struct ov8830_reg ov8830_reset_register[] = {
-       {OV8830_16BIT, {0x301A}, 0x10}, /* Lock_Register, transition to standby at frame end */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_raw_10[] = {
-       {OV8830_16BIT, {0x0112}, 0x0A0A}, /* CCP_DATA_FORMAT, set to RAW10 mode */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_scaler[] = {
-       {OV8830_16BIT, {0x0400}, 0x0000}, /* SCALE_MODE: 0:disable */
-       {OV8830_16BIT, {0x0404}, 0x0010}, /* SCALE_M = 16 */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-/*****************************************************************************/
-/*****************************************************************************/
-/*****************************************************************************/
-
-/*****************************still15ok*****************************/
-static struct ov8830_reg const ov8830_STILL_8M_12fps[] = {
-       /*      STILL 8M        */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CCF  },  /*  X_ADDR_END      3279    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x099F  },  /*  Y_ADDR_END      2463    */
-       {OV8830_16BIT, {0x034C},        0x0CD0  },  /*  X_OUTPUT_SIZE   3280    */
-       {OV8830_16BIT, {0x034E},        0x09A0  },  /*  Y_OUTPUT_SIZE   2464    */
-       {OV8830_16BIT, {0x3040},        0x0041  },  /*  READ_MODE       65      */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x17F8  },  /*  line_length_pck 6136    */
-       {OV8830_16BIT, {0x0340},        0x0A2F  },  /*  frame_length_lines      2607    */
-       {OV8830_16BIT, {0x0202},        0x0A2F  },  /*  COARSE_INTEGRATION_TIME 2607    */
-       {OV8830_16BIT, {0x3014},        0x0D77  },  /*  FINE_INTEGRATION_TIME   3348    */
-       {OV8830_16BIT, {0x3010},        0x0078  },  /*  FINE_CORRECTION 120     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_STILL_6M_15fps[] = {
-       /*      STILL 6M        */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CCF  },  /*  X_ADDR_END      3279    */
-       {OV8830_16BIT, {0x0346},        0x0134  },  /*  Y_ADDR_START    308     */
-       {OV8830_16BIT, {0x034A},        0x086D  },  /*  Y_ADDR_END      2157    */
-       {OV8830_16BIT, {0x034C},        0x0CD0  },  /*  X_OUTPUT_SIZE   3280    */
-       {OV8830_16BIT, {0x034E},        0x0738  },  /*  Y_OUTPUT_SIZE   1848    */
-       {OV8830_16BIT, {0x3040},        0x0041  },  /*  READ_MODE       65      */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x191C  },  /*  line_length_pck 6428    */
-       {OV8830_16BIT, {0x0340},        0x07C7  },  /*  frame_length_lines      1991    */
-       {OV8830_16BIT, {0x0202},        0x07C7  },  /*  COARSE_INTEGRATION_TIME 1991    */
-       {OV8830_16BIT, {0x3014},        0x073C  },  /*  FINE_INTEGRATION_TIME   1852    */
-       {OV8830_16BIT, {0x3010},        0x0078  },  /*  FINE_CORRECTION 120     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_STILL_2M_15fps[] = {
-       /*      STILL 2M        */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CD1  },  /*  X_ADDR_END      3281    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x09A1  },  /*  Y_ADDR_END      2465    */
-       {OV8830_16BIT, {0x034C},        0x0668  },  /*  X_OUTPUT_SIZE   1640    */
-       {OV8830_16BIT, {0x034E},        0x04D0  },  /*  Y_OUTPUT_SIZE   1232    */
-       {OV8830_16BIT, {0x3040},        0x04C3  },  /*  READ_MODE       1219    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x2460  },  /*  line_length_pck 9312    */
-       {OV8830_16BIT, {0x0340},        0x0563  },  /*  frame_length_lines      1379    */
-       {OV8830_16BIT, {0x0202},        0x055F  },  /*  COARSE_INTEGRATION_TIME 1375    */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-/*****************************preview30ok********************************/
-static struct ov8830_reg const ov8830_PREVIEW_30fps[] = {
-       /*      PREVIEW */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CC9  },  /*  X_ADDR_END      3273    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x0999  },  /*  Y_ADDR_END      2457    */
-       {OV8830_16BIT, {0x034C},        0x0334  },  /*  X_OUTPUT_SIZE   820     */
-       {OV8830_16BIT, {0x034E},        0x0268  },  /*  Y_OUTPUT_SIZE   616     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       5575    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x20F0  },  /*  line_length_pck 8432    */
-       {OV8830_16BIT, {0x0340},        0x02F7  },  /*  frame_length_lines      759     */
-       {OV8830_16BIT, {0x0202},        0x02F7  },  /*  COARSE_INTEGRATION_TIME 759     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_WIDE_PREVIEW_30fps[] = {
-       /*      WIDE PREVIEW    */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CD1  },  /*  X_ADDR_END      3281    */
-       {OV8830_16BIT, {0x0346},        0x0114  },  /*  Y_ADDR_START    276     */
-       {OV8830_16BIT, {0x034A},        0x088D  },  /*  Y_ADDR_END      2189    */
-       {OV8830_16BIT, {0x034C},        0x0668  },  /*  X_OUTPUT_SIZE   1640    */
-       {OV8830_16BIT, {0x034E},        0x03BC  },  /*  Y_OUTPUT_SIZE   956     */
-       {OV8830_16BIT, {0x3040},        0x04C3  },  /*  READ_MODE       1219    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x16C2  },  /*  line_length_pck 5826    */
-       {OV8830_16BIT, {0x0340},        0x044F  },  /*  frame_length_lines      1103    */
-       {OV8830_16BIT, {0x0202},        0x044B  },  /*  COARSE_INTEGRATION_TIME 1099    */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-/*****************************video************************/
-static struct ov8830_reg const ov8830_1080p_strong_dvs_30fps[] = {
-       /*      1080p strong dvs        */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x01D8  },  /*  X_ADDR_START    472     */
-       {OV8830_16BIT, {0x0348},        0x0AF7  },  /*  X_ADDR_END      2807    */
-       {OV8830_16BIT, {0x0346},        0x0242  },  /*  Y_ADDR_START    578     */
-       {OV8830_16BIT, {0x034A},        0x075D  },  /*  Y_ADDR_END      1885    */
-       {OV8830_16BIT, {0x034C},        0x0920  },  /*  X_OUTPUT_SIZE   2336    */
-       {OV8830_16BIT, {0x034E},        0x051C  },  /*  Y_OUTPUT_SIZE   1308    */
-       {OV8830_16BIT, {0x3040},        0x0041  },  /*  READ_MODE       65      */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x113A  },  /*  line_length_pck 4410    */
-       {OV8830_16BIT, {0x0340},        0x05AB  },  /*  frame_length_lines      1451    */
-       {OV8830_16BIT, {0x0202},        0x05AB  },  /*  COARSE_INTEGRATION_TIME 1451    */
-       {OV8830_16BIT, {0x3014},        0x0442  },  /*  FINE_INTEGRATION_TIME   1090    */
-       {OV8830_16BIT, {0x3010},        0x0078  },  /*  FINE_CORRECTION 120     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_720p_strong_dvs_30fps[] = {
-       /*      720p strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0048  },  /*  X_ADDR_START    72      */
-       {OV8830_16BIT, {0x0348},        0x0C89  },  /*  X_ADDR_END      3209    */
-       {OV8830_16BIT, {0x0346},        0x0164  },  /*  Y_ADDR_START    356     */
-       {OV8830_16BIT, {0x034A},        0x083D  },  /*  Y_ADDR_END      2109    */
-       {OV8830_16BIT, {0x034C},        0x0620  },  /*  X_OUTPUT_SIZE   1568    */
-       {OV8830_16BIT, {0x034E},        0x036C  },  /*  Y_OUTPUT_SIZE   876     */
-       {OV8830_16BIT, {0x3040},        0x04C3  },  /*  READ_MODE       5315    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x188C  },  /*  line_length_pck 6284    */
-       {OV8830_16BIT, {0x0340},        0x03FF  },  /*  frame_length_lines      1023    */
-       {OV8830_16BIT, {0x0202},        0x03FB  },  /*  COARSE_INTEGRATION_TIME 1019    */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x2     },  /*  SCALE_MODE      2       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_WVGA_strong_dvs_30fps[] = {
-       /*      WVGA strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CCD  },  /*  X_ADDR_END      3281    */
-       {OV8830_16BIT, {0x0346},        0x00D0  },  /*  Y_ADDR_START    208     */
-       {OV8830_16BIT, {0x034A},        0x08CD  },  /*  Y_ADDR_END      2253    */
-       {OV8830_16BIT, {0x034C},        0x0668  },  /*  X_OUTPUT_SIZE   1640    */
-       {OV8830_16BIT, {0x034E},        0x0400  },  /*  Y_OUTPUT_SIZE   1024    */
-       {OV8830_16BIT, {0x3040},        0x04C3  },  /*  READ_MODE       195     */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x156C  },  /*  line_length_pck 5484    */
-       {OV8830_16BIT, {0x0340},        0x048F  },  /*  frame_length_lines      1167    */
-       {OV8830_16BIT, {0x0202},        0x048F  },  /*  COARSE_INTEGRATION_TIME 1167    */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_VGA_strong_dvs_30fps[] = {
-       /*      VGA strong dvs  */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CC9  },  /*  X_ADDR_END      3273    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x0999  },  /*  Y_ADDR_END      2457    */
-       {OV8830_16BIT, {0x034C},        0x0334  },  /*  X_OUTPUT_SIZE   820     */
-       {OV8830_16BIT, {0x034E},        0x0268  },  /*  Y_OUTPUT_SIZE   616     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       1479    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x20F0  },  /*  line_length_pck 8432    */
-       {OV8830_16BIT, {0x0340},        0x02F7  },  /*  frame_length_lines      759     */
-       {OV8830_16BIT, {0x0202},        0x02F7  },  /*  COARSE_INTEGRATION_TIME 759     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-#if 0
-static struct ov8830_reg const ov8830_QVGA_strong_dvs_30fps[] = {
-       /*      QVGA strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CC9  },  /*  X_ADDR_END      3273    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x0999  },  /*  Y_ADDR_END      2457    */
-       {OV8830_16BIT, {0x034C},        0x019A  },  /*  X_OUTPUT_SIZE   410     */
-       {OV8830_16BIT, {0x034E},        0x0134  },  /*  Y_OUTPUT_SIZE   308     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       1479    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x20F0  },  /*  line_length_pck 8432    */
-       {OV8830_16BIT, {0x0340},        0x02F7  },  /*  frame_length_lines      759     */
-       {OV8830_16BIT, {0x0202},        0x02F7  },  /*  COARSE_INTEGRATION_TIME 759     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x2     },      /*      SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x20    },  /*  SCALE_M 32      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-
-static struct ov8830_reg const ov8830_QCIF_strong_dvs_30fps[] = {
-       /* QCIF strong dvs      */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0000  },  /*  X_ADDR_START    0       */
-       {OV8830_16BIT, {0x0348},        0x0CC9  },  /*  X_ADDR_END      3273    */
-       {OV8830_16BIT, {0x0346},        0x0000  },  /*  Y_ADDR_START    0       */
-       {OV8830_16BIT, {0x034A},        0x0999  },  /*  Y_ADDR_END      2457    */
-       {OV8830_16BIT, {0x034C},        0x019A  },  /*  X_OUTPUT_SIZE   205     */
-       {OV8830_16BIT, {0x034E},        0x0134  },  /*  Y_OUTPUT_SIZE   154     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       1479    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x20F0  },  /*  line_length_pck 8432    */
-       {OV8830_16BIT, {0x0340},        0x02F7  },  /*  frame_length_lines      759     */
-       {OV8830_16BIT, {0x0202},        0x02F7  },  /*  COARSE_INTEGRATION_TIME 759     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x2     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x40    },  /*  SCALE_M 64      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-#endif
-
-static struct ov8830_reg const ov8830_QVGA_strong_dvs_30fps[] = {
-       /*      QVGA strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0368  },  /*  X_ADDR_START    872     */
-       {OV8830_16BIT, {0x0348},        0x0961  },  /*  X_ADDR_END      2401    */
-       {OV8830_16BIT, {0x0346},        0x0290  },  /*  Y_ADDR_START    656     */
-       {OV8830_16BIT, {0x034A},        0x0709  },  /*  Y_ADDR_END      1801    */
-       {OV8830_16BIT, {0x034C},        0x0180  },  /*  X_OUTPUT_SIZE   384     */
-       {OV8830_16BIT, {0x034E},        0x0120  },  /*  Y_OUTPUT_SIZE   288     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       1479    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x3A00  },  /*  line_length_pck 14848   */
-       {OV8830_16BIT, {0x0340},        0x01AF  },  /*  frame_length_lines      431     */
-       {OV8830_16BIT, {0x0202},        0x01AF  },  /*  COARSE_INTEGRATION_TIME 431     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x40    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static struct ov8830_reg const ov8830_QCIF_strong_dvs_30fps[] = {
-       /*      QCIF strong dvs */
-       GROUPED_PARAMETER_HOLD_ENABLE,
-       /* Output size */
-       {OV8830_16BIT, {0x0344},        0x0368  },  /*  X_ADDR_START    872     */
-       {OV8830_16BIT, {0x0348},        0x0961  },  /*  X_ADDR_END      2401    */
-       {OV8830_16BIT, {0x0346},        0x0288  },  /*  Y_ADDR_START    648     */
-       {OV8830_16BIT, {0x034A},        0x0711  },  /*  Y_ADDR_END      1809    */
-       {OV8830_16BIT, {0x034C},        0x0180  },  /*  X_OUTPUT_SIZE   384     */
-       {OV8830_16BIT, {0x034E},        0x0124  },  /*  Y_OUTPUT_SIZE   292     */
-       {OV8830_16BIT, {0x3040},        0x05C7  },  /*  READ_MODE       1479    */
-       /* Timing Configuation */
-       {OV8830_16BIT, {0x0342},        0x3978  },  /*  line_length_pck 14712   */
-       {OV8830_16BIT, {0x0340},        0x01B3  },  /*  frame_length_lines      435     */
-       {OV8830_16BIT, {0x0202},        0x01B3  },  /*  COARSE_INTEGRATION_TIME 435     */
-       {OV8830_16BIT, {0x3014},        0x0846  },  /*  FINE_INTEGRATION_TIME   2118    */
-       {OV8830_16BIT, {0x3010},        0x0130  },  /*  FINE_CORRECTION 304     */
-       /* scaler */
-       {OV8830_16BIT, {0x0400},        0x0     },  /*  SCALE_MODE      0       */
-       {OV8830_16BIT, {0x0404},        0x10    },  /*  SCALE_M 16      */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-
-
-/*****************************************************************************/
-/*****************************************************************************/
-/*****************************************************************************/
-
-static const struct ov8830_reg ov8830_soft_standby[] = {
-       {OV8830_8BIT, {0x301C}, 0x00},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_streaming[] = {
-       {OV8830_8BIT, {0x301C}, 0x01},
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_param_hold[] = {
-       {OV8830_8BIT, {0x0104}, 0x01},  /* GROUPED_PARAMETER_HOLD */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_param_update[] = {
-       {OV8830_8BIT, {0x0104}, 0x00},  /* GROUPED_PARAMETER_HOLD */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
-static const struct ov8830_reg ov8830_lens_shading[] = {
-       {OV8830_16BIT | OV8830_RMW, {0x3780}, 0x8000, 0}, /* POLY_SC_ENABLE */
-       {OV8830_16BIT, {0x3600}, 0x0430},       /* P_GR_P0Q0 */
-       {OV8830_16BIT, {0x3602}, 0x1BEE},       /* P_GR_P0Q1 */
-       {OV8830_16BIT, {0x3604}, 0x39F0},       /* P_GR_P0Q2 */
-       {OV8830_16BIT, {0x3606}, 0xC7AD},       /* P_GR_P0Q3 */
-       {OV8830_16BIT, {0x3608}, 0xC390},       /* P_GR_P0Q4 */
-       {OV8830_16BIT, {0x360A}, 0x03D0},       /* P_RD_P0Q0 */
-       {OV8830_16BIT, {0x360C}, 0xA0CE},       /* P_RD_P0Q1 */
-       {OV8830_16BIT, {0x360E}, 0x2850},       /* P_RD_P0Q2 */
-       {OV8830_16BIT, {0x3610}, 0x6A0E},       /* P_RD_P0Q3 */
-       {OV8830_16BIT, {0x3612}, 0xAF30},       /* P_RD_P0Q4 */
-       {OV8830_16BIT, {0x3614}, 0x03D0},       /* P_BL_P0Q0 */
-       {OV8830_16BIT, {0x3616}, 0x36AE},       /* P_BL_P0Q1 */
-       {OV8830_16BIT, {0x3618}, 0x5E6F},       /* P_BL_P0Q2 */
-       {OV8830_16BIT, {0x361A}, 0xA22E},       /* P_BL_P0Q3 */
-       {OV8830_16BIT, {0x361C}, 0xF6EF},       /* P_BL_P0Q4 */
-       {OV8830_16BIT, {0x361E}, 0x02F0},       /* P_GB_P0Q0 */
-       {OV8830_16BIT, {0x3620}, 0xA00E},       /* P_GB_P0Q1 */
-       {OV8830_16BIT, {0x3622}, 0x3CD0},       /* P_GB_P0Q2 */
-       {OV8830_16BIT, {0x3624}, 0x530E},       /* P_GB_P0Q3 */
-       {OV8830_16BIT, {0x3626}, 0xCEF0},       /* P_GB_P0Q4 */
-       {OV8830_16BIT, {0x3640}, 0xAB2D},       /* P_GR_P1Q0 */
-       {OV8830_16BIT, {0x3642}, 0xB72E},       /* P_GR_P1Q1 */
-       {OV8830_16BIT, {0x3644}, 0x988D},       /* P_GR_P1Q2 */
-       {OV8830_16BIT, {0x3646}, 0x6E2E},       /* P_GR_P1Q3 */
-       {OV8830_16BIT, {0x3648}, 0x53EE},       /* P_GR_P1Q4 */
-       {OV8830_16BIT, {0x364A}, 0xDA2C},       /* P_RD_P1Q0 */
-       {OV8830_16BIT, {0x364C}, 0x3E8D},       /* P_RD_P1Q1 */
-       {OV8830_16BIT, {0x364E}, 0xAFAD},       /* P_RD_P1Q2 */
-       {OV8830_16BIT, {0x3650}, 0x874E},       /* P_RD_P1Q3 */
-       {OV8830_16BIT, {0x3652}, 0x5B4E},       /* P_RD_P1Q4 */
-       {OV8830_16BIT, {0x3654}, 0x740D},       /* P_BL_P1Q0 */
-       {OV8830_16BIT, {0x3656}, 0x310E},       /* P_BL_P1Q1 */
-       {OV8830_16BIT, {0x3658}, 0x280B},       /* P_BL_P1Q2 */
-       {OV8830_16BIT, {0x365A}, 0xE06E},       /* P_BL_P1Q3 */
-       {OV8830_16BIT, {0x365C}, 0xEA0D},       /* P_BL_P1Q4 */
-       {OV8830_16BIT, {0x365E}, 0x182D},       /* P_GB_P1Q0 */
-       {OV8830_16BIT, {0x3660}, 0xAD0E},       /* P_GB_P1Q1 */
-       {OV8830_16BIT, {0x3662}, 0x032E},       /* P_GB_P1Q2 */
-       {OV8830_16BIT, {0x3664}, 0x7EEE},       /* P_GB_P1Q3 */
-       {OV8830_16BIT, {0x3666}, 0xF34E},       /* P_GB_P1Q4 */
-       {OV8830_16BIT, {0x3680}, 0x0E31},       /* P_GR_P2Q0 */
-       {OV8830_16BIT, {0x3682}, 0x104F},       /* P_GR_P2Q1 */
-       {OV8830_16BIT, {0x3684}, 0x92D3},       /* P_GR_P2Q2 */
-       {OV8830_16BIT, {0x3686}, 0xA030},       /* P_GR_P2Q3 */
-       {OV8830_16BIT, {0x3688}, 0x3873},       /* P_GR_P2Q4 */
-       {OV8830_16BIT, {0x368A}, 0x1971},       /* P_RD_P2Q0 */
-       {OV8830_16BIT, {0x368C}, 0x750C},       /* P_RD_P2Q1 */
-       {OV8830_16BIT, {0x368E}, 0xFFF2},       /* P_RD_P2Q2 */
-       {OV8830_16BIT, {0x3690}, 0xEDAF},       /* P_RD_P2Q3 */
-       {OV8830_16BIT, {0x3692}, 0x1D73},       /* P_RD_P2Q4 */
-       {OV8830_16BIT, {0x3694}, 0x0031},       /* P_BL_P2Q0 */
-       {OV8830_16BIT, {0x3696}, 0x1A2F},       /* P_BL_P2Q1 */
-       {OV8830_16BIT, {0x3698}, 0xF792},       /* P_BL_P2Q2 */
-       {OV8830_16BIT, {0x369A}, 0x8530},       /* P_BL_P2Q3 */
-       {OV8830_16BIT, {0x369C}, 0x1F73},       /* P_BL_P2Q4 */
-       {OV8830_16BIT, {0x369E}, 0x08B1},       /* P_GB_P2Q0 */
-       {OV8830_16BIT, {0x36A0}, 0x11AE},       /* P_GB_P2Q1 */
-       {OV8830_16BIT, {0x36A2}, 0x9093},       /* P_GB_P2Q2 */
-       {OV8830_16BIT, {0x36A4}, 0x9030},       /* P_GB_P2Q3 */
-       {OV8830_16BIT, {0x36A6}, 0x36D3},       /* P_GB_P2Q4 */
-       {OV8830_16BIT, {0x36C0}, 0x5F2D},       /* P_GR_P3Q0 */
-       {OV8830_16BIT, {0x36C2}, 0x314F},       /* P_GR_P3Q1 */
-       {OV8830_16BIT, {0x36C4}, 0x684E},       /* P_GR_P3Q2 */
-       {OV8830_16BIT, {0x36C6}, 0x88B0},       /* P_GR_P3Q3 */
-       {OV8830_16BIT, {0x36C8}, 0xDAF0},       /* P_GR_P3Q4 */
-       {OV8830_16BIT, {0x36CA}, 0x636E},       /* P_RD_P3Q0 */
-       {OV8830_16BIT, {0x36CC}, 0xAD0C},       /* P_RD_P3Q1 */
-       {OV8830_16BIT, {0x36CE}, 0xEEEE},       /* P_RD_P3Q2 */
-       {OV8830_16BIT, {0x36D0}, 0x500E},       /* P_RD_P3Q3 */
-       {OV8830_16BIT, {0x36D2}, 0xDDCE},       /* P_RD_P3Q4 */
-       {OV8830_16BIT, {0x36D4}, 0xA3AC},       /* P_BL_P3Q0 */
-       {OV8830_16BIT, {0x36D6}, 0xC06E},       /* P_BL_P3Q1 */
-       {OV8830_16BIT, {0x36D8}, 0xC04F},       /* P_BL_P3Q2 */
-       {OV8830_16BIT, {0x36DA}, 0x49AF},       /* P_BL_P3Q3 */
-       {OV8830_16BIT, {0x36DC}, 0x4830},       /* P_BL_P3Q4 */
-       {OV8830_16BIT, {0x36DE}, 0x0F6B},       /* P_GB_P3Q0 */
-       {OV8830_16BIT, {0x36E0}, 0x1DEF},       /* P_GB_P3Q1 */
-       {OV8830_16BIT, {0x36E2}, 0x8730},       /* P_GB_P3Q2 */
-       {OV8830_16BIT, {0x36E4}, 0x9E50},       /* P_GB_P3Q3 */
-       {OV8830_16BIT, {0x36E6}, 0x7110},       /* P_GB_P3Q4 */
-       {OV8830_16BIT, {0x3700}, 0xF4F1},       /* P_GR_P4Q0 */
-       {OV8830_16BIT, {0x3702}, 0xF090},       /* P_GR_P4Q1 */
-       {OV8830_16BIT, {0x3704}, 0x6493},       /* P_GR_P4Q2 */
-       {OV8830_16BIT, {0x3706}, 0x5FB1},       /* P_GR_P4Q3 */
-       {OV8830_16BIT, {0x3708}, 0xADB3},       /* P_GR_P4Q4 */
-       {OV8830_16BIT, {0x370A}, 0xFEF1},       /* P_RD_P4Q0 */
-       {OV8830_16BIT, {0x370C}, 0x134B},       /* P_RD_P4Q1 */
-       {OV8830_16BIT, {0x370E}, 0x4D33},       /* P_RD_P4Q2 */
-       {OV8830_16BIT, {0x3710}, 0x9B8E},       /* P_RD_P4Q3 */
-       {OV8830_16BIT, {0x3712}, 0x88B3},       /* P_RD_P4Q4 */
-       {OV8830_16BIT, {0x3714}, 0xEBB1},       /* P_BL_P4Q0 */
-       {OV8830_16BIT, {0x3716}, 0x8131},       /* P_BL_P4Q1 */
-       {OV8830_16BIT, {0x3718}, 0x5AD3},       /* P_BL_P4Q2 */
-       {OV8830_16BIT, {0x371A}, 0x54F1},       /* P_BL_P4Q3 */
-       {OV8830_16BIT, {0x371C}, 0xB193},       /* P_BL_P4Q4 */
-       {OV8830_16BIT, {0x371E}, 0xE6D1},       /* P_GB_P4Q0 */
-       {OV8830_16BIT, {0x3720}, 0xE0EC},       /* P_GB_P4Q1 */
-       {OV8830_16BIT, {0x3722}, 0x6033},       /* P_GB_P4Q2 */
-       {OV8830_16BIT, {0x3724}, 0x9DCE},       /* P_GB_P4Q3 */
-       {OV8830_16BIT, {0x3726}, 0xA453},       /* P_GB_P4Q4 */
-       {OV8830_16BIT, {0x3782}, 0x0614},       /* POLY_ORIGIN_C */
-       {OV8830_16BIT, {0x3784}, 0x0494},       /* POLY_ORIGIN_R */
-       {OV8830_16BIT, {0x37C0}, 0xC40A},       /* P_GR_Q5 */
-       {OV8830_16BIT, {0x37C2}, 0xCE6A},       /* P_RD_Q5 */
-       {OV8830_16BIT, {0x37C4}, 0xDBAA},       /* P_BL_Q5 */
-       {OV8830_16BIT, {0x37C6}, 0xCCEA},       /* P_GB_Q5 */
-
-       /*STATE= Lens Correction Falloff, 70 */
-       {OV8830_16BIT | OV8830_RMW, {0x3780}, 0x8000, 1}, /* POLY_SC_ENABLE */
-       {OV8830_TOK_TERM, {0}, 0}
-};
-
 #endif