blob: d8853e5d7a2d1dd736baad2d554cc62afe27408e [file] [log] [blame]
/*
* Galaxycore GC0313 sensor driver
*
* This program is free software; you can redistribute it and/or
*modify it under the terms of the GNU General Public License as
*published by the Free Software Foundation version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
*kind, whether express or implied; without even the implied warranty
*of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __GC0313_H__
#define __GC0313_H__
#define ENABLE_COLOR_PATTERN 0
#define GC0313_SATURATION_MIN 0
#define GC0313_SATURATION_MAX 200
#define GC0313_SATURATION_STEP 100
#define GC0313_SATURATION_DEF 100
#define GC0313_SHARPNESS_MIN 0
#define GC0313_SHARPNESS_MAX 200
#define GC0313_SHARPNESS_STEP 100
#define GC0313_SHARPNESS_DEF 100
/**
*struct gc0313_reg - gc0313 register format
*@reg: 16-bit offset to register
*@val: 8/16/32-bit register value
*@length: length of the register
*
* Define a structure for GC0313 register initialization values
*/
struct gc0313_reg {
u8 reg;
u8 val;
};
/* TODO: Divide this properly */
static const struct gc0313_reg configscript_common1[] = {
{0xfe, 0x80},
{0xfe, 0x80},
{0xfe, 0x80},
{0xfe, 0x10},
{0xfe, 0x10},
{0xf1, 0xf0},
{0xf2, 0x00},
{0xf6, 0x03},
{0xf7, 0x03},
{0xfc, 0x1e},
{0xfe, 0x00},
{0x42, 0xff},
{0xfe, 0x00},
{0x0d, 0x01},
{0x0e, 0xe8},
{0x0f, 0x02},
{0x10, 0x88},
{0x05, 0x00},
{0x06, 0xde},
{0x07, 0x00},
{0x08, 0xa7},
{0x09, 0x00},
{0x0a, 0x00},
{0x0b, 0x00},
{0x0c, 0x04},
/* Analog & CISCTL */
{0x17, 0x14},
{0x19, 0x04},
{0x1b, 0x48},
{0x1f, 0x08},
{0x20, 0x01},
{0x21, 0x48},
{0x22, 0x9a},
{0x23, 0x07},
{0x24, 0x16},
/* ISP Realated */
{0x40, 0xdf},
{0x41, 0x22},
{0x42, 0xff},
{0x44, 0x20},
{0x45, 0x00},
{0x46, 0x02},
{0x4d, 0x01},
{0x4f, 0x01},
{0x50, 0x01},
{0x70, 0x70},
/* BLK */
{0x26, 0xf7},
{0x27, 0x01},
{0x28, 0x7f},
{0x29, 0x38},
{0x33, 0x1a},
{0x34, 0x1a},
{0x35, 0x1a},
{0x36, 0x1a},
{0x37, 0x1a},
{0x38, 0x1a},
{0x39, 0x1a},
{0x3a, 0x1a},
/* Y Gamma */
{0xfe, 0x00},
{0x63, 0x00},
{0x64, 0x06},
{0x65, 0x0f},
{0x66, 0x21},
{0x67, 0x34},
{0x68, 0x47},
{0x69, 0x59},
{0x6a, 0x6c},
{0x6b, 0x8e},
{0x6c, 0xab},
{0x6d, 0xc5},
{0x6e, 0xe0},
{0x6f, 0xfa},
/* YUV to RGB */
{0xb0, 0x13},
{0xb1, 0x26},
{0xb2, 0x07},
{0xb3, 0xf5},
{0xb4, 0xea},
{0xb5, 0x21},
{0xb6, 0x21},
{0xb7, 0xe4},
{0xb8, 0xfb},
/* DNDD */
{0x7e, 0x12},
{0x7f, 0xc3},
{0x82, 0x78},
{0x84, 0x02},
{0x89, 0xa4},
/* INTPEE */
{0x90, 0xbc},
{0x92, 0x08},
{0x94, 0x08},
{0x95, 0x64},
/* ASDE */
{0xfe, 0x01},
{0x18, 0x01},
{0xfe, 0x00},
{0x9a, 0x20},
{0x9c, 0x98},
{0x9e, 0x08},
{0xa2, 0x32},
{0xa4, 0x40},
{0xaa, 0x50},
/* RGB Gamma */
{0xbf, 0x0e},
{0xc0, 0x1c},
{0xc1, 0x34},
{0xc2, 0x48},
{0xc3, 0x5a},
{0xc4, 0x6b},
{0xc5, 0x7b},
{0xc6, 0x95},
{0xc7, 0xab},
{0xc8, 0xbf},
{0xc9, 0xce},
{0xca, 0xd9},
{0xcb, 0xe4},
{0xcc, 0xec},
{0xcd, 0xf7},
{0xce, 0xfd},
{0xcf, 0xff},
/* AEC */
{0xfe, 0x01},
{0x10, 0x08},
{0x11, 0x11},
{0x12, 0x13},
{0x13, 0x45},
{0x16, 0x18},
{0x17, 0x88},
{0x29, 0x00},
{0x2a, 0x83},
{0x2b, 0x02},
{0x2c, 0x8f},
{0x2d, 0x03},
{0x2e, 0x95},
{0x2f, 0x06},
{0x30, 0x24},
{0x31, 0x0c},
{0x32, 0x48},
{0x33, 0x20},
{0x3c, 0x60},
{0x3e, 0x40},
/* YCP */
{0xfe, 0x00},
{0xd1, 0x30},
{0xd2, 0x30},
{0xde, 0x38},
{0xd6, 0xfa},
{0xd7, 0x16},
{0xd8, 0x18},
{0xdd, 0x00},
{0xe4, 0x8f},
{0xe5, 0x50},
/* DARK & RC */
{0xfe, 0x01},
{0x40, 0x8f},
{0x41, 0x83},
{0x42, 0xff},
{0x43, 0x06},
{0x44, 0x1f},
{0x45, 0xff},
{0x46, 0xff},
{0x47, 0x04},
/* AWB */
{0x06, 0x0d},
{0x07, 0x06},
{0x08, 0xa4},
{0x09, 0xf2},
{0x50, 0xfd},
{0x51, 0x20},
{0x52, 0x24},
{0x53, 0x08},
{0x54, 0x0b},
{0x55, 0x0f},
{0x56, 0x0b},
{0x57, 0x20},
{0x58, 0xf6},
{0x59, 0x0b},
{0x5a, 0x11},
{0x5b, 0xf0},
{0x5c, 0xe8},
{0x5d, 0x10},
{0x5e, 0x20},
{0x5f, 0xe0},
{0x60, 0x00},
{0x67, 0x00},
{0x6d, 0x32},
{0x6e, 0x08},
{0x6f, 0x08},
{0x70, 0x40},
{0x71, 0x83},
{0x72, 0x26},
{0x73, 0x62},
{0x74, 0x03},
{0x75, 0x48},
{0x76, 0x40},
{0x77, 0xc2},
{0x78, 0xa5},
{0x79, 0x18},
{0x7a, 0x40},
{0x7b, 0xb0},
{0x7c, 0xf5},
{0x81, 0x80},
{0x82, 0x60},
{0x83, 0xb0},
{0x92, 0x00},
{0xd5, 0x0C},
{0xd6, 0x02},
{0xd7, 0x06},
{0xd8, 0x05},
{0xdd, 0x00},
{0xfe, 0x00},
/* LSC */
{0xfe, 0x01},
{0xa0, 0x00},
{0xa1, 0x3c},
{0xa2, 0x50},
{0xa3, 0x00},
{0xa4, 0x00},
{0xa5, 0x00},
{0xa6, 0x00},
{0xa7, 0x00},
{0xa8, 0x00},
{0xa9, 0x00},
{0xaa, 0x00},
{0xab, 0x00},
{0xac, 0x00},
{0xad, 0x00},
{0xae, 0x00},
{0xaf, 0x00},
{0xb0, 0x00},
{0xb1, 0x00},
{0xb2, 0x00},
{0xb3, 0x00},
{0xb4, 0x3b},
{0xb5, 0x25},
{0xb6, 0x27},
{0xba, 0x30},
{0xbb, 0x24},
{0xbc, 0x27},
{0xc0, 0x15},
{0xc1, 0x11},
{0xc2, 0x11},
{0xc6, 0x15},
{0xc7, 0x12},
{0xc8, 0x12},
{0xb7, 0x20},
{0xb8, 0x20},
{0xb9, 0x20},
{0xbd, 0x20},
{0xbe, 0x20},
{0xbf, 0x20},
{0xc3, 0x00},
{0xc4, 0x00},
{0xc5, 0x00},
{0xc9, 0x00},
{0xca, 0x00},
{0xcb, 0x00},
{0xfe, 0x03},
{0x01, 0x03},
{0x02, 0x21},
{0x03, 0x10},
{0x04, 0x80},
{0x05, 0x02},
{0x06, 0x80},
{0x11, 0x1e},
{0x12, 0x00},
{0x13, 0x05},
{0x15, 0x12},
{0x17, 0x00},
{0x21, 0x01},
{0x22, 0x02},
{0x23, 0x01},
{0x29, 0x02},
{0x2a, 0x01},
{0x10, 0x94},
{0xfe, 0x00},
{0x17, 0x17},
{0xff, 0xff},
};
static const struct gc0313_reg yuv422_init_common[] = {
{0xff, 0xff},
};
static const struct gc0313_reg jpeg_init_common[] = {
{0xff, 0xff},
};
/*EFFECT */
static const struct gc0313_reg gc0313_effect_normal_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_effect_bw_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_effect_sepia_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_effect_negative_tbl[] = {
{0xff, 0xff},
};
/*AntiBanding */
static const struct gc0313_reg gc0313_antibanding_auto_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_antibanding_50z_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_antibanding_60z_tbl[] = {
{0xff, 0xff},
};
/*Lens_shading*/
static const struct gc0313_reg gc0313_lens_shading_on_tbl[] = {
/*@@ Lenc On(C) */
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_lens_shading_off_tbl[] = {
{0xff, 0xff},
};
/*Contrast */
static const struct gc0313_reg gc0313_contrast_default_lv3_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_contrast_lv0_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_contrast_lv1_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_contrast_lv2_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_contrast_lv4_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_contrast_lv5_tbl[] = {
{0xff, 0xff},
};
/*sharpness */
static const struct gc0313_reg gc0313_sharpness_default_lv2_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_sharpness_lv0_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_sharpness_lv1_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_sharpness_lv3_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_sharpness_lv4_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_sharpness_lv5_tbl[] = {
{0xff, 0xff},
};
/* saturation */
static const struct gc0313_reg gc0313_saturation_default_lv3_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_saturation_lv0_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_saturation_lv1_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_saturation_lv2_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_saturation_lv4_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_saturation_lv5_tbl[] = {
{0xff, 0xff},
};
/* brightness */
static const struct gc0313_reg gc0313_brightness_lv0_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_brightness_lv1_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_brightness_lv2_default_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_brightness_lv3_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_brightness_lv4_tbl[] = {
{0xff, 0xff},
};
/* Auto Expourse */
static const struct gc0313_reg gc0313_ae_average_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_ae_centerweight_tbl[] = {
{0xff, 0xff},
};
/*default awb */
static const struct gc0313_reg gc0313_wb_def[] = {
{0xff, 0xff},
};
/* White Balance */
static const struct gc0313_reg gc0313_wb_fluorescent[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_wb_daylight[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_wb_cloudy[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_wb_tungsten[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_5[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_7[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_10[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_15[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_20[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_25[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_fps_30[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_afpreinit_tbl[] = {
{0xff, 0xff},
};
static const struct gc0313_reg gc0313_afpostinit_tbl[] = {
{0xff, 0xff},
};
const u8 gc0313_afinit_data[] = {};
#endif /* __GC0313_H__ */