Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e382af5 authored by Kui Wang's avatar Kui Wang
Browse files

msm: msm8909: camera: Update gc0310 driver setting



Update gc0310 driver setting for tuning.

Change-Id: If2b46d052f437b610455ba2d7901811e2e60abb9
Signed-off-by: default avatarKui Wang <kuiw@codeaurora.org>
parent e48abe33
Loading
Loading
Loading
Loading
+96 −136
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -86,8 +86,6 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0xf8, 0x03},
	{0xf9, 0x8e},
	{0xfa, 0x11},

	/*	CISCTL reg	*/
	{0x00, 0x2f},
	{0x01, 0x0f},
	{0x02, 0x04},
@@ -112,27 +110,23 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x1b, 0x48},
	{0x1e, 0x6b},
	{0x1f, 0x28},
	{0x20, 0x89},
	{0x20, 0x8b},
	{0x21, 0x49},
	{0x22, 0xb0},
	{0x23, 0x04},
	{0x24, 0x16},
	{0x34, 0x20},

	/*	 BLK	 */
	{0x26, 0x23},
	{0x28, 0xff},
	{0x29, 0x00},
	{0x33, 0x18},
	{0x33, 0x10},
	{0x37, 0x20},
	{0x47, 0x80},
	{0x4e, 0x66},
	{0xa8, 0x02},
	{0xa9, 0x80},

	/*	ISP	reg		*/
	{0x40, 0xff},
	{0x41, 0x21},
	{0x40, 0xdf},
	{0x41, 0x25},
	{0x42, 0xcf},
	{0x44, 0x02},
	{0x46, 0x06},
@@ -146,30 +140,25 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x56, 0xe0},
	{0x57, 0x02},
	{0x58, 0x80},

	/*		GAIN	 */
	{0x70, 0x50},
	{0x5a, 0x98},
	{0x5b, 0xdc},
	{0x5c, 0xfe},
	{0x70, 0x70},
	{0x5a, 0x84},
	{0x5b, 0xc9},
	{0x5c, 0xed},
	{0x77, 0x74},
	{0x78, 0x40},
	{0x79, 0x5f},

	/*		DNDD	*/
	{0x82, 0x0a},
	{0x80, 0x00},
	{0x82, 0x08},
	{0x83, 0x0b},

	/*	 EEINTP	 */
	{0x8f, 0xff},
	{0x89, 0xf0},
	{0x8f, 0xaa},
	{0x90, 0x8c},
	{0x91, 0x90},
	{0x92, 0x18},
	{0x93, 0x10},
	{0x95, 0x43},
	{0x96, 0x82},

	/*	 ASDE	 */
	{0x92, 0x03},
	{0x93, 0x03},
	{0x94, 0x05},
	{0x95, 0x65},
	{0x96, 0xf0},
	{0xfe, 0x00},
	{0x9a, 0x20},
	{0x9b, 0x80},
@@ -178,41 +167,38 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0xa1, 0x30},
	{0xa2, 0x32},
	{0xa4, 0x30},
	{0xa5, 0x28},
	{0xaa, 0x50},
	{0xac, 0x24},

	/*		GAMMA		*/
	{0xbf, 0x0d},
	{0xc0, 0x26},
	{0xc1, 0x3d},
	{0xc2, 0x52},
	{0xc3, 0x66},
	{0xc4, 0x75},
	{0xc5, 0x82},
	{0xc6, 0x99},
	{0xc7, 0xab},
	{0xc8, 0xb9},
	{0xc9, 0xc6},
	{0xca, 0xd1},
	{0xcb, 0xda},
	{0xcc, 0xe1},
	{0xcd, 0xec},
	{0xce, 0xf5},
	{0xcf, 0xfb},

	/*		YCP	 */
	{0xa5, 0x30},
	{0xaa, 0x10},
	{0xac, 0x22},
	{0xad, 0x28},
	{0xbf, 0x06},
	{0xc0, 0x12},
	{0xc1, 0x28},
	{0xc2, 0x41},
	{0xc3, 0x5a},
	{0xc4, 0x6c},
	{0xc5, 0x7a},
	{0xc6, 0x96},
	{0xc7, 0xac},
	{0xc8, 0xbc},
	{0xc9, 0xc9},
	{0xca, 0xd3},
	{0xcb, 0xdd},
	{0xcc, 0xe5},
	{0xcd, 0xf1},
	{0xce, 0xfa},
	{0xcf, 0xff},
	{0xd0, 0x40},
	{0xd1, 0x30},
	{0xd2, 0x30},
	{0xd3, 0x48},
	{0xd3, 0x40},
	{0xfe, 0x00},
	{0xd6, 0xf2},
	{0xd7, 0x1b},
	{0xdd, 0x71},
	{0x7c, 0x80},

	/*	 AEC	 */
	{0xdd, 0x72},
	{0xde, 0xe5},
	{0xe4, 0x86},
	{0xe5, 0x30},
	{0xfe, 0x01},
	{0x05, 0x30},
	{0x06, 0x75},
@@ -222,13 +208,12 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x0b, 0x11},
	{0x0c, 0x00},
	{0x12, 0x52},
	{0x13, 0x30},
	{0x13, 0x34},
	{0x18, 0x95},
	{0x19, 0x95},
	{0x19, 0x96},
	{0x1e, 0x41},
	{0x1f, 0x30},
	{0x1f, 0x40},
	{0x20, 0x40},

	{0x25, 0x00},
	{0x26, 0x83},
	{0x27, 0x02},
@@ -239,24 +224,16 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x2c, 0x18},
	{0x2d, 0x0a},
	{0x2e, 0x3c},

	{0x3c, 0x20},
	{0x3e, 0x40},
	{0x3f, 0x5c},
	{0x3f, 0x57},
	{0x40, 0x7b},
	{0x41, 0xbd},
	{0x42, 0xf6},
	{0x43, 0x63},

	{0x03, 0x60},

	{0x44, 0x03},

	/*	 AWB	 */
	{0x44, 0x02},
	{0x1c, 0x91},
	{0x21, 0x15},
	{0x50, 0x80},
	{0x56, 0x06},
	{0x56, 0x04},
	{0x59, 0x08},
	{0x5b, 0x02},
	{0x61, 0x8d},
@@ -271,10 +248,9 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x6c, 0x00},
	{0x6d, 0x02},
	{0x6e, 0xf0},
	{0x6f, 0x90},

	{0x78, 0xaf},
	{0x79, 0x70},
	{0x6f, 0x80},
	{0x78, 0xb8},
	{0x79, 0x75},
	{0x7a, 0x58},
	{0x7b, 0x60},
	{0x7c, 0x0c},
@@ -284,118 +260,104 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x8c, 0x00},
	{0x8a, 0x06},
	{0x8f, 0x00},

	/*awb*/
	{0x90, 0x00},
	{0x91, 0x00},
	{0x92, 0xf0},
	{0x93, 0xd9},
	{0x95, 0x21},
	{0x96, 0xf0},
	{0x97, 0x3e},
	{0x98, 0x21},
	{0x9a, 0x3e},
	{0x9b, 0x21},
	{0x9c, 0x70},
	{0x9d, 0x3e},
	{0x92, 0xed},
	{0x93, 0xd2},
	{0x95, 0x0e},
	{0x96, 0xed},
	{0x97, 0x38},
	{0x98, 0x0e},
	{0x9a, 0x38},
	{0x9b, 0x0e},
	{0x9c, 0x7d},
	{0x9d, 0x39},
	{0x9f, 0x00},
	{0xa0, 0x00},
	{0xa1, 0x00},
	{0xa2, 0x00},
	{0x86, 0x00},
	{0x87, 0x00},
	{0x86, 0x30},
	{0x87, 0x52},
	{0x88, 0x00},
	{0x89, 0x00},
	{0xa4, 0x00},
	{0xa5, 0x00},
	{0xa6, 0xbe},
	{0xa7, 0x9c},
	{0xa9, 0xbe},
	{0xaa, 0x9a},
	{0xab, 0xb3},
	{0xac, 0x9e},
	{0xae, 0xcb},
	{0xaf, 0xb3},
	{0xb0, 0xcf},
	{0xb1, 0xa1},
	{0xa6, 0xbb},
	{0xa7, 0xa1},
	{0xa9, 0xbf},
	{0xaa, 0x98},
	{0xab, 0xa9},
	{0xac, 0x8a},
	{0xae, 0xbe},
	{0xaf, 0xa9},
	{0xb0, 0xc9},
	{0xb1, 0x90},
	{0xb3, 0x00},
	{0xb4, 0x00},
	{0xb5, 0x00},
	{0xb6, 0x00},
	{0x8b, 0x00},
	{0x8c, 0x00},
	{0x8b, 0xbe},
	{0x8c, 0x8a},
	{0x8d, 0x00},
	{0x8e, 0x00},
	{0x94, 0x56},
	{0x94, 0x50},
	{0x99, 0xa6},
	{0x9e, 0xaa},
	{0xa3, 0x00},
	{0x8a, 0x00},
	{0x8a, 0x0a},
	{0xa8, 0x50},
	{0xad, 0x55},
	{0xb2, 0x55},
	{0xb7, 0x00},
	{0x8f, 0x00},
	{0xb8, 0xdd},
	{0xb9, 0x80},

	/*CC*/
	{0x8f, 0x05},
	{0xb8, 0xb8},
	{0xb9, 0xb1},
	{0xfe, 0x01},
	{0xd0, 0x38},
	{0xd1, 0xf0},
	{0xd2, 0xfe},
	{0xd3, 0x00},
	{0xd4, 0x57},
	{0xd5, 0xfa},
	{0xd1, 0xf7},
	{0xd2, 0x03},
	{0xd3, 0xf0},
	{0xd4, 0x40},
	{0xd5, 0xf5},
	{0xd6, 0x3f},
	{0xd7, 0xf8},
	{0xd8, 0x05},
	{0xd9, 0x08},
	{0xda, 0x38},
	{0xdb, 0xe9},

	/*	 LSC	 */
	{0xfe, 0x01},
	{0x76, 0x80},
	{0xc1, 0x3c},
	{0xc2, 0x50},
	{0xc3, 0x00},
	{0xc4, 0x4b},
	{0xc5, 0x38},
	{0xc6, 0x36},
	{0xc7, 0x24},
	{0xc8, 0x00},
	{0xc9, 0x00},
	{0xc4, 0x68},
	{0xc5, 0x3a},
	{0xc6, 0x3a},
	{0xc7, 0x28},
	{0xc8, 0x18},
	{0xc9, 0x18},
	{0xdc, 0x20},
	{0xdd, 0x10},
	{0xdf, 0x00},
	{0xde, 0x00},

	/*	 Histogram	*/
	{0x01, 0x10},
	{0x0b, 0x31},
	{0x0e, 0x6c},
	{0x0e, 0x50},
	{0x0f, 0x0f},
	{0x10, 0x6e},
	{0x12, 0xa0},
	{0x15, 0x40},
	{0x15, 0x60},
	{0x16, 0x60},
	{0x17, 0x20},

	/* Measure Window */
	{0x17, 0xe0},
	{0xcc, 0x10},
	{0xcd, 0x10},
	{0xce, 0xa0},
	{0xcf, 0xe0},

	/* dark sun  */
	{0x45, 0xf7},
	{0x46, 0xff},
	{0x47, 0x15},
	{0x48, 0x03},
	{0x4f, 0x60},

	/* MIPI  */
	{0xfe, 0x03},
	{0x01, 0x03},
	{0x02, 0x22},
@@ -409,7 +371,6 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x13, 0x05},
	{0x15, 0x10},
	{0x17, 0xf0},
	/* 1/24M= 42ns */
	{0x21, 0x02},
	{0x22, 0x02},
	{0x23, 0x04},
@@ -417,7 +378,6 @@ static struct msm_camera_i2c_reg_array gc0310_recommend_setting_list[] = {
	{0x29, 0x02},
	{0x2a, 0x04},
	{0xfe, 0x00},

};

static struct msm_camera_i2c_reg_setting gc0310_recommend_setting[] = {