From 78b85738fee679fef754f56fbf1330cd73dffaae Mon Sep 17 00:00:00 2001 From: ddl Date: Tue, 2 Apr 2013 18:47:34 +0800 Subject: [PATCH] camera: update mt9p111 and add hm5065 --- arch/arm/plat-rk/include/plat/rk_camera.h | 3 + drivers/media/video/Kconfig | 6 + drivers/media/video/Makefile | 1 + drivers/media/video/hm5065.c | 5839 +++++++++++++++++++++ drivers/media/video/hm5065.h | 11 + drivers/media/video/mt9p111.c | 3220 +++++++----- include/media/v4l2-chip-ident.h | 1 + 7 files changed, 7830 insertions(+), 1251 deletions(-) create mode 100755 drivers/media/video/hm5065.c create mode 100755 drivers/media/video/hm5065.h diff --git a/arch/arm/plat-rk/include/plat/rk_camera.h b/arch/arm/plat-rk/include/plat/rk_camera.h index 0d22f69bdd39..caea6a2275e7 100755 --- a/arch/arm/plat-rk/include/plat/rk_camera.h +++ b/arch/arm/plat-rk/include/plat/rk_camera.h @@ -71,6 +71,7 @@ #define RK29_CAM_SENSOR_S5K5CA s5k5ca #define RK29_CAM_ISP_MTK9335 mtk9335isp #define RK29_CAM_SENSOR_GC2035 gc2035 +#define RK29_CAM_SENSOR_HM5065 hm5065 #define RK29_CAM_SENSOR_NAME_OV7675 "ov7675" #define RK29_CAM_SENSOR_NAME_OV9650 "ov9650" @@ -104,6 +105,7 @@ #define RK29_CAM_SENSOR_NAME_S5K5CA "s5k5ca" #define RK29_CAM_ISP_NAME_MTK9335ISP "mtk9335isp" #define RK29_CAM_SENSOR_NAME_GC2035 "gc2035" +#define RK29_CAM_SENSOR_NAME_HM5065 "hm5065" #define ov7675_FULL_RESOLUTION 0x30000 // 0.3 megapixel #define ov9650_FULL_RESOLUTION 0x130000 // 1.3 megapixel @@ -157,6 +159,7 @@ #define s5k5ca_FULL_RESOLUTION 0x300000 // 3 megapixel #define mtk9335isp_FULL_RESOLUTION 0x500000 //5 megapixel #define gc2035_FULL_RESOLUTION 0x200000 // 2 megapixel +#define hm5065_FULL_RESOLUTION 0x500000 // 5 megapixel /*---------------- Camera Sensor Must Define Macro End ------------------------*/ diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index a7292cf75a6c..6cdd07d2b795 100755 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -1327,6 +1327,12 @@ config SP2518_USER_DEFINED_SERIES bool "sp2518 user defined init series" default n +config SOC_CAMERA_HM5065 + tristate "hm5065 camera support for rockchip" + depends on SOC_CAMERA && I2C + help + This is a HM5065 camera driver for rockchip + config SOC_CAMERA_OV9640 tristate "ov9640 camera support" diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index c0bde79c51c8..91e07a64776b 100755 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -118,6 +118,7 @@ obj-$(CONFIG_SOC_CAMERA_GC0329) += gc0329.o obj-$(CONFIG_SOC_CAMERA_SP0838) += sp0838.o obj-$(CONFIG_SOC_CAMERA_SP2518) += sp2518.o obj-$(CONFIG_SOC_CAMERA_S5K5CA) += s5k5ca.o +obj-$(CONFIG_SOC_CAMERA_HM5065) += hm5065.o obj-$(CONFIG_SOC_CAMERA_MV9335) += mv9335/ # And now the v4l2 drivers: diff --git a/drivers/media/video/hm5065.c b/drivers/media/video/hm5065.c new file mode 100755 index 000000000000..b0bc11fdc6ce --- /dev/null +++ b/drivers/media/video/hm5065.c @@ -0,0 +1,5839 @@ +/* + * Driver for HM5065 CMOS Image Sensor from Himax + * + * Copyright (C) 2008, Guennadi Liakhovetski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "hm5065.h" +//#include +struct reginfo +{ + u16 reg; + u8 val; +}; +static int debug=1; +module_param(debug, int, S_IRUGO|S_IWUSR); + +#define dprintk(level, fmt, arg...) do { \ + if (debug >= level) \ + printk(KERN_WARNING fmt , ## arg); } while (0) + +#define SENSOR_TR(format, ...) printk(KERN_ERR format, ## __VA_ARGS__) +#define SENSOR_DG(format, ...) dprintk(1, format, ## __VA_ARGS__) + +#define _CONS(a,b) a##b +#define CONS(a,b) _CONS(a,b) + +#define __STR(x) #x +#define _STR(x) __STR(x) +#define STR(x) _STR(x) + +#define MIN(x,y) ((xy) ? x: y) + +/* Sensor Driver Configuration */ +#define SENSOR_NAME RK29_CAM_SENSOR_HM5065 +#define SENSOR_V4L2_IDENT V4L2_IDENT_HM5065 +#define SENSOR_ID 0x039E +#define SENSOR_MIN_WIDTH 176 +#define SENSOR_MIN_HEIGHT 144 +#define SENSOR_MAX_WIDTH 2592 +#define SENSOR_MAX_HEIGHT 1944 +#define SENSOR_INIT_WIDTH 800 //640/* Sensor pixel size for sensor_init_data array */ +#define SENSOR_INIT_HEIGHT 600 //480 +#define SENSOR_INIT_WINSEQADR sensor_svga +#define SENSOR_INIT_PIXFMT V4L2_MBUS_FMT_YUYV8_2X8 + +#define CONFIG_SENSOR_WhiteBalance 1 +#define CONFIG_SENSOR_Brightness 1 +#define CONFIG_SENSOR_Contrast 1 +#define CONFIG_SENSOR_Saturation 1 +#define CONFIG_SENSOR_Effect 1 +#define CONFIG_SENSOR_Scene 1 +#define CONFIG_SENSOR_DigitalZoom 0 +#define CONFIG_SENSOR_Exposure 0 +#define CONFIG_SENSOR_Flash 1 +#define CONFIG_SENSOR_Mirror 0 +#define CONFIG_SENSOR_Flip 0 +#define CONFIG_SENSOR_Focus 1 + +#define CONFIG_SENSOR_I2C_SPEED 100000 /* Hz */ +/* Sensor write register continues by preempt_disable/preempt_enable for current process not be scheduled */ +#define CONFIG_SENSOR_I2C_NOSCHED 0 +#define CONFIG_SENSOR_I2C_RDWRCHK 0 + +#define CONFIG_SENSOR_WRITE_REGS 1 +#define WRITE_REGS_NUM 3 + +#define SENSOR_BUS_PARAM (SOCAM_MASTER | SOCAM_PCLK_SAMPLE_RISING |\ + SOCAM_HSYNC_ACTIVE_HIGH| SOCAM_VSYNC_ACTIVE_LOW |\ + SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATAWIDTH_8 |SOCAM_MCLK_24MHZ) + +#define COLOR_TEMPERATURE_CLOUDY_DN 6500 +#define COLOR_TEMPERATURE_CLOUDY_UP 8000 +#define COLOR_TEMPERATURE_CLEARDAY_DN 5000 +#define COLOR_TEMPERATURE_CLEARDAY_UP 6500 +#define COLOR_TEMPERATURE_OFFICE_DN 3500 +#define COLOR_TEMPERATURE_OFFICE_UP 5000 +#define COLOR_TEMPERATURE_HOME_DN 2500 +#define COLOR_TEMPERATURE_HOME_UP 3500 + +#define SENSOR_NAME_STRING(a) STR(CONS(SENSOR_NAME, a)) +#define SENSOR_NAME_VARFUN(a) CONS(SENSOR_NAME, a) + +#define SENSOR_AF_IS_ERR (0x00<<0) +#define SENSOR_AF_IS_OK (0x01<<0) +#define SENSOR_INIT_IS_ERR (0x00<<28) +#define SENSOR_INIT_IS_OK (0x01<<28) + +#if CONFIG_SENSOR_Focus +/*#define SENSOR_AF_MODE_INFINITY 0 +#define SENSOR_AF_MODE_MACRO 1 +#define SENSOR_AF_MODE_FIXED 2 +#define SENSOR_AF_MODE_AUTO 3 +#define SENSOR_AF_MODE_CONTINUOUS 4 +#define SENSOR_AF_MODE_CLOSE 5*/ +#define SENSOR_AF_MODE_AUTO 0 +#define SENSOR_AF_MODE_CLOSE 1 +#define SENSOR_AF_MODE_CONTINUOUS 2 +#endif + +#if CONFIG_SENSOR_Focus +/* hm5065 VCM Command and Status Registers */ +#define AF_TARGETPOS_REG_H 0x0700 +#define AF_TARGETPOS_REG_L 0x0701 + +#define AF_MODES_REG 0x070A +#define AF_AUTOCMDS_REG 0x070b +#define AF_LENSPOS_REG_H 0x06F0 +#define AF_LENSPOS_REG_L 0x06F1 +#define AF_MANUCMDS_REG 0x070c +#define AF_FINISHCHK_REG 0x07ae //[0]: false [1] : true + +#define FACE_LC 0x0714 //[0] : focus , [1] : AE “„Ó +#define FACE_START_XH 0x0715 +#define FACE_START_XL 0x0716 +#define FACE_SIZE_XH 0x0717 +#define FACE_SIZE_XL 0x0718 +#define FACE_START_YH 0x0719 +#define FACE_START_YL 0x071A +#define FACE_SIZE_YH 0x071B +#define FACE_SIZE_YL 0x071C + + +#define AF_ZONE0_WEIGHT 0x0808 +#define AF_ZONE1_WEIGHT 0x0809 +#define AF_ZONE2_WEIGHT 0x080A +#define AF_ZONE3_WEIGHT 0x080B +#define AF_ZONE4_WEIGHT 0x080C +#define AF_ZONE5_WEIGHT 0x080D +#define AF_ZONE6_WEIGHT 0x080E + +#endif + +//flash off in fixed time to prevent from too hot , zyc +struct flash_timer{ + struct soc_camera_device *icd; + struct hrtimer timer; +}; +static enum hrtimer_restart flash_off_func(struct hrtimer *timer); + +static struct flash_timer flash_off_timer; +//for user defined if user want to customize the series , zyc +#ifdef CONFIG_HM5065_USER_DEFINED_SERIES +#include "hm5065_user_series.c" +#else + + +static struct reginfo sensor_init_data[] = +{ +#if 1 + {0xffff,0x01}, // 2013-03-01 Start new patch + {0x9000,0x03}, + {0xA000,0x90}, + {0xA001,0x0C}, + {0xA002,0x56}, + {0xA003,0xE0}, + {0xA004,0xFE}, + {0xA005,0xA3}, + {0xA006,0xE0}, + {0xA007,0xFF}, + {0xA008,0x12}, + {0xA009,0x42}, + {0xA00A,0x85}, + {0xA00B,0x90}, + {0xA00C,0x01}, + {0xA00D,0xB7}, + {0xA00E,0xEE}, + {0xA00F,0xF0}, + {0xA010,0xFC}, + {0xA011,0xA3}, + {0xA012,0xEF}, + {0xA013,0xF0}, + {0xA014,0xFD}, + {0xA015,0x90}, + {0xA016,0x06}, + {0xA017,0x05}, + {0xA018,0xE0}, + {0xA019,0x75}, + {0xA01A,0xF0}, + {0xA01B,0x02}, + {0xA01C,0xA4}, + {0xA01D,0x2D}, + {0xA01E,0xFF}, + {0xA01F,0xE5}, + {0xA020,0xF0}, + {0xA021,0x3C}, + {0xA022,0xFE}, + {0xA023,0xAB}, + {0xA024,0x07}, + {0xA025,0xFA}, + {0xA026,0x33}, + {0xA027,0x95}, + {0xA028,0xE0}, + {0xA029,0xF9}, + {0xA02A,0xF8}, + {0xA02B,0x90}, + {0xA02C,0x0B}, + {0xA02D,0x4B}, + {0xA02E,0xE0}, + {0xA02F,0xFE}, + {0xA030,0xA3}, + {0xA031,0xE0}, + {0xA032,0xFF}, + {0xA033,0xEE}, + {0xA034,0x33}, + {0xA035,0x95}, + {0xA036,0xE0}, + {0xA037,0xFD}, + {0xA038,0xFC}, + {0xA039,0x12}, + {0xA03A,0x0C}, + {0xA03B,0x7B}, + {0xA03C,0x90}, + {0xA03D,0x01}, + {0xA03E,0xB9}, + {0xA03F,0x12}, + {0xA040,0x0E}, + {0xA041,0x05}, + {0xA042,0x90}, + {0xA043,0x01}, + {0xA044,0xB9}, + {0xA045,0xE0}, + {0xA046,0xFC}, + {0xA047,0xA3}, + {0xA048,0xE0}, + {0xA049,0xFD}, + {0xA04A,0xA3}, + {0xA04B,0xE0}, + {0xA04C,0xFE}, + {0xA04D,0xA3}, + {0xA04E,0xE0}, + {0xA04F,0xFF}, + {0xA050,0x78}, + {0xA051,0x08}, + {0xA052,0x12}, + {0xA053,0x0D}, + {0xA054,0xBF}, + {0xA055,0xA8}, + {0xA056,0x04}, + {0xA057,0xA9}, + {0xA058,0x05}, + {0xA059,0xAA}, + {0xA05A,0x06}, + {0xA05B,0xAB}, + {0xA05C,0x07}, + {0xA05D,0x90}, + {0xA05E,0x0B}, + {0xA05F,0x49}, + {0xA060,0xE0}, + {0xA061,0xFE}, + {0xA062,0xA3}, + {0xA063,0xE0}, + {0xA064,0xFF}, + {0xA065,0xEE}, + {0xA066,0x33}, + {0xA067,0x95}, + {0xA068,0xE0}, + {0xA069,0xFD}, + {0xA06A,0xFC}, + {0xA06B,0xC3}, + {0xA06C,0xEF}, + {0xA06D,0x9B}, + {0xA06E,0xFF}, + {0xA06F,0xEE}, + {0xA070,0x9A}, + {0xA071,0xFE}, + {0xA072,0xED}, + {0xA073,0x99}, + {0xA074,0xFD}, + {0xA075,0xEC}, + {0xA076,0x98}, + {0xA077,0xFC}, + {0xA078,0x78}, + {0xA079,0x01}, + {0xA07A,0x12}, + {0xA07B,0x0D}, + {0xA07C,0xBF}, + {0xA07D,0x90}, + {0xA07E,0x0C}, + {0xA07F,0x4A}, + {0xA080,0xE0}, + {0xA081,0xFC}, + {0xA082,0xA3}, + {0xA083,0xE0}, + {0xA084,0xF5}, + {0xA085,0x82}, + {0xA086,0x8C}, + {0xA087,0x83}, + {0xA088,0xC0}, + {0xA089,0x83}, + {0xA08A,0xC0}, + {0xA08B,0x82}, + {0xA08C,0x90}, + {0xA08D,0x0B}, + {0xA08E,0x48}, + {0xA08F,0xE0}, + {0xA090,0xD0}, + {0xA091,0x82}, + {0xA092,0xD0}, + {0xA093,0x83}, + {0xA094,0x75}, + {0xA095,0xF0}, + {0xA096,0x02}, + {0xA097,0x12}, + {0xA098,0x0E}, + {0xA099,0x45}, + {0xA09A,0xEE}, + {0xA09B,0xF0}, + {0xA09C,0xA3}, + {0xA09D,0xEF}, + {0xA09E,0xF0}, + {0xA09F,0x02}, + {0xA0A0,0xBA}, + {0xA0A1,0xD8}, + {0xA0A2,0x90}, + {0xA0A3,0x30}, + {0xA0A4,0x18}, + {0xA0A5,0xe4}, + {0xA0A6,0xf0}, + {0xA0A7,0x74}, + {0xA0A8,0x3f}, + {0xA0A9,0xf0}, + {0xA0AA,0x22}, + {0xA0BF,0x90}, + {0xA0C0,0x00}, + {0xA0C1,0x5E}, + {0xA0C2,0xE0}, + {0xA0C3,0xFF}, + {0xA0C4,0x70}, + {0xA0C5,0x20}, + {0xA0C6,0x90}, + {0xA0C7,0x47}, + {0xA0C8,0x04}, + {0xA0C9,0x74}, + {0xA0CA,0x0A}, + {0xA0CB,0xF0}, + {0xA0CC,0xA3}, + {0xA0CD,0x74}, + {0xA0CE,0x30}, + {0xA0CF,0xF0}, + {0xA0D0,0x90}, + {0xA0D1,0x47}, + {0xA0D2,0x0C}, + {0xA0D3,0x74}, + {0xA0D4,0x07}, + {0xA0D5,0xF0}, + {0xA0D6,0xA3}, + {0xA0D7,0x74}, + {0xA0D8,0xA8}, + {0xA0D9,0xF0}, + {0xA0DA,0x90}, + {0xA0DB,0x47}, + {0xA0DC,0xA4}, + {0xA0DD,0x74}, + {0xA0DE,0x01}, + {0xA0DF,0xF0}, + {0xA0E0,0x90}, + {0xA0E1,0x47}, + {0xA0E2,0xA8}, + {0xA0E3,0xF0}, + {0xA0E4,0x80}, + {0xA0E5,0x50}, + {0xA0E6,0xEF}, + {0xA0E7,0x64}, + {0xA0E8,0x01}, + {0xA0E9,0x60}, + {0xA0EA,0x04}, + {0xA0EB,0xEF}, + {0xA0EC,0xB4}, + {0xA0ED,0x03}, + {0xA0EE,0x20}, + {0xA0EF,0x90}, + {0xA0F0,0x47}, + {0xA0F1,0x04}, + {0xA0F2,0x74}, + {0xA0F3,0x05}, + {0xA0F4,0xF0}, + {0xA0F5,0xA3}, + {0xA0F6,0x74}, + {0xA0F7,0x18}, + {0xA0F8,0xF0}, + {0xA0F9,0x90}, + {0xA0FA,0x47}, + {0xA0FB,0x0C}, + {0xA0FC,0x74}, + {0xA0FD,0x03}, + {0xA0FE,0xF0}, + {0xA0FF,0xA3}, + {0xA100,0x74}, + {0xA101,0xD4}, + {0xA102,0xF0}, + {0xA103,0x90}, + {0xA104,0x47}, + {0xA105,0xA4}, + {0xA106,0x74}, + {0xA107,0x02}, + {0xA108,0xF0}, + {0xA109,0x90}, + {0xA10A,0x47}, + {0xA10B,0xA8}, + {0xA10C,0xF0}, + {0xA10D,0x80}, + {0xA10E,0x27}, + {0xA10F,0xEF}, + {0xA110,0x64}, + {0xA111,0x02}, + {0xA112,0x60}, + {0xA113,0x04}, + {0xA114,0xEF}, + {0xA115,0xB4}, + {0xA116,0x04}, + {0xA117,0x1E}, + {0xA118,0x90}, + {0xA119,0x47}, + {0xA11A,0x04}, + {0xA11B,0x74}, + {0xA11C,0x02}, + {0xA11D,0xF0}, + {0xA11E,0xA3}, + {0xA11F,0x74}, + {0xA120,0x8C}, + {0xA121,0xF0}, + {0xA122,0x90}, + {0xA123,0x47}, + {0xA124,0x0C}, + {0xA125,0x74}, + {0xA126,0x01}, + {0xA127,0xF0}, + {0xA128,0xA3}, + {0xA129,0x74}, + {0xA12A,0xEA}, + {0xA12B,0xF0}, + {0xA12C,0x90}, + {0xA12D,0x47}, + {0xA12E,0xA4}, + {0xA12F,0x74}, + {0xA130,0x04}, + {0xA131,0xF0}, + {0xA132,0x90}, + {0xA133,0x47}, + {0xA134,0xA8}, + {0xA135,0xF0}, + {0xA136,0x22}, + {0xA137,0x74}, + {0xA138,0x04}, + {0xA139,0xF0}, + {0xA13A,0xA3}, + {0xA13B,0x74}, + {0xA13C,0x20}, + {0xA13D,0xF0}, + {0xA13E,0xE4}, + {0xA13F,0xF5}, + {0xA140,0x22}, + {0xA141,0xE5}, + {0xA142,0x22}, + {0xA143,0xC3}, + {0xA144,0x94}, + {0xA145,0x40}, + {0xA146,0x40}, + {0xA147,0x03}, + {0xA148,0x02}, + {0xA149,0xF1}, + {0xA14A,0xFD}, + {0xA14B,0x90}, + {0xA14C,0x0A}, + {0xA14D,0xBA}, + {0xA14E,0xE0}, + {0xA14F,0xFE}, + {0xA150,0xA3}, + {0xA151,0xE0}, + {0xA152,0xFF}, + {0xA153,0xF5}, + {0xA154,0x82}, + {0xA155,0x8E}, + {0xA156,0x83}, + {0xA157,0xE0}, + {0xA158,0x54}, + {0xA159,0x70}, + {0xA15A,0xFD}, + {0xA15B,0xC4}, + {0xA15C,0x54}, + {0xA15D,0x0F}, + {0xA15E,0xFD}, + {0xA15F,0x90}, + {0xA160,0x0A}, + {0xA161,0xBC}, + {0xA162,0xE0}, + {0xA163,0xFA}, + {0xA164,0xA3}, + {0xA165,0xE0}, + {0xA166,0xF5}, + {0xA167,0x82}, + {0xA168,0x8A}, + {0xA169,0x83}, + {0xA16A,0xED}, + {0xA16B,0xF0}, + {0xA16C,0x90}, + {0xA16D,0x0A}, + {0xA16E,0xBD}, + {0xA16F,0xE0}, + {0xA170,0x04}, + {0xA171,0xF0}, + {0xA172,0x70}, + {0xA173,0x06}, + {0xA174,0x90}, + {0xA175,0x0A}, + {0xA176,0xBC}, + {0xA177,0xE0}, + {0xA178,0x04}, + {0xA179,0xF0}, + {0xA17A,0x8F}, + {0xA17B,0x82}, + {0xA17C,0x8E}, + {0xA17D,0x83}, + {0xA17E,0xA3}, + {0xA17F,0xE0}, + {0xA180,0xFF}, + {0xA181,0x90}, + {0xA182,0x0A}, + {0xA183,0xBC}, + {0xA184,0xE0}, + {0xA185,0xFC}, + {0xA186,0xA3}, + {0xA187,0xE0}, + {0xA188,0xF5}, + {0xA189,0x82}, + {0xA18A,0x8C}, + {0xA18B,0x83}, + {0xA18C,0xEF}, + {0xA18D,0xF0}, + {0xA18E,0x90}, + {0xA18F,0x0A}, + {0xA190,0xBD}, + {0xA191,0xE0}, + {0xA192,0x04}, + {0xA193,0xF0}, + {0xA194,0x70}, + {0xA195,0x06}, + {0xA196,0x90}, + {0xA197,0x0A}, + {0xA198,0xBC}, + {0xA199,0xE0}, + {0xA19A,0x04}, + {0xA19B,0xF0}, + {0xA19C,0x90}, + {0xA19D,0x0A}, + {0xA19E,0xBA}, + {0xA19F,0xE0}, + {0xA1A0,0xFE}, + {0xA1A1,0xA3}, + {0xA1A2,0xE0}, + {0xA1A3,0xFF}, + {0xA1A4,0xF5}, + {0xA1A5,0x82}, + {0xA1A6,0x8E}, + {0xA1A7,0x83}, + {0xA1A8,0xE0}, + {0xA1A9,0x54}, + {0xA1AA,0x07}, + {0xA1AB,0xFD}, + {0xA1AC,0x90}, + {0xA1AD,0x0A}, + {0xA1AE,0xBC}, + {0xA1AF,0xE0}, + {0xA1B0,0xFA}, + {0xA1B1,0xA3}, + {0xA1B2,0xE0}, + {0xA1B3,0xF5}, + {0xA1B4,0x82}, + {0xA1B5,0x8A}, + {0xA1B6,0x83}, + {0xA1B7,0xED}, + {0xA1B8,0xF0}, + {0xA1B9,0x90}, + {0xA1BA,0x0A}, + {0xA1BB,0xBD}, + {0xA1BC,0xE0}, + {0xA1BD,0x04}, + {0xA1BE,0xF0}, + {0xA1BF,0x70}, + {0xA1C0,0x06}, + {0xA1C1,0x90}, + {0xA1C2,0x0A}, + {0xA1C3,0xBC}, + {0xA1C4,0xE0}, + {0xA1C5,0x04}, + {0xA1C6,0xF0}, + {0xA1C7,0x8F}, + {0xA1C8,0x82}, + {0xA1C9,0x8E}, + {0xA1CA,0x83}, + {0xA1CB,0xA3}, + {0xA1CC,0xA3}, + {0xA1CD,0xE0}, + {0xA1CE,0xFF}, + {0xA1CF,0x90}, + {0xA1D0,0x0A}, + {0xA1D1,0xBC}, + {0xA1D2,0xE0}, + {0xA1D3,0xFC}, + {0xA1D4,0xA3}, + {0xA1D5,0xE0}, + {0xA1D6,0xF5}, + {0xA1D7,0x82}, + {0xA1D8,0x8C}, + {0xA1D9,0x83}, + {0xA1DA,0xEF}, + {0xA1DB,0xF0}, + {0xA1DC,0x90}, + {0xA1DD,0x0A}, + {0xA1DE,0xBD}, + {0xA1DF,0xE0}, + {0xA1E0,0x04}, + {0xA1E1,0xF0}, + {0xA1E2,0x70}, + {0xA1E3,0x06}, + {0xA1E4,0x90}, + {0xA1E5,0x0A}, + {0xA1E6,0xBC}, + {0xA1E7,0xE0}, + {0xA1E8,0x04}, + {0xA1E9,0xF0}, + {0xA1EA,0x90}, + {0xA1EB,0x0A}, + {0xA1EC,0xBB}, + {0xA1ED,0xE0}, + {0xA1EE,0x24}, + {0xA1EF,0x03}, + {0xA1F0,0xF0}, + {0xA1F1,0x90}, + {0xA1F2,0x0A}, + {0xA1F3,0xBA}, + {0xA1F4,0xE0}, + {0xA1F5,0x34}, + {0xA1F6,0x00}, + {0xA1F7,0xF0}, + {0xA1F8,0x05}, + {0xA1F9,0x22}, + {0xA1FA,0x02}, + {0xA1FB,0xF1}, + {0xA1FC,0x41}, + {0xA1FD,0x90}, + {0xA1FE,0x0A}, + {0xA1FF,0xBA}, + {0xA200,0x74}, + {0xA201,0x0E}, + {0xA202,0xF0}, + {0xA203,0xA3}, + {0xA204,0x74}, + {0xA205,0xDC}, + {0xA206,0xF0}, + {0xA207,0xA3}, + {0xA208,0x74}, + {0xA209,0x05}, + {0xA20A,0xF0}, + {0xA20B,0xA3}, + {0xA20C,0x74}, + {0xA20D,0x61}, + {0xA20E,0xF0}, + {0xA20F,0x90}, + {0xA210,0x0A}, + {0xA211,0xBA}, + {0xA212,0xE0}, + {0xA213,0xFE}, + {0xA214,0xA3}, + {0xA215,0xE0}, + {0xA216,0xAA}, + {0xA217,0x06}, + {0xA218,0xF9}, + {0xA219,0x7B}, + {0xA21A,0x01}, + {0xA21B,0xC0}, + {0xA21C,0x02}, + {0xA21D,0xA3}, + {0xA21E,0xE0}, + {0xA21F,0xFE}, + {0xA220,0xA3}, + {0xA221,0xE0}, + {0xA222,0xAA}, + {0xA223,0x06}, + {0xA224,0xF8}, + {0xA225,0xAC}, + {0xA226,0x02}, + {0xA227,0x7D}, + {0xA228,0x01}, + {0xA229,0xD0}, + {0xA22A,0x02}, + {0xA22B,0x7E}, + {0xA22C,0x00}, + {0xA22D,0x7F}, + {0xA22E,0x04}, + {0xA22F,0x12}, + {0xA230,0x0F}, + {0xA231,0x6F}, + {0xA232,0x02}, + {0xA233,0x66}, + {0xA234,0xD9}, + {0xA235,0x90}, + {0xA236,0x07}, + {0xA237,0xD0}, + {0xA238,0x02}, + {0xA239,0xA2}, + {0xA23A,0x69}, + {0xA240,0x02}, + {0xA241,0x21}, + {0xA242,0x7F}, + {0xA243,0x02}, + {0xA244,0x21}, + {0xA245,0xF4}, + {0xA246,0x02}, + {0xA247,0xA6}, + {0xA248,0x15}, + {0xA249,0x60}, + {0xA24A,0x0A}, + {0xA24B,0xEF}, + {0xA24C,0xB4}, + {0xA24D,0x01}, + {0xA24E,0x16}, + {0xA24F,0x90}, + {0xA250,0x00}, + {0xA251,0x5D}, + {0xA252,0xE0}, + {0xA253,0x70}, + {0xA254,0x10}, + {0xA255,0x12}, + {0xA256,0x26}, + {0xA257,0xC8}, + {0xA258,0x90}, + {0xA259,0x00}, + {0xA25A,0x11}, + {0xA25B,0x74}, + {0xA25C,0x30}, + {0xA25D,0xF0}, + {0xA25E,0x90}, + {0xA25F,0x00}, + {0xA260,0x10}, + {0xA261,0x74}, + {0xA262,0x01}, + {0xA263,0xF0}, + {0xA264,0x22}, + {0xA265,0x12}, + {0xA266,0x25}, + {0xA267,0xA8}, + {0xA268,0x02}, + {0xA269,0x29}, + {0xA26A,0xFC}, + {0xA26B,0x44}, + {0xA26C,0x18}, + {0xA26D,0xF0}, + {0xA26E,0x90}, + {0xA26F,0x72}, + {0xA270,0x18}, + {0xA271,0xE0}, + {0xA272,0x44}, + {0xA273,0x18}, + {0xA274,0xF0}, + {0xA275,0x00}, + {0xA276,0x00}, + {0xA277,0x00}, + {0xA278,0x00}, + {0xA279,0x00}, + {0xA27A,0x00}, + {0xA27B,0x90}, + {0xA27C,0x72}, + {0xA27D,0x08}, + {0xA27E,0xE0}, + {0xA27F,0x44}, + {0xA280,0x10}, + {0xA281,0xF0}, + {0xA282,0x90}, + {0xA283,0x72}, + {0xA284,0x14}, + {0xA285,0xE0}, + {0xA286,0x54}, + {0xA287,0xFD}, + {0xA288,0xF0}, + {0xA289,0x22}, + {0xA29B,0xF0}, + {0xA29C,0xD3}, + {0xA29D,0x90}, + {0xA29E,0x07}, + {0xA29F,0x91}, + {0xA2A0,0xE0}, + {0xA2A1,0x94}, + {0xA2A2,0x21}, + {0xA2A3,0x90}, + {0xA2A4,0x07}, + {0xA2A5,0x90}, + {0xA2A6,0xE0}, + {0xA2A7,0x64}, + {0xA2A8,0x80}, + {0xA2A9,0x94}, + {0xA2AA,0x81}, + {0xA2AB,0x40}, + {0xA2AC,0x08}, + {0xA2AD,0x90}, + {0xA2AE,0x07}, + {0xA2AF,0xCB}, + {0xA2B0,0x74}, + {0xA2B1,0xFF}, + {0xA2B2,0xF0}, + {0xA2B3,0x80}, + {0xA2B4,0x06}, + {0xA2B5,0x90}, + {0xA2B6,0x07}, + {0xA2B7,0xCB}, + {0xA2B8,0x74}, + {0xA2B9,0x01}, + {0xA2BA,0xF0}, + {0xA2BB,0x02}, + {0xA2BC,0xB5}, + {0xA2BD,0xC3}, + {0xA2BE,0x90}, + {0xA2BF,0x08}, + {0xA2C0,0x34}, + {0xA2C1,0xE0}, + {0xA2C2,0xFC}, + {0xA2C3,0xA3}, + {0xA2C4,0xE0}, + {0xA2C5,0xFD}, + {0xA2C6,0xA3}, + {0xA2C7,0xE0}, + {0xA2C8,0xFE}, + {0xA2C9,0xA3}, + {0xA2CA,0xE0}, + {0xA2CB,0xFF}, + {0xA2CC,0x90}, + {0xA2CD,0x07}, + {0xA2CE,0xD0}, + {0xA2CF,0xE0}, + {0xA2D0,0xF8}, + {0xA2D1,0xA3}, + {0xA2D2,0xE0}, + {0xA2D3,0xF9}, + {0xA2D4,0xA3}, + {0xA2D5,0xE0}, + {0xA2D6,0xFA}, + {0xA2D7,0xA3}, + {0xA2D8,0xE0}, + {0xA2D9,0xFB}, + {0xA2DA,0xD3}, + {0xA2DB,0x12}, + {0xA2DC,0x0D}, + {0xA2DD,0xAE}, + {0xA2DE,0x40}, + {0xA2DF,0x0B}, + {0xA2E0,0x12}, + {0xA2E1,0xB5}, + {0xA2E2,0x49}, + {0xA2E3,0x90}, + {0xA2E4,0x07}, + {0xA2E5,0xA4}, + {0xA2E6,0x74}, + {0xA2E7,0x02}, + {0xA2E8,0xF0}, + {0xA2E9,0x80}, + {0xA2EA,0x09}, + {0xA2EB,0x12}, + {0xA2EC,0xB7}, + {0xA2ED,0x51}, + {0xA2EE,0x90}, + {0xA2EF,0x07}, + {0xA2F0,0xA4}, + {0xA2F1,0x74}, + {0xA2F2,0x05}, + {0xA2F3,0xF0}, + {0xA2F4,0x02}, + {0xA2F5,0xA2}, + {0xA2F6,0xDA}, + {0xA2F7,0x90}, + {0xA2F8,0x0E}, + {0xA2F9,0xE0}, + {0xA2FA,0xE0}, + {0xA2FB,0xFD}, + {0xA2FC,0xA3}, + {0xA2FD,0xE0}, + {0xA2FE,0x90}, + {0xA2FF,0x02}, + {0xA300,0xA2}, + {0xA301,0xCD}, + {0xA302,0xF0}, + {0xA303,0xA3}, + {0xA304,0xED}, + {0xA305,0xF0}, + {0xA306,0x90}, + {0xA307,0x0E}, + {0xA308,0xE2}, + {0xA309,0xE0}, + {0xA30A,0xFD}, + {0xA30B,0xA3}, + {0xA30C,0xE0}, + {0xA30D,0x90}, + {0xA30E,0x02}, + {0xA30F,0xA8}, + {0xA310,0xCD}, + {0xA311,0xF0}, + {0xA312,0xA3}, + {0xA313,0xED}, + {0xA314,0xF0}, + {0xA315,0xE4}, + {0xA316,0x90}, + {0xA317,0x06}, + {0xA318,0x38}, + {0xA319,0xF0}, + {0xA31A,0x02}, + {0xA31B,0x67}, + {0xA31C,0x63}, + {0xA31D,0x90}, + {0xA31E,0x0E}, + {0xA31F,0xE8}, + {0xA320,0xE0}, + {0xA321,0x90}, + {0xA322,0x02}, + {0xA323,0x62}, + {0xA324,0xF0}, + {0xA325,0x90}, + {0xA326,0x0E}, + {0xA327,0xE9}, + {0xA328,0xE0}, + {0xA329,0x90}, + {0xA32A,0x02}, + {0xA32B,0x63}, + {0xA32C,0xF0}, + {0xA32D,0x02}, + {0xA32E,0x67}, + {0xA32F,0x1F}, + {0xA33B,0x90}, + {0xA33C,0x0E}, + {0xA33D,0x14}, + {0xA33E,0xE0}, + {0xA33F,0xFE}, + {0xA340,0xA3}, + {0xA341,0xE0}, + {0xA342,0xFF}, + {0xA343,0x90}, + {0xA344,0x06}, + {0xA345,0xD9}, + {0xA346,0xEE}, + {0xA347,0xF0}, + {0xA348,0xA3}, + {0xA349,0xEF}, + {0xA34A,0xF0}, + {0xA34B,0x90}, + {0xA34C,0x0E}, + {0xA34D,0x18}, + {0xA34E,0xE0}, + {0xA34F,0xFD}, + {0xA350,0x7C}, + {0xA351,0x00}, + {0xA352,0xC3}, + {0xA353,0xEF}, + {0xA354,0x9D}, + {0xA355,0xEE}, + {0xA356,0x9C}, + {0xA357,0x50}, + {0xA358,0x09}, + {0xA359,0xE4}, + {0xA35A,0x90}, + {0xA35B,0x06}, + {0xA35C,0xD7}, + {0xA35D,0xF0}, + {0xA35E,0xA3}, + {0xA35F,0xF0}, + {0xA360,0x80}, + {0xA361,0x13}, + {0xA362,0xC3}, + {0xA363,0x90}, + {0xA364,0x06}, + {0xA365,0xDA}, + {0xA366,0xE0}, + {0xA367,0x9D}, + {0xA368,0xFE}, + {0xA369,0x90}, + {0xA36A,0x06}, + {0xA36B,0xD9}, + {0xA36C,0xE0}, + {0xA36D,0x9C}, + {0xA36E,0x90}, + {0xA36F,0x06}, + {0xA370,0xD7}, + {0xA371,0xF0}, + {0xA372,0xA3}, + {0xA373,0xCE}, + {0xA374,0xF0}, + {0xA375,0x90}, + {0xA376,0x0E}, + {0xA377,0x18}, + {0xA378,0xE0}, + {0xA379,0xF9}, + {0xA37A,0xFF}, + {0xA37B,0x90}, + {0xA37C,0x06}, + {0xA37D,0xC2}, + {0xA37E,0xE0}, + {0xA37F,0xFC}, + {0xA380,0xA3}, + {0xA381,0xE0}, + {0xA382,0xFD}, + {0xA383,0xC3}, + {0xA384,0x9F}, + {0xA385,0xFF}, + {0xA386,0xEC}, + {0xA387,0x94}, + {0xA388,0x00}, + {0xA389,0xFE}, + {0xA38A,0x90}, + {0xA38B,0x0E}, + {0xA38C,0x16}, + {0xA38D,0xE0}, + {0xA38E,0xFA}, + {0xA38F,0xA3}, + {0xA390,0xE0}, + {0xA391,0xFB}, + {0xA392,0xD3}, + {0xA393,0x9F}, + {0xA394,0xEA}, + {0xA395,0x9E}, + {0xA396,0x40}, + {0xA397,0x0A}, + {0xA398,0x90}, + {0xA399,0x06}, + {0xA39A,0xD5}, + {0xA39B,0xEC}, + {0xA39C,0xF0}, + {0xA39D,0xA3}, + {0xA39E,0xED}, + {0xA39F,0xF0}, + {0xA3A0,0x80}, + {0xA3A1,0x0E}, + {0xA3A2,0xE9}, + {0xA3A3,0x7E}, + {0xA3A4,0x00}, + {0xA3A5,0x2B}, + {0xA3A6,0xFF}, + {0xA3A7,0xEE}, + {0xA3A8,0x3A}, + {0xA3A9,0x90}, + {0xA3AA,0x06}, + {0xA3AB,0xD5}, + {0xA3AC,0xF0}, + {0xA3AD,0xA3}, + {0xA3AE,0xEF}, + {0xA3AF,0xF0}, + {0xA3B0,0xE9}, + {0xA3B1,0xFB}, + {0xA3B2,0x7A}, + {0xA3B3,0x00}, + {0xA3B4,0x90}, + {0xA3B5,0x0E}, + {0xA3B6,0x15}, + {0xA3B7,0xE0}, + {0xA3B8,0x2B}, + {0xA3B9,0xFE}, + {0xA3BA,0x90}, + {0xA3BB,0x0E}, + {0xA3BC,0x14}, + {0xA3BD,0xE0}, + {0xA3BE,0x3A}, + {0xA3BF,0x90}, + {0xA3C0,0x06}, + {0xA3C1,0xE1}, + {0xA3C2,0xF0}, + {0xA3C3,0xA3}, + {0xA3C4,0xCE}, + {0xA3C5,0xF0}, + {0xA3C6,0xC3}, + {0xA3C7,0x90}, + {0xA3C8,0x0E}, + {0xA3C9,0x17}, + {0xA3CA,0xE0}, + {0xA3CB,0x9B}, + {0xA3CC,0xFE}, + {0xA3CD,0x90}, + {0xA3CE,0x0E}, + {0xA3CF,0x16}, + {0xA3D0,0x02}, + {0xA3D1,0x20}, + {0xA3D2,0xD5}, + {0xA3D3,0x90}, + {0xA3d4,0x0E}, + {0xA3d5,0xE4}, + {0xA3d6,0xE0}, + {0xA3d7,0x90}, + {0xA3d8,0x02}, + {0xA3d9,0x66}, + {0xA3da,0xF0}, + {0xA3DB,0x90}, + {0xA3dc,0x0E}, + {0xA3dd,0xE5}, + {0xA3de,0xE0}, + {0xA3df,0x90}, + {0xA3e0,0x02}, + {0xA3e1,0x64}, + {0xA3e2,0xF0}, + {0xA3e3,0x90}, + {0xA3e4,0x0E}, + {0xA3e5,0xE6}, + {0xA3e6,0xE0}, + {0xA3e7,0x90}, + {0xA3e8,0x02}, + {0xA3e9,0x65}, + {0xA3ea,0xF0}, + {0xA3eb,0x02}, + {0xA3ec,0x67}, + {0xA3ed,0xA5}, + {0xA3f0,0x12}, + {0xA3f1,0x47}, + {0xA3f2,0x59}, + {0xA3f3,0x90}, + {0xA3f4,0x00}, + {0xA3f5,0xB5}, + {0xA3f6,0xE0}, + {0xA3f7,0xB4}, + {0xA3f8,0x02}, + {0xA3f9,0x03}, + {0xA3fa,0x12}, + {0xA3fb,0x47}, + {0xA3fc,0x59}, + {0xA3fd,0x02}, + {0xA3fe,0xC5}, + {0xA3ff,0xC3}, + {0xA400,0x90}, + {0xA401,0x00}, + {0xA402,0x3D}, + {0xA403,0xF0}, + {0xA404,0x90}, + {0xA405,0x00}, + {0xA406,0x84}, + {0xA407,0xE0}, + {0xA408,0xFE}, + {0xA409,0x90}, + {0xA40A,0x00}, + {0xA40B,0x3E}, + {0xA40C,0xF0}, + {0xA40D,0xEF}, + {0xA40E,0x70}, + {0xA40F,0x03}, + {0xA410,0xEE}, + {0xA411,0x60}, + {0xA412,0x04}, + {0xA413,0x7F}, + {0xA414,0x01}, + {0xA415,0x80}, + {0xA416,0x02}, + {0xA417,0x7F}, + {0xA418,0x00}, + {0xA419,0x90}, + {0xA41A,0x00}, + {0xA41B,0x3F}, + {0xA41C,0xEF}, + {0xA41D,0xF0}, + {0xA41E,0x02}, + {0xA41F,0x89}, + {0xA420,0xD3}, + {0xA421,0x90}, + {0xA422,0x00}, + {0xA423,0x12}, + {0xA424,0xE0}, + {0xA425,0xFF}, + {0xA426,0x70}, + {0xA427,0x0C}, + {0xA428,0x90}, + {0xA429,0x00}, + {0xA42A,0x46}, + {0xA42B,0xE0}, + {0xA42C,0xC3}, + {0xA42D,0x94}, + {0xA42E,0x07}, + {0xA42F,0x40}, + {0xA430,0x03}, + {0xA431,0x75}, + {0xA432,0x2E}, + {0xA433,0x02}, + {0xA434,0xEF}, + {0xA435,0xB4}, + {0xA436,0x01}, + {0xA437,0x0C}, + {0xA438,0x90}, + {0xA439,0x00}, + {0xA43A,0x66}, + {0xA43B,0xE0}, + {0xA43C,0xC3}, + {0xA43D,0x94}, + {0xA43E,0x07}, + {0xA43F,0x40}, + {0xA440,0x03}, + {0xA441,0x75}, + {0xA442,0x2E}, + {0xA443,0x02}, + {0xA444,0x02}, + {0xA445,0xA7}, + {0xA446,0x9E}, + {0xA447,0xC3}, + {0xA448,0x90}, + {0xA449,0x0B}, + {0xA44A,0x8F}, + {0xA44B,0xE0}, + {0xA44C,0x94}, + {0xA44D,0x00}, + {0xA44E,0x90}, + {0xA44F,0x0B}, + {0xA450,0x8E}, + {0xA451,0xE0}, + {0xA452,0x94}, + {0xA453,0x41}, + {0xA454,0x40}, + {0xA455,0x22}, + {0xA456,0x90}, + {0xA457,0x0B}, + {0xA458,0x91}, + {0xA459,0xE0}, + {0xA45A,0x94}, + {0xA45B,0x00}, + {0xA45C,0x90}, + {0xA45D,0x0B}, + {0xA45E,0x90}, + {0xA45F,0xE0}, + {0xA460,0x94}, + {0xA461,0x41}, + {0xA462,0x40}, + {0xA463,0x14}, + {0xA464,0x90}, + {0xA465,0x0B}, + {0xA466,0x93}, + {0xA467,0xE0}, + {0xA468,0x94}, + {0xA469,0x00}, + {0xA46A,0x90}, + {0xA46B,0x0B}, + {0xA46C,0x92}, + {0xA46D,0xE0}, + {0xA46E,0x94}, + {0xA46F,0x41}, + {0xA470,0x40}, + {0xA471,0x06}, + {0xA472,0x90}, + {0xA473,0x01}, + {0xA474,0xA4}, + {0xA475,0x02}, + {0xA476,0x86}, + {0xA477,0x57}, + {0xA478,0x02}, + {0xA479,0x86}, + {0xA47A,0x5C}, + {0xA500,0xF5}, + {0xA501,0x3B}, + {0xA502,0x90}, + {0xA503,0x06}, + {0xA504,0x6C}, + {0xA505,0xE0}, + {0xA506,0xFF}, + {0xA507,0xE5}, + {0xA508,0x3B}, + {0xA509,0xC3}, + {0xA50A,0x9F}, + {0xA50B,0x40}, + {0xA50C,0x03}, + {0xA50D,0x02}, + {0xA50E,0xF6}, + {0xA50F,0x0E}, + {0xA510,0x90}, + {0xA511,0x0B}, + {0xA512,0xC6}, + {0xA513,0xE0}, + {0xA514,0x14}, + {0xA515,0x60}, + {0xA516,0x3C}, + {0xA517,0x14}, + {0xA518,0x60}, + {0xA519,0x6B}, + {0xA51A,0x24}, + {0xA51B,0x02}, + {0xA51C,0x60}, + {0xA51D,0x03}, + {0xA51E,0x02}, + {0xA51F,0xF5}, + {0xA520,0xB5}, + {0xA521,0x90}, + {0xA522,0x0A}, + {0xA523,0x9A}, + {0xA524,0xE0}, + {0xA525,0xFB}, + {0xA526,0xA3}, + {0xA527,0xE0}, + {0xA528,0xFA}, + {0xA529,0xA3}, + {0xA52A,0xE0}, + {0xA52B,0xF9}, + {0xA52C,0x85}, + {0xA52D,0x3B}, + {0xA52E,0x82}, + {0xA52F,0x75}, + {0xA530,0x83}, + {0xA531,0x00}, + {0xA532,0x12}, + {0xA533,0x0A}, + {0xA534,0xB8}, + {0xA535,0xFF}, + {0xA536,0x74}, + {0xA537,0xAB}, + {0xA538,0x25}, + {0xA539,0x3B}, + {0xA53A,0xF5}, + {0xA53B,0x82}, + {0xA53C,0xE4}, + {0xA53D,0x34}, + {0xA53E,0x0A}, + {0xA53F,0xF5}, + {0xA540,0x83}, + {0xA541,0xE0}, + {0xA542,0xFD}, + {0xA543,0xC3}, + {0xA544,0xEF}, + {0xA545,0x9D}, + {0xA546,0xFE}, + {0xA547,0xE4}, + {0xA548,0x94}, + {0xA549,0x00}, + {0xA54A,0x90}, + {0xA54B,0x0B}, + {0xA54C,0xCA}, + {0xA54D,0xF0}, + {0xA54E,0xA3}, + {0xA54F,0xCE}, + {0xA550,0xF0}, + {0xA551,0x80}, + {0xA552,0x62}, + {0xA553,0x90}, + {0xA554,0x0A}, + {0xA555,0x9A}, + {0xA556,0xE0}, + {0xA557,0xFB}, + {0xA558,0xA3}, + {0xA559,0xE0}, + {0xA55A,0xFA}, + {0xA55B,0xA3}, + {0xA55C,0xE0}, + {0xA55D,0xF9}, + {0xA55E,0x85}, + {0xA55F,0x3B}, + {0xA560,0x82}, + {0xA561,0x75}, + {0xA562,0x83}, + {0xA563,0x00}, + {0xA564,0x12}, + {0xA565,0x0A}, + {0xA566,0xB8}, + {0xA567,0xFF}, + {0xA568,0x74}, + {0xA569,0x9D}, + {0xA56A,0x25}, + {0xA56B,0x3B}, + {0xA56C,0xF5}, + {0xA56D,0x82}, + {0xA56E,0xE4}, + {0xA56F,0x34}, + {0xA570,0x0A}, + {0xA571,0xF5}, + {0xA572,0x83}, + {0xA573,0xE0}, + {0xA574,0xFD}, + {0xA575,0xC3}, + {0xA576,0xEF}, + {0xA577,0x9D}, + {0xA578,0xFE}, + {0xA579,0xE4}, + {0xA57A,0x94}, + {0xA57B,0x00}, + {0xA57C,0x90}, + {0xA57D,0x0B}, + {0xA57E,0xCA}, + {0xA57F,0xF0}, + {0xA580,0xA3}, + {0xA581,0xCE}, + {0xA582,0xF0}, + {0xA583,0x80}, + {0xA584,0x30}, + {0xA585,0x90}, + {0xA586,0x0A}, + {0xA587,0x9A}, + {0xA588,0xE0}, + {0xA589,0xFB}, + {0xA58A,0xA3}, + {0xA58B,0xE0}, + {0xA58C,0xFA}, + {0xA58D,0xA3}, + {0xA58E,0xE0}, + {0xA58F,0xF9}, + {0xA590,0x85}, + {0xA591,0x3B}, + {0xA592,0x82}, + {0xA593,0x75}, + {0xA594,0x83}, + {0xA595,0x00}, + {0xA596,0x12}, + {0xA597,0x0A}, + {0xA598,0xB8}, + {0xA599,0xFF}, + {0xA59A,0x74}, + {0xA59B,0xA4}, + {0xA59C,0x25}, + {0xA59D,0x3B}, + {0xA59E,0xF5}, + {0xA59F,0x82}, + {0xA5A0,0xE4}, + {0xA5A1,0x34}, + {0xA5A2,0x0A}, + {0xA5A3,0xF5}, + {0xA5A4,0x83}, + {0xA5A5,0xE0}, + {0xA5A6,0xFD}, + {0xA5A7,0xC3}, + {0xA5A8,0xEF}, + {0xA5A9,0x9D}, + {0xA5AA,0xFE}, + {0xA5AB,0xE4}, + {0xA5AC,0x94}, + {0xA5AD,0x00}, + {0xA5AE,0x90}, + {0xA5AF,0x0B}, + {0xA5B0,0xCA}, + {0xA5B1,0xF0}, + {0xA5B2,0xA3}, + {0xA5B3,0xCE}, + {0xA5B4,0xF0}, + {0xA5B5,0x90}, + {0xA5B6,0x07}, + {0xA5B7,0x83}, + {0xA5B8,0xE0}, + {0xA5B9,0xFF}, + {0xA5BA,0x7E}, + {0xA5BB,0x00}, + {0xA5BC,0x90}, + {0xA5BD,0x0D}, + {0xA5BE,0xF6}, + {0xA5BF,0xEE}, + {0xA5C0,0xF0}, + {0xA5C1,0xA3}, + {0xA5C2,0xEF}, + {0xA5C3,0xF0}, + {0xA5C4,0x90}, + {0xA5C5,0x0B}, + {0xA5C6,0xCA}, + {0xA5C7,0xE0}, + {0xA5C8,0xFC}, + {0xA5C9,0xA3}, + {0xA5CA,0xE0}, + {0xA5CB,0xFD}, + {0xA5CC,0xD3}, + {0xA5CD,0x9F}, + {0xA5CE,0x74}, + {0xA5CF,0x80}, + {0xA5D0,0xF8}, + {0xA5D1,0xEC}, + {0xA5D2,0x64}, + {0xA5D3,0x80}, + {0xA5D4,0x98}, + {0xA5D5,0x40}, + {0xA5D6,0x0C}, + {0xA5D7,0x90}, + {0xA5D8,0x0B}, + {0xA5D9,0xC8}, + {0xA5DA,0xE0}, + {0xA5DB,0x04}, + {0xA5DC,0xF0}, + {0xA5DD,0xA3}, + {0xA5DE,0xE0}, + {0xA5DF,0x04}, + {0xA5E0,0xF0}, + {0xA5E1,0x80}, + {0xA5E2,0x26}, + {0xA5E3,0x90}, + {0xA5E4,0x0D}, + {0xA5E5,0xF6}, + {0xA5E6,0xE0}, + {0xA5E7,0xFE}, + {0xA5E8,0xA3}, + {0xA5E9,0xE0}, + {0xA5EA,0xFF}, + {0xA5EB,0xC3}, + {0xA5EC,0xE4}, + {0xA5ED,0x9F}, + {0xA5EE,0xFF}, + {0xA5EF,0xE4}, + {0xA5F0,0x9E}, + {0xA5F1,0xFE}, + {0xA5F2,0xC3}, + {0xA5F3,0xED}, + {0xA5F4,0x9F}, + {0xA5F5,0xEE}, + {0xA5F6,0x64}, + {0xA5F7,0x80}, + {0xA5F8,0xF8}, + {0xA5F9,0xEC}, + {0xA5FA,0x64}, + {0xA5FB,0x80}, + {0xA5FC,0x98}, + {0xA5FD,0x50}, + {0xA5FE,0x0A}, + {0xA5FF,0x90}, + {0xA600,0x0B}, + {0xA601,0xC8}, + {0xA602,0xE0}, + {0xA603,0x14}, + {0xA604,0xF0}, + {0xA605,0xA3}, + {0xA606,0xE0}, + {0xA607,0x04}, + {0xA608,0xF0}, + {0xA609,0x05}, + {0xA60A,0x3B}, + {0xA60B,0x02}, + {0xA60C,0xF5}, + {0xA60D,0x02}, + {0xA60E,0x90}, + {0xA60F,0x08}, + {0xA610,0x58}, + {0xA611,0x02}, + {0xA612,0x9D}, + {0xA613,0x50}, + {0x9006,0xBA}, + {0x9007,0x75}, + {0x9008,0x00}, + {0x9009,0x00}, + {0x900A,0x02}, + {0x900D,0x01}, + {0x900E,0xA2}, + {0x900F,0x8F}, + {0x9010,0x00}, + {0x9011,0xCB}, + {0x9012,0x03}, + {0x9016,0xE6}, + {0x9017,0x6B}, + {0x9018,0x02}, + {0x9019,0x6B}, + {0x901A,0x02}, + {0x901D,0x01}, + {0x901E,0xAC}, + {0x901F,0x70}, + {0x9020,0x00}, + {0x9021,0xC5}, + {0x9022,0x03}, + {0x9026,0x9C}, + {0x9027,0x5B}, + {0x9028,0x00}, + {0x9029,0xBF}, + {0x902A,0x02}, + {0x902E,0x60}, + {0x902F,0x1C}, + {0x9030,0x01}, + {0x9031,0x37}, + {0x9032,0x02}, + {0x9035,0x01}, + {0x9036,0xBA}, + {0x9037,0x70}, + {0x9038,0x00}, + {0x9039,0x00}, + {0x903A,0x03}, + {0x903E,0x21}, + {0x903F,0x3F}, + {0x9040,0x02}, + {0x9041,0x40}, + {0x9042,0x02}, + {0x9046,0x21}, + {0x9047,0xEA}, + {0x9048,0x02}, + {0x9049,0x43}, + {0x904A,0x02}, + {0x904E,0xA6}, + {0x904F,0x12}, + {0x9050,0x02}, + {0x9051,0x46}, + {0x9052,0x02}, + {0x9056,0x29}, + {0x9057,0xE3}, + {0x9058,0x02}, + {0x9059,0x49}, + {0x905A,0x02}, + {0x905D,0x01}, + {0x905E,0x9C}, + {0x905F,0x6E}, + {0x9060,0x05}, + {0x9061,0x00}, + {0x9062,0x02}, + {0x9065,0x01}, + {0x9066,0xA2}, + {0x9067,0x66}, + {0x9068,0x02}, + {0x9069,0x35}, + {0x906A,0x02}, + {0x906D,0x01}, + {0x906E,0xB5}, + {0x906F,0xC2}, + {0x9070,0x02}, + {0x9071,0x9B}, + {0x9072,0x02}, + {0x9075,0x01}, + {0x9076,0xA2}, + {0x9077,0xD4}, + {0x9078,0x02}, + {0x9079,0xBE}, + {0x907A,0x02}, + {0x907D,0x01}, + {0x907E,0xB7}, + {0x907F,0xEA}, + {0x9080,0x00}, + {0x9081,0x02}, + {0x9082,0x03}, + {0x9086,0x67}, + {0x9087,0x31}, + {0x9088,0x02}, + {0x9089,0xF7}, + {0x908A,0x02}, + {0x908E,0x66}, + {0x908F,0xED}, + {0x9090,0x03}, + {0x9091,0x1D}, + {0x9092,0x02}, + {0x9096,0x67}, + {0x9097,0x73}, + {0x9098,0x03}, + {0x9099,0xD3}, + {0x909A,0x02}, + {0x909E,0x20}, + {0x909F,0x40}, + {0x90A0,0x03}, + {0x90A1,0x3B}, + {0x90A2,0x02}, + {0x90A6,0xC5}, + {0x90A7,0xC0}, + {0x90A8,0x03}, + {0x90A9,0xF0}, + {0x90AA,0x02}, + {0x90AE,0x41}, + {0x90AF,0xB3}, + {0x90B0,0x00}, + {0x90B1,0xA2}, + {0x90B2,0x02}, + {0x90B6,0x44}, + {0x90B7,0xBA}, + {0x90B8,0x00}, + {0x90B9,0xF0}, + {0x90BA,0x03}, + {0x90BE,0x89}, + {0x90BF,0x99}, + {0x90C0,0x04}, + {0x90C1,0x00}, + {0x90C2,0x02}, + {0x90C6,0xA7}, + {0x90C7,0x91}, + {0x90C8,0x04}, + {0x90C9,0x21}, + {0x90CA,0x02}, + {0x90CE,0x3A}, + {0x90CF,0x51}, + {0x90D0,0x00}, + {0x90D1,0xA2}, + {0x90D2,0x02}, + {0x90D6,0x86}, + {0x90D7,0x54}, + {0x90D8,0x04}, + {0x90D9,0x47}, + {0x90DA,0x02}, + {0x9000,0x01}, + {0xffff,0x00}, // 2013-03-01 end + {SEQUENCE_END, 0x00} +#endif +}; +static struct reginfo sensor_init_data1[] = +{ +{0x0009,0x16}, //10 +{0x0085,0x00}, +{0x0040,0x00}, +{0x0016,0x00}, +{0x0046,0x00}, +{0x0041,0x00}, +{0x00B5,0x02}, +{0x7101,0x44}, +{0x00ED,0x0A}, +{0x00EE,0x1E}, +{0x00B3,0x80}, +{0x7104,0x00}, +{0x7105,0x80}, +{0x019C,0x4B}, +{0x019D,0x20}, +{0x0129,0x00}, +{0x0130,0x00}, +{0x0083,0x01}, +{0x0084,0x01}, +{0x01A1,0x80}, +{0x01A2,0x80}, +{0x01A3,0x80}, +{0x01A0,0x01}, +{0x0021,0x00}, +{0x0022,0x01}, + +{0x0040,0x00}, //00 +{0x0060,0x00}, +{0x0013,0x00}, +{0x0041,0x00},//00:5M 03:SVGA + +{0x0061,0x00}, +{0x0046,0x02}, +{0x0066,0x02}, +{0x0012,0x00}, +{0x7102,0x09}, +{0x7103,0x00}, +{0x7158,0x00}, +{0x00E8,0x01}, +{0x7000,0x2C}, +{0x5200,0x01}, +{0x7000,0x0C}, +{0x0143,0x5F}, +{0x0144,0x0D}, +{0x02C2,0x00}, +{0x02C3,0xC0}, +{0x015E,0x40}, +{0x015F,0x00}, +{0x0390,0x01}, +{0x0391,0x00}, +{0x0392,0x00}, +{0x03A0,0x14}, +{0x03A1,0x00}, +{0x03A2,0x5A}, +{0x03A3,0xEE}, +{0x03A4,0x69}, +{0x03A5,0x49}, +{0x03A6,0x3E}, +{0x03A7,0x00}, +{0x03A8,0x39}, +{0x03A9,0x33}, +{0x03B0,0x60}, +{0x03B1,0x00}, +{0x03B2,0x5A}, +{0x03B3,0xEE}, +{0x03B4,0x69}, +{0x03B5,0x49}, +{0x03B6,0x3E}, +{0x03B7,0x00}, +{0x03B8,0x3D}, +{0x03B9,0x20}, +{0x03C0,0x10}, +{0x03C1,0x00}, +{0x03C2,0x5A}, +{0x03C3,0xEE}, +{0x03C4,0x69}, +{0x03C5,0x49}, +{0x03C6,0x3A}, +{0x03C7,0x80}, +{0x03D0,0x64}, +{0x03D1,0x00}, +{0x03D2,0x5A}, +{0x03D3,0xEE}, +{0x03D4,0x69}, +{0x03D5,0x49}, +{0x03D6,0x34}, +{0x03D7,0xD1}, +{0x004C,0x08}, +{0x006C,0x08}, +{0x0350,0x00}, +{0x0351,0x5A}, +{0x0352,0xEE}, +{0x0353,0x69}, +{0x0354,0x49}, +{0x0355,0x39}, +{0x0356,0x6D}, +{0x0357,0x19}, +{0x0358,0x00}, +{0x0359,0x3C}, +{0x035A,0x5A}, +{0x035B,0xEE}, +{0x035C,0x69}, +{0x035D,0x49}, +{0x035E,0x39}, +{0x035F,0x85}, +{0x0049,0x14}, +{0x004A,0x0D}, +{0x0069,0x14}, +{0x006A,0x0D}, +{0x0090,0x00}, +{0x0091,0x5A}, +{0x0092,0xEE}, +{0x0093,0x3E}, +{0x0094,0x00}, +{0x0095,0x69}, +{0x0096,0x49}, +{0x0097,0x39}, +{0x0098,0xCF}, +{0x00A0,0x00}, +{0x00A1,0x5A}, +{0x00A2,0xEE}, +{0x00A3,0x3E}, +{0x00A4,0x00}, +{0x00A5,0x69}, +{0x00A6,0x49}, +{0x00A7,0x3B}, +{0x00A8,0x80}, +#if 0 // 03-06 old LSC +{0x0420,0x00}, +{0x0421,0x09}, +{0x0422,0xff}, +{0x0423,0x9e}, +{0x0424,0x00}, +{0x0425,0x89}, +{0x0426,0x00}, +{0x0427,0xab}, +{0x0428,0xff}, +{0x0429,0xe9}, +{0x042a,0xff}, +{0x042b,0x8b}, +{0x042c,0x00}, +{0x042d,0x73}, +{0x042e,0xff}, +{0x042f,0xb6}, +{0x0430,0x00}, +{0x0431,0x54}, +{0x0432,0xff}, +{0x0433,0x43}, +{0x0434,0x01}, +{0x0435,0x04}, +{0x0436,0x01}, +{0x0437,0x34}, +{0x0438,0xff}, +{0x0439,0x7c}, +{0x043a,0xfe}, +{0x043b,0xd2}, +{0x043c,0x00}, +{0x043d,0x63}, +{0x043e,0xff}, +{0x043f,0x15}, +{0x0450,0x00}, +{0x0451,0x3b}, +{0x0452,0xff}, +{0x0453,0x98}, +{0x0454,0x00}, +{0x0455,0x6f}, +{0x0456,0x00}, +{0x0457,0x93}, +{0x0458,0xff}, +{0x0459,0xad}, +{0x045a,0xff}, +{0x045b,0x87}, +{0x045c,0x00}, +{0x045d,0x52}, +{0x045e,0xff}, +{0x045f,0xa7}, +{0x0440,0xff}, +{0x0441,0xfd}, +{0x0442,0xff}, +{0x0443,0x6c}, +{0x0444,0x00}, +{0x0445,0x90}, +{0x0446,0x00}, +{0x0447,0xa1}, +{0x0448,0x00}, +{0x0449,0x02}, +{0x044a,0xff}, +{0x044b,0x48}, +{0x044c,0x00}, +{0x044d,0x5b}, +{0x044e,0xff}, +{0x044f,0xb4}, +{0x0460,0xff}, +{0x0461,0x69}, +{0x0462,0xff}, +{0x0463,0xbb}, +{0x0464,0x00}, +{0x0465,0x84}, +{0x0466,0x00}, +{0x0467,0xa3}, +{0x0468,0x00}, +{0x0469,0x0e}, +{0x046a,0x00}, +{0x046b,0x76}, +{0x046c,0xff}, +{0x046d,0xaf}, +{0x046e,0xff}, +{0x046f,0xf5}, +{0x0470,0xff}, +{0x0471,0x8a}, +{0x0472,0xff}, +{0x0473,0x5a}, +{0x0474,0x00}, +{0x0475,0xef}, +{0x0476,0x01}, +{0x0477,0x16}, +{0x0478,0xff}, +{0x0479,0xd4}, +{0x047a,0x00}, +{0x047b,0x02}, +{0x047c,0x00}, +{0x047d,0x2c}, +{0x047e,0xff}, +{0x047f,0x95}, +{0x0490,0xff}, +{0x0491,0x9b}, +{0x0492,0xff}, +{0x0493,0x91}, +{0x0494,0x00}, +{0x0495,0x6f}, +{0x0496,0x00}, +{0x0497,0x95}, +{0x0498,0xff}, +{0x0499,0xd5}, +{0x049a,0x01}, +{0x049b,0x20}, +{0x049c,0xff}, +{0x049d,0xfb}, +{0x049e,0xff}, +{0x049f,0xe1}, +{0x0480,0xff}, +{0x0481,0x5a}, +{0x0482,0xff}, +{0x0483,0x91}, +{0x0484,0x00}, +{0x0485,0x8c}, +{0x0486,0x00}, +{0x0487,0x9f}, +{0x0488,0x00}, +{0x0489,0x29}, +{0x048a,0x00}, +{0x048b,0x53}, +{0x048c,0xff}, +{0x048d,0x80}, +{0x048e,0xff}, +{0x048f,0xf7}, +{0x04a0,0xff}, +{0x04a1,0x6c}, +{0x04a2,0xff}, +{0x04a3,0xb9}, +{0x04a4,0x00}, +{0x04a5,0x81}, +{0x04a6,0x00}, +{0x04a7,0x93}, +{0x04a8,0x00}, +{0x04a9,0x1c}, +{0x04aa,0x00}, +{0x04ab,0x39}, +{0x04ac,0xff}, +{0x04ad,0x9f}, +{0x04ae,0x00}, +{0x04af,0x0e}, +{0x04b0,0xff}, +{0x04b1,0xe0}, +{0x04b2,0xff}, +{0x04b3,0x7b}, +{0x04b4,0x00}, +{0x04b5,0xaa}, +{0x04b6,0x00}, +{0x04b7,0xc8}, +{0x04b8,0xff}, +{0x04b9,0xe1}, +{0x04ba,0x00}, +{0x04bb,0x0e}, +{0x04bc,0x00}, +{0x04bd,0x0b}, +{0x04be,0xff}, +{0x04bf,0xff}, +{0x04d0,0xff}, +{0x04d1,0xac}, +{0x04d2,0xff}, +{0x04d3,0x93}, +{0x04d4,0x00}, +{0x04d5,0x64}, +{0x04d6,0x00}, +{0x04d7,0x83}, +{0x04d8,0xff}, +{0x04d9,0xdb}, +{0x04da,0x00}, +{0x04db,0xa8}, +{0x04dc,0xff}, +{0x04dd,0xf5}, +{0x04de,0x00}, +{0x04df,0x15}, +{0x04c0,0xff}, +{0x04c1,0x5d}, +{0x04c2,0xff}, +{0x04c3,0x9c}, +{0x04c4,0x00}, +{0x04c5,0x82}, +{0x04c6,0x00}, +{0x04c7,0x96}, +{0x04c8,0x00}, +{0x04c9,0x33}, +{0x04ca,0x00}, +{0x04cb,0x07}, +{0x04cc,0xff}, +{0x04cd,0x71}, +{0x04ce,0x00}, +{0x04cf,0x11}, +{0x04e0,0xff}, +{0x04e1,0x6d}, +{0x04e2,0xff}, +{0x04e3,0xb8}, +{0x04e4,0x00}, +{0x04e5,0x84}, +{0x04e6,0x00}, +{0x04e7,0x96}, +{0x04e8,0xff}, +{0x04e9,0xc0}, +{0x04ea,0x00}, +{0x04eb,0x6d}, +{0x04ec,0xff}, +{0x04ed,0xbb}, +{0x04ee,0x00}, +{0x04ef,0x00}, +{0x04f0,0xff}, +{0x04f1,0xe0}, +{0x04f2,0xff}, +{0x04f3,0x95}, +{0x04f4,0x00}, +{0x04f5,0xa7}, +{0x04f6,0x00}, +{0x04f7,0xc8}, +{0x04f8,0xff}, +{0x04f9,0xde}, +{0x04fa,0x00}, +{0x04fb,0x7e}, +{0x04fc,0x00}, +{0x04fd,0x36}, +{0x04fe,0x00}, +{0x04ff,0x10}, +{0x0510,0xff}, +{0x0511,0xc1}, +{0x0512,0xff}, +{0x0513,0x9f}, +{0x0514,0x00}, +{0x0515,0x6a}, +{0x0516,0x00}, +{0x0517,0x89}, +{0x0518,0xff}, +{0x0519,0xdc}, +{0x051a,0x00}, +{0x051b,0x55}, +{0x051c,0x00}, +{0x051d,0x09}, +{0x051e,0x00}, +{0x051f,0x0d}, +{0x0500,0xff}, +{0x0501,0x60}, +{0x0502,0xff}, +{0x0503,0x9e}, +{0x0504,0x00}, +{0x0505,0x81}, +{0x0506,0x00}, +{0x0507,0x9c}, +{0x0508,0xff}, +{0x0509,0xc0}, +{0x050a,0x00}, +{0x050b,0x40}, +{0x050c,0xff}, +{0x050d,0x8e}, +{0x050e,0x00}, +{0x050f,0x00}, +{0x0561,0x0e}, +{0x0562,0x01}, +{0x0563,0x01}, +{0x0564,0x06}, +#endif // LSC end +#if 1 //new LSC start - 0306 +{0x0420,0x00}, +{0x0421,0x26}, +{0x0422,0xff}, +{0x0423,0x03}, +{0x0424,0x00}, +{0x0425,0x63}, +{0x0426,0x00}, +{0x0427,0x8e}, +{0x0428,0xff}, +{0x0429,0xf3}, +{0x042A,0x00}, +{0x042B,0x26}, +{0x042C,0xff}, +{0x042D,0xc8}, +{0x042E,0xff}, +{0x042F,0x5f}, +{0x0430,0x00}, +{0x0431,0x10}, +{0x0432,0xfe}, +{0x0433,0xcf}, +{0x0434,0x00}, +{0x0435,0xc2}, +{0x0436,0x00}, +{0x0437,0xf2}, +{0x0438,0xff}, +{0x0439,0xd0}, +{0x043A,0x00}, +{0x043B,0xa1}, +{0x043C,0x00}, +{0x043D,0x2f}, +{0x043E,0xfe}, +{0x043F,0xdc}, +{0x0450,0x00}, +{0x0451,0x36}, +{0x0452,0xff}, +{0x0453,0x60}, +{0x0454,0x00}, +{0x0455,0x43}, +{0x0456,0x00}, +{0x0457,0x6b}, +{0x0458,0xff}, +{0x0459,0xdf}, +{0x045A,0x00}, +{0x045B,0x83}, +{0x045C,0xff}, +{0x045D,0xeb}, +{0x045E,0xff}, +{0x045F,0x5f}, +{0x0440,0x00}, +{0x0441,0x36}, +{0x0442,0xff}, +{0x0443,0x3e}, +{0x0444,0x00}, +{0x0445,0x6d}, +{0x0446,0x00}, +{0x0447,0x87}, +{0x0448,0x00}, +{0x0449,0x0f}, +{0x044A,0xff}, +{0x044B,0xd3}, +{0x044C,0x00}, +{0x044D,0x18}, +{0x044E,0xff}, +{0x044F,0x4f}, +{0x0561,0x08}, +{0x0460,0x00}, +{0x0461,0x22}, +{0x0462,0xff}, +{0x0463,0x0a}, +{0x0464,0x00}, +{0x0465,0x63}, +{0x0466,0x00}, +{0x0467,0x8b}, +{0x0468,0xff}, +{0x0469,0xf9}, +{0x046A,0x00}, +{0x046B,0x17}, +{0x046C,0xff}, +{0x046D,0xbd}, +{0x046E,0xff}, +{0x046F,0x65}, +{0x0470,0x00}, +{0x0471,0x15}, +{0x0472,0xfe}, +{0x0473,0xd7}, +{0x0474,0x00}, +{0x0475,0xb6}, +{0x0476,0x00}, +{0x0477,0xe5}, +{0x0478,0xff}, +{0x0479,0xd0}, +{0x047A,0x00}, +{0x047B,0xb2}, +{0x047C,0x00}, +{0x047D,0x2c}, +{0x047E,0xfe}, +{0x047F,0xe6}, +{0x0490,0x00}, +{0x0491,0x2b}, +{0x0492,0xff}, +{0x0493,0x71}, +{0x0494,0x00}, +{0x0495,0x43}, +{0x0496,0x00}, +{0x0497,0x69}, +{0x0498,0xff}, +{0x0499,0xd7}, +{0x049A,0x00}, +{0x049B,0x59}, +{0x049C,0xff}, +{0x049D,0xde}, +{0x049E,0xff}, +{0x049F,0x76}, +{0x0480,0x00}, +{0x0481,0x38}, +{0x0482,0xff}, +{0x0483,0x3a}, +{0x0484,0x00}, +{0x0485,0x6b}, +{0x0486,0x00}, +{0x0487,0x86}, +{0x0488,0x00}, +{0x0489,0x14}, +{0x048A,0xff}, +{0x048B,0xd7}, +{0x048C,0x00}, +{0x048D,0x13}, +{0x048E,0xff}, +{0x048F,0x58}, +{0x0562,0x08}, +{0x04A0,0x00}, +{0x04A1,0x17}, +{0x04A2,0xff}, +{0x04A3,0x2e}, +{0x04A4,0x00}, +{0x04A5,0x5d}, +{0x04A6,0x00}, +{0x04A7,0x7a}, +{0x04A8,0xff}, +{0x04A9,0xf9}, +{0x04AA,0xff}, +{0x04AB,0xc0}, +{0x04AC,0xff}, +{0x04AD,0xc7}, +{0x04AE,0xff}, +{0x04AF,0x7d}, +{0x04B0,0x00}, +{0x04B1,0x13}, +{0x04B2,0xff}, +{0x04B3,0x45}, +{0x04B4,0x00}, +{0x04B5,0x70}, +{0x04B6,0x00}, +{0x04B7,0x96}, +{0x04B8,0xff}, +{0x04B9,0xde}, +{0x04BA,0x00}, +{0x04BB,0x17}, +{0x04BC,0x00}, +{0x04BD,0x23}, +{0x04BE,0xff}, +{0x04BF,0x46}, +{0x04D0,0x00}, +{0x04D1,0x17}, +{0x04D2,0xff}, +{0x04D3,0x99}, +{0x04D4,0x00}, +{0x04D5,0x3d}, +{0x04D6,0x00}, +{0x04D7,0x5f}, +{0x04D8,0xff}, +{0x04D9,0xd1}, +{0x04DA,0xff}, +{0x04DB,0xe2}, +{0x04DC,0xff}, +{0x04DD,0xc6}, +{0x04DE,0xff}, +{0x04DF,0x9c}, +{0x04C0,0x00}, +{0x04C1,0x32}, +{0x04C2,0xff}, +{0x04C3,0x4e}, +{0x04C4,0x00}, +{0x04C5,0x5e}, +{0x04C6,0x00}, +{0x04C7,0x7c}, +{0x04C8,0x00}, +{0x04C9,0x17}, +{0x04CA,0xff}, +{0x04CB,0x9b}, +{0x04CC,0x00}, +{0x04CD,0x06}, +{0x04CE,0xff}, +{0x04CF,0x70}, +{0x0563,0x05}, +{0x04E0,0x00}, +{0x04E1,0x11}, +{0x04E2,0xff}, +{0x04E3,0x20}, +{0x04E4,0x00}, +{0x04E5,0x5f}, +{0x04E6,0x00}, +{0x04E7,0x7b}, +{0x04E8,0x00}, +{0x04E9,0x02}, +{0x04EA,0xff}, +{0x04EB,0xf1}, +{0x04EC,0xff}, +{0x04ED,0xb7}, +{0x04EE,0xff}, +{0x04EF,0x7b}, +{0x04F0,0x00}, +{0x04F1,0x1c}, +{0x04F2,0xff}, +{0x04F3,0x08}, +{0x04F4,0x00}, +{0x04F5,0x7e}, +{0x04F6,0x00}, +{0x04F7,0xac}, +{0x04F8,0xff}, +{0x04F9,0xeb}, +{0x04FA,0x00}, +{0x04FB,0x93}, +{0x04FC,0x00}, +{0x04FD,0x1b}, +{0x04FE,0xff}, +{0x04FF,0x11}, +{0x0510,0xff}, +{0x0511,0xfe}, +{0x0512,0xff}, +{0x0513,0x8e}, +{0x0514,0x00}, +{0x0515,0x4a}, +{0x0516,0x00}, +{0x0517,0x6e}, +{0x0518,0xff}, +{0x0519,0xbb}, +{0x051A,0xff}, +{0x051B,0xcc}, +{0x051C,0xff}, +{0x051D,0x9a}, +{0x051E,0xff}, +{0x051F,0xa2}, +{0x0500,0x00}, +{0x0501,0x30}, +{0x0502,0xff}, +{0x0503,0x36}, +{0x0504,0x00}, +{0x0505,0x5d}, +{0x0506,0x00}, +{0x0507,0x81}, +{0x0508,0x00}, +{0x0509,0x1f}, +{0x050A,0xff}, +{0x050B,0xd4}, +{0x050C,0xff}, +{0x050D,0xfe}, +{0x050E,0xff}, +{0x050F,0x75}, +{0x0564,0x00}, +#endif //new LSC end +{0x0324,0x39}, +{0x0325,0xAE}, +{0x0326,0x3A}, +{0x0327,0x29}, +{0x0328,0x3B}, +{0x0329,0x0A}, +{0x032A,0x3B}, +{0x032B,0x62}, +{0x0320,0x01}, +{0x0321,0x04}, +{0x0322,0x01}, +{0x0323,0x01}, +{0x0330,0x01}, +{0x0384,0x00}, +{0x0337,0x01}, +{0x03EC,0x39}, +{0x03ED,0x85}, +{0x03FC,0x3A}, +{0x03FD,0x14}, +{0x040C,0x3A}, +{0x040D,0xF6}, +{0x041C,0x3B}, +{0x041D,0x9A}, +{0x03E0,0xB6}, +{0x03E1,0x04}, +{0x03E2,0xBB}, +{0x03E3,0xE9}, +{0x03E4,0xBC}, +{0x03E5,0x70}, +{0x03E6,0x37}, +{0x03E7,0x02}, +{0x03E8,0xBC}, +{0x03E9,0x00}, +{0x03EA,0xBF}, +{0x03EB,0x12}, +{0x03F0,0xBA}, +{0x03F1,0x7B}, +{0x03F2,0xBA}, +{0x03F3,0x83}, +{0x03F4,0xBB}, +{0x03F5,0xBC}, +{0x03F6,0x38}, +{0x03F7,0x2D}, +{0x03F8,0xBB}, +{0x03F9,0x23}, +{0x03FA,0xBD}, +{0x03FB,0xAC}, +{0x0400,0xBE}, +{0x0401,0x96}, +{0x0402,0xB9}, +{0x0403,0xBE}, +{0x0404,0xBB}, +{0x0405,0x57}, +{0x0406,0x3A}, +{0x0407,0xBB}, +{0x0408,0xB3}, +{0x0409,0x17}, +{0x040A,0xBE}, +{0x040B,0x66}, +{0x0410,0xBB}, +{0x0411,0x2A}, +{0x0412,0xBA}, +{0x0413,0x00}, +{0x0414,0xBB}, +{0x0415,0x10}, +{0x0416,0xB8}, +{0x0417,0xCD}, +{0x0418,0xB7}, +{0x0419,0x5C}, +{0x041A,0xBB}, +{0x041B,0x6C}, +{0x01f8,0x3c}, +{0x01f9,0x00}, +{0x01fa,0x00}, +{0x02a2,0x3e}, +{0x02a3,0x00}, +{0x02a4,0x3e}, +{0x02a5,0x00}, +{0x02a6,0x3e}, +{0x02a7,0x00}, +{0x02a8,0x3e}, +{0x02a9,0x00}, +{0x056c,0x42}, +{0x056d,0x00}, +{0x056e,0x42}, +{0x056f,0x00}, +{0x0570,0x42}, +{0x0571,0x00}, +{0x0572,0x42}, +{0x0573,0x00}, +{0x0081,0x55}, //6E->55 +{0x0588,0x00}, +{0x0589,0x5A}, +{0x058A,0xEE}, +{0x058B,0x69}, +{0x058C,0x49}, +{0x058D,0x3D}, +{0x058E,0x3D}, +{0x0080,0x6C}, +{0x0082,0x5A}, +{0x0010,0x01}, + + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_init_data2[] = +{ +{0x4708,0x00}, +{0x4709,0x00}, +{0x4710,0x00}, +{0x4711,0x00}, +//AF intial setting +#if 0 +{0x065A,0x00}, +{0x06C9,0x01}, +{0x06CD,0x01}, +{0x06CE,0xBD}, +{0x06CF,0x00}, +{0x06D0,0x93}, +{0x06D1,0x02}, +{0x06D2,0x30}, +{0x06D3,0xD4}, +{0x06D4,0x01}, +{0x06DB,0x59}, +{0x06DC,0x0D}, +{0x0730,0x00}, +{0x0731,0x00}, +{0x0732,0x03}, +{0x0733,0xFF}, +{0x0734,0x03}, +{0x0735,0xff}, +{0x0755,0x01}, +{0x0756,0x00},//03->00 +{0x075B,0x01},//00 +{0x075E,0x00}, +{0x0764,0x01}, +{0x0766,0x01},//00 +{0x0768,0x01}, +{0x076A,0x00},//01 +{0x0758,0x01}, +{0x075C,0x01}, +{0x0770,0x98}, +{0x0771,0x19}, +{0x0772,0x1B}, +{0x0774,0x01}, +{0x0775,0x4A}, +{0x0777,0x00}, +{0x0778,0x45}, +{0x0779,0x00}, +{0x077A,0x02}, +{0x077D,0x01}, +{0x077E,0x03}, +{0x0783,0x10}, +{0x0785,0x14}, +{0x0846,0x06}, +{0x0847,0x05}, +#endif // old af @ vcm end -03-06 +#if 1 //03-06 new af @ vcm +{0x0659,0x01}, +{0x065A,0x00}, +{0x06C9,0x01}, +{0x06CD,0x01}, +{0x06CE,0xBD}, +{0x06CF,0x00}, +{0x06D0,0x93}, +{0x06D1,0x02}, +{0x06D2,0x30}, +{0x06D3,0xD4}, +{0x06D4,0x01}, +{0x06DB,0x59}, +{0x06DC,0x0d}, +{0x0730,0x00}, +{0x0731,0x00}, +{0x0732,0x03}, +{0x0733,0xFF}, +{0x0734,0x03}, +{0x0735,0x70}, +{0x0755,0x01}, +{0x0756,0x00}, +{0x075A,0x00}, +{0x075B,0x01}, +{0x075E,0x00}, +{0x0764,0x01}, +{0x0766,0x01}, +{0x0768,0x01}, +{0x076A,0x00}, +{0x0758,0x01}, +{0x075C,0x01}, +{0x0770,0x98}, +{0x0771,0x19}, +{0x0772,0x1B}, +{0x0774,0x01}, +{0x0775,0x4a}, +{0x0777,0x00}, +{0x0778,0x45}, +{0x0779,0x00}, +{0x077A,0x02}, +{0x077D,0x01}, +{0x077E,0x03}, +{0x0783,0x10}, +{0x0785,0x14}, +{0x0788,0x04}, +{0x0846,0x06}, +{0x0847,0x05}, +#endif +{0xC41A,0x05}, +{0xC423,0x11}, +{0xC427,0x11}, +{0x300B,0x09}, + +{0x7000,0x08}, +{0x5200,0x09}, +{0x00B2,0x50}, +{0x00B3,0x80}, +{0x00B5,0x01}, +{0x0030,0x14}, +{0x0040,0x01}, //AB2 +{0x0041,0x03}, //SVGA mode + +{0x0010,0x01}, + + {SEQUENCE_END, 0x00} +}; //sensor_init_data2 end + + + +/* 720p 15fps @ 1280x720 */ + +static struct reginfo sensor_720p[]= +{ + + {SEQUENCE_END, 0x00} +}; + +/* 1080p, 0x15fps, 0xyuv @1920x1080 */ + +static struct reginfo sensor_1080p[]= +{ + + {SEQUENCE_END, 0x00} +}; + +/* 2592X1944 QSXGA */ +static struct reginfo sensor_qsxga[] = +{ + +//{0x0010,0x02}, + +{0x7000,0x08}, +{0x5200,0x09}, +//{0x00B2,0x50}, +//{0x00B3,0x80}, +//{0x00B5,0x02}, +//{0x0030,0x11}, +{0x0040,0x00}, +{0x0041,0x00}, +{0x0010,0x01}, + + {SEQUENCE_END, 0x00} +}; +/* 2048*1536 QXGA */ +static struct reginfo sensor_qxga[] = +{ + {SEQUENCE_END, 0x00} +}; + +/* 1600X1200 UXGA */ +static struct reginfo sensor_uxga[] = +{ +#if 0 +{0x7000,0x08}, +{0x5200,0x09}, +//{0x00B2,0x50}, +//{0x00B3,0x80}, +//{0x00B5,0x02}, +//{0x0030,0x14}, +{0x0040,0x00}, +{0x0041,0x01}, +{0x0010,0x01}, +#endif + {SEQUENCE_END, 0x00} +}; + +/* 1280X1024 SXGA */ +static struct reginfo sensor_sxga[] = +{ +#if 0 +{0x7000,0x08}, +{0x5200,0x09}, +//{0x00B2,0x50}, +//{0x00B3,0x80}, +//{0x00B5,0x02}, +//{0x0030,0x14}, +{0x0040,0x00}, +{0x0041,0x02}, +{0x0010,0x01}, +#endif + {SEQUENCE_END, 0x00} +}; +/* 1024X768 XGA */ +static struct reginfo sensor_xga[] = +{ +#if 0 +{0x7000,0x08}, +{0x5200,0x09}, +//{0x00B2,0x50}, +//{0x00B3,0x80}, +//{0x00B5,0x02}, +//{0x0030,0x11}, +{0x0040,0x01}, +{0x0041,0x0a}, +{0x0042,0x05}, +{0x0043,0x00}, +{0x0044,0x03}, +{0x0045,0x20}, +{0x0010,0x01}, +#endif + {SEQUENCE_END, 0x00} +}; +/* 800X600 SVGA*/ +static struct reginfo sensor_svga[] = +{ +//{0x0010,0x02}, + +//{0x7000,0x08}, +//{0x5200,0x09}, +//{0x00B2,0x50}, +//{0x00B3,0x80}, +//{0x00B5,0x02}, +//{0x0030,0x14}, +{0x0040,0x01}, +{0x0041,0x03}, + +{0x00ed,0x0A}, +{0x00ee,0x1E}, + +//{0x0010,0x01}, + + {SEQUENCE_END, 0x00} +}; + +/* 640X480 VGA */ +static struct reginfo sensor_vga[] = +{ + + +{0x7000,0x08}, +{0x5200,0x09}, +{0x0040,0x01}, +{0x0041,0x04}, +{0x00ed,0x1E}, +{0x00ee,0x1E}, +{0x331e,0x00}, + + {SEQUENCE_END, 0x00} +}; +/* 352X288 CIF */ +static struct reginfo sensor_cif[] = +{ + + {SEQUENCE_END, 0x00} +}; + +/* 320*240 QVGA */ +static struct reginfo sensor_qvga[] = +{ + + {SEQUENCE_END, 0x00} +}; + +/* 176X144 QCIF*/ +static struct reginfo sensor_qcif[] = +{ + + {SEQUENCE_END, 0x00} +}; +#endif +static struct reginfo sensor_ClrFmt_YUYV[]= +{ + + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_ClrFmt_UYVY[]= +{ + + {SEQUENCE_END, 0x00} +}; + + +#if CONFIG_SENSOR_WhiteBalance +static struct reginfo sensor_WhiteB_Auto[]= +{ + {0x01A0,0x01}, + {SEQUENCE_END, 0x00} +}; +/* Cloudy Colour Temperature : 6500K - 8000K */ +static struct reginfo sensor_WhiteB_Cloudy[]= +{ + {0x01A0,0x04}, + {SEQUENCE_END, 0x00} +}; +/* ClearDay Colour Temperature : 5000K - 6500K */ +static struct reginfo sensor_WhiteB_ClearDay[]= +{ + {0x01A0,0x05}, + {SEQUENCE_END, 0x00} +}; +/* Office Colour Temperature : 3500K - 5000K */ +static struct reginfo sensor_WhiteB_TungstenLamp1[]= +{ + {0x01A0,0x07}, + {SEQUENCE_END, 0x00} +}; +/* Home Colour Temperature : 2500K - 3500K */ +static struct reginfo sensor_WhiteB_TungstenLamp2[]= +{ + {0x01A0,0x08}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_WhiteBalanceSeqe[] = {sensor_WhiteB_Auto, sensor_WhiteB_TungstenLamp1,sensor_WhiteB_TungstenLamp2, + sensor_WhiteB_ClearDay, sensor_WhiteB_Cloudy,NULL, +}; +#endif + +#if CONFIG_SENSOR_Brightness +static struct reginfo sensor_Brightness0[]= +{ + {0x082,0x34}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Brightness1[]= +{ + {0x082,0x44}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Brightness2[]= +{ + {0x082,0x54}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Brightness3[]= +{ + {0x082,0x64}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Brightness4[]= +{ + {0x082,0x74}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Brightness5[]= +{ + {0x082,0x84}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_BrightnessSeqe[] = {sensor_Brightness0, sensor_Brightness1, sensor_Brightness2, sensor_Brightness3, + sensor_Brightness4, sensor_Brightness5,NULL, +}; + +#endif + +#if CONFIG_SENSOR_Effect +static struct reginfo sensor_Effect_Normal[] = +{ + {0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x0}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Effect_WandB[] = +{ + {0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x5}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Effect_Sepia[] = +{ + {0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x6}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Effect_Negative[] = +{ + //Negative + {0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x8}, + {SEQUENCE_END, 0x00} +};static struct reginfo sensor_Effect_Bluish[] = +{ + // Bluish +{0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x4}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Effect_Green[] = +{ + // Greenish + {0x0380,0x0}, + {0x0381,0x0}, + {0x0382,0x0}, + {0x0384,0x3}, + {SEQUENCE_END, 0x00} +}; +/*static struct reginfo sensor_Effect_Reddish[] = +{ + // Greenish + + {SEQUENCE_END, 0x00} +};*/ + +static struct reginfo *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia, + sensor_Effect_Bluish, sensor_Effect_Green,NULL, +}; +#endif +#if CONFIG_SENSOR_Exposure +static struct reginfo sensor_Exposure0[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Exposure1[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Exposure2[]= +{ + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Exposure3[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Exposure4[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Exposure5[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Exposure6[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_ExposureSeqe[] = {sensor_Exposure0, sensor_Exposure1, sensor_Exposure2, sensor_Exposure3, + sensor_Exposure4, sensor_Exposure5,sensor_Exposure6,NULL, +}; +#endif +#if CONFIG_SENSOR_Saturation +static struct reginfo sensor_Saturation0[]= +{ + {0x081,0x34}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Saturation1[]= +{ + {0x081,0x44}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Saturation2[]= +{ + {0x081,0x54}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Saturation3[]= +{ + {0x081,0x64}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Saturation4[]= +{ + {0x081,0x74}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Saturation5[]= +{ + {0x081,0x84}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Saturation6[]= +{ + {0x081,0x94}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_SaturationSeqe[] = {sensor_Saturation0, sensor_Saturation1, sensor_Saturation2,sensor_Saturation3, sensor_Saturation4, sensor_Saturation5,sensor_Saturation6, NULL,}; + +#endif +#if CONFIG_SENSOR_Contrast +static struct reginfo sensor_Contrast0[]= +{ + {0x080,0x34}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Contrast1[]= +{ + {0x080,0x44}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Contrast2[]= +{ + {0x080,0x54}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Contrast3[]= +{ + {0x080,0x64}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Contrast4[]= +{ + {0x080,0x74}, + {SEQUENCE_END, 0x00} +}; + + +static struct reginfo sensor_Contrast5[]= +{ + {0x080,0x84}, + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Contrast6[]= +{ + {0x080,0x94}, + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_ContrastSeqe[] = {sensor_Contrast0, sensor_Contrast1, sensor_Contrast2, sensor_Contrast3, + sensor_Contrast4, sensor_Contrast5, sensor_Contrast6, NULL, +}; + +#endif +#if CONFIG_SENSOR_Mirror +static struct reginfo sensor_MirrorOn[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_MirrorOff[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_MirrorSeqe[] = {sensor_MirrorOff, sensor_MirrorOn,NULL,}; +#endif +#if CONFIG_SENSOR_Flip +static struct reginfo sensor_FlipOn[]= +{ + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_FlipOff[]= +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_FlipSeqe[] = {sensor_FlipOff, sensor_FlipOn,NULL,}; + +#endif +#if CONFIG_SENSOR_Scene +static struct reginfo sensor_SceneAuto[] = +{ + + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_SceneNight[] = +{ + //15fps ~ 3.75fps night mode for 60/50Hz light environment, 24Mhz clock input,24Mzh pclk + + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_SceneSeqe[] = {sensor_SceneAuto, sensor_SceneNight,NULL,}; + +#endif +#if CONFIG_SENSOR_DigitalZoom +static struct reginfo sensor_Zoom0[] = +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo sensor_Zoom1[] = +{ + {SEQUENCE_END, 0x00} +}; + +static struct reginfo sensor_Zoom2[] = +{ + {SEQUENCE_END, 0x00} +}; + + +static struct reginfo sensor_Zoom3[] = +{ + {SEQUENCE_END, 0x00} +}; +static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL}; +#endif +static const struct v4l2_querymenu sensor_menus[] = +{ + #if CONFIG_SENSOR_WhiteBalance + { .id = V4L2_CID_DO_WHITE_BALANCE, .index = 0, .name = "auto", .reserved = 0, }, { .id = V4L2_CID_DO_WHITE_BALANCE, .index = 1, .name = "incandescent", .reserved = 0,}, + { .id = V4L2_CID_DO_WHITE_BALANCE, .index = 2, .name = "fluorescent", .reserved = 0,}, { .id = V4L2_CID_DO_WHITE_BALANCE, .index = 3, .name = "daylight", .reserved = 0,}, + { .id = V4L2_CID_DO_WHITE_BALANCE, .index = 4, .name = "cloudy-daylight", .reserved = 0,}, + #endif + + #if CONFIG_SENSOR_Effect + { .id = V4L2_CID_EFFECT, .index = 0, .name = "none", .reserved = 0, }, { .id = V4L2_CID_EFFECT, .index = 1, .name = "mono", .reserved = 0,}, + { .id = V4L2_CID_EFFECT, .index = 2, .name = "negative", .reserved = 0,}, { .id = V4L2_CID_EFFECT, .index = 3, .name = "sepia", .reserved = 0,}, + { .id = V4L2_CID_EFFECT, .index = 4, .name = "posterize", .reserved = 0,} ,{ .id = V4L2_CID_EFFECT, .index = 5, .name = "aqua", .reserved = 0,}, + #endif + + #if CONFIG_SENSOR_Scene + { .id = V4L2_CID_SCENE, .index = 0, .name = "auto", .reserved = 0,} ,{ .id = V4L2_CID_SCENE, .index = 1, .name = "night", .reserved = 0,}, + #endif + + #if CONFIG_SENSOR_Flash + { .id = V4L2_CID_FLASH, .index = 0, .name = "off", .reserved = 0, }, { .id = V4L2_CID_FLASH, .index = 1, .name = "auto", .reserved = 0,}, + { .id = V4L2_CID_FLASH, .index = 2, .name = "on", .reserved = 0,}, { .id = V4L2_CID_FLASH, .index = 3, .name = "torch", .reserved = 0,}, + #endif +}; + +static struct v4l2_queryctrl sensor_controls[] = +{ + #if CONFIG_SENSOR_WhiteBalance + { + .id = V4L2_CID_DO_WHITE_BALANCE, + .type = V4L2_CTRL_TYPE_MENU, + .name = "White Balance Control", + .minimum = 0, + .maximum = 4, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Brightness + { + .id = V4L2_CID_BRIGHTNESS, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Brightness Control", + .minimum = -3, + .maximum = 2, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Effect + { + .id = V4L2_CID_EFFECT, + .type = V4L2_CTRL_TYPE_MENU, + .name = "Effect Control", + .minimum = 0, + .maximum = 5, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Exposure + { + .id = V4L2_CID_EXPOSURE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Exposure Control", + .minimum = 0, + .maximum = 6, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Saturation + { + .id = V4L2_CID_SATURATION, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Saturation Control", + .minimum = 0, + .maximum = 2, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Contrast + { + .id = V4L2_CID_CONTRAST, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Contrast Control", + .minimum = -3, + .maximum = 3, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Mirror + { + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Mirror Control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1, + }, + #endif + + #if CONFIG_SENSOR_Flip + { + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Flip Control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1, + }, + #endif + + #if CONFIG_SENSOR_Scene + { + .id = V4L2_CID_SCENE, + .type = V4L2_CTRL_TYPE_MENU, + .name = "Scene Control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_DigitalZoom + { + .id = V4L2_CID_ZOOM_RELATIVE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "DigitalZoom Control", + .minimum = -1, + .maximum = 1, + .step = 1, + .default_value = 0, + }, { + .id = V4L2_CID_ZOOM_ABSOLUTE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "DigitalZoom Control", + .minimum = 0, + .maximum = 3, + .step = 1, + .default_value = 0, + }, + #endif + + #if CONFIG_SENSOR_Focus + /*{ + .id = V4L2_CID_FOCUS_RELATIVE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Focus Control", + .minimum = -1, + .maximum = 1, + .step = 1, + .default_value = 0, + }, { + .id = V4L2_CID_FOCUS_ABSOLUTE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Focus Control", + .minimum = 0, + .maximum = 255, + .step = 1, + .default_value = 125, + },*/ + { + .id = V4L2_CID_FOCUSZONE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "FocusZone Control", + .minimum = -1, + .maximum = 1, + .step = 1, + .default_value = 0, + },{ + .id = V4L2_CID_FOCUS_AUTO, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Focus Control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, + },/*{ + .id = V4L2_CID_FOCUS_CONTINUOUS, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Focus Control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, + },*/ + #endif + + #if CONFIG_SENSOR_Flash + { + .id = V4L2_CID_FLASH, + .type = V4L2_CTRL_TYPE_MENU, + .name = "Flash Control", + .minimum = 0, + .maximum = 3, + .step = 1, + .default_value = 0, + }, + #endif +}; + +static int sensor_probe(struct i2c_client *client, const struct i2c_device_id *did); +static int sensor_video_probe(struct soc_camera_device *icd, struct i2c_client *client); +static int sensor_g_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl); +static int sensor_s_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl); +static int sensor_g_ext_controls(struct v4l2_subdev *sd, struct v4l2_ext_controls *ext_ctrl); +static int sensor_s_ext_controls(struct v4l2_subdev *sd, struct v4l2_ext_controls *ext_ctrl); +static int sensor_suspend(struct soc_camera_device *icd, pm_message_t pm_msg); +static int sensor_resume(struct soc_camera_device *icd); +static int sensor_set_bus_param(struct soc_camera_device *icd,unsigned long flags); +static unsigned long sensor_query_bus_param(struct soc_camera_device *icd); +static int sensor_set_effect(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value); +#if CONFIG_SENSOR_WhiteBalance +static int sensor_set_whiteBalance(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value); +#endif +static int sensor_deactivate(struct i2c_client *client); +static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf); +static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf); + +static struct soc_camera_ops sensor_ops = +{ + .suspend = sensor_suspend, + .resume = sensor_resume, + .set_bus_param = sensor_set_bus_param, + .query_bus_param = sensor_query_bus_param, + .controls = sensor_controls, + .menus = sensor_menus, + .num_controls = ARRAY_SIZE(sensor_controls), + .num_menus = ARRAY_SIZE(sensor_menus), +}; +/* only one fixed colorspace per pixelcode */ +struct sensor_datafmt { + enum v4l2_mbus_pixelcode code; + enum v4l2_colorspace colorspace; +}; + +/* Find a data format by a pixel code in an array */ +static const struct sensor_datafmt *sensor_find_datafmt( + enum v4l2_mbus_pixelcode code, const struct sensor_datafmt *fmt, + int n) +{ + int i; + for (i = 0; i < n; i++) + if (fmt[i].code == code) + return fmt + i; + + return NULL; +} + +static const struct sensor_datafmt sensor_colour_fmts[] = { + {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG}, + {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG} +}; +enum sensor_wq_cmd +{ + WqCmd_af_init, + WqCmd_af_single, + WqCmd_af_special_pos, + WqCmd_af_far_pos, + WqCmd_af_near_pos, + WqCmd_af_continues, + WqCmd_af_return_idle, +}; +enum sensor_wq_result +{ + WqRet_success = 0, + WqRet_fail = -1, + WqRet_inval = -2 +}; +struct sensor_work +{ + struct i2c_client *client; + struct delayed_work dwork; + enum sensor_wq_cmd cmd; + wait_queue_head_t done; + enum sensor_wq_result result; + bool wait; + int var; + int zone_pos[4]; +}; + +typedef struct sensor_info_priv_s +{ + int whiteBalance; + int brightness; + int contrast; + int saturation; + int effect; + int scene; + int digitalzoom; + int focus; + int auto_focus; + int affm_reinit; + int flash; + int exposure; + bool snap2preview; + bool video2preview; + unsigned char mirror; /* HFLIP */ + unsigned char flip; /* VFLIP */ + struct reginfo *winseqe_cur_addr; + struct sensor_datafmt fmt; + unsigned int enable; + unsigned int funmodule_state; +} sensor_info_priv_t; + + + +struct sensor_parameter +{ + int af_pos[2]; +}; + +struct sensor +{ + struct v4l2_subdev subdev; + struct i2c_client *client; + sensor_info_priv_t info_priv; + struct sensor_parameter parameter; + struct workqueue_struct *sensor_wq; + struct mutex wq_lock; + int model; /* V4L2_IDENT_OV* codes from v4l2-chip-ident.h */ +#if CONFIG_SENSOR_I2C_NOSCHED + atomic_t tasklock_cnt; +#endif + struct rk29camera_platform_data *sensor_io_request; + struct rk29camera_gpio_res *sensor_gpio_res; +}; + +static struct sensor* to_sensor(const struct i2c_client *client) +{ + return container_of(i2c_get_clientdata(client), struct sensor, subdev); +} + +static int sensor_task_lock(struct i2c_client *client, int lock) +{ +#if CONFIG_SENSOR_I2C_NOSCHED + int cnt = 3; + struct sensor *sensor = to_sensor(client); + + if (lock) { + if (atomic_read(&sensor->tasklock_cnt) == 0) { + while ((atomic_read(&client->adapter->bus_lock.count) < 1) && (cnt>0)) { + SENSOR_TR("\n %s will obtain i2c in atomic, but i2c bus is locked! Wait...\n",SENSOR_NAME_STRING()); + msleep(35); + cnt--; + } + if ((atomic_read(&client->adapter->bus_lock.count) < 1) && (cnt<=0)) { + SENSOR_TR("\n %s obtain i2c fail in atomic!!\n",SENSOR_NAME_STRING()); + goto sensor_task_lock_err; + } + preempt_disable(); + } + + atomic_add(1, &sensor->tasklock_cnt); + } else { + if (atomic_read(&sensor->tasklock_cnt) > 0) { + atomic_sub(1, &sensor->tasklock_cnt); + + if (atomic_read(&sensor->tasklock_cnt) == 0) + preempt_enable(); + } + } + return 0; +sensor_task_lock_err: + return -1; +#else + return 0; +#endif + +} + + +#if CONFIG_SENSOR_WRITE_REGS +static int sensor_write_regs(struct i2c_client *client, u8 *reg_info, int num) +{ + int err=0,cnt; + struct i2c_msg msg[1]; + + msg->len = num; + msg->addr = client->addr; + msg->flags = client->flags; + msg->buf = reg_info; + msg->scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg->read_type = 0; /* fpga i2c:0==I2C_NORMAL : direct use number not enum for don't want include spi_fpga.h */ + + + cnt= 3; + err = -EAGAIN; + + while ((cnt-- > 0) && (err < 0)) { /* ddl@rock-chips.com : Transfer again if transent is failed */ + err = i2c_transfer(client->adapter, msg, 1); + if (err >= 0) { + return 0; + } else { + SENSOR_TR("\n %s write reg failed, try to write again!\n", SENSOR_NAME_STRING()); + udelay(10); + } + } + + return err; + +} + +#endif + + + + +/* sensor register write */ +static int sensor_write(struct i2c_client *client, u16 reg, u8 val) +{ + int err,cnt; + u8 buf[3]; + struct i2c_msg msg[1]; + + buf[0] = reg >> 8; + buf[1] = reg & 0xFF; + buf[2] = val; + + msg->addr = client->addr; + msg->flags = client->flags; + msg->buf = buf; + msg->len = sizeof(buf); + msg->scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg->read_type = 0; /* fpga i2c:0==I2C_NORMAL : direct use number not enum for don't want include spi_fpga.h */ + + cnt = 3; + err = -EAGAIN; + + while ((cnt-- > 0) && (err < 0)) { /* ddl@rock-chips.com : Transfer again if transent is failed */ + err = i2c_transfer(client->adapter, msg, 1); + + if (err >= 0) { + return 0; + } else { + SENSOR_TR("\n %s write reg(0x%x, val:0x%x) failed, try to write again!\n",SENSOR_NAME_STRING(),reg, val); + udelay(10); + } + } + + return err; +} + +/* sensor register read */ +static int sensor_read(struct i2c_client *client, u16 reg, u8 *val) +{ + int err,cnt; + u8 buf[2]; + struct i2c_msg msg[2]; + + buf[0] = reg >> 8; + buf[1] = reg & 0xFF; + + msg[0].addr = client->addr; + msg[0].flags = client->flags; + msg[0].buf = buf; + msg[0].len = sizeof(buf); + msg[0].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg[0].read_type = 2; /* fpga i2c:0==I2C_NO_STOP : direct use number not enum for don't want include spi_fpga.h */ + + msg[1].addr = client->addr; + msg[1].flags = client->flags|I2C_M_RD; + msg[1].buf = buf; + msg[1].len = 1; + msg[1].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg[1].read_type = 2; /* fpga i2c:0==I2C_NO_STOP : direct use number not enum for don't want include spi_fpga.h */ + + cnt = 3; + err = -EAGAIN; + while ((cnt-- > 0) && (err < 0)) { /* ddl@rock-chips.com : Transfer again if transent is failed */ + err = i2c_transfer(client->adapter, msg, 2); + + if (err >= 0) { + *val = buf[0]; + return 0; + } else { + SENSOR_TR("\n %s read reg(0x%x val:0x%x) failed, try to read again! \n",SENSOR_NAME_STRING(),reg, *val); + udelay(10); + } + } + + return err; +} + +/* write a array of registers */ +static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray) +{ + int err = 0, cnt; + int i = 0; +#if CONFIG_SENSOR_Focus + struct sensor *sensor = to_sensor(client); +#endif +#if CONFIG_SENSOR_I2C_RDWRCHK + char valchk; +#endif +#if CONFIG_SENSOR_WRITE_REGS + int j = 0, reg_num; + u8 *ptemp, *phead; + int reg_length; +#endif + + cnt = 0; + if (sensor_task_lock(client, 1) < 0) + goto sensor_write_array_end; + while (regarray[i].reg != SEQUENCE_END) { + + #if 0 + if ((regarray == sensor_af_firmware) && (sensor->info_priv.enable == 0)) { + SENSOR_DG("%s disable, Download af firmware terminated!\n",SENSOR_NAME_STRING()); + err = -EINVAL; + goto sensor_write_array_end; + } + #endif + +#if CONFIG_SENSOR_WRITE_REGS + + j = i; + reg_num = 2; + reg_length = 0x0001; + + while((regarray[i].reg + reg_length) == regarray[i+1].reg) { + i++; + reg_num++; + if(reg_num >= WRITE_REGS_NUM) + break; + } + + if(reg_num > 2) { + + int size_num; + size_num = reg_num + 1; + + ptemp = phead = (u8*)kmalloc((size_num+10)*sizeof(u8),GFP_KERNEL); + if (!phead) { + SENSOR_DG("-------------write registers allocate memory fail!!!\n"); + i = j; + err = sensor_write(client, regarray[i].reg, regarray[i].val); + } else { + *phead = regarray[j].reg >> 8; + *(ptemp+1) = regarray[j].reg & 0xFF; + ptemp += 2; + for( ; reg_num > 0; reg_num --, j++) { + *ptemp ++ = regarray[j].val; + } + + ptemp = phead; + err = sensor_write_regs(client, ptemp,size_num); + kfree(phead); + } + }else{ + err = sensor_write(client, regarray[i].reg, regarray[i].val); + } +#else + err = sensor_write(client, regarray[i].reg, regarray[i].val); +#endif + if (err < 0) + { + if (cnt-- > 0) { + SENSOR_TR("%s..write failed current reg:0x%x, Write array again !\n", SENSOR_NAME_STRING(),regarray[i].reg); + i = 0; + continue; + } else { + SENSOR_TR("%s..write array failed!!!\n", SENSOR_NAME_STRING()); + err = -EPERM; + goto sensor_write_array_end; + } + } else { + #if CONFIG_SENSOR_I2C_RDWRCHK + sensor_read(client, regarray[i].reg, &valchk); + if (valchk != regarray[i].val) + SENSOR_TR("%s Reg:0x%x write(0x%x, 0x%x) fail\n",SENSOR_NAME_STRING(), regarray[i].reg, regarray[i].val, valchk); + #endif + } + i++; + } + + #if CONFIG_SENSOR_Focus + if (((regarray->reg == SEQUENCE_PROPERTY) && (regarray->val == SEQUENCE_INIT)) + || (regarray == sensor_init_data)) { + sensor->info_priv.affm_reinit = 1; + } + #endif + +sensor_write_array_end: + sensor_task_lock(client,0); + return err; +} +#if CONFIG_SENSOR_I2C_RDWRCHK +static int sensor_readchk_array(struct i2c_client *client, struct reginfo *regarray) +{ + int cnt; + int i = 0; + char valchk; + + cnt = 0; + valchk = 0; + while (regarray[i].reg != 0) + { + sensor_read(client, regarray[i].reg, &valchk); + if (valchk != regarray[i].val) + SENSOR_TR("%s Reg:0x%x read(0x%x, 0x%x) error\n",SENSOR_NAME_STRING(), regarray[i].reg, regarray[i].val, valchk); + + i++; + } + return 0; +} +#endif +#if CONFIG_SENSOR_Focus +struct af_cmdinfo +{ + char cmd_tag; + char cmd_para[4]; + char validate_bit; +}; +static int sensor_af_cmdset(struct i2c_client *client, int cmd_main, struct af_cmdinfo *cmdinfo) +{ + + return 0; +sensor_af_cmdset_err: + return -1; +} + +static int sensor_af_idlechk(struct i2c_client *client) +{ + int ret = 0; + + sensor_write(client,0x070A, 0x00); + sensor_write(client,0x0700, 0x03); + sensor_write(client,0x0701, 0xFF); + sensor_write(client,0x070C, 0x00); + sensor_write(client,0x070C, 0x07); + +sensor_af_idlechk_end: + return ret; +} +static int sensor_af_touch_zone(struct i2c_client *client, int *zone_pos) +{ + int ret = 0; + int xstart,ystart; + + *zone_pos += 1000; + *(zone_pos+1) += 1000; + *(zone_pos+2) += 1000; + *(zone_pos+3) += 1000; + + xstart = ((*zone_pos + *(zone_pos+2))>>1)*800/2000; + ystart = ((*(zone_pos+1) + *(zone_pos+3))>>1)*600/2000; + + if (xstart>0xa0) { + xstart -= 0xa0; + } else { + xstart = 0; + } + + if (ystart>0xa0) { + ystart -= 0xa0; + } else { + ystart = 0; + } + + ret |= sensor_write(client, AF_ZONE0_WEIGHT,0x01); + ret |= sensor_write(client, AF_ZONE1_WEIGHT,0x00); + ret |= sensor_write(client, AF_ZONE2_WEIGHT,0x00); + ret |= sensor_write(client, AF_ZONE3_WEIGHT,0x00); + ret |= sensor_write(client, AF_ZONE4_WEIGHT,0x00); + ret |= sensor_write(client, AF_ZONE5_WEIGHT,0x00); + ret |= sensor_write(client, AF_ZONE6_WEIGHT,0x00); + ret |= sensor_write(client, FACE_LC,0x03); + + ret |= sensor_write(client, FACE_START_XH, ((xstart&0xff00)>>8)); + ret |= sensor_write(client, FACE_START_XL, xstart&0xff); + ret |= sensor_write(client, FACE_START_YH, ((ystart&0xff00)>>8)); + ret |= sensor_write(client, FACE_START_YL, ystart&0xff); + + ret |= sensor_write(client, FACE_SIZE_XH, 0x01); + ret |= sensor_write(client, FACE_SIZE_XL, 0x40); + ret |= sensor_write(client, FACE_SIZE_YH, 0x01); + ret |= sensor_write(client, FACE_SIZE_YL, 0x40); + + SENSOR_DG("%s touch focus zone at (%d,%d)\n",SENSOR_NAME_STRING(), xstart,ystart); + msleep(10); +sensor_af_zone_end: + return ret; +} +static int sensor_af_single(struct i2c_client *client) +{ + int ret = 0; + char state,cnt=0; + struct sensor *sensor = to_sensor(client); + + ret |= sensor_write(client,AF_MODES_REG,0x03); + ret |= sensor_write(client,AF_AUTOCMDS_REG,0x01); + msleep(200); + ret |= sensor_write(client,AF_AUTOCMDS_REG,0x02); + + do { + msleep(20); + sensor_read(client,AF_FINISHCHK_REG,&state); + cnt++; + }while ((state != 1) && (cnt<100)); + + if (state == 1) { + sensor_read(client, AF_LENSPOS_REG_H,&sensor->parameter.af_pos[0]); + sensor_read(client, AF_LENSPOS_REG_L,&sensor->parameter.af_pos[1]); + } + + SENSOR_DG("%s single focus, state: %d cnt: %d\n",SENSOR_NAME_STRING(),state,cnt); +sensor_af_single_end: + return ret; +} + +static int sensor_af_const(struct i2c_client *client) +{ + int ret = 0; + + ret = sensor_write(client, AF_MODES_REG, 0x01); + + SENSOR_DG("%s const focus\n",SENSOR_NAME_STRING()); + return ret; +} + +static int sensor_af_special_pos (struct i2c_client *client) +{ + struct sensor *sensor = to_sensor(client); + + sensor_write(client,0x070A, 0x00); + sensor_write(client,0x0734, sensor->parameter.af_pos[0]& 0xFF); + sensor_write(client,0x0735, sensor->parameter.af_pos[1] & 0xFF); + sensor_write(client,0x070C, 0x00); + mdelay(100); + sensor_write(client,0x070C, 0x05); + return 0; +} + +static int sensor_af_init(struct i2c_client *client) +{ + int ret = 0; + char state,cnt; + +sensor_af_init_end: + SENSOR_DG("%s %s ret:0x%x \n",SENSOR_NAME_STRING(),__FUNCTION__,ret); + return ret; +} + +static int sensor_af_downfirmware(struct i2c_client *client) +{ + struct sensor *sensor = to_sensor(client); + int ret=0; + struct soc_camera_device *icd = client->dev.platform_data; + struct v4l2_mbus_framefmt mf; + + SENSOR_DG("%s %s Enter\n",SENSOR_NAME_STRING(), __FUNCTION__); + + if (sensor_af_init(client)) { + sensor->info_priv.funmodule_state &= (~SENSOR_AF_IS_OK); + ret = -1; + } else { + sensor->info_priv.funmodule_state |= SENSOR_AF_IS_OK; + + mf.width = icd->user_width; + mf.height = icd->user_height; + mf.code = sensor->info_priv.fmt.code; + mf.colorspace = sensor->info_priv.fmt.colorspace; + mf.field = V4L2_FIELD_NONE; + + if (sensor_fmt_videochk(NULL, &mf) == true) { /* ddl@rock-chips.com: focus mode fix const auto focus in video */ + ret = sensor_af_const(client); + } else { + switch (sensor->info_priv.auto_focus) + { + case SENSOR_AF_MODE_AUTO: + { + ret = sensor_af_single(client); + break; + } + case SENSOR_AF_MODE_CLOSE: + { + ret = 0; + break; + } + case SENSOR_AF_MODE_CONTINUOUS: + { + ret = sensor_af_const(client); + break; + } + default: + { + SENSOR_DG("%s focus mode(0x%x) is unkonwn\n",SENSOR_NAME_STRING(),sensor->info_priv.auto_focus); + goto sensor_af_downfirmware_end; + } + } + } + SENSOR_DG("%s sensor_af_downfirmware set focus mode(0x%x) ret:0x%x\n",SENSOR_NAME_STRING(), sensor->info_priv.auto_focus,ret); + } + +sensor_af_downfirmware_end: + + return ret; +} +static void sensor_af_workqueue(struct work_struct *work) +{ + struct sensor_work *sensor_work = container_of(work, struct sensor_work, dwork.work); + struct i2c_client *client = sensor_work->client; + struct sensor *sensor = to_sensor(client); + struct af_cmdinfo cmdinfo; + + SENSOR_DG("%s %s Enter, cmd:0x%x \n",SENSOR_NAME_STRING(), __FUNCTION__,sensor_work->cmd); + + mutex_lock(&sensor->wq_lock); + + switch (sensor_work->cmd) + { + case WqCmd_af_init: + { + if (sensor_af_downfirmware(client) < 0) { + SENSOR_TR("%s Sensor_af_init is failed in sensor_af_workqueue!\n",SENSOR_NAME_STRING()); + } + break; + } + case WqCmd_af_single: + { + sensor_af_touch_zone(client,sensor_work->zone_pos); + + if (sensor_af_single(client) < 0) { + SENSOR_TR("%s Sensor_af_single is failed in sensor_af_workqueue!\n",SENSOR_NAME_STRING()); + sensor_work->result = WqRet_fail; + } else { + sensor_work->result = WqRet_success; + } + break; + } + + case WqCmd_af_special_pos: + { + if (sensor_af_special_pos(client)< 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + #if 0 + case WqCmd_af_near_pos: + { + sensor_af_idlechk(client); + cmdinfo.cmd_tag = StepFocus_Near_Tag; + cmdinfo.validate_bit = 0x80; + if (sensor_af_cmdset(client, StepMode_Cmd, &cmdinfo) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + case WqCmd_af_far_pos: + { + sensor_af_idlechk(client); + cmdinfo.cmd_tag = StepFocus_Far_Tag; + cmdinfo.validate_bit = 0x80; + if (sensor_af_cmdset(client, StepMode_Cmd, &cmdinfo) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + #endif + case WqCmd_af_continues: + { + if (sensor_af_const(client) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + case WqCmd_af_return_idle: + { + if (sensor_af_idlechk(client) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + default: + SENSOR_TR("Unknow command(%d) in %s af workqueue!",sensor_work->cmd,SENSOR_NAME_STRING()); + break; + } +set_end: + if (sensor_work->wait == false) { + kfree((void*)sensor_work); + } else { + wake_up(&sensor_work->done); + } + mutex_unlock(&sensor->wq_lock); + return; +} + +static int sensor_af_workqueue_set(struct soc_camera_device *icd, enum sensor_wq_cmd cmd, int var, bool wait, int *zone_pos) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + struct sensor_work *wk; + int ret=0; + + if (sensor->sensor_wq == NULL) { + ret = -EINVAL; + goto sensor_af_workqueue_set_end; + } + + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) != SENSOR_AF_IS_OK) { + if (cmd != WqCmd_af_init) { + SENSOR_TR("%s %s cmd(%d) ingore,because af module isn't ready!",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + ret = -1; + goto sensor_af_workqueue_set_end; + } + } + + wk = kzalloc(sizeof(struct sensor_work), GFP_KERNEL); + if (wk) { + wk->client = client; + INIT_WORK(&(wk->dwork.work), sensor_af_workqueue); + wk->cmd = cmd; + wk->result = WqRet_inval; + wk->wait = wait; + wk->var = var; + init_waitqueue_head(&wk->done); + + if (zone_pos) { + if (*zone_pos || *(zone_pos+1) || *(zone_pos+2) || *(zone_pos+3)) { + memcpy(wk->zone_pos,zone_pos, sizeof(wk->zone_pos)); + } + } + + queue_delayed_work(sensor->sensor_wq,&(wk->dwork),0); + + /* ddl@rock-chips.com: + * video_lock is been locked in v4l2_ioctl function, but auto focus may slow, + * As a result any other ioctl calls will proceed very, very slowly since each call + * will have to wait for the AF to finish. Camera preview is pause,because VIDIOC_QBUF + * and VIDIOC_DQBUF is sched. so unlock video_lock here. + */ + if (wait == true) { + mutex_unlock(&icd->video_lock); + if (wait_event_timeout(wk->done, (wk->result != WqRet_inval), msecs_to_jiffies(2500)) == 0) { + SENSOR_TR("%s %s cmd(%d) is timeout!",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + } + ret = wk->result; + kfree((void*)wk); + mutex_lock(&icd->video_lock); + } + + } else { + SENSOR_TR("%s %s cmd(%d) ingore,because struct sensor_work malloc failed!",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + ret = -1; + } +sensor_af_workqueue_set_end: + return ret; +} +#endif +static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd cmd, int on) +{ + struct soc_camera_link *icl = to_soc_camera_link(icd); + int ret = 0; + + SENSOR_DG("%s %s cmd(%d) on(%d)\n",SENSOR_NAME_STRING(),__FUNCTION__,cmd,on); + + switch (cmd) + { + #if 1 //derek + case Sensor_PowerDown: + { + if (icl->powerdown) { + ret = icl->powerdown(icd->pdev, on); + //printk("=============================<<<<222RK30_PIN1_PB7's value is %d\n",gpio_get_value(RK30_PIN1_PB7)); + if (ret == RK29_CAM_IO_SUCCESS) { + if (on == 0) { + mdelay(2); + if (icl->reset) + icl->reset(icd->pdev); + + } + } else if (ret == RK29_CAM_EIO_REQUESTFAIL) { + ret = -ENODEV; + goto sensor_power_end; + } + } + break; + } + #endif + case Sensor_Flash: + { + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + + if (sensor->sensor_io_request && sensor->sensor_io_request->sensor_ioctrl) { + sensor->sensor_io_request->sensor_ioctrl(icd->pdev,Cam_Flash, on); + if(on){ + //flash off after 2 secs + hrtimer_cancel(&(flash_off_timer.timer)); + hrtimer_start(&(flash_off_timer.timer),ktime_set(0, 800*1000*1000),HRTIMER_MODE_REL); + } + } + break; + } + default: + { + SENSOR_TR("%s cmd(0x%x) is unknown!",SENSOR_NAME_STRING(),cmd); + break; + } + } + +sensor_power_end: + return ret; +} + +static enum hrtimer_restart flash_off_func(struct hrtimer *timer){ + struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer); + sensor_ioctrl(fps_timer->icd,Sensor_Flash,0); + SENSOR_DG("%s %s !!!!!!",SENSOR_NAME_STRING(),__FUNCTION__); + return 0; + +} + +static int sensor_init(struct v4l2_subdev *sd, u32 val) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct soc_camera_device *icd = client->dev.platform_data; + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl; + const struct sensor_datafmt *fmt; + char value; + int ret,pid = 0; + + SENSOR_DG("\n%s..%s.. \n",SENSOR_NAME_STRING(),__FUNCTION__); +#if 1 //derek + if (sensor_ioctrl(icd, Sensor_PowerDown, 0) < 0) { +//if (sensor_ioctrl(icd, Sensor_PowerDown, 1) < 0) { + ret = -ENODEV; + goto sensor_INIT_ERR; + } +#endif + /* soft reset */ + if (sensor_task_lock(client,1)<0) + goto sensor_INIT_ERR; + /* + ret = sensor_write(client, 0x3008, 0x80); + if (ret != 0) { + SENSOR_TR("%s soft reset sensor failed\n",SENSOR_NAME_STRING()); + ret = -ENODEV; + goto sensor_INIT_ERR; + } +*/ + mdelay(5); //delay 5 microseconds + /* check if it is an sensor sensor */ + + ret = sensor_read(client, 0x0000, &value); + if (ret != 0) { + SENSOR_TR("read chip id high byte failed\n"); + ret = -ENODEV; + goto sensor_INIT_ERR; + } + printk("jzw 5065:value=0x%02x\n",value); + pid |= (value << 8); + + ret = sensor_read(client, 0x0001, &value); + if (ret != 0) { + SENSOR_TR("read chip id low byte failed\n"); + ret = -ENODEV; + goto sensor_INIT_ERR; + } + printk("jzw 506522:value=0x%02x\n",value); + pid |= (value & 0xff); + SENSOR_DG("\n %s pid = 0x%x \n", SENSOR_NAME_STRING(), pid); + + if (pid == SENSOR_ID) { + sensor->model = SENSOR_V4L2_IDENT; + } else { + SENSOR_TR("error: %s mismatched pid = 0x%x\n", SENSOR_NAME_STRING(), pid); + ret = -ENODEV; + goto sensor_INIT_ERR; + } + + // 写两次init_date,尽量避免打开摄像头绿屏的问题,Edit by zhansb@20120524 + SENSOR_DG("write 1 time\n"); + ret = sensor_write_array(client, sensor_init_data); + if (ret != 0) { + SENSOR_TR("error: %s initial failed\n",SENSOR_NAME_STRING()); + goto sensor_INIT_ERR; + } + msleep(200); + ret = sensor_write_array(client, sensor_init_data1); + if (ret != 0) { + SENSOR_TR("error: %s initial1 failed\n",SENSOR_NAME_STRING()); + goto sensor_INIT_ERR; + } + msleep(200); + ret = sensor_write_array(client, sensor_init_data2); + if (ret != 0) { + SENSOR_TR("error: %s initial failed\n",SENSOR_NAME_STRING()); + goto sensor_INIT_ERR; + } + msleep(200); +// sensor_write(client, 0x070a, 0x01); + ret = sensor_read(client, 0x0010, &value); + if (ret != 0) { + ret = -ENODEV; + SENSOR_TR("error: %s initial failed\n",SENSOR_NAME_STRING()); + goto sensor_INIT_ERR; + } + printk("<<<info_priv.winseqe_cur_addr = SENSOR_INIT_WINSEQADR; + fmt = sensor_find_datafmt(SENSOR_INIT_PIXFMT,sensor_colour_fmts, ARRAY_SIZE(sensor_colour_fmts)); + if (!fmt) { + SENSOR_TR("error: %s initial array colour fmts is not support!!",SENSOR_NAME_STRING()); + ret = -EINVAL; + goto sensor_INIT_ERR; + } + sensor->info_priv.fmt = *fmt; + +#if 1 + /* sensor sensor information for initialization */ + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_DO_WHITE_BALANCE); + if (qctrl) + sensor->info_priv.whiteBalance = qctrl->default_value; + + // 解决进摄像头后第一次拍的照片跟后续的拍的照片白平衡相差较大的问题,add by zhansb@120614 +#if CONFIG_SENSOR_WhiteBalance + sensor_set_whiteBalance(icd, qctrl,sensor->info_priv.whiteBalance); +#endif + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_BRIGHTNESS); + if (qctrl) + sensor->info_priv.brightness = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EFFECT); + if (qctrl) + sensor->info_priv.effect = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EXPOSURE); + if (qctrl) + sensor->info_priv.exposure = qctrl->default_value; + + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_SATURATION); + if (qctrl) + sensor->info_priv.saturation = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_CONTRAST); + if (qctrl) + sensor->info_priv.contrast = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_HFLIP); + if (qctrl) + sensor->info_priv.mirror = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_VFLIP); + if (qctrl) + sensor->info_priv.flip = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_SCENE); + if (qctrl) + sensor->info_priv.scene = qctrl->default_value; + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_ZOOM_ABSOLUTE); + if (qctrl) + sensor->info_priv.digitalzoom = qctrl->default_value; + + /* ddl@rock-chips.com : if sensor support auto focus and flash, programer must run focus and flash code */ + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FOCUS_ABSOLUTE); + if (qctrl) + sensor->info_priv.focus = qctrl->default_value; + + #if CONFIG_SENSOR_Flash + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH); + if (qctrl) + sensor->info_priv.flash = qctrl->default_value; + flash_off_timer.icd = icd; + flash_off_timer.timer.function = flash_off_func; + #endif + SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),((val == 0)?__FUNCTION__:"sensor_reinit"),icd->user_width,icd->user_height); + + sensor->info_priv.funmodule_state = SENSOR_INIT_IS_OK; +#endif + return 0; +sensor_INIT_ERR: + sensor->info_priv.funmodule_state &= ~SENSOR_INIT_IS_OK; + sensor_task_lock(client,0); + sensor_deactivate(client); + printk("init error============================================================\n"); + return ret; +} +static int sensor_deactivate(struct i2c_client *client) +{ + struct soc_camera_device *icd = client->dev.platform_data; + struct sensor *sensor = to_sensor(client); + + SENSOR_DG("\n%s..%s.. Enter\n",SENSOR_NAME_STRING(),__FUNCTION__); + + /* ddl@rock-chips.com : all sensor output pin must change to input for other sensor */ + if (sensor->info_priv.funmodule_state & SENSOR_INIT_IS_OK) { + sensor_task_lock(client, 1); + sensor_write(client, 0x3017, 0x00); // FREX,VSYNC,HREF,PCLK,D9-D6 + sensor_write(client, 0x3018, 0x03); // D5-D0 + sensor_write(client,0x3019,0x00); // STROBE,SDA + sensor_task_lock(client, 0); + } + #if 1 //derek + sensor_ioctrl(icd, Sensor_PowerDown, 1); + #endif + + msleep(100); + /* ddl@rock-chips.com : sensor config init width , because next open sensor quickly(soc_camera_open -> Try to configure with default parameters) */ + icd->user_width = SENSOR_INIT_WIDTH; + icd->user_height = SENSOR_INIT_HEIGHT; + sensor->info_priv.funmodule_state &= ~SENSOR_INIT_IS_OK; + return 0; +} + +static struct reginfo sensor_power_down_sequence[]= +{ + {0x00,0x00} +}; + +static int sensor_suspend(struct soc_camera_device *icd, pm_message_t pm_msg) +{ + int ret; + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if (pm_msg.event == PM_EVENT_SUSPEND) { + SENSOR_DG("\n %s Enter Suspend.. \n", SENSOR_NAME_STRING()); + ret = sensor_write_array(client, sensor_power_down_sequence) ; + if (ret != 0) { + SENSOR_TR("\n %s..%s WriteReg Fail.. \n", SENSOR_NAME_STRING(),__FUNCTION__); + return ret; + } else { + #if 0 //derek + ret = sensor_ioctrl(icd, Sensor_PowerDown, 1); + if (ret < 0) { + SENSOR_TR("\n %s suspend fail for turn on power!\n", SENSOR_NAME_STRING()); + return -EINVAL; + } + #endif + } + } else { + SENSOR_TR("\n %s cann't suppout Suspend..\n",SENSOR_NAME_STRING()); + return -EINVAL; + } + + return 0; +} + +static int sensor_resume(struct soc_camera_device *icd) +{ + int ret; +#if 0 //derek + ret = sensor_ioctrl(icd, Sensor_PowerDown, 0); + if (ret < 0) { + SENSOR_TR("\n %s resume fail for turn on power!\n", SENSOR_NAME_STRING()); + return -EINVAL; + } +#endif + SENSOR_DG("\n %s Enter Resume.. \n", SENSOR_NAME_STRING()); + return 0; +} + +static int sensor_set_bus_param(struct soc_camera_device *icd, + unsigned long flags) +{ + + return 0; +} + +static unsigned long sensor_query_bus_param(struct soc_camera_device *icd) +{ + struct soc_camera_link *icl = to_soc_camera_link(icd); + unsigned long flags = SENSOR_BUS_PARAM; + + return soc_camera_apply_sensor_flags(icl, flags); +} + +static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct soc_camera_device *icd = client->dev.platform_data; + struct sensor *sensor = to_sensor(client); + + mf->width = icd->user_width; + mf->height = icd->user_height; + mf->code = sensor->info_priv.fmt.code; + mf->colorspace = sensor->info_priv.fmt.colorspace; + mf->field = V4L2_FIELD_NONE; + + return 0; +} +static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) +{ //capture mode + bool ret = false; + + if ((mf->width == 1024) && (mf->height == 768)) { + ret = true; + } else if ((mf->width == 1280) && (mf->height == 1024)) { + ret = true; + } else if ((mf->width == 1600) && (mf->height == 1200)) { + ret = true; + } else if ((mf->width == 2048) && (mf->height == 1536)) { + ret = true; + } else if ((mf->width == 2592) && (mf->height == 1944)) { + ret = true; + } + + if (ret == true) + SENSOR_DG("%s %dx%d is capture format\n", __FUNCTION__, mf->width, mf->height); + return ret; +} + +static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) +{ // video mode + bool ret = false; + + if ((mf->width == 1280) && (mf->height == 720)) { + ret = true; + } else if ((mf->width == 1920) && (mf->height == 1080)) { + ret = true; + } + + if (ret == true) + SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height); + return ret; +} +static int sensor_s_fmt(struct v4l2_subdev *sd,struct v4l2_mbus_framefmt *mf) +{ + char value,af_status=0,af_pos_h=0,af_pos_l=0; + struct i2c_client *client = v4l2_get_subdevdata(sd); + const struct sensor_datafmt *fmt; + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl; + struct soc_camera_device *icd = client->dev.platform_data; + struct reginfo *winseqe_set_addr=NULL; + int ret = 0, set_w,set_h; + int i=0; + + + fmt = sensor_find_datafmt(mf->code, sensor_colour_fmts, + ARRAY_SIZE(sensor_colour_fmts)); + if (!fmt) { + ret = -EINVAL; + goto sensor_s_fmt_end; + } + + if (sensor->info_priv.fmt.code != mf->code) { + switch (mf->code) + { + case V4L2_MBUS_FMT_YUYV8_2X8: + { + winseqe_set_addr = sensor_ClrFmt_YUYV; + break; + } + case V4L2_MBUS_FMT_UYVY8_2X8: + { + winseqe_set_addr = sensor_ClrFmt_UYVY; + break; + } + default: + break; + } + if (winseqe_set_addr != NULL) { + sensor_write_array(client, winseqe_set_addr); + sensor->info_priv.fmt.code = mf->code; + sensor->info_priv.fmt.colorspace= mf->colorspace; + SENSOR_DG("%s v4l2_mbus_code:%d set success!\n", SENSOR_NAME_STRING(),mf->code); + } else { + SENSOR_TR("%s v4l2_mbus_code:%d is invalidate!\n", SENSOR_NAME_STRING(),mf->code); + } + } + + set_w = mf->width; + set_h = mf->height; + + if (((set_w <= 176) && (set_h <= 144)) && (sensor_qcif[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_qcif; + set_w = 176; + set_h = 144; + } + else if (((set_w <= 320) && (set_h <= 240)) && (sensor_qvga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_qvga; + set_w = 320; + set_h = 240; + } + else if (((set_w <= 352) && (set_h<= 288)) && (sensor_cif[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_cif; + set_w = 352; + set_h = 288; + } + else if (((set_w <= 640) && (set_h <= 480)) && (sensor_vga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_vga; + set_w = 640; + set_h = 480; + } + else if (((set_w <= 800) && (set_h <= 600)) && (sensor_svga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_svga; + set_w = 800; + set_h = 600; + } + else if (((set_w <= 1024) && (set_h <= 768)) && (sensor_xga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_xga; + set_w = 1024; + set_h = 768; + } + else if (((set_w <= 1280) && (set_h <= 720)) && (sensor_720p[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_720p; + set_w = 1280; + set_h = 720; + } + else if (((set_w <= 1280) && (set_h <= 1024)) && (sensor_sxga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_sxga; + set_w = 1280; + set_h = 1024; + } + else if (((set_w <= 1600) && (set_h <= 1200)) && (sensor_uxga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_uxga; + set_w = 1600; + set_h = 1200; + } + else if (((set_w <= 1920) && (set_h <= 1080)) && (sensor_1080p[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_1080p; + set_w = 1920; + set_h = 1080; + } + else if (((set_w <= 2048) && (set_h <= 1536)) && (sensor_qxga[0].reg!=SEQUENCE_END)) + { + winseqe_set_addr = sensor_qxga; + set_w = 2048; + set_h = 1536; + } + else if (((set_w <= 2592) && (set_h <= 1944)) && (sensor_qsxga[0].reg!=SEQUENCE_END)) + { + + winseqe_set_addr = sensor_qsxga; + set_w = 2592; + set_h = 1944; + } + else + { + winseqe_set_addr = SENSOR_INIT_WINSEQADR; /* ddl@rock-chips.com : Sensor output smallest size if isn't support app */ + set_w = SENSOR_INIT_WIDTH; + set_h = SENSOR_INIT_HEIGHT; + SENSOR_TR("\n %s..%s Format is Invalidate. pix->width = %d.. pix->height = %d\n",SENSOR_NAME_STRING(),__FUNCTION__,mf->width,mf->height); + } + + if (winseqe_set_addr != sensor->info_priv.winseqe_cur_addr) + { + if (sensor_fmt_capturechk(sd,mf) == true) { /* ddl@rock-chips.com : Capture */ + + #if CONFIG_SENSOR_Flash + if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) { + sensor_ioctrl(icd, Sensor_Flash, Flash_On); + printk("%s flash on in capture!\n", SENSOR_NAME_STRING()); + } + #endif + }else { /* ddl@rock-chips.com : Video */ + #if CONFIG_SENSOR_Flash + if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) { + sensor_ioctrl(icd, Sensor_Flash, Flash_Off); + printk("%s flash off in preivew!\n", SENSOR_NAME_STRING()); + } + #endif + } + if ((sensor->info_priv.winseqe_cur_addr->reg == SEQUENCE_PROPERTY) && (sensor->info_priv.winseqe_cur_addr->val == SEQUENCE_INIT)) { + if (((winseqe_set_addr->reg == SEQUENCE_PROPERTY) && (winseqe_set_addr->val == SEQUENCE_NORMAL)) + || (winseqe_set_addr->reg != SEQUENCE_PROPERTY)) { + ret |= sensor_write_array(client,sensor_init_data); + SENSOR_DG("\n%s reinit ret:0x%x \n",SENSOR_NAME_STRING(), ret); + } + } + + ret |= sensor_write_array(client, winseqe_set_addr); + if (ret != 0) { + SENSOR_TR("%s set format capability failed\n", SENSOR_NAME_STRING()); + #if CONFIG_SENSOR_Flash + if (sensor_fmt_capturechk(sd,mf) == true) { + if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) { + sensor_ioctrl(icd, Sensor_Flash, Flash_Off); + SENSOR_TR("%s Capture format set fail, flash off !\n", SENSOR_NAME_STRING()); + } + } + #endif + goto sensor_s_fmt_end; + } + sensor->info_priv.winseqe_cur_addr = winseqe_set_addr; + if (sensor_fmt_capturechk(sd,mf) == true) { /* ddl@rock-chips.com : Capture */ + #if CONFIG_SENSOR_Focus + if (sensor->info_priv.auto_focus == SENSOR_AF_MODE_AUTO) + sensor_af_workqueue_set(icd,WqCmd_af_special_pos,0,true,NULL); + #endif + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EFFECT); + sensor_set_effect(icd, qctrl,sensor->info_priv.effect); + if (sensor->info_priv.whiteBalance != 0) { + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_DO_WHITE_BALANCE); + sensor_set_whiteBalance(icd, qctrl,sensor->info_priv.whiteBalance); + } + sensor->info_priv.snap2preview = true; + } else if (sensor_fmt_videochk(sd,mf) == true) { /* ddl@rock-chips.com : Video */ + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EFFECT); + sensor_set_effect(icd, qctrl,sensor->info_priv.effect); + + sensor->info_priv.video2preview = true; + + } else if ((sensor->info_priv.snap2preview == true) || (sensor->info_priv.video2preview == true)) { + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EFFECT); + sensor_set_effect(icd, qctrl,sensor->info_priv.effect); + + if (sensor->info_priv.snap2preview == true) { + qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_DO_WHITE_BALANCE); + sensor_set_whiteBalance(icd, qctrl,sensor->info_priv.whiteBalance); + } + #if CONFIG_SENSOR_Focus + if (sensor->info_priv.auto_focus == SENSOR_AF_MODE_AUTO) { + sensor_af_workqueue_set(icd,WqCmd_af_return_idle,0,false,NULL); + } + #else + msleep(500); + #endif + sensor->info_priv.video2preview = false; + sensor->info_priv.snap2preview = false; + } + SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),__FUNCTION__,set_w,set_h); + } + else + { // preview size @ video preview + SENSOR_DG("\n %s .. Current Format is validate. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),set_w,set_h); + } + + mf->width = set_w; + mf->height = set_h; +sensor_s_fmt_end: + return ret; +} + +static int sensor_try_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct sensor *sensor = to_sensor(client); + const struct sensor_datafmt *fmt; + int ret = 0,set_w,set_h; + + fmt = sensor_find_datafmt(mf->code, sensor_colour_fmts, + ARRAY_SIZE(sensor_colour_fmts)); + if (fmt == NULL) { + fmt = &sensor->info_priv.fmt; + mf->code = fmt->code; + } + + if (mf->height > SENSOR_MAX_HEIGHT) + mf->height = SENSOR_MAX_HEIGHT; + else if (mf->height < SENSOR_MIN_HEIGHT) + mf->height = SENSOR_MIN_HEIGHT; + + if (mf->width > SENSOR_MAX_WIDTH) + mf->width = SENSOR_MAX_WIDTH; + else if (mf->width < SENSOR_MIN_WIDTH) + mf->width = SENSOR_MIN_WIDTH; + + set_w = mf->width; + set_h = mf->height; + + if (((set_w <= 176) && (set_h <= 144)) && (sensor_qcif[0].reg!=SEQUENCE_END)) + { + set_w = 176; + set_h = 144; + } + else if (((set_w <= 320) && (set_h <= 240)) && (sensor_qvga[0].reg!=SEQUENCE_END)) + { + set_w = 320; + set_h = 240; + } + else if (((set_w <= 352) && (set_h<= 288)) && (sensor_cif[0].reg!=SEQUENCE_END)) + { + set_w = 352; + set_h = 288; + } + else if (((set_w <= 640) && (set_h <= 480)) && (sensor_vga[0].reg!=SEQUENCE_END)) + { + set_w = 640; + set_h = 480; + } + else if (((set_w <= 800) && (set_h <= 600)) && (sensor_svga[0].reg!=SEQUENCE_END)) + { + set_w = 800; + set_h = 600; + } + else if (((set_w <= 1024) && (set_h <= 768)) && (sensor_xga[0].reg!=SEQUENCE_END)) + { + set_w = 1024; + set_h = 768; + } + else if (((set_w <= 1280) && (set_h <= 720)) && (sensor_720p[0].reg!=SEQUENCE_END)) + { + set_w = 1280; + set_h = 720; + } + else if (((set_w <= 1280) && (set_h <= 1024)) && (sensor_sxga[0].reg!=SEQUENCE_END)) + { + set_w = 1280; + set_h = 1024; + } + else if (((set_w <= 1600) && (set_h <= 1200)) && (sensor_uxga[0].reg!=SEQUENCE_END)) + { + set_w = 1600; + set_h = 1200; + } + else if (((set_w <= 1920) && (set_h <= 1080)) && (sensor_1080p[0].reg!=SEQUENCE_END)) + { + set_w = 1920; + set_h = 1080; + } + else if (((set_w <= 2048) && (set_h <= 1536)) && (sensor_qxga[0].reg!=SEQUENCE_END)) + { + set_w = 2048; + set_h = 1536; + } + else if (((set_w <= 2592) && (set_h <= 1944)) && (sensor_qsxga[0].reg!=SEQUENCE_END)) + { + set_w = 2592; + set_h = 1944; + } + else + { + set_w = SENSOR_INIT_WIDTH; + set_h = SENSOR_INIT_HEIGHT; + } + + mf->width = set_w; + mf->height = set_h; + + mf->colorspace = fmt->colorspace; + + return ret; +} + + static int sensor_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *id) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + + if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR) + return -EINVAL; + + if (id->match.addr != client->addr) + return -ENODEV; + + id->ident = SENSOR_V4L2_IDENT; /* ddl@rock-chips.com : Return OV2655 identifier */ + id->revision = 0; + + return 0; +} +#if CONFIG_SENSOR_Brightness +static int sensor_set_brightness(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_BrightnessSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_BrightnessSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Effect +static int sensor_set_effect(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_EffectSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_EffectSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n%s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Exposure +static int sensor_set_exposure(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_ExposureSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_ExposureSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Saturation +static int sensor_set_saturation(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_SaturationSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_SaturationSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Contrast +static int sensor_set_contrast(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_ContrastSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_ContrastSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Mirror +static int sensor_set_mirror(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_MirrorSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_MirrorSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Flip +static int sensor_set_flip(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_FlipSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_FlipSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Scene +static int sensor_set_scene(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_SceneSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_SceneSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_WhiteBalance +static int sensor_set_whiteBalance(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) + { + if (sensor_WhiteBalanceSeqe[value - qctrl->minimum] != NULL) + { + if (sensor_write_array(client, sensor_WhiteBalanceSeqe[value - qctrl->minimum]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + } + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_DigitalZoom +static int sensor_set_digitalzoom(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int *value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl_info; + int digitalzoom_cur, digitalzoom_total; + + qctrl_info = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_ZOOM_ABSOLUTE); + if (qctrl_info) + return -EINVAL; + + digitalzoom_cur = sensor->info_priv.digitalzoom; + digitalzoom_total = qctrl_info->maximum; + + if ((*value > 0) && (digitalzoom_cur >= digitalzoom_total)) + { + SENSOR_TR("%s digitalzoom is maximum - %x\n", SENSOR_NAME_STRING(), digitalzoom_cur); + return -EINVAL; + } + + if ((*value < 0) && (digitalzoom_cur <= qctrl_info->minimum)) + { + SENSOR_TR("%s digitalzoom is minimum - %x\n", SENSOR_NAME_STRING(), digitalzoom_cur); + return -EINVAL; + } + + if ((*value > 0) && ((digitalzoom_cur + *value) > digitalzoom_total)) + { + *value = digitalzoom_total - digitalzoom_cur; + } + + if ((*value < 0) && ((digitalzoom_cur + *value) < 0)) + { + *value = 0 - digitalzoom_cur; + } + + digitalzoom_cur += *value; + + if (sensor_ZoomSeqe[digitalzoom_cur] != NULL) + { + if (sensor_write_array(client, sensor_ZoomSeqe[digitalzoom_cur]) != 0) + { + SENSOR_TR("%s..%s WriteReg Fail.. \n",SENSOR_NAME_STRING(), __FUNCTION__); + return -EINVAL; + } + SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, *value); + return 0; + } + + return -EINVAL; +} +#endif +#if CONFIG_SENSOR_Focus +static int sensor_set_focus_absolute(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl_info; + int ret = 0; + + qctrl_info = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FOCUS_ABSOLUTE); + if (!qctrl_info) + return -EINVAL; + + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) && (sensor->info_priv.affm_reinit == 0)) { + if ((value >= qctrl_info->minimum) && (value <= qctrl_info->maximum)) { + ret = sensor_af_workqueue_set(icd, WqCmd_af_special_pos, value, true,NULL); + SENSOR_DG("%s..%s : %d ret:0x%x\n",SENSOR_NAME_STRING(),__FUNCTION__, value,ret); + } else { + ret = -EINVAL; + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + } + } else { + ret = -EACCES; + SENSOR_TR("\n %s..%s AF module state(0x%x, 0x%x) is error!\n",SENSOR_NAME_STRING(),__FUNCTION__, + sensor->info_priv.funmodule_state,sensor->info_priv.affm_reinit); + } + + return ret; +} +static int sensor_set_focus_relative(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl_info; + int ret = 0; + + qctrl_info = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FOCUS_RELATIVE); + if (!qctrl_info) + return -EINVAL; + + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) && (sensor->info_priv.affm_reinit == 0)) { + if ((value >= qctrl_info->minimum) && (value <= qctrl_info->maximum)) { + if (value > 0) { + ret = sensor_af_workqueue_set(icd, WqCmd_af_near_pos, 0, true,NULL); + } else { + ret = sensor_af_workqueue_set(icd, WqCmd_af_far_pos, 0, true,NULL); + } + SENSOR_DG("%s..%s : %d ret:0x%x\n",SENSOR_NAME_STRING(),__FUNCTION__, value,ret); + } else { + ret = -EINVAL; + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + } + } else { + ret = -EACCES; + SENSOR_TR("\n %s..%s AF module state(0x%x, 0x%x) is error!\n",SENSOR_NAME_STRING(),__FUNCTION__, + sensor->info_priv.funmodule_state,sensor->info_priv.affm_reinit); + } + return ret; +} + +static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value, int *zone_pos) +{ + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + int ret = 0; + + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) && (sensor->info_priv.affm_reinit == 0)) { + switch (value) + { + case SENSOR_AF_MODE_AUTO: + { + ret = sensor_af_workqueue_set(icd, WqCmd_af_single, 0, true, zone_pos); + break; + } + + /*case SENSOR_AF_MODE_MACRO: + { + ret = sensor_set_focus_absolute(icd, qctrl, 0xff); + break; + } + + case SENSOR_AF_MODE_INFINITY: + { + ret = sensor_set_focus_absolute(icd, qctrl, 0x00); + break; + } + */ + case SENSOR_AF_MODE_CONTINUOUS: + { + ret = sensor_af_workqueue_set(icd, WqCmd_af_continues, 0, true,NULL); + break; + } + default: + SENSOR_TR("\n %s..%s AF value(0x%x) is error!\n",SENSOR_NAME_STRING(),__FUNCTION__,value); + break; + + } + + SENSOR_DG("%s..%s : %d ret:0x%x\n",SENSOR_NAME_STRING(),__FUNCTION__, value,ret); + } else { + ret = -EACCES; + SENSOR_TR("\n %s..%s AF module state(0x%x, 0x%x) is error!\n",SENSOR_NAME_STRING(),__FUNCTION__, + sensor->info_priv.funmodule_state,sensor->info_priv.affm_reinit); + } + + return ret; +} +#endif +#if CONFIG_SENSOR_Flash +static int sensor_set_flash(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +{ + if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) { + if (value == 3) { /* ddl@rock-chips.com: torch */ + sensor_ioctrl(icd, Sensor_Flash, Flash_Torch); /* Flash On */ + } else { + sensor_ioctrl(icd, Sensor_Flash, Flash_Off); + } + SENSOR_DG("%s..%s : %d\n",SENSOR_NAME_STRING(),__FUNCTION__, value); + return 0; + } + + SENSOR_TR("\n %s..%s valure = %d is invalidate.. \n",SENSOR_NAME_STRING(),__FUNCTION__,value); + return -EINVAL; +} +#endif +static int sensor_g_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct sensor *sensor = to_sensor(client); + const struct v4l2_queryctrl *qctrl; + + qctrl = soc_camera_find_qctrl(&sensor_ops, ctrl->id); + + if (!qctrl) + { + SENSOR_TR("\n %s ioctrl id = 0x%x is invalidate \n", SENSOR_NAME_STRING(), ctrl->id); + return -EINVAL; + } + + switch (ctrl->id) + { + case V4L2_CID_BRIGHTNESS: + { + ctrl->value = sensor->info_priv.brightness; + break; + } + case V4L2_CID_SATURATION: + { + ctrl->value = sensor->info_priv.saturation; + break; + } + case V4L2_CID_CONTRAST: + { + ctrl->value = sensor->info_priv.contrast; + break; + } + case V4L2_CID_DO_WHITE_BALANCE: + { + ctrl->value = sensor->info_priv.whiteBalance; + break; + } + case V4L2_CID_EXPOSURE: + { + ctrl->value = sensor->info_priv.exposure; + break; + } + case V4L2_CID_HFLIP: + { + ctrl->value = sensor->info_priv.mirror; + break; + } + case V4L2_CID_VFLIP: + { + ctrl->value = sensor->info_priv.flip; + break; + } + default : + break; + } + return 0; +} + + + +static int sensor_s_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct sensor *sensor = to_sensor(client); + struct soc_camera_device *icd = client->dev.platform_data; + const struct v4l2_queryctrl *qctrl; + + + qctrl = soc_camera_find_qctrl(&sensor_ops, ctrl->id); + + if (!qctrl) + { + SENSOR_TR("\n %s ioctrl id = 0x%x is invalidate \n", SENSOR_NAME_STRING(), ctrl->id); + return -EINVAL; + } + + switch (ctrl->id) + { +#if CONFIG_SENSOR_Brightness + case V4L2_CID_BRIGHTNESS: + { + if (ctrl->value != sensor->info_priv.brightness) + { + if (sensor_set_brightness(icd, qctrl,ctrl->value) != 0) + { + return -EINVAL; + } + sensor->info_priv.brightness = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Exposure + case V4L2_CID_EXPOSURE: + { + if (ctrl->value != sensor->info_priv.exposure) + { + if (sensor_set_exposure(icd, qctrl,ctrl->value) != 0) + { + return -EINVAL; + } + sensor->info_priv.exposure = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Saturation + case V4L2_CID_SATURATION: + { + if (ctrl->value != sensor->info_priv.saturation) + { + if (sensor_set_saturation(icd, qctrl,ctrl->value) != 0) + { + return -EINVAL; + } + sensor->info_priv.saturation = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Contrast + case V4L2_CID_CONTRAST: + { + if (ctrl->value != sensor->info_priv.contrast) + { + if (sensor_set_contrast(icd, qctrl,ctrl->value) != 0) + { + return -EINVAL; + } + sensor->info_priv.contrast = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_WhiteBalance + case V4L2_CID_DO_WHITE_BALANCE: + { + if (ctrl->value != sensor->info_priv.whiteBalance) + { + if (sensor_set_whiteBalance(icd, qctrl,ctrl->value) != 0) + { + return -EINVAL; + } + sensor->info_priv.whiteBalance = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Mirror + case V4L2_CID_HFLIP: + { + if (ctrl->value != sensor->info_priv.mirror) + { + if (sensor_set_mirror(icd, qctrl,ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.mirror = ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Flip + case V4L2_CID_VFLIP: + { + if (ctrl->value != sensor->info_priv.flip) + { + if (sensor_set_flip(icd, qctrl,ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.flip = ctrl->value; + } + break; + } +#endif + default: + break; + } + + return 0; +} +static int sensor_g_ext_control(struct soc_camera_device *icd , struct v4l2_ext_control *ext_ctrl) +{ + const struct v4l2_queryctrl *qctrl; + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + + qctrl = soc_camera_find_qctrl(&sensor_ops, ext_ctrl->id); + + if (!qctrl) + { + SENSOR_TR("\n %s ioctrl id = 0x%x is invalidate \n", SENSOR_NAME_STRING(), ext_ctrl->id); + return -EINVAL; + } + + switch (ext_ctrl->id) + { + case V4L2_CID_SCENE: + { + ext_ctrl->value = sensor->info_priv.scene; + break; + } + case V4L2_CID_EFFECT: + { + ext_ctrl->value = sensor->info_priv.effect; + break; + } + case V4L2_CID_ZOOM_ABSOLUTE: + { + ext_ctrl->value = sensor->info_priv.digitalzoom; + break; + } + case V4L2_CID_ZOOM_RELATIVE: + { + return -EINVAL; + } + case V4L2_CID_FOCUS_ABSOLUTE: + { + return -EINVAL; + } + case V4L2_CID_FOCUS_RELATIVE: + { + return -EINVAL; + } + case V4L2_CID_FLASH: + { + ext_ctrl->value = sensor->info_priv.flash; + break; + } + default : + break; + } + return 0; +} +static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_control *ext_ctrl) +{ + const struct v4l2_queryctrl *qctrl; + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + int val_offset,ret; + + qctrl = soc_camera_find_qctrl(&sensor_ops, ext_ctrl->id); + + if (!qctrl) + { + SENSOR_TR("\n %s ioctrl id = 0x%x is invalidate \n", SENSOR_NAME_STRING(), ext_ctrl->id); + return -EINVAL; + } + + val_offset = 0; + switch (ext_ctrl->id) + { +#if CONFIG_SENSOR_Scene + case V4L2_CID_SCENE: + { + if (ext_ctrl->value != sensor->info_priv.scene) + { + if (sensor_set_scene(icd, qctrl,ext_ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.scene = ext_ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_Effect + case V4L2_CID_EFFECT: + { + if (ext_ctrl->value != sensor->info_priv.effect) + { + if (sensor_set_effect(icd, qctrl,ext_ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.effect= ext_ctrl->value; + } + break; + } +#endif +#if CONFIG_SENSOR_DigitalZoom + case V4L2_CID_ZOOM_ABSOLUTE: + { + if ((ext_ctrl->value < qctrl->minimum) || (ext_ctrl->value > qctrl->maximum)) + return -EINVAL; + + if (ext_ctrl->value != sensor->info_priv.digitalzoom) + { + val_offset = ext_ctrl->value -sensor->info_priv.digitalzoom; + + if (sensor_set_digitalzoom(icd, qctrl,&val_offset) != 0) + return -EINVAL; + sensor->info_priv.digitalzoom += val_offset; + + SENSOR_DG("%s digitalzoom is %x\n",SENSOR_NAME_STRING(), sensor->info_priv.digitalzoom); + } + + break; + } + case V4L2_CID_ZOOM_RELATIVE: + { + if (ext_ctrl->value) + { + if (sensor_set_digitalzoom(icd, qctrl,&ext_ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.digitalzoom += ext_ctrl->value; + + SENSOR_DG("%s digitalzoom is %x\n", SENSOR_NAME_STRING(), sensor->info_priv.digitalzoom); + } + break; + } +#endif +#if CONFIG_SENSOR_Focus + case V4L2_CID_FOCUS_ABSOLUTE: + { + if ((ext_ctrl->value < qctrl->minimum) || (ext_ctrl->value > qctrl->maximum)) + return -EINVAL; + + break; + } + case V4L2_CID_FOCUS_RELATIVE: + { + if ((ext_ctrl->value < qctrl->minimum) || (ext_ctrl->value > qctrl->maximum)) + return -EINVAL; + + sensor_set_focus_relative(icd, qctrl,ext_ctrl->value); + break; + } + case V4L2_CID_FOCUS_AUTO: + { + printk("AF: %d\n",ext_ctrl->value); + if (ext_ctrl->value) { + if ((ext_ctrl->value==1) || (SENSOR_AF_MODE_AUTO == sensor->info_priv.auto_focus)) { + if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_AUTO,ext_ctrl->rect) != 0) { + if(0 == (sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)) { + sensor->info_priv.auto_focus = SENSOR_AF_MODE_AUTO; + } + return -EINVAL; + } + } + if (ext_ctrl->value == 1) + sensor->info_priv.auto_focus = SENSOR_AF_MODE_AUTO; + } else if (SENSOR_AF_MODE_AUTO == sensor->info_priv.auto_focus){ + if (ext_ctrl->value == 0) + sensor->info_priv.auto_focus = SENSOR_AF_MODE_CLOSE; + } + break; + } + case V4L2_CID_FOCUS_CONTINUOUS: + { + if (SENSOR_AF_MODE_CONTINUOUS != sensor->info_priv.auto_focus) { + if (ext_ctrl->value == 1) { + if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_CONTINUOUS,NULL) != 0) { + if(0 == (sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)) { + sensor->info_priv.auto_focus = SENSOR_AF_MODE_CONTINUOUS; + } + return -EINVAL; + } + sensor->info_priv.auto_focus = SENSOR_AF_MODE_CONTINUOUS; + } + } else { + if (ext_ctrl->value == 0) + sensor->info_priv.auto_focus = SENSOR_AF_MODE_CLOSE; + } + break; + } +#endif +#if CONFIG_SENSOR_Flash + case V4L2_CID_FLASH: + { + if (sensor_set_flash(icd, qctrl,ext_ctrl->value) != 0) + return -EINVAL; + sensor->info_priv.flash = ext_ctrl->value; + + SENSOR_DG("%s flash is %x\n",SENSOR_NAME_STRING(), sensor->info_priv.flash); + break; + } +#endif + default: + break; + } + + return 0; +} + +static int sensor_g_ext_controls(struct v4l2_subdev *sd, struct v4l2_ext_controls *ext_ctrl) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct soc_camera_device *icd = client->dev.platform_data; + int i, error_cnt=0, error_idx=-1; + + + for (i=0; icount; i++) { + if (sensor_g_ext_control(icd, &ext_ctrl->controls[i]) != 0) { + error_cnt++; + error_idx = i; + } + } + + if (error_cnt > 1) + error_idx = ext_ctrl->count; + + if (error_idx != -1) { + ext_ctrl->error_idx = error_idx; + return -EINVAL; + } else { + return 0; + } +} + +static int sensor_s_ext_controls(struct v4l2_subdev *sd, struct v4l2_ext_controls *ext_ctrl) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct soc_camera_device *icd = client->dev.platform_data; + int i, error_cnt=0, error_idx=-1; + + for (i=0; icount; i++) { + if (sensor_s_ext_control(icd, &ext_ctrl->controls[i]) != 0) { + error_cnt++; + error_idx = i; + } + } + + if (error_cnt > 1) + error_idx = ext_ctrl->count; + + if (error_idx != -1) { + ext_ctrl->error_idx = error_idx; + return -EINVAL; + } else { + return 0; + } +} + +static int sensor_s_stream(struct v4l2_subdev *sd, int enable) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct sensor *sensor = to_sensor(client); + #if CONFIG_SENSOR_Focus + struct soc_camera_device *icd = client->dev.platform_data; + struct v4l2_mbus_framefmt mf; + #endif + + if (enable == 1) { + sensor->info_priv.enable = 1; + #if CONFIG_SENSOR_Focus + mf.width = icd->user_width; + mf.height = icd->user_height; + mf.code = sensor->info_priv.fmt.code; + mf.colorspace = sensor->info_priv.fmt.colorspace; + mf.field = V4L2_FIELD_NONE; + /* If auto focus firmware haven't download success, must download firmware again when in video or preview stream on */ + if (sensor_fmt_capturechk(sd, &mf) == false) { + if ((sensor->info_priv.affm_reinit == 1) || ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)==0)) { + sensor_af_workqueue_set(icd, WqCmd_af_init, 0, false,NULL); + sensor->info_priv.affm_reinit = 0; + } + } + #endif + } else if (enable == 0) { + sensor->info_priv.enable = 0; + #if CONFIG_SENSOR_Focus + flush_workqueue(sensor->sensor_wq); + #endif + } + return 0; +} + +/* Interface active, can use i2c. If it fails, it can indeed mean, that + * this wasn't our capture interface, so, we wait for the right one */ +static int sensor_video_probe(struct soc_camera_device *icd, + struct i2c_client *client) +{ + char value; + int ret,pid = 0; + struct sensor *sensor = to_sensor(client); + + /* We must have a parent by now. And it cannot be a wrong one. + * So this entire test is completely redundant. */ + if (!icd->dev.parent || + to_soc_camera_host(icd->dev.parent)->nr != icd->iface) + return -ENODEV; +#if 1 //derek + if (sensor_ioctrl(icd, Sensor_PowerDown, 0) < 0) { + ret = -ENODEV; + goto sensor_video_probe_err; + } +#endif + /* soft reset */ + /* + ret = sensor_write(client, 0x3008, 0x80); + if (ret != 0) { + SENSOR_TR("soft reset %s failed\n",SENSOR_NAME_STRING()); + ret = -ENODEV; + goto sensor_video_probe_err; + } + mdelay(5); //delay 5 microseconds +*/ + printk("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + mdelay(5000); //jzw modify + + + /* check if it is an sensor sensor */ + ret = sensor_read(client, 0x0000, &value); + if (ret != 0) { + SENSOR_TR("read chip id high byte failed\n"); + ret = -ENODEV; + goto sensor_video_probe_err; + } + printk("jzw:%s:0x%02x\n",__FUNCTION__,value); + pid |= (value << 8); + + ret = sensor_read(client, 0x0001, &value); + if (ret != 0) { + SENSOR_TR("read chip id low byte failed\n"); + ret = -ENODEV; + goto sensor_video_probe_err; + } + printk("jzw:%s:0x%02x\n",__FUNCTION__,value); + pid |= (value & 0xff); + SENSOR_DG("\n %s pid = 0x%x\n", SENSOR_NAME_STRING(), pid); + if (pid == SENSOR_ID) { + sensor->model = SENSOR_V4L2_IDENT; + } else { + SENSOR_TR("error: %s mismatched pid = 0x%x\n", SENSOR_NAME_STRING(), pid); + ret = -ENODEV; + goto sensor_video_probe_err; + } + + return 0; + +sensor_video_probe_err: + return ret; +} +static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct soc_camera_device *icd = client->dev.platform_data; + struct sensor *sensor = to_sensor(client); + int ret = 0,i; + + SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + switch (cmd) + { + case RK29_CAM_SUBDEV_DEACTIVATE: + { + sensor_deactivate(client); + break; + } + case RK29_CAM_SUBDEV_IOREQUEST: + { + sensor->sensor_io_request = (struct rk29camera_platform_data*)arg; + if (sensor->sensor_io_request != NULL) { + sensor->sensor_gpio_res = NULL; + for (i=0; isensor_io_request->gpio_res[i].dev_name && + (strcmp(sensor->sensor_io_request->gpio_res[i].dev_name, dev_name(icd->pdev)) == 0)) { + sensor->sensor_gpio_res = (struct rk29camera_gpio_res*)&sensor->sensor_io_request->gpio_res[i]; + } + } + if (sensor->sensor_gpio_res == NULL) { + SENSOR_TR("%s %s obtain gpio resource failed when RK29_CAM_SUBDEV_IOREQUEST \n",SENSOR_NAME_STRING(),__FUNCTION__); + ret = -EINVAL; + goto sensor_ioctl_end; + } + } else { + SENSOR_TR("%s %s RK29_CAM_SUBDEV_IOREQUEST fail\n",SENSOR_NAME_STRING(),__FUNCTION__); + ret = -EINVAL; + goto sensor_ioctl_end; + } + /* ddl@rock-chips.com : if gpio_flash havn't been set in board-xxx.c, sensor driver must notify is not support flash control + for this project */ + #if CONFIG_SENSOR_Flash + if (sensor->sensor_gpio_res) { + printk("flash io:%d\n",sensor->sensor_gpio_res->gpio_flash); + if (sensor->sensor_gpio_res->gpio_flash == INVALID_GPIO) { + for (i = 0; i < icd->ops->num_controls; i++) { + if (V4L2_CID_FLASH == icd->ops->controls[i].id) { + //memset((char*)&icd->ops->controls[i],0x00,sizeof(struct v4l2_queryctrl)); + sensor_controls[i].id=0xffff; + } + } + sensor->info_priv.flash = 0xff; + SENSOR_DG("%s flash gpio is invalidate!\n",SENSOR_NAME_STRING()); + }else{ //two cameras are the same,need to deal diffrently ,zyc + for (i = 0; i < icd->ops->num_controls; i++) { + if(0xffff == icd->ops->controls[i].id){ + sensor_controls[i].id=V4L2_CID_FLASH; + } + } + } + } + #endif + break; + } + default: + { + SENSOR_TR("%s %s cmd(0x%x) is unknown !\n",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + break; + } + } + +sensor_ioctl_end: + return ret; + +} +static int sensor_enum_fmt(struct v4l2_subdev *sd, unsigned int index, + enum v4l2_mbus_pixelcode *code) +{ + if (index >= ARRAY_SIZE(sensor_colour_fmts)) + return -EINVAL; + + *code = sensor_colour_fmts[index].code; + return 0; +} +static struct v4l2_subdev_core_ops sensor_subdev_core_ops = { + .init = sensor_init, + .g_ctrl = sensor_g_control, + .s_ctrl = sensor_s_control, + .g_ext_ctrls = sensor_g_ext_controls, + .s_ext_ctrls = sensor_s_ext_controls, + .g_chip_ident = sensor_g_chip_ident, + .ioctl = sensor_ioctl, +}; + +static struct v4l2_subdev_video_ops sensor_subdev_video_ops = { + .s_mbus_fmt = sensor_s_fmt, + .g_mbus_fmt = sensor_g_fmt, + .try_mbus_fmt = sensor_try_fmt, + .enum_mbus_fmt = sensor_enum_fmt, + .s_stream = sensor_s_stream, +}; + +static struct v4l2_subdev_ops sensor_subdev_ops = { + .core = &sensor_subdev_core_ops, + .video = &sensor_subdev_video_ops, +}; + +static int sensor_probe(struct i2c_client *client, + const struct i2c_device_id *did) +{ + struct sensor *sensor; + struct soc_camera_device *icd = client->dev.platform_data; + struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct soc_camera_link *icl; + int ret; + + SENSOR_DG("\n%s..%s..%d..\n",__FUNCTION__,__FILE__,__LINE__); + if (!icd) { + dev_err(&client->dev, "%s: missing soc-camera data!\n",SENSOR_NAME_STRING()); + return -EINVAL; + } + + icl = to_soc_camera_link(icd); + if (!icl) { + dev_err(&client->dev, "%s driver needs platform data\n", SENSOR_NAME_STRING()); + return -EINVAL; + } + + if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { + dev_warn(&adapter->dev, + "I2C-Adapter doesn't support I2C_FUNC_I2C\n"); + return -EIO; + } + + sensor = kzalloc(sizeof(struct sensor), GFP_KERNEL); + if (!sensor) + return -ENOMEM; + + v4l2_i2c_subdev_init(&sensor->subdev, client, &sensor_subdev_ops); + + /* Second stage probe - when a capture adapter is there */ + icd->ops = &sensor_ops; + sensor->info_priv.fmt = sensor_colour_fmts[0]; + #if CONFIG_SENSOR_I2C_NOSCHED + atomic_set(&sensor->tasklock_cnt,0); + #endif + + ret = sensor_video_probe(icd, client); + if (ret < 0) { + icd->ops = NULL; + i2c_set_clientdata(client, NULL); + kfree(sensor); + sensor = NULL; + } else { + #if CONFIG_SENSOR_Focus + sensor->sensor_wq = create_workqueue(SENSOR_NAME_STRING(_af_workqueue)); + if (sensor->sensor_wq == NULL) + SENSOR_TR("%s create fail!", SENSOR_NAME_STRING(_af_workqueue)); + mutex_init(&sensor->wq_lock); + #endif + } + hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL); + SENSOR_DG("\n%s..%s..%d ret = %x \n",__FUNCTION__,__FILE__,__LINE__,ret); + return ret; +} + +static int sensor_remove(struct i2c_client *client) +{ + struct sensor *sensor = to_sensor(client); + struct soc_camera_device *icd = client->dev.platform_data; + + #if CONFIG_SENSOR_Focus + if (sensor->sensor_wq) { + destroy_workqueue(sensor->sensor_wq); + sensor->sensor_wq = NULL; + } + #endif + + icd->ops = NULL; + i2c_set_clientdata(client, NULL); + client->driver = NULL; + kfree(sensor); + sensor = NULL; + return 0; +} + +static const struct i2c_device_id sensor_id[] = { + {SENSOR_NAME_STRING(), 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, sensor_id); + +static struct i2c_driver sensor_i2c_driver = { + .driver = { + .name = SENSOR_NAME_STRING(), + }, + .probe = sensor_probe, + .remove = sensor_remove, + .id_table = sensor_id, +}; + +static int __init sensor_mod_init(void) +{ + // if (!tcsi_get_value(WESI_CAMERA_HM5065)) //add by caixx + // return 0; + + SENSOR_DG("\n%s..%s.. \n",__FUNCTION__,SENSOR_NAME_STRING()); + return i2c_add_driver(&sensor_i2c_driver); +} + +static void __exit sensor_mod_exit(void) +{ + //if (!tcsi_get_value(WESI_CAMERA_HM5065)) //add by caixx + // return; + + i2c_del_driver(&sensor_i2c_driver); +} + +device_initcall_sync(sensor_mod_init); +module_exit(sensor_mod_exit); + +MODULE_DESCRIPTION(SENSOR_NAME_STRING(Camera sensor driver)); +MODULE_AUTHOR("ddl "); +MODULE_LICENSE("GPL"); diff --git a/drivers/media/video/hm5065.h b/drivers/media/video/hm5065.h new file mode 100755 index 000000000000..4b53839e1d27 --- /dev/null +++ b/drivers/media/video/hm5065.h @@ -0,0 +1,11 @@ +#ifndef __HM5065_H__ +#define __HM5065_H__ + + +#define SEQUENCE_INIT 0x00 +#define SEQUENCE_NORMAL 0x01 + +#define SEQUENCE_PROPERTY 0xFFFD +#define SEQUENCE_WAIT_MS 0xFFFE +#define SEQUENCE_END 0xFFFC +#endif diff --git a/drivers/media/video/mt9p111.c b/drivers/media/video/mt9p111.c index 422896761941..5d8ef04b7897 100755 --- a/drivers/media/video/mt9p111.c +++ b/drivers/media/video/mt9p111.c @@ -63,17 +63,17 @@ module_param(debug, int, S_IRUGO|S_IWUSR); #define SENSOR_INIT_PIXFMT V4L2_MBUS_FMT_UYVY8_2X8 #define YUV420_BUFFER_MAX_SIZE 7558272 /* 2592*1944*1.5*/ -#define CONFIG_SENSOR_WhiteBalance 1 +#define CONFIG_SENSOR_WhiteBalance 0 #define CONFIG_SENSOR_Brightness 0 #define CONFIG_SENSOR_Contrast 0 #define CONFIG_SENSOR_Saturation 0 -#define CONFIG_SENSOR_Effect 1 -#define CONFIG_SENSOR_Scene 1 +#define CONFIG_SENSOR_Effect 0 +#define CONFIG_SENSOR_Scene 0 #define CONFIG_SENSOR_DigitalZoom 0 #define CONFIG_SENSOR_Exposure 0 -#define CONFIG_SENSOR_Flash 1 +#define CONFIG_SENSOR_Flash 0 #define CONFIG_SENSOR_Mirror 0 -#define CONFIG_SENSOR_Flip 1 +#define CONFIG_SENSOR_Flip 0 #define CONFIG_SENSOR_Focus 1 @@ -109,17 +109,21 @@ module_param(debug, int, S_IRUGO|S_IWUSR); #if CONFIG_SENSOR_Focus -#define SENSOR_AF_MODE_INFINITY 0 +/*#define SENSOR_AF_MODE_INFINITY 0 #define SENSOR_AF_MODE_MACRO 1 #define SENSOR_AF_MODE_FIXED 2 #define SENSOR_AF_MODE_AUTO 3 #define SENSOR_AF_MODE_CONTINUOUS 4 -#define SENSOR_AF_MODE_CLOSE 5 +#define SENSOR_AF_MODE_CLOSE 5*/ +#define SENSOR_AF_MODE_AUTO 0 +#define SENSOR_AF_MODE_CLOSE 1 +#define SENSOR_AF_MODE_CONTINUOUS 2 #endif //flash off in fixed time to prevent from too hot , zyc struct flash_timer{ - struct soc_camera_device *icd; + int status; + struct soc_camera_device *icd; struct hrtimer timer; }; static enum hrtimer_restart flash_off_func(struct hrtimer *timer); @@ -132,139 +136,122 @@ static struct flash_timer flash_off_timer; /* init 640X480 VGA */ static struct reginfo sensor_init_data[] = -{ -//[Step2-PLL_Timing] -//for 24MHz input, VCO=MAX=768mhz -{ 0x0010, 0x0340, WORD_LEN, 0}, -/*sovle problem that lack of pclk during one href*/ -#if ADJUST_PCLK_FRE_FALG -{ 0x0012, 0x0080, WORD_LEN, 0}, //PCLK=85MHz -#else -{ 0x0012, 0x0090, WORD_LEN, 0}, //PCLK=76MHz -#endif -{ 0x0014, 0x2025, WORD_LEN, 0}, -{ 0x001E, 0x0565, WORD_LEN, 0}, // PAD_SLEW_PAD_CONFIG -{ 0x0022, 0x0030, WORD_LEN, 0}, //0x01E0// VDD_DIS_COUNTER -#if ADJUST_PCLK_FRE_FALG -{ 0x002A, 0x7FFF, WORD_LEN, 0}, -#else -{ 0x002A, 0x7F7E, WORD_LEN, 0}, //0x7F7F// PLL_P4_P5_P6_DIVIDERS By Hwang 20101104 -#endif -{ 0x002C, 0x0000, WORD_LEN, 0}, // PLL_P7_DIVIDER -{ 0x002E, 0x0000, WORD_LEN, 0}, // SENSOR_CLOCK_DIVIDER -{ 0x0018, 0x4008, WORD_LEN, 0}, // STANDBY_CONTROL_AND_STATUS -//////{ SEQUENCE_WAIT_MS,100,WORD_LEN, 0}, -{ SEQUENCE_WAIT_MS,20,WORD_LEN, 0}, -//timing_settings -{ 0x0010, 0x0340, WORD_LEN, 0}, // PLL_DIVIDERS -{ 0x098E, 0x483A, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS [CAM_CORE_A_Y_ADDR_START] -{ 0xC83A, 0x000C, WORD_LEN, 0}, // CAM_CORE_A_Y_ADDR_START -{ 0xC83C, 0x0018, WORD_LEN, 0}, // CAM_CORE_A_X_ADDR_START -{ 0xC83E, 0x07B1, WORD_LEN, 0}, // CAM_CORE_A_Y_ADDR_END -{ 0xC840, 0x0A45, WORD_LEN, 0}, // CAM_CORE_A_X_ADDR_END -{ 0xC842, 0x0001, WORD_LEN, 0}, // CAM_CORE_A_ROW_SPEED -{ 0xC844, 0x0103, WORD_LEN, 0}, // CAM_CORE_A_SKIP_X_CORE -{ 0xC846, 0x0103, WORD_LEN, 0}, // CAM_CORE_A_SKIP_Y_CORE -{ 0xC848, 0x0103, WORD_LEN, 0}, // CAM_CORE_A_SKIP_X_PIPE -{ 0xC84A, 0x0103, WORD_LEN, 0}, // CAM_CORE_A_SKIP_Y_PIPE -{ 0xC84C, 0x00F6, WORD_LEN, 0}, // CAM_CORE_A_POWER_MODE -{ 0xC84E, 0x0001, WORD_LEN, 0}, // CAM_CORE_A_BIN_MODE -/*lzg@rock-chips.com, FIH:preview image to be mirrored and flipped */ -#if CONFIG_SENSOR_NONE_FLIP_MIRROR -{ 0xC850, 0x00, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_MIRROR -{ 0xC850, 0x01, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_FLIPE -{ 0xC850, 0x02, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_MIRROR_AND_FLIPE -{ 0xC850, 0x03, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#endif -{ 0xC851, 0x00, BYTE_LEN, 0}, // CAM_CORE_A_PIXEL_ORDER -{ 0xC852, 0x019C, WORD_LEN, 0}, // CAM_CORE_A_FINE_CORRECTION -{ 0xC854, 0x0732, WORD_LEN, 0}, // CAM_CORE_A_FINE_ITMIN -{ 0xC858, 0x0000, WORD_LEN, 0}, // CAM_CORE_A_COARSE_ITMIN -{ 0xC85A, 0x0001, WORD_LEN, 0}, // CAM_CORE_A_COARSE_ITMAX_MARGIN -{ 0xC85C, 0x0423, WORD_LEN, 0}, // CAM_CORE_A_MIN_FRAME_LENGTH_LINES -{ 0xC85E, 0xFFFF, WORD_LEN, 0}, // CAM_CORE_A_MAX_FRAME_LENGTH_LINS -{ 0xC860, 0x0423, WORD_LEN, 0}, // CAM_CORE_A_BASE_FRAME_LENGTH_LINES -{ 0xC862, 0x1194, WORD_LEN, 0}, // CAM_CORE_A_MIN_LINE_LENGTH_PCLK -{ 0xC864, 0xFFFE, WORD_LEN, 0}, // CAM_CORE_A_MAX_LINE_LENGTH_PCLK -{ 0xC866, 0x7F7F, WORD_LEN, 0}, // CAM_CORE_A_P4_5_6_DIVIDER -{ 0xC868, 0x0423, WORD_LEN, 0}, // CAM_CORE_A_FRAME_LENGTH_LINES -{ 0xC86A, 0x1194, WORD_LEN, 0}, // CAM_CORE_A_LINE_LENGTH_PCK -{ 0xC86C, 0x0518, WORD_LEN, 0}, // CAM_CORE_A_OUTPUT_SIZE_WIDTH -{ 0xC86E, 0x03D4, WORD_LEN, 0}, // CAM_CORE_A_OUTPUT_SIZE_HEIGHT -{ 0xC870, 0x0014, WORD_LEN, 0}, // CAM_CORE_A_RX_FIFO_TRIGGER_MARK -{ 0xC858, 0x0003, WORD_LEN, 0}, // CAM_CORE_A_COARSE_ITMIN -{ 0xC8B8, 0x0004, WORD_LEN, 0}, // CAM_OUTPUT_0_JPEG_CONTROL -{ 0xC8AE, 0x0001, WORD_LEN, 0}, // CAM_OUTPUT_0_OUTPUT_FORMAT -{ 0xC8AA, 0x0280, WORD_LEN, 0}, // CAM_OUTPUT_0_IMAGE_WIDTH -{ 0xC8AC, 0x01E0, WORD_LEN, 0}, // CAM_OUTPUT_0_IMAGE_HEIGHT -{ 0xC872, 0x0010, WORD_LEN, 0}, // CAM_CORE_B_Y_ADDR_START -{ 0xC874, 0x001C, WORD_LEN, 0}, // CAM_CORE_B_X_ADDR_START -{ 0xC876, 0x07AF, WORD_LEN, 0}, // CAM_CORE_B_Y_ADDR_END -{ 0xC878, 0x0A43, WORD_LEN, 0}, // CAM_CORE_B_X_ADDR_END -{ 0xC87A, 0x0001, WORD_LEN, 0}, // CAM_CORE_B_ROW_SPEED -{ 0xC87C, 0x0101, WORD_LEN, 0}, // CAM_CORE_B_SKIP_X_CORE -{ 0xC87E, 0x0101, WORD_LEN, 0}, // CAM_CORE_B_SKIP_Y_CORE -{ 0xC880, 0x0101, WORD_LEN, 0}, // CAM_CORE_B_SKIP_X_PIPE -{ 0xC882, 0x0101, WORD_LEN, 0}, // CAM_CORE_B_SKIP_Y_PIPE -{ 0xC884, 0x00F2, WORD_LEN, 0}, // CAM_CORE_B_POWER_MODE -{ 0xC886, 0x0000, WORD_LEN, 0}, // CAM_CORE_B_BIN_MODE -/*lzg@rock-chips.com, FIH:capture image to be mirrored and flipped */ -#if CONFIG_SENSOR_NONE_FLIP_MIRROR -{ 0xC888, 0x00, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_MIRROR -{ 0xC888, 0x01, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_FLIPE -{ 0xC888, 0x02, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#elif CONFIG_SENSOR_MIRROR_AND_FLIPE -{ 0xC888, 0x03, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION -#endif +{ +{ 0x0010, 0x0340, WORD_LEN, 0 }, + + +{ 0x0010, 0x0340, WORD_LEN, 0 }, // PLL_DIVIDERS +{ 0x0012, 0x0080, WORD_LEN, 0 }, // PLL_P_DIVIDERS +{ 0x0014, 0x2025, WORD_LEN, 0 }, // PLL_CONTROL +{ 0x001E, 0x0565, WORD_LEN, 0 }, // PAD_SLEW_PAD_CONFIG +{ 0x0022, 0x0030, WORD_LEN, 0 }, // VDD_DIS_COUNTER +{ 0x002A, 0x7FFF, WORD_LEN, 0 }, // PLL_P4_P5_P6_DIVIDERS +{ 0x002C, 0x0000, WORD_LEN, 0 }, // PLL_P7_DIVIDER +{ 0x002E, 0x0000, WORD_LEN, 0 }, // SENSOR_CLOCK_DIVIDER +{ 0x0018, 0x400c, WORD_LEN, 0 }, // STANDBY_CONTROL_AND_STATUS +//delay = 100 +{SEQUENCE_WAIT_MS,300,WORD_LEN,0}, +{ 0x098E, 0x483A, WORD_LEN, 0 }, // LOGICAL_ADDRESS_ACCESS +{ 0xC83A, 0x000C, WORD_LEN, 0 }, // CAM_CORE_A_Y_ADDR_START +{ 0xC83C, 0x0018, WORD_LEN, 0 }, // CAM_CORE_A_X_ADDR_START +{ 0xC83E, 0x07B1, WORD_LEN, 0 }, // CAM_CORE_A_Y_ADDR_END +{ 0xC840, 0x0A45, WORD_LEN, 0 }, // CAM_CORE_A_X_ADDR_END +{ 0xC842, 0x0001, WORD_LEN, 0 }, // CAM_CORE_A_ROW_SPEED +{ 0xC844, 0x0103, WORD_LEN, 0 }, // CAM_CORE_A_SKIP_X_CORE +{ 0xC846, 0x0103, WORD_LEN, 0 }, // CAM_CORE_A_SKIP_Y_CORE +{ 0xC848, 0x0103, WORD_LEN, 0 }, // CAM_CORE_A_SKIP_X_PIPE +{ 0xC84A, 0x0103, WORD_LEN, 0 }, // CAM_CORE_A_SKIP_Y_PIPE +{ 0xC84C, 0x00F6, WORD_LEN, 0 }, // CAM_CORE_A_POWER_MODE +{ 0xC84E, 0x0001, WORD_LEN, 0 }, // CAM_CORE_A_BIN_MODE +{ 0xC850, 0x00, BYTE_LEN, 0}, // CAM_CORE_A_ORIENTATION +{ 0xC851, 0x00, BYTE_LEN, 0}, // CAM_CORE_A_PIXEL_ORDER +{ 0xC852, 0x019C, WORD_LEN, 0 }, // CAM_CORE_A_FINE_CORRECTION +{ 0xC854, 0x0732, WORD_LEN, 0 }, // CAM_CORE_A_FINE_ITMIN +{ 0xC858, 0x0000, WORD_LEN, 0 }, // CAM_CORE_A_COARSE_ITMIN +{ 0xC85A, 0x0001, WORD_LEN, 0 }, // CAM_CORE_A_COARSE_ITMAX_MARGIN +{ 0xC85C, 0x0423, WORD_LEN, 0 }, // CAM_CORE_A_MIN_FRAME_LENGTH_LINES +{ 0xC85E, 0xFFFF, WORD_LEN, 0 }, // CAM_CORE_A_MAX_FRAME_LENGTH_LINES +{ 0xC860, 0x0423, WORD_LEN, 0 }, // CAM_CORE_A_BASE_FRAME_LENGTH_LINES +{ 0xC862, 0x1194, WORD_LEN, 0 }, // CAM_CORE_A_MIN_LINE_LENGTH_PCLK +{ 0xC864, 0xFFFE, WORD_LEN, 0 }, // CAM_CORE_A_MAX_LINE_LENGTH_PCLK +{ 0xC866, 0x7F7F, WORD_LEN, 0 }, // CAM_CORE_A_P4_5_6_DIVIDER +{ 0xC868, 0x0423, WORD_LEN, 0 }, // CAM_CORE_A_FRAME_LENGTH_LINES +{ 0xC86A, 0x1194, WORD_LEN, 0 }, // CAM_CORE_A_LINE_LENGTH_PCK +{ 0xC86C, 0x0518, WORD_LEN, 0 }, // CAM_CORE_A_OUTPUT_SIZE_WIDTH +{ 0xC86E, 0x03D4, WORD_LEN, 0 }, // CAM_CORE_A_OUTPUT_SIZE_HEIGHT +{ 0xC870, 0x0014, WORD_LEN, 0 }, // CAM_CORE_A_RX_FIFO_TRIGGER_MARK +{ 0xC858, 0x0003, WORD_LEN, 0 }, // CAM_CORE_A_COARSE_ITMIN +{ 0xC8B8, 0x0004, WORD_LEN, 0 }, // CAM_OUTPUT_0_JPEG_CONTROL +{ 0xC8AE, 0x0001, WORD_LEN, 0 }, // CAM_OUTPUT_0_OUTPUT_FORMAT +{ 0xC8AA, 0x0280, WORD_LEN, 0 }, // CAM_OUTPUT_0_IMAGE_WIDTH +{ 0xC8AC, 0x01E0, WORD_LEN, 0 }, // CAM_OUTPUT_0_IMAGE_HEIGHT +{ 0xC872, 0x0010, WORD_LEN, 0 }, // CAM_CORE_B_Y_ADDR_START +{ 0xC874, 0x001C, WORD_LEN, 0 }, // CAM_CORE_B_X_ADDR_START +{ 0xC876, 0x07AF, WORD_LEN, 0 }, // CAM_CORE_B_Y_ADDR_END +{ 0xC878, 0x0A43, WORD_LEN, 0 }, // CAM_CORE_B_X_ADDR_END +{ 0xC87A, 0x0001, WORD_LEN, 0 }, // CAM_CORE_B_ROW_SPEED +{ 0xC87C, 0x0101, WORD_LEN, 0 }, // CAM_CORE_B_SKIP_X_CORE +{ 0xC87E, 0x0101, WORD_LEN, 0 }, // CAM_CORE_B_SKIP_Y_CORE +{ 0xC880, 0x0101, WORD_LEN, 0 }, // CAM_CORE_B_SKIP_X_PIPE +{ 0xC882, 0x0101, WORD_LEN, 0 }, // CAM_CORE_B_SKIP_Y_PIPE +{ 0xC884, 0x00F2, WORD_LEN, 0 }, // CAM_CORE_B_POWER_MODE +{ 0xC886, 0x0000, WORD_LEN, 0 }, // CAM_CORE_B_BIN_MODE +{ 0xC888, 0x00, BYTE_LEN, 0}, // CAM_CORE_B_ORIENTATION { 0xC889, 0x00, BYTE_LEN, 0}, // CAM_CORE_B_PIXEL_ORDER -{ 0xC88A, 0x009C, WORD_LEN, 0}, // CAM_CORE_B_FINE_CORRECTION -{ 0xC88C, 0x034A, WORD_LEN, 0}, // CAM_CORE_B_FINE_ITMIN -{ 0xC890, 0x0000, WORD_LEN, 0}, // CAM_CORE_B_COARSE_ITMIN -{ 0xC892, 0x0001, WORD_LEN, 0}, // CAM_CORE_B_COARSE_ITMAX_MARGIN -{ 0xC894, 0x07EF, WORD_LEN, 0}, // CAM_CORE_B_MIN_FRAME_LENGTH_LINES -{ 0xC896, 0xFFFF, WORD_LEN, 0}, // CAM_CORE_B_MAX_FRAME_LENGTH_LINES -{ 0xC898, 0x082F, WORD_LEN, 0}, // CAM_CORE_B_BASE_FRAME_LENGTH_LINES -{ 0xC89A, 0x1964, WORD_LEN, 0}, // CAM_CORE_B_MIN_LINE_LENGTH_PCLK -{ 0xC89C, 0xFFFE, WORD_LEN, 0}, // CAM_CORE_B_MAX_LINE_LENGTH_PCLK -{ 0xC89E, 0x7F7F, WORD_LEN, 0}, // CAM_CORE_B_P4_5_6_DIVIDER -{ 0xC8A0, 0x07EF, WORD_LEN, 0}, // CAM_CORE_B_FRAME_LENGTH_LINES -{ 0xC8A2, 0x1964, WORD_LEN, 0}, // CAM_CORE_B_LINE_LENGTH_PCK -{ 0xC8A4, 0x0A28, WORD_LEN, 0}, // CAM_CORE_B_OUTPUT_SIZE_WIDTH -{ 0xC8A6, 0x07A0, WORD_LEN, 0}, // CAM_CORE_B_OUTPUT_SIZE_HEIGHT -{ 0xC8A8, 0x0124, WORD_LEN, 0}, // CAM_CORE_B_RX_FIFO_TRIGGER_MARK -{ 0xC890, 0x0003, WORD_LEN, 0}, // CAM_CORE_B_COARSE_ITMIN -{ 0xC8C0, 0x0A20, WORD_LEN, 0}, // CAM_OUTPUT_1_IMAGE_WIDTH -{ 0xC8C2, 0x0798, WORD_LEN, 0}, // CAM_OUTPUT_1_IMAGE_HEIGHT -{ 0xC89A, 0x1964, WORD_LEN, 0}, // CAM_CORE_B_MIN_LINE_LENGTH_PCLK -{ 0xC8A2, 0x1964, WORD_LEN, 0}, // CAM_CORE_B_LINE_LENGTH_PCK -{ 0xC8C4, 0x0001, WORD_LEN, 0}, // CAM_OUTPUT_1_OUTPUT_FORMAT -{ 0xC8C6, 0x0000, WORD_LEN, 0}, // CAM_OUTPUT_1_OUTPUT_FORMAT_ORDER -{ 0xC8CE, 0x0014, WORD_LEN, 0}, // CAM_OUTPUT_1_JPEG_CONTROL -{ 0xD822, 0x4610, WORD_LEN, 0}, // JPEG_JPSS_CTRL_VAR -{ 0x3330, 0x0000, WORD_LEN, 0}, // OUTPUT_FORMAT_TEST -{ 0x098E, 0xA00E, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS +{ 0xC88A, 0x009C, WORD_LEN, 0 }, // CAM_CORE_B_FINE_CORRECTION +{ 0xC88C, 0x034A, WORD_LEN, 0 }, // CAM_CORE_B_FINE_ITMIN +{ 0xC890, 0x0000, WORD_LEN, 0 }, // CAM_CORE_B_COARSE_ITMIN +{ 0xC892, 0x0001, WORD_LEN, 0 }, // CAM_CORE_B_COARSE_ITMAX_MARGIN +{ 0xC894, 0x07EF, WORD_LEN, 0 }, // CAM_CORE_B_MIN_FRAME_LENGTH_LINES +{ 0xC896, 0xFFFF, WORD_LEN, 0 }, // CAM_CORE_B_MAX_FRAME_LENGTH_LINES +{ 0xC898, 0x082F, WORD_LEN, 0 }, // CAM_CORE_B_BASE_FRAME_LENGTH_LINES +{ 0xC89A, 0x1964, WORD_LEN, 0 }, // CAM_CORE_B_MIN_LINE_LENGTH_PCLK +{ 0xC89C, 0xFFFE, WORD_LEN, 0 }, // CAM_CORE_B_MAX_LINE_LENGTH_PCLK +{ 0xC89E, 0x7F7F, WORD_LEN, 0 }, // CAM_CORE_B_P4_5_6_DIVIDER +{ 0xC8A0, 0x07EF, WORD_LEN, 0 }, // CAM_CORE_B_FRAME_LENGTH_LINES +{ 0xC8A2, 0x1964, WORD_LEN, 0 }, // CAM_CORE_B_LINE_LENGTH_PCK +{ 0xC8A4, 0x0A28, WORD_LEN, 0 }, // CAM_CORE_B_OUTPUT_SIZE_WIDTH +{ 0xC8A6, 0x07A0, WORD_LEN, 0 }, // CAM_CORE_B_OUTPUT_SIZE_HEIGHT +{ 0xC8A8, 0x0124, WORD_LEN, 0 }, // CAM_CORE_B_RX_FIFO_TRIGGER_MARK +{ 0xC890, 0x0003, WORD_LEN, 0 }, // CAM_CORE_B_COARSE_ITMIN +{ 0xC8C0, 0x0A20, WORD_LEN, 0 }, // CAM_OUTPUT_1_IMAGE_WIDTH +{ 0xC8C2, 0x0798, WORD_LEN, 0 }, // CAM_OUTPUT_1_IMAGE_HEIGHT +{ 0xC89A, 0x1964, WORD_LEN, 0 }, // CAM_CORE_B_MIN_LINE_LENGTH_PCLK +{ 0xC8A2, 0x1964, WORD_LEN, 0 }, // CAM_CORE_B_LINE_LENGTH_PCK +{ 0xC8C4, 0x0001, WORD_LEN, 0 }, // CAM_OUTPUT_1_OUTPUT_FORMAT +{ 0xC8C6, 0x0000, WORD_LEN, 0 }, // CAM_OUTPUT_1_OUTPUT_FORMAT_ORDER +{ 0xC8CE, 0x0014, WORD_LEN, 0 }, // CAM_OUTPUT_1_JPEG_CONTROL +{ 0xD822, 0x4610, WORD_LEN, 0 }, // JPEG_JPSS_CTRL_VAR +{ 0x3330, 0x0000, WORD_LEN, 0 }, // OUTPUT_FORMAT_TEST +{ 0x098E, 0xA00E, WORD_LEN, 0 }, // LOGICAL_ADDRESS_ACCESS { 0xA00E, 0x32, BYTE_LEN, 0}, // FD_MAX_NUM_AUTOCOR_FUNC_VALUES_TO_CHECK -{ 0xA010, 0x00CC, WORD_LEN, 0}, // FD_MIN_EXPECTED50HZ_FLICKER_PERIOD -{ 0xA012, 0x00E0, WORD_LEN, 0}, // FD_MAX_EXPECTED50HZ_FLICKER_PERIOD -{ 0xA014, 0x00A8, WORD_LEN, 0}, // FD_MIN_EXPECTED60HZ_FLICKER_PERIOD -{ 0xA016, 0x00BC, WORD_LEN, 0}, // FD_MAX_EXPECTED60HZ_FLICKER_PERIOD -{ 0xA018, 0x00D6, WORD_LEN, 0}, // FD_EXPECTED50HZ_FLICKER_PERIOD_IN_CONTEXT_A -{ 0xA01A, 0x0075, WORD_LEN, 0}, // FD_EXPECTED50HZ_FLICKER_PERIOD_IN_CONTEXT_B -{ 0xA01C, 0x00B2, WORD_LEN, 0}, // FD_EXPECTED60HZ_FLICKER_PERIOD_IN_CONTEXT_A -{ 0xA01E, 0x0062, WORD_LEN, 0}, // FD_EXPECTED60HZ_FLICKER_PERIOD_IN_CONTEXT_B +{ 0xA010, 0x00CC, WORD_LEN, 0 }, // FD_MIN_EXPECTED50HZ_FLICKER_PERIOD +{ 0xA012, 0x00E0, WORD_LEN, 0 }, // FD_MAX_EXPECTED50HZ_FLICKER_PERIOD +{ 0xA014, 0x00A8, WORD_LEN, 0 }, // FD_MIN_EXPECTED60HZ_FLICKER_PERIOD +{ 0xA016, 0x00BC, WORD_LEN, 0 }, // FD_MAX_EXPECTED60HZ_FLICKER_PERIOD +{ 0xA018, 0x00D6, WORD_LEN, 0 }, // FD_EXPECTED50HZ_FLICKER_PERIOD_IN_CONTEXT_A +{ 0xA01A, 0x0075, WORD_LEN, 0 }, // FD_EXPECTED50HZ_FLICKER_PERIOD_IN_CONTEXT_B +{ 0xA01C, 0x00B2, WORD_LEN, 0 }, // FD_EXPECTED60HZ_FLICKER_PERIOD_IN_CONTEXT_A +{ 0xA01E, 0x0062, WORD_LEN, 0 }, // FD_EXPECTED60HZ_FLICKER_PERIOD_IN_CONTEXT_B { 0xA000, 0x10, BYTE_LEN, 0}, // FD_STATUS { 0x8417, 0x02, BYTE_LEN, 0}, // SEQ_STATE_CFG_1_FD -{ 0x8404, 0x06, BYTE_LEN, 0}, // SEQ_CMD -//////{ SEQUENCE_WAIT_MS,300, BYTE_LEN, 0}, +//delay = 100 { SEQUENCE_WAIT_MS,100, BYTE_LEN, 0}, -//[Step3-Recommended] -//[k28a_rev3_FW_patch7] -// k28a_rev03_patch07_CR30221_MCNEX_AWB_AFNOISE_YOFFSET_APGA_REV1 + + +//[Step2-Fixups] +// Default variable access mode is always logical. + + +{ 0x098E, 0x0000, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS +{ 0x301A, 0x0030, WORD_LEN, 0}, // RESET_REGISTER +{ 0x316C, 0xB430, WORD_LEN, 0}, // DAC_TXLO +{ 0x31E0, 0x0003, WORD_LEN, 0}, // PIX_DEF_ID +{ 0x3E2E, 0xF319, WORD_LEN, 0}, // SAMP_SPARE +{ 0x3EE6, 0xA7C1, WORD_LEN, 0}, // DAC_LD_26_27 +{ 0x301E, 0x00A8, WORD_LEN, 0}, // DATA_PEDESTAL +{ 0xDC33, 0x2A, BYTE_LEN, 0}, // SYS_FIRST_BLACK_LEVEL +{ 0x3812, 0x212C, WORD_LEN, 0}, // OTPM_CFG { 0x0982, 0x0000, WORD_LEN, 0}, // ACCESS_CTL_STAT { 0x098A, 0x0000, WORD_LEN, 0}, // PHYSICAL_ADDRESS_ACCESS { 0x886C, 0xC0F1, WORD_LEN, 0}, @@ -302,885 +289,1232 @@ static struct reginfo sensor_init_data[] = { 0x88AC, 0x0219, WORD_LEN, 0}, { 0x88AE, 0x06C4, WORD_LEN, 0}, { 0x88B0, 0xFF80, WORD_LEN, 0}, -{ 0x88B2, 0x08C8, WORD_LEN, 0}, +{ 0x88B2, 0x08D4, WORD_LEN, 0}, { 0x88B4, 0xFF80, WORD_LEN, 0}, { 0x88B6, 0x086C, WORD_LEN, 0}, { 0x88B8, 0xFF80, WORD_LEN, 0}, { 0x88BA, 0x08C0, WORD_LEN, 0}, { 0x88BC, 0xFF80, WORD_LEN, 0}, -{ 0x88BE, 0x08C8, WORD_LEN, 0}, +{ 0x88BE, 0x08D4, WORD_LEN, 0}, { 0x88C0, 0xFF80, WORD_LEN, 0}, -{ 0x88C2, 0x08D0, WORD_LEN, 0}, +{ 0x88C2, 0x08DC, WORD_LEN, 0}, { 0x88C4, 0xFF80, WORD_LEN, 0}, -{ 0x88C6, 0x0978, WORD_LEN, 0}, -{ 0x88C8, 0x0007, WORD_LEN, 0}, -{ 0x88CA, 0x0001, WORD_LEN, 0}, -{ 0x88CC, 0x0000, WORD_LEN, 0}, -{ 0x88CE, 0x0000, WORD_LEN, 0}, -{ 0x88D0, 0xC0F1, WORD_LEN, 0}, -{ 0x88D2, 0x097E, WORD_LEN, 0}, -{ 0x88D4, 0x06E4, WORD_LEN, 0}, -{ 0x88D6, 0xDA14, WORD_LEN, 0}, -{ 0x88D8, 0xD0C8, WORD_LEN, 0}, -{ 0x88DA, 0xDE00, WORD_LEN, 0}, -{ 0x88DC, 0xD1C8, WORD_LEN, 0}, -{ 0x88DE, 0x2E41, WORD_LEN, 0}, -{ 0x88E0, 0x120C, WORD_LEN, 0}, -{ 0x88E2, 0xA895, WORD_LEN, 0}, -{ 0x88E4, 0xD5C7, WORD_LEN, 0}, -{ 0x88E6, 0xA8D4, WORD_LEN, 0}, -{ 0x88E8, 0xA8D6, WORD_LEN, 0}, -{ 0x88EA, 0x0F0A, WORD_LEN, 0}, -{ 0x88EC, 0x06A4, WORD_LEN, 0}, -{ 0x88EE, 0x2555, WORD_LEN, 0}, -{ 0x88F0, 0x1440, WORD_LEN, 0}, -{ 0x88F2, 0xD0C5, WORD_LEN, 0}, -{ 0x88F4, 0x2555, WORD_LEN, 0}, -{ 0x88F6, 0x1441, WORD_LEN, 0}, -{ 0x88F8, 0x77A9, WORD_LEN, 0}, -{ 0x88FA, 0xA515, WORD_LEN, 0}, -{ 0x88FC, 0xD0C3, WORD_LEN, 0}, -{ 0x88FE, 0xA020, WORD_LEN, 0}, -{ 0x8900, 0xD1C3, WORD_LEN, 0}, -{ 0x8902, 0x70E9, WORD_LEN, 0}, -{ 0x8904, 0x0EEE, WORD_LEN, 0}, -{ 0x8906, 0x06A4, WORD_LEN, 0}, -{ 0x8908, 0xDA44, WORD_LEN, 0}, -{ 0x890A, 0xD0C2, WORD_LEN, 0}, -{ 0x890C, 0xD1C2, WORD_LEN, 0}, -{ 0x890E, 0xA502, WORD_LEN, 0}, -{ 0x8910, 0xD0C2, WORD_LEN, 0}, -{ 0x8912, 0xA0E0, WORD_LEN, 0}, -{ 0x8914, 0xD0C2, WORD_LEN, 0}, -{ 0x8916, 0xB0CB, WORD_LEN, 0}, -{ 0x8918, 0x8900, WORD_LEN, 0}, -{ 0x891A, 0xDB08, WORD_LEN, 0}, -{ 0x891C, 0xDAF0, WORD_LEN, 0}, -{ 0x891E, 0x19B0, WORD_LEN, 0}, -{ 0x8920, 0x00C2, WORD_LEN, 0}, -{ 0x8922, 0xB8A6, WORD_LEN, 0}, -{ 0x8924, 0xA900, WORD_LEN, 0}, -{ 0x8926, 0xD851, WORD_LEN, 0}, -{ 0x8928, 0x19B2, WORD_LEN, 0}, -{ 0x892A, 0x0002, WORD_LEN, 0}, -{ 0x892C, 0xD852, WORD_LEN, 0}, -{ 0x892E, 0x19B3, WORD_LEN, 0}, -{ 0x8930, 0x0002, WORD_LEN, 0}, -{ 0x8932, 0xD855, WORD_LEN, 0}, -{ 0x8934, 0x19B6, WORD_LEN, 0}, -{ 0x8936, 0x0002, WORD_LEN, 0}, -{ 0x8938, 0xD856, WORD_LEN, 0}, -{ 0x893A, 0x19B7, WORD_LEN, 0}, -{ 0x893C, 0x0002, WORD_LEN, 0}, -{ 0x893E, 0xD896, WORD_LEN, 0}, -{ 0x8940, 0x19B8, WORD_LEN, 0}, -{ 0x8942, 0x0004, WORD_LEN, 0}, -{ 0x8944, 0xD814, WORD_LEN, 0}, -{ 0x8946, 0x19BA, WORD_LEN, 0}, -{ 0x8948, 0x0004, WORD_LEN, 0}, -{ 0x894A, 0xD805, WORD_LEN, 0}, -{ 0x894C, 0xB111, WORD_LEN, 0}, -{ 0x894E, 0x19B1, WORD_LEN, 0}, -{ 0x8950, 0x0082, WORD_LEN, 0}, -{ 0x8952, 0x19B4, WORD_LEN, 0}, -{ 0x8954, 0x00C2, WORD_LEN, 0}, -{ 0x8956, 0x19B5, WORD_LEN, 0}, -{ 0x8958, 0x0082, WORD_LEN, 0}, -{ 0x895A, 0xD1B2, WORD_LEN, 0}, -{ 0x895C, 0x2556, WORD_LEN, 0}, -{ 0x895E, 0x12C0, WORD_LEN, 0}, -{ 0x8960, 0x0E92, WORD_LEN, 0}, -{ 0x8962, 0x06A4, WORD_LEN, 0}, -{ 0x8964, 0xDA2C, WORD_LEN, 0}, -{ 0x8966, 0xD0B0, WORD_LEN, 0}, -{ 0x8968, 0x2556, WORD_LEN, 0}, -{ 0x896A, 0x12C1, WORD_LEN, 0}, -{ 0x896C, 0xA519, WORD_LEN, 0}, -{ 0x896E, 0xD0AF, WORD_LEN, 0}, -{ 0x8970, 0x0145, WORD_LEN, 0}, -{ 0x8972, 0x06E4, WORD_LEN, 0}, -{ 0x8974, 0xA020, WORD_LEN, 0}, -{ 0x8976, 0x78E0, WORD_LEN, 0}, -{ 0x8978, 0xC0F1, WORD_LEN, 0}, -{ 0x897A, 0xD0AD, WORD_LEN, 0}, -{ 0x897C, 0xD1AD, WORD_LEN, 0}, -{ 0x897E, 0xD2AE, WORD_LEN, 0}, -{ 0x8980, 0xA020, WORD_LEN, 0}, -{ 0x8982, 0x8A09, WORD_LEN, 0}, -{ 0x8984, 0x8A6A, WORD_LEN, 0}, -{ 0x8986, 0xB808, WORD_LEN, 0}, -{ 0x8988, 0x7865, WORD_LEN, 0}, -{ 0x898A, 0xB880, WORD_LEN, 0}, -{ 0x898C, 0x2841, WORD_LEN, 0}, -{ 0x898E, 0x020C, WORD_LEN, 0}, -{ 0x8990, 0xAA89, WORD_LEN, 0}, -{ 0x8992, 0xAA0A, WORD_LEN, 0}, -{ 0x8994, 0xD2A9, WORD_LEN, 0}, -{ 0x8996, 0x8A00, WORD_LEN, 0}, -{ 0x8998, 0x0809, WORD_LEN, 0}, -{ 0x899A, 0x01DE, WORD_LEN, 0}, -{ 0x899C, 0xB8A7, WORD_LEN, 0}, -{ 0x899E, 0xAA00, WORD_LEN, 0}, -{ 0x89A0, 0xDBFF, WORD_LEN, 0}, -{ 0x89A2, 0x2B41, WORD_LEN, 0}, -{ 0x89A4, 0x0200, WORD_LEN, 0}, -{ 0x89A6, 0xAA0C, WORD_LEN, 0}, -{ 0x89A8, 0x1228, WORD_LEN, 0}, -{ 0x89AA, 0x0080, WORD_LEN, 0}, -{ 0x89AC, 0xAA6D, WORD_LEN, 0}, -{ 0x89AE, 0x0815, WORD_LEN, 0}, -{ 0x89B0, 0x01DE, WORD_LEN, 0}, -{ 0x89B2, 0xB8A7, WORD_LEN, 0}, -{ 0x89B4, 0x1A28, WORD_LEN, 0}, -{ 0x89B6, 0x0002, WORD_LEN, 0}, -{ 0x89B8, 0x8123, WORD_LEN, 0}, -{ 0x89BA, 0x7960, WORD_LEN, 0}, -{ 0x89BC, 0x1228, WORD_LEN, 0}, -{ 0x89BE, 0x0080, WORD_LEN, 0}, -{ 0x89C0, 0xC0D1, WORD_LEN, 0}, -{ 0x89C2, 0x7EE0, WORD_LEN, 0}, -{ 0x89C4, 0xC0F1, WORD_LEN, 0}, -{ 0x89C6, 0x088E, WORD_LEN, 0}, -{ 0x89C8, 0x06E4, WORD_LEN, 0}, -{ 0x89CA, 0xDB03, WORD_LEN, 0}, -{ 0x89CC, 0xD29B, WORD_LEN, 0}, -{ 0x89CE, 0x8A2E, WORD_LEN, 0}, -{ 0x89D0, 0x8ACF, WORD_LEN, 0}, -{ 0x89D2, 0xB908, WORD_LEN, 0}, -{ 0x89D4, 0x79C5, WORD_LEN, 0}, -{ 0x89D6, 0xDD65, WORD_LEN, 0}, -{ 0x89D8, 0x094F, WORD_LEN, 0}, -{ 0x89DA, 0x00D1, WORD_LEN, 0}, -{ 0x89DC, 0xD90A, WORD_LEN, 0}, -{ 0x89DE, 0x1A24, WORD_LEN, 0}, -{ 0x89E0, 0x0042, WORD_LEN, 0}, -{ 0x89E2, 0x8A24, WORD_LEN, 0}, -{ 0x89E4, 0xE1E5, WORD_LEN, 0}, -{ 0x89E6, 0xF6C9, WORD_LEN, 0}, -{ 0x89E8, 0xD902, WORD_LEN, 0}, -{ 0x89EA, 0x2941, WORD_LEN, 0}, -{ 0x89EC, 0x0200, WORD_LEN, 0}, -{ 0x89EE, 0xAA0E, WORD_LEN, 0}, -{ 0x89F0, 0xAA2F, WORD_LEN, 0}, -{ 0x89F2, 0x70A9, WORD_LEN, 0}, -{ 0x89F4, 0xF014, WORD_LEN, 0}, -{ 0x89F6, 0xE1C8, WORD_LEN, 0}, -{ 0x89F8, 0x0036, WORD_LEN, 0}, -{ 0x89FA, 0x000B, WORD_LEN, 0}, -{ 0x89FC, 0xE0C8, WORD_LEN, 0}, -{ 0x89FE, 0x003A, WORD_LEN, 0}, -{ 0x8A00, 0x000A, WORD_LEN, 0}, -{ 0x8A02, 0xD901, WORD_LEN, 0}, -{ 0x8A04, 0x2941, WORD_LEN, 0}, -{ 0x8A06, 0x0200, WORD_LEN, 0}, -{ 0x8A08, 0xAA0E, WORD_LEN, 0}, -{ 0x8A0A, 0xAA2F, WORD_LEN, 0}, -{ 0x8A0C, 0xD848, WORD_LEN, 0}, -{ 0x8A0E, 0xF008, WORD_LEN, 0}, -{ 0x8A10, 0xD900, WORD_LEN, 0}, -{ 0x8A12, 0x2941, WORD_LEN, 0}, -{ 0x8A14, 0x0200, WORD_LEN, 0}, -{ 0x8A16, 0xAA0E, WORD_LEN, 0}, -{ 0x8A18, 0xAA2F, WORD_LEN, 0}, -{ 0x8A1A, 0xD820, WORD_LEN, 0}, -{ 0x8A1C, 0xD288, WORD_LEN, 0}, -{ 0x8A1E, 0x8A26, WORD_LEN, 0}, -{ 0x8A20, 0xB961, WORD_LEN, 0}, -{ 0x8A22, 0xAA26, WORD_LEN, 0}, -{ 0x8A24, 0xF00D, WORD_LEN, 0}, -{ 0x8A26, 0x091F, WORD_LEN, 0}, -{ 0x8A28, 0x0091, WORD_LEN, 0}, -{ 0x8A2A, 0x8A24, WORD_LEN, 0}, -{ 0x8A2C, 0xF1E5, WORD_LEN, 0}, -{ 0x8A2E, 0x0913, WORD_LEN, 0}, -{ 0x8A30, 0x0812, WORD_LEN, 0}, -{ 0x8A32, 0x08E1, WORD_LEN, 0}, -{ 0x8A34, 0x8812, WORD_LEN, 0}, -{ 0x8A36, 0x2B41, WORD_LEN, 0}, -{ 0x8A38, 0x0201, WORD_LEN, 0}, -{ 0x8A3A, 0xAA2E, WORD_LEN, 0}, -{ 0x8A3C, 0xAA6F, WORD_LEN, 0}, -{ 0x8A3E, 0x0081, WORD_LEN, 0}, -{ 0x8A40, 0x06C4, WORD_LEN, 0}, -{ 0x8A42, 0x09F7, WORD_LEN, 0}, -{ 0x8A44, 0x8051, WORD_LEN, 0}, -{ 0x8A46, 0x8A24, WORD_LEN, 0}, -{ 0x8A48, 0xF1F3, WORD_LEN, 0}, -{ 0x8A4A, 0x78E0, WORD_LEN, 0}, -{ 0x8A4C, 0xC0F1, WORD_LEN, 0}, -{ 0x8A4E, 0x0FFA, WORD_LEN, 0}, -{ 0x8A50, 0x0684, WORD_LEN, 0}, -{ 0x8A52, 0xD67A, WORD_LEN, 0}, -{ 0x8A54, 0x7508, WORD_LEN, 0}, -{ 0x8A56, 0x8E01, WORD_LEN, 0}, -{ 0x8A58, 0xD179, WORD_LEN, 0}, -{ 0x8A5A, 0x2046, WORD_LEN, 0}, -{ 0x8A5C, 0x00C0, WORD_LEN, 0}, -{ 0x8A5E, 0xAE01, WORD_LEN, 0}, -{ 0x8A60, 0x1145, WORD_LEN, 0}, -{ 0x8A62, 0x0080, WORD_LEN, 0}, -{ 0x8A64, 0x1146, WORD_LEN, 0}, -{ 0x8A66, 0x0082, WORD_LEN, 0}, -{ 0x8A68, 0xB808, WORD_LEN, 0}, -{ 0x8A6A, 0x7845, WORD_LEN, 0}, -{ 0x8A6C, 0x0817, WORD_LEN, 0}, -{ 0x8A6E, 0x001E, WORD_LEN, 0}, -{ 0x8A70, 0x8900, WORD_LEN, 0}, -{ 0x8A72, 0x8941, WORD_LEN, 0}, -{ 0x8A74, 0xB808, WORD_LEN, 0}, -{ 0x8A76, 0x7845, WORD_LEN, 0}, -{ 0x8A78, 0x080B, WORD_LEN, 0}, -{ 0x8A7A, 0x00DE, WORD_LEN, 0}, -{ 0x8A7C, 0x70A9, WORD_LEN, 0}, -{ 0x8A7E, 0xFFD2, WORD_LEN, 0}, -{ 0x8A80, 0x7508, WORD_LEN, 0}, -{ 0x8A82, 0x1604, WORD_LEN, 0}, -{ 0x8A84, 0x1090, WORD_LEN, 0}, -{ 0x8A86, 0x0D93, WORD_LEN, 0}, -{ 0x8A88, 0x1400, WORD_LEN, 0}, -{ 0x8A8A, 0x8EEA, WORD_LEN, 0}, -{ 0x8A8C, 0x8E0B, WORD_LEN, 0}, -{ 0x8A8E, 0x214A, WORD_LEN, 0}, -{ 0x8A90, 0x2040, WORD_LEN, 0}, -{ 0x8A92, 0x8E2D, WORD_LEN, 0}, -{ 0x8A94, 0xBF08, WORD_LEN, 0}, -{ 0x8A96, 0x7F05, WORD_LEN, 0}, -{ 0x8A98, 0x8E0C, WORD_LEN, 0}, -{ 0x8A9A, 0xB808, WORD_LEN, 0}, -{ 0x8A9C, 0x7825, WORD_LEN, 0}, -{ 0x8A9E, 0x7710, WORD_LEN, 0}, -{ 0x8AA0, 0x21C2, WORD_LEN, 0}, -{ 0x8AA2, 0x244C, WORD_LEN, 0}, -{ 0x8AA4, 0x081D, WORD_LEN, 0}, -{ 0x8AA6, 0x03E3, WORD_LEN, 0}, -{ 0x8AA8, 0xD9FF, WORD_LEN, 0}, -{ 0x8AAA, 0x2702, WORD_LEN, 0}, -{ 0x8AAC, 0x1002, WORD_LEN, 0}, -{ 0x8AAE, 0x2A05, WORD_LEN, 0}, -{ 0x8AB0, 0x037E, WORD_LEN, 0}, -{ 0x8AB2, 0x0876, WORD_LEN, 0}, -{ 0x8AB4, 0x06E4, WORD_LEN, 0}, -{ 0x8AB6, 0x702F, WORD_LEN, 0}, -{ 0x8AB8, 0x7810, WORD_LEN, 0}, -{ 0x8ABA, 0x7F02, WORD_LEN, 0}, -{ 0x8ABC, 0x7FF0, WORD_LEN, 0}, -{ 0x8ABE, 0xF00B, WORD_LEN, 0}, -{ 0x8AC0, 0x78E2, WORD_LEN, 0}, -{ 0x8AC2, 0x2805, WORD_LEN, 0}, -{ 0x8AC4, 0x037E, WORD_LEN, 0}, -{ 0x8AC6, 0x0862, WORD_LEN, 0}, -{ 0x8AC8, 0x06E4, WORD_LEN, 0}, -{ 0x8ACA, 0x702F, WORD_LEN, 0}, -{ 0x8ACC, 0x7810, WORD_LEN, 0}, -{ 0x8ACE, 0x671F, WORD_LEN, 0}, -{ 0x8AD0, 0x7FF0, WORD_LEN, 0}, -{ 0x8AD2, 0x7FEF, WORD_LEN, 0}, -{ 0x8AD4, 0x8E08, WORD_LEN, 0}, -{ 0x8AD6, 0xBF06, WORD_LEN, 0}, -{ 0x8AD8, 0xD15A, WORD_LEN, 0}, -{ 0x8ADA, 0xB8C3, WORD_LEN, 0}, -{ 0x8ADC, 0x78E5, WORD_LEN, 0}, -{ 0x8ADE, 0xB88F, WORD_LEN, 0}, -{ 0x8AE0, 0x1908, WORD_LEN, 0}, -{ 0x8AE2, 0x0024, WORD_LEN, 0}, -{ 0x8AE4, 0x2841, WORD_LEN, 0}, -{ 0x8AE6, 0x0201, WORD_LEN, 0}, -{ 0x8AE8, 0x1E26, WORD_LEN, 0}, -{ 0x8AEA, 0x1042, WORD_LEN, 0}, -{ 0x8AEC, 0x0D15, WORD_LEN, 0}, -{ 0x8AEE, 0x1423, WORD_LEN, 0}, -{ 0x8AF0, 0x1E27, WORD_LEN, 0}, -{ 0x8AF2, 0x1002, WORD_LEN, 0}, -{ 0x8AF4, 0x214C, WORD_LEN, 0}, -{ 0x8AF6, 0xA000, WORD_LEN, 0}, -{ 0x8AF8, 0x214A, WORD_LEN, 0}, -{ 0x8AFA, 0x2040, WORD_LEN, 0}, -{ 0x8AFC, 0x21C2, WORD_LEN, 0}, -{ 0x8AFE, 0x2442, WORD_LEN, 0}, -{ 0x8B00, 0x8E21, WORD_LEN, 0}, -{ 0x8B02, 0x214F, WORD_LEN, 0}, -{ 0x8B04, 0x0040, WORD_LEN, 0}, -{ 0x8B06, 0x090F, WORD_LEN, 0}, -{ 0x8B08, 0x2010, WORD_LEN, 0}, -{ 0x8B0A, 0x2145, WORD_LEN, 0}, -{ 0x8B0C, 0x0181, WORD_LEN, 0}, -{ 0x8B0E, 0xAE21, WORD_LEN, 0}, -{ 0x8B10, 0xF003, WORD_LEN, 0}, -{ 0x8B12, 0xB8A2, WORD_LEN, 0}, -{ 0x8B14, 0xAE01, WORD_LEN, 0}, -{ 0x8B16, 0x0BFA, WORD_LEN, 0}, -{ 0x8B18, 0xFFE3, WORD_LEN, 0}, -{ 0x8B1A, 0x70A9, WORD_LEN, 0}, -{ 0x8B1C, 0x0789, WORD_LEN, 0}, -{ 0x8B1E, 0x0684, WORD_LEN, 0}, -{ 0x8B20, 0xD149, WORD_LEN, 0}, -{ 0x8B22, 0xD24A, WORD_LEN, 0}, -{ 0x8B24, 0x11B2, WORD_LEN, 0}, -{ 0x8B26, 0x8903, WORD_LEN, 0}, -{ 0x8B28, 0x1252, WORD_LEN, 0}, -{ 0x8B2A, 0x0100, WORD_LEN, 0}, -{ 0x8B2C, 0x7B6F, WORD_LEN, 0}, -{ 0x8B2E, 0xB808, WORD_LEN, 0}, -{ 0x8B30, 0x2004, WORD_LEN, 0}, -{ 0x8B32, 0x0F80, WORD_LEN, 0}, -{ 0x8B34, 0x0000, WORD_LEN, 0}, -{ 0x8B36, 0xFF00, WORD_LEN, 0}, -{ 0x8B38, 0x7865, WORD_LEN, 0}, -{ 0x8B3A, 0x19B2, WORD_LEN, 0}, -{ 0x8B3C, 0x8024, WORD_LEN, 0}, -{ 0x8B3E, 0xD044, WORD_LEN, 0}, -{ 0x8B40, 0x8801, WORD_LEN, 0}, -{ 0x8B42, 0xB8E1, WORD_LEN, 0}, -{ 0x8B44, 0xD800, WORD_LEN, 0}, -{ 0x8B46, 0xF404, WORD_LEN, 0}, -{ 0x8B48, 0x1234, WORD_LEN, 0}, -{ 0x8B4A, 0x0080, WORD_LEN, 0}, -{ 0x8B4C, 0x1955, WORD_LEN, 0}, -{ 0x8B4E, 0x803C, WORD_LEN, 0}, -{ 0x8B50, 0x1233, WORD_LEN, 0}, -{ 0x8B52, 0x0080, WORD_LEN, 0}, -{ 0x8B54, 0xB802, WORD_LEN, 0}, -{ 0x8B56, 0x1957, WORD_LEN, 0}, -{ 0x8B58, 0x803C, WORD_LEN, 0}, -{ 0x8B5A, 0x1958, WORD_LEN, 0}, -{ 0x8B5C, 0x803C, WORD_LEN, 0}, -{ 0x8B5E, 0x1959, WORD_LEN, 0}, -{ 0x8B60, 0x803C, WORD_LEN, 0}, -{ 0x8B62, 0x195A, WORD_LEN, 0}, -{ 0x8B64, 0x803C, WORD_LEN, 0}, -{ 0x8B66, 0x7EE0, WORD_LEN, 0}, -{ 0x8B68, 0xC0F1, WORD_LEN, 0}, -{ 0x8B6A, 0x0EE6, WORD_LEN, 0}, -{ 0x8B6C, 0x0684, WORD_LEN, 0}, -{ 0x8B6E, 0xD523, WORD_LEN, 0}, -{ 0x8B70, 0x8D2C, WORD_LEN, 0}, -{ 0x8B72, 0x0983, WORD_LEN, 0}, -{ 0x8B74, 0x0010, WORD_LEN, 0}, -{ 0x8B76, 0xD236, WORD_LEN, 0}, -{ 0x8B78, 0x123A, WORD_LEN, 0}, -{ 0x8B7A, 0x0083, WORD_LEN, 0}, -{ 0x8B7C, 0x123B, WORD_LEN, 0}, -{ 0x8B7E, 0x008F, WORD_LEN, 0}, -{ 0x8B80, 0x8D55, WORD_LEN, 0}, -{ 0x8B82, 0xBB08, WORD_LEN, 0}, -{ 0x8B84, 0x7BE5, WORD_LEN, 0}, -{ 0x8B86, 0x8DF6, WORD_LEN, 0}, -{ 0x8B88, 0xBA08, WORD_LEN, 0}, -{ 0x8B8A, 0x7AE5, WORD_LEN, 0}, -{ 0x8B8C, 0x0B0D, WORD_LEN, 0}, -{ 0x8B8E, 0x00A3, WORD_LEN, 0}, -{ 0x8B90, 0x8DC5, WORD_LEN, 0}, -{ 0x8B92, 0x8D54, WORD_LEN, 0}, -{ 0x8B94, 0xAD45, WORD_LEN, 0}, -{ 0x8B96, 0xF026, WORD_LEN, 0}, -{ 0x8B98, 0x65DB, WORD_LEN, 0}, -{ 0x8B9A, 0x8B6D, WORD_LEN, 0}, -{ 0x8B9C, 0x0815, WORD_LEN, 0}, -{ 0x8B9E, 0x00E2, WORD_LEN, 0}, -{ 0x8BA0, 0x65DA, WORD_LEN, 0}, -{ 0x8BA2, 0x8A51, WORD_LEN, 0}, -{ 0x8BA4, 0x0A0D, WORD_LEN, 0}, -{ 0x8BA6, 0x0002, WORD_LEN, 0}, -{ 0x8BA8, 0xE683, WORD_LEN, 0}, -{ 0x8BAA, 0x22CA, WORD_LEN, 0}, -{ 0x8BAC, 0x038B, WORD_LEN, 0}, -{ 0x8BAE, 0xF69A, WORD_LEN, 0}, -{ 0x8BB0, 0xDA00, WORD_LEN, 0}, -{ 0x8BB2, 0xAD45, WORD_LEN, 0}, -{ 0x8BB4, 0x2540, WORD_LEN, 0}, -{ 0x8BB6, 0x1343, WORD_LEN, 0}, -{ 0x8BB8, 0xE180, WORD_LEN, 0}, -{ 0x8BBA, 0x2540, WORD_LEN, 0}, -{ 0x8BBC, 0x144F, WORD_LEN, 0}, -{ 0x8BBE, 0xF6D2, WORD_LEN, 0}, -{ 0x8BC0, 0x719F, WORD_LEN, 0}, -{ 0x8BC2, 0x78E0, WORD_LEN, 0}, -{ 0x8BC4, 0x20A8, WORD_LEN, 0}, -{ 0x8BC6, 0x0280, WORD_LEN, 0}, -{ 0x8BC8, 0x8B20, WORD_LEN, 0}, -{ 0x8BCA, 0x0813, WORD_LEN, 0}, -{ 0x8BCC, 0x0043, WORD_LEN, 0}, -{ 0x8BCE, 0xE201, WORD_LEN, 0}, -{ 0x8BD0, 0x7A4F, WORD_LEN, 0}, -{ 0x8BD2, 0xAD45, WORD_LEN, 0}, -{ 0x8BD4, 0xE301, WORD_LEN, 0}, -{ 0x8BD6, 0xE701, WORD_LEN, 0}, -{ 0x8BD8, 0xF004, WORD_LEN, 0}, -{ 0x8BDA, 0x8F20, WORD_LEN, 0}, -{ 0x8BDC, 0x09F3, WORD_LEN, 0}, -{ 0x8BDE, 0x8002, WORD_LEN, 0}, -{ 0x8BE0, 0xD01C, WORD_LEN, 0}, -{ 0x8BE2, 0x8800, WORD_LEN, 0}, -{ 0x8BE4, 0xE803, WORD_LEN, 0}, -{ 0x8BE6, 0x0E0F, WORD_LEN, 0}, -{ 0x8BE8, 0x1080, WORD_LEN, 0}, -{ 0x8BEA, 0xD008, WORD_LEN, 0}, -{ 0x8BEC, 0x8000, WORD_LEN, 0}, -{ 0x8BEE, 0x8002, WORD_LEN, 0}, -{ 0x8BF0, 0x7840, WORD_LEN, 0}, -{ 0x8BF2, 0x06C5, WORD_LEN, 0}, -{ 0x8BF4, 0x0684, WORD_LEN, 0}, -{ 0x8BF6, 0x78E0, WORD_LEN, 0}, -{ 0x8BF8, 0xFF80, WORD_LEN, 0}, -{ 0x8BFA, 0x0644, WORD_LEN, 0}, -{ 0x8BFC, 0x0000, WORD_LEN, 0}, -{ 0x8BFE, 0xF978, WORD_LEN, 0}, -{ 0x8C00, 0xFF80, WORD_LEN, 0}, -{ 0x8C02, 0x0E00, WORD_LEN, 0}, -{ 0x8C04, 0xFF80, WORD_LEN, 0}, -{ 0x8C06, 0x0B68, WORD_LEN, 0}, -{ 0x8C08, 0x8000, WORD_LEN, 0}, -{ 0x8C0A, 0x0164, WORD_LEN, 0}, -{ 0x8C0C, 0x0000, WORD_LEN, 0}, -{ 0x8C0E, 0xF9AC, WORD_LEN, 0}, -{ 0x8C10, 0xFF80, WORD_LEN, 0}, -{ 0x8C12, 0x0B20, WORD_LEN, 0}, -{ 0x8C14, 0xFF80, WORD_LEN, 0}, -{ 0x8C16, 0x0314, WORD_LEN, 0}, -{ 0x8C18, 0x8000, WORD_LEN, 0}, -{ 0x8C1A, 0x016C, WORD_LEN, 0}, -{ 0x8C1C, 0xFF80, WORD_LEN, 0}, -{ 0x8C1E, 0x0694, WORD_LEN, 0}, -{ 0x8C20, 0x0000, WORD_LEN, 0}, -{ 0x8C22, 0xF444, WORD_LEN, 0}, -{ 0x8C24, 0xFF80, WORD_LEN, 0}, -{ 0x8C26, 0x0C54, WORD_LEN, 0}, -{ 0x8C28, 0x8000, WORD_LEN, 0}, -{ 0x8C2A, 0x009C, WORD_LEN, 0}, -{ 0x8C2C, 0x8000, WORD_LEN, 0}, -{ 0x8C2E, 0x0008, WORD_LEN, 0}, -{ 0x8C30, 0xFF80, WORD_LEN, 0}, -{ 0x8C32, 0x0DF0, WORD_LEN, 0}, -{ 0x8C34, 0xFF80, WORD_LEN, 0}, -{ 0x8C36, 0x02CC, WORD_LEN, 0}, -{ 0x8C38, 0xFF80, WORD_LEN, 0}, -{ 0x8C3A, 0x0158, WORD_LEN, 0}, -{ 0x8C3C, 0xFF80, WORD_LEN, 0}, -{ 0x8C3E, 0x0290, WORD_LEN, 0}, -{ 0x8C40, 0xFF00, WORD_LEN, 0}, -{ 0x8C42, 0x0618, WORD_LEN, 0}, -{ 0x8C44, 0xFF00, WORD_LEN, 0}, -{ 0x8C46, 0x33CC, WORD_LEN, 0}, -{ 0x8C48, 0xFF80, WORD_LEN, 0}, -{ 0x8C4A, 0x0658, WORD_LEN, 0}, -{ 0x8C4C, 0xFF80, WORD_LEN, 0}, -{ 0x8C4E, 0x0250, WORD_LEN, 0}, -{ 0x8C50, 0x8000, WORD_LEN, 0}, -{ 0x8C52, 0x0168, WORD_LEN, 0}, -{ 0x8C54, 0xC0F1, WORD_LEN, 0}, -{ 0x8C56, 0x0DFE, WORD_LEN, 0}, -{ 0x8C58, 0x0684, WORD_LEN, 0}, -{ 0x8C5A, 0x17BC, WORD_LEN, 0}, -{ 0x8C5C, 0xF00E, WORD_LEN, 0}, -{ 0x8C5E, 0x8E01, WORD_LEN, 0}, -{ 0x8C60, 0xB8A4, WORD_LEN, 0}, -{ 0x8C62, 0xAE01, WORD_LEN, 0}, -{ 0x8C64, 0x8E09, WORD_LEN, 0}, -{ 0x8C66, 0xB8E0, WORD_LEN, 0}, -{ 0x8C68, 0xF29B, WORD_LEN, 0}, -{ 0x8C6A, 0x17E4, WORD_LEN, 0}, -{ 0x8C6C, 0xF00D, WORD_LEN, 0}, -{ 0x8C6E, 0x153A, WORD_LEN, 0}, -{ 0x8C70, 0x1080, WORD_LEN, 0}, -{ 0x8C72, 0x153B, WORD_LEN, 0}, -{ 0x8C74, 0x1081, WORD_LEN, 0}, -{ 0x8C76, 0xB808, WORD_LEN, 0}, -{ 0x8C78, 0x7825, WORD_LEN, 0}, -{ 0x8C7A, 0x16B8, WORD_LEN, 0}, -{ 0x8C7C, 0x1101, WORD_LEN, 0}, -{ 0x8C7E, 0x092D, WORD_LEN, 0}, -{ 0x8C80, 0x0003, WORD_LEN, 0}, -{ 0x8C82, 0x16B0, WORD_LEN, 0}, -{ 0x8C84, 0x1082, WORD_LEN, 0}, -{ 0x8C86, 0x1E3C, WORD_LEN, 0}, -{ 0x8C88, 0x1082, WORD_LEN, 0}, -{ 0x8C8A, 0x16B1, WORD_LEN, 0}, -{ 0x8C8C, 0x1082, WORD_LEN, 0}, -{ 0x8C8E, 0x1E3D, WORD_LEN, 0}, -{ 0x8C90, 0x1082, WORD_LEN, 0}, -{ 0x8C92, 0x16B4, WORD_LEN, 0}, -{ 0x8C94, 0x1082, WORD_LEN, 0}, -{ 0x8C96, 0x1E3E, WORD_LEN, 0}, -{ 0x8C98, 0x1082, WORD_LEN, 0}, -{ 0x8C9A, 0x16B5, WORD_LEN, 0}, -{ 0x8C9C, 0x1082, WORD_LEN, 0}, -{ 0x8C9E, 0x1E3F, WORD_LEN, 0}, -{ 0x8CA0, 0x1082, WORD_LEN, 0}, -{ 0x8CA2, 0x8E40, WORD_LEN, 0}, -{ 0x8CA4, 0xBAA6, WORD_LEN, 0}, -{ 0x8CA6, 0xAE40, WORD_LEN, 0}, -{ 0x8CA8, 0x098F, WORD_LEN, 0}, -{ 0x8CAA, 0x0022, WORD_LEN, 0}, -{ 0x8CAC, 0x16BA, WORD_LEN, 0}, -{ 0x8CAE, 0x1102, WORD_LEN, 0}, -{ 0x8CB0, 0x0A87, WORD_LEN, 0}, -{ 0x8CB2, 0x0003, WORD_LEN, 0}, -{ 0x8CB4, 0x16B2, WORD_LEN, 0}, -{ 0x8CB6, 0x1084, WORD_LEN, 0}, -{ 0x8CB8, 0x0F2E, WORD_LEN, 0}, -{ 0x8CBA, 0x0664, WORD_LEN, 0}, -{ 0x8CBC, 0x16B0, WORD_LEN, 0}, -{ 0x8CBE, 0x1083, WORD_LEN, 0}, -{ 0x8CC0, 0x1E3C, WORD_LEN, 0}, -{ 0x8CC2, 0x1002, WORD_LEN, 0}, -{ 0x8CC4, 0x153A, WORD_LEN, 0}, -{ 0x8CC6, 0x1080, WORD_LEN, 0}, -{ 0x8CC8, 0x153B, WORD_LEN, 0}, -{ 0x8CCA, 0x1081, WORD_LEN, 0}, -{ 0x8CCC, 0x16B3, WORD_LEN, 0}, -{ 0x8CCE, 0x1084, WORD_LEN, 0}, -{ 0x8CD0, 0xB808, WORD_LEN, 0}, -{ 0x8CD2, 0x7825, WORD_LEN, 0}, -{ 0x8CD4, 0x16B8, WORD_LEN, 0}, -{ 0x8CD6, 0x1101, WORD_LEN, 0}, -{ 0x8CD8, 0x16BA, WORD_LEN, 0}, -{ 0x8CDA, 0x1102, WORD_LEN, 0}, -{ 0x8CDC, 0x0F0A, WORD_LEN, 0}, -{ 0x8CDE, 0x0664, WORD_LEN, 0}, -{ 0x8CE0, 0x16B1, WORD_LEN, 0}, -{ 0x8CE2, 0x1083, WORD_LEN, 0}, -{ 0x8CE4, 0x1E3D, WORD_LEN, 0}, -{ 0x8CE6, 0x1002, WORD_LEN, 0}, -{ 0x8CE8, 0x153A, WORD_LEN, 0}, -{ 0x8CEA, 0x1080, WORD_LEN, 0}, -{ 0x8CEC, 0x153B, WORD_LEN, 0}, -{ 0x8CEE, 0x1081, WORD_LEN, 0}, -{ 0x8CF0, 0x16B6, WORD_LEN, 0}, -{ 0x8CF2, 0x1084, WORD_LEN, 0}, +{ 0x88C6, 0x0F58, WORD_LEN, 0}, +{ 0x88C8, 0xFF80, WORD_LEN, 0}, +{ 0x88CA, 0x0920, WORD_LEN, 0}, +{ 0x88CC, 0xFF80, WORD_LEN, 0}, +{ 0x88CE, 0x1010, WORD_LEN, 0}, +{ 0x88D0, 0xFF80, WORD_LEN, 0}, +{ 0x88D2, 0x1030, WORD_LEN, 0}, +{ 0x88D4, 0x0010, WORD_LEN, 0}, +{ 0x88D6, 0x0008, WORD_LEN, 0}, +{ 0x88D8, 0x0000, WORD_LEN, 0}, +{ 0x88DA, 0x0000, WORD_LEN, 0}, +{ 0x88DC, 0xD102, WORD_LEN, 0}, +{ 0x88DE, 0xD003, WORD_LEN, 0}, +{ 0x88E0, 0x7FE0, WORD_LEN, 0}, +{ 0x88E2, 0xB035, WORD_LEN, 0}, +{ 0x88E4, 0xFF80, WORD_LEN, 0}, +{ 0x88E6, 0x10C8, WORD_LEN, 0}, +{ 0x88E8, 0xFF80, WORD_LEN, 0}, +{ 0x88EA, 0x0118, WORD_LEN, 0}, +{ 0x88EC, 0xC0F1, WORD_LEN, 0}, +{ 0x88EE, 0xC5E1, WORD_LEN, 0}, +{ 0x88F0, 0xD5EC, WORD_LEN, 0}, +{ 0x88F2, 0x8D04, WORD_LEN, 0}, +{ 0x88F4, 0x8D25, WORD_LEN, 0}, +{ 0x88F6, 0xB808, WORD_LEN, 0}, +{ 0x88F8, 0x7825, WORD_LEN, 0}, +{ 0x88FA, 0x0821, WORD_LEN, 0}, +{ 0x88FC, 0x01DE, WORD_LEN, 0}, +{ 0x88FE, 0xD0EA, WORD_LEN, 0}, +{ 0x8900, 0x8000, WORD_LEN, 0}, +{ 0x8902, 0x8008, WORD_LEN, 0}, +{ 0x8904, 0x7840, WORD_LEN, 0}, +{ 0x8906, 0x8D04, WORD_LEN, 0}, +{ 0x8908, 0x8D25, WORD_LEN, 0}, +{ 0x890A, 0xB808, WORD_LEN, 0}, +{ 0x890C, 0x7825, WORD_LEN, 0}, +{ 0x890E, 0xB8A7, WORD_LEN, 0}, +{ 0x8910, 0x2841, WORD_LEN, 0}, +{ 0x8912, 0x0201, WORD_LEN, 0}, +{ 0x8914, 0xAD24, WORD_LEN, 0}, +{ 0x8916, 0xAD05, WORD_LEN, 0}, +{ 0x8918, 0x09A6, WORD_LEN, 0}, +{ 0x891A, 0x0104, WORD_LEN, 0}, +{ 0x891C, 0x01A9, WORD_LEN, 0}, +{ 0x891E, 0x06C4, WORD_LEN, 0}, +{ 0x8920, 0xC0F1, WORD_LEN, 0}, +{ 0x8922, 0x0932, WORD_LEN, 0}, +{ 0x8924, 0x06E4, WORD_LEN, 0}, +{ 0x8926, 0xDA38, WORD_LEN, 0}, +{ 0x8928, 0xD1E0, WORD_LEN, 0}, +{ 0x892A, 0xD5E1, WORD_LEN, 0}, +{ 0x892C, 0x76A9, WORD_LEN, 0}, +{ 0x892E, 0x0EC6, WORD_LEN, 0}, +{ 0x8930, 0x06A4, WORD_LEN, 0}, +{ 0x8932, 0x70C9, WORD_LEN, 0}, +{ 0x8934, 0xD0DF, WORD_LEN, 0}, +{ 0x8936, 0xA501, WORD_LEN, 0}, +{ 0x8938, 0xD0DF, WORD_LEN, 0}, +{ 0x893A, 0xA503, WORD_LEN, 0}, +{ 0x893C, 0xD0DF, WORD_LEN, 0}, +{ 0x893E, 0xA506, WORD_LEN, 0}, +{ 0x8940, 0xD0DF, WORD_LEN, 0}, +{ 0x8942, 0xA509, WORD_LEN, 0}, +{ 0x8944, 0xD0D8, WORD_LEN, 0}, +{ 0x8946, 0xA0C0, WORD_LEN, 0}, +{ 0x8948, 0xD0DE, WORD_LEN, 0}, +{ 0x894A, 0x802E, WORD_LEN, 0}, +{ 0x894C, 0x9117, WORD_LEN, 0}, +{ 0x894E, 0x0171, WORD_LEN, 0}, +{ 0x8950, 0x06E4, WORD_LEN, 0}, +{ 0x8952, 0xB10E, WORD_LEN, 0}, +{ 0x8954, 0xC0F1, WORD_LEN, 0}, +{ 0x8956, 0xD0D3, WORD_LEN, 0}, +{ 0x8958, 0x8806, WORD_LEN, 0}, +{ 0x895A, 0x080F, WORD_LEN, 0}, +{ 0x895C, 0x0051, WORD_LEN, 0}, +{ 0x895E, 0xD0D2, WORD_LEN, 0}, +{ 0x8960, 0x8000, WORD_LEN, 0}, +{ 0x8962, 0x8008, WORD_LEN, 0}, +{ 0x8964, 0x7840, WORD_LEN, 0}, +{ 0x8966, 0x0A1E, WORD_LEN, 0}, +{ 0x8968, 0x0104, WORD_LEN, 0}, +{ 0x896A, 0xC0D1, WORD_LEN, 0}, +{ 0x896C, 0x7EE0, WORD_LEN, 0}, +{ 0x896E, 0x78E0, WORD_LEN, 0}, +{ 0x8970, 0xC0F1, WORD_LEN, 0}, +{ 0x8972, 0x08D6, WORD_LEN, 0}, +{ 0x8974, 0x06C4, WORD_LEN, 0}, +{ 0x8976, 0xD7CC, WORD_LEN, 0}, +{ 0x8978, 0x8700, WORD_LEN, 0}, +{ 0x897A, 0x8009, WORD_LEN, 0}, +{ 0x897C, 0x7840, WORD_LEN, 0}, +{ 0x897E, 0xE080, WORD_LEN, 0}, +{ 0x8980, 0x0276, WORD_LEN, 0}, +{ 0x8982, 0x0002, WORD_LEN, 0}, +{ 0x8984, 0xD5C7, WORD_LEN, 0}, +{ 0x8986, 0xD6D0, WORD_LEN, 0}, +{ 0x8988, 0x1530, WORD_LEN, 0}, +{ 0x898A, 0x1081, WORD_LEN, 0}, +{ 0x898C, 0x1531, WORD_LEN, 0}, +{ 0x898E, 0x1080, WORD_LEN, 0}, +{ 0x8990, 0xB908, WORD_LEN, 0}, +{ 0x8992, 0x7905, WORD_LEN, 0}, +{ 0x8994, 0x2941, WORD_LEN, 0}, +{ 0x8996, 0x0200, WORD_LEN, 0}, +{ 0x8998, 0x1D32, WORD_LEN, 0}, +{ 0x899A, 0x1002, WORD_LEN, 0}, +{ 0x899C, 0x1D33, WORD_LEN, 0}, +{ 0x899E, 0x1042, WORD_LEN, 0}, +{ 0x89A0, 0x962D, WORD_LEN, 0}, +{ 0x89A2, 0x2540, WORD_LEN, 0}, +{ 0x89A4, 0x15D1, WORD_LEN, 0}, +{ 0x89A6, 0x2941, WORD_LEN, 0}, +{ 0x89A8, 0x0200, WORD_LEN, 0}, +{ 0x89AA, 0x1D30, WORD_LEN, 0}, +{ 0x89AC, 0x1002, WORD_LEN, 0}, +{ 0x89AE, 0x8D06, WORD_LEN, 0}, +{ 0x89B0, 0x2540, WORD_LEN, 0}, +{ 0x89B2, 0x1610, WORD_LEN, 0}, +{ 0x89B4, 0x1D31, WORD_LEN, 0}, +{ 0x89B6, 0x1042, WORD_LEN, 0}, +{ 0x89B8, 0x081B, WORD_LEN, 0}, +{ 0x89BA, 0x0051, WORD_LEN, 0}, +{ 0x89BC, 0x8700, WORD_LEN, 0}, +{ 0x89BE, 0x8008, WORD_LEN, 0}, +{ 0x89C0, 0x7840, WORD_LEN, 0}, +{ 0x89C2, 0xD900, WORD_LEN, 0}, +{ 0x89C4, 0x2941, WORD_LEN, 0}, +{ 0x89C6, 0x0200, WORD_LEN, 0}, +{ 0x89C8, 0xAD00, WORD_LEN, 0}, +{ 0x89CA, 0xAD21, WORD_LEN, 0}, +{ 0x89CC, 0xD801, WORD_LEN, 0}, +{ 0x89CE, 0x1D4D, WORD_LEN, 0}, +{ 0x89D0, 0x1002, WORD_LEN, 0}, +{ 0x89D2, 0x154D, WORD_LEN, 0}, +{ 0x89D4, 0x1080, WORD_LEN, 0}, +{ 0x89D6, 0xB861, WORD_LEN, 0}, +{ 0x89D8, 0xE085, WORD_LEN, 0}, +{ 0x89DA, 0x0218, WORD_LEN, 0}, +{ 0x89DC, 0x000D, WORD_LEN, 0}, +{ 0x89DE, 0x2740, WORD_LEN, 0}, +{ 0x89E0, 0x7381, WORD_LEN, 0}, +{ 0x89E2, 0x2132, WORD_LEN, 0}, +{ 0x89E4, 0x0000, WORD_LEN, 0}, +{ 0x89E6, 0x7914, WORD_LEN, 0}, +{ 0x89E8, 0x7900, WORD_LEN, 0}, +{ 0x89EA, 0x0323, WORD_LEN, 0}, +{ 0x89EC, 0x67BB, WORD_LEN, 0}, +{ 0x89EE, 0xD62E, WORD_LEN, 0}, +{ 0x89F0, 0x8D11, WORD_LEN, 0}, +{ 0x89F2, 0xD1B6, WORD_LEN, 0}, +{ 0x89F4, 0x8924, WORD_LEN, 0}, +{ 0x89F6, 0x2032, WORD_LEN, 0}, +{ 0x89F8, 0x2000, WORD_LEN, 0}, +{ 0x89FA, 0xDE02, WORD_LEN, 0}, +{ 0x89FC, 0x082B, WORD_LEN, 0}, +{ 0x89FE, 0x0040, WORD_LEN, 0}, +{ 0x8A00, 0x8D20, WORD_LEN, 0}, +{ 0x8A02, 0x8D41, WORD_LEN, 0}, +{ 0x8A04, 0xB908, WORD_LEN, 0}, +{ 0x8A06, 0x7945, WORD_LEN, 0}, +{ 0x8A08, 0xB983, WORD_LEN, 0}, +{ 0x8A0A, 0x2941, WORD_LEN, 0}, +{ 0x8A0C, 0x0202, WORD_LEN, 0}, +{ 0x8A0E, 0xAD40, WORD_LEN, 0}, +{ 0x8A10, 0xAD21, WORD_LEN, 0}, +{ 0x8A12, 0xD1AF, WORD_LEN, 0}, +{ 0x8A14, 0x8120, WORD_LEN, 0}, +{ 0x8A16, 0x8121, WORD_LEN, 0}, +{ 0x8A18, 0x7940, WORD_LEN, 0}, +{ 0x8A1A, 0x8D06, WORD_LEN, 0}, +{ 0x8A1C, 0xE001, WORD_LEN, 0}, +{ 0x8A1E, 0xAD06, WORD_LEN, 0}, +{ 0x8A20, 0x1D4D, WORD_LEN, 0}, +{ 0x8A22, 0x1382, WORD_LEN, 0}, +{ 0x8A24, 0xF0E9, WORD_LEN, 0}, +{ 0x8A26, 0x8D06, WORD_LEN, 0}, +{ 0x8A28, 0x1D4D, WORD_LEN, 0}, +{ 0x8A2A, 0x1382, WORD_LEN, 0}, +{ 0x8A2C, 0xE001, WORD_LEN, 0}, +{ 0x8A2E, 0xAD06, WORD_LEN, 0}, +{ 0x8A30, 0x8D00, WORD_LEN, 0}, +{ 0x8A32, 0x8D21, WORD_LEN, 0}, +{ 0x8A34, 0xB808, WORD_LEN, 0}, +{ 0x8A36, 0x7825, WORD_LEN, 0}, +{ 0x8A38, 0xB885, WORD_LEN, 0}, +{ 0x8A3A, 0x2841, WORD_LEN, 0}, +{ 0x8A3C, 0x0201, WORD_LEN, 0}, +{ 0x8A3E, 0xAD20, WORD_LEN, 0}, +{ 0x8A40, 0xAD01, WORD_LEN, 0}, +{ 0x8A42, 0x8D31, WORD_LEN, 0}, +{ 0x8A44, 0xF01A, WORD_LEN, 0}, +{ 0x8A46, 0x8D31, WORD_LEN, 0}, +{ 0x8A48, 0x8D12, WORD_LEN, 0}, +{ 0x8A4A, 0x8D46, WORD_LEN, 0}, +{ 0x8A4C, 0x7822, WORD_LEN, 0}, +{ 0x8A4E, 0x0863, WORD_LEN, 0}, +{ 0x8A50, 0x0082, WORD_LEN, 0}, +{ 0x8A52, 0x1532, WORD_LEN, 0}, +{ 0x8A54, 0x1080, WORD_LEN, 0}, +{ 0x8A56, 0x1533, WORD_LEN, 0}, +{ 0x8A58, 0x1081, WORD_LEN, 0}, +{ 0x8A5A, 0x1531, WORD_LEN, 0}, +{ 0x8A5C, 0x1082, WORD_LEN, 0}, +{ 0x8A5E, 0xB808, WORD_LEN, 0}, +{ 0x8A60, 0x7825, WORD_LEN, 0}, +{ 0x8A62, 0x1530, WORD_LEN, 0}, +{ 0x8A64, 0x1081, WORD_LEN, 0}, +{ 0x8A66, 0xB908, WORD_LEN, 0}, +{ 0x8A68, 0x7945, WORD_LEN, 0}, +{ 0x8A6A, 0xD29A, WORD_LEN, 0}, +{ 0x8A6C, 0x0992, WORD_LEN, 0}, +{ 0x8A6E, 0x0020, WORD_LEN, 0}, +{ 0x8A70, 0x8A40, WORD_LEN, 0}, +{ 0x8A72, 0x8D31, WORD_LEN, 0}, +{ 0x8A74, 0x081F, WORD_LEN, 0}, +{ 0x8A76, 0x0051, WORD_LEN, 0}, +{ 0x8A78, 0x8D06, WORD_LEN, 0}, +{ 0x8A7A, 0x6038, WORD_LEN, 0}, +{ 0x8A7C, 0xD194, WORD_LEN, 0}, +{ 0x8A7E, 0x8120, WORD_LEN, 0}, +{ 0x8A80, 0x8121, WORD_LEN, 0}, +{ 0x8A82, 0x7960, WORD_LEN, 0}, +{ 0x8A84, 0x2132, WORD_LEN, 0}, +{ 0x8A86, 0x2000, WORD_LEN, 0}, +{ 0x8A88, 0x8D06, WORD_LEN, 0}, +{ 0x8A8A, 0xE001, WORD_LEN, 0}, +{ 0x8A8C, 0xAD06, WORD_LEN, 0}, +{ 0x8A8E, 0xD806, WORD_LEN, 0}, +{ 0x8A90, 0xF0B1, WORD_LEN, 0}, +{ 0x8A92, 0xE88F, WORD_LEN, 0}, +{ 0x8A94, 0x8D66, WORD_LEN, 0}, +{ 0x8A96, 0x633B, WORD_LEN, 0}, +{ 0x8A98, 0x63BB, WORD_LEN, 0}, +{ 0x8A9A, 0xD08D, WORD_LEN, 0}, +{ 0x8A9C, 0x8000, WORD_LEN, 0}, +{ 0x8A9E, 0x8021, WORD_LEN, 0}, +{ 0x8AA0, 0x7960, WORD_LEN, 0}, +{ 0x8AA2, 0x8B17, WORD_LEN, 0}, +{ 0x8AA4, 0x8D06, WORD_LEN, 0}, +{ 0x8AA6, 0xE001, WORD_LEN, 0}, +{ 0x8AA8, 0xAD06, WORD_LEN, 0}, +{ 0x8AAA, 0xD803, WORD_LEN, 0}, +{ 0x8AAC, 0xF0A3, WORD_LEN, 0}, +{ 0x8AAE, 0x2032, WORD_LEN, 0}, +{ 0x8AB0, 0x2040, WORD_LEN, 0}, +{ 0x8AB2, 0xAD07, WORD_LEN, 0}, +{ 0x8AB4, 0xD804, WORD_LEN, 0}, +{ 0x8AB6, 0xF09F, WORD_LEN, 0}, +{ 0x8AB8, 0x1532, WORD_LEN, 0}, +{ 0x8ABA, 0x1080, WORD_LEN, 0}, +{ 0x8ABC, 0x1533, WORD_LEN, 0}, +{ 0x8ABE, 0x1081, WORD_LEN, 0}, +{ 0x8AC0, 0x1531, WORD_LEN, 0}, +{ 0x8AC2, 0x1082, WORD_LEN, 0}, +{ 0x8AC4, 0xB808, WORD_LEN, 0}, +{ 0x8AC6, 0x7825, WORD_LEN, 0}, +{ 0x8AC8, 0x1530, WORD_LEN, 0}, +{ 0x8ACA, 0x1081, WORD_LEN, 0}, +{ 0x8ACC, 0xB908, WORD_LEN, 0}, +{ 0x8ACE, 0x7945, WORD_LEN, 0}, +{ 0x8AD0, 0xD280, WORD_LEN, 0}, +{ 0x8AD2, 0x092E, WORD_LEN, 0}, +{ 0x8AD4, 0x0020, WORD_LEN, 0}, +{ 0x8AD6, 0x8A41, WORD_LEN, 0}, +{ 0x8AD8, 0x8D51, WORD_LEN, 0}, +{ 0x8ADA, 0x8D32, WORD_LEN, 0}, +{ 0x8ADC, 0x8DC6, WORD_LEN, 0}, +{ 0x8ADE, 0x7942, WORD_LEN, 0}, +{ 0x8AE0, 0x62DB, WORD_LEN, 0}, +{ 0x8AE2, 0x091F, WORD_LEN, 0}, +{ 0x8AE4, 0x03A2, WORD_LEN, 0}, +{ 0x8AE6, 0x63BB, WORD_LEN, 0}, +{ 0x8AE8, 0xE88B, WORD_LEN, 0}, +{ 0x8AEA, 0x8D00, WORD_LEN, 0}, +{ 0x8AEC, 0x8D21, WORD_LEN, 0}, +{ 0x8AEE, 0xB808, WORD_LEN, 0}, +{ 0x8AF0, 0x7825, WORD_LEN, 0}, +{ 0x8AF2, 0xB885, WORD_LEN, 0}, +{ 0x8AF4, 0x2841, WORD_LEN, 0}, +{ 0x8AF6, 0x0201, WORD_LEN, 0}, +{ 0x8AF8, 0xAD20, WORD_LEN, 0}, +{ 0x8AFA, 0xAD01, WORD_LEN, 0}, +{ 0x8AFC, 0xF1CF, WORD_LEN, 0}, +{ 0x8AFE, 0xDF04, WORD_LEN, 0}, +{ 0x8B00, 0x092B, WORD_LEN, 0}, +{ 0x8B02, 0x03A3, WORD_LEN, 0}, +{ 0x8B04, 0x1D4D, WORD_LEN, 0}, +{ 0x8B06, 0x13C2, WORD_LEN, 0}, +{ 0x8B08, 0x1530, WORD_LEN, 0}, +{ 0x8B0A, 0x108E, WORD_LEN, 0}, +{ 0x8B0C, 0x1531, WORD_LEN, 0}, +{ 0x8B0E, 0x1081, WORD_LEN, 0}, +{ 0x8B10, 0x1533, WORD_LEN, 0}, +{ 0x8B12, 0x108F, WORD_LEN, 0}, +{ 0x8B14, 0xBE08, WORD_LEN, 0}, +{ 0x8B16, 0x7E25, WORD_LEN, 0}, +{ 0x8B18, 0x1532, WORD_LEN, 0}, +{ 0x8B1A, 0x1081, WORD_LEN, 0}, +{ 0x8B1C, 0xB908, WORD_LEN, 0}, +{ 0x8B1E, 0x79E5, WORD_LEN, 0}, +{ 0x8B20, 0x0907, WORD_LEN, 0}, +{ 0x8B22, 0x0382, WORD_LEN, 0}, +{ 0x8B24, 0xE883, WORD_LEN, 0}, +{ 0x8B26, 0x8B16, WORD_LEN, 0}, +{ 0x8B28, 0xF002, WORD_LEN, 0}, +{ 0x8B2A, 0x8B15, WORD_LEN, 0}, +{ 0x8B2C, 0x8D22, WORD_LEN, 0}, +{ 0x8B2E, 0xAD07, WORD_LEN, 0}, +{ 0x8B30, 0x8D03, WORD_LEN, 0}, +{ 0x8B32, 0xD367, WORD_LEN, 0}, +{ 0x8B34, 0xB908, WORD_LEN, 0}, +{ 0x8B36, 0x8DC1, WORD_LEN, 0}, +{ 0x8B38, 0x7905, WORD_LEN, 0}, +{ 0x8B3A, 0x8D00, WORD_LEN, 0}, +{ 0x8B3C, 0xB808, WORD_LEN, 0}, +{ 0x8B3E, 0x78C5, WORD_LEN, 0}, +{ 0x8B40, 0x0921, WORD_LEN, 0}, +{ 0x8B42, 0x011E, WORD_LEN, 0}, +{ 0x8B44, 0xB883, WORD_LEN, 0}, +{ 0x8B46, 0x2841, WORD_LEN, 0}, +{ 0x8B48, 0x0201, WORD_LEN, 0}, +{ 0x8B4A, 0xAD20, WORD_LEN, 0}, +{ 0x8B4C, 0x8320, WORD_LEN, 0}, +{ 0x8B4E, 0xAD01, WORD_LEN, 0}, +{ 0x8B50, 0x8121, WORD_LEN, 0}, +{ 0x8B52, 0x7960, WORD_LEN, 0}, +{ 0x8B54, 0x2032, WORD_LEN, 0}, +{ 0x8B56, 0x2080, WORD_LEN, 0}, +{ 0x8B58, 0x8D06, WORD_LEN, 0}, +{ 0x8B5A, 0xE001, WORD_LEN, 0}, +{ 0x8B5C, 0xAD06, WORD_LEN, 0}, +{ 0x8B5E, 0xF04D, WORD_LEN, 0}, +{ 0x8B60, 0x8D00, WORD_LEN, 0}, +{ 0x8B62, 0x8D21, WORD_LEN, 0}, +{ 0x8B64, 0xB808, WORD_LEN, 0}, +{ 0x8B66, 0x7825, WORD_LEN, 0}, +{ 0x8B68, 0xB886, WORD_LEN, 0}, +{ 0x8B6A, 0x2841, WORD_LEN, 0}, +{ 0x8B6C, 0x0201, WORD_LEN, 0}, +{ 0x8B6E, 0xAD20, WORD_LEN, 0}, +{ 0x8B70, 0xAD01, WORD_LEN, 0}, +{ 0x8B72, 0xD057, WORD_LEN, 0}, +{ 0x8B74, 0x8000, WORD_LEN, 0}, +{ 0x8B76, 0x8021, WORD_LEN, 0}, +{ 0x8B78, 0x7960, WORD_LEN, 0}, +{ 0x8B7A, 0x8D07, WORD_LEN, 0}, +{ 0x8B7C, 0x1545, WORD_LEN, 0}, +{ 0x8B7E, 0x1080, WORD_LEN, 0}, +{ 0x8B80, 0x1546, WORD_LEN, 0}, +{ 0x8B82, 0x1081, WORD_LEN, 0}, +{ 0x8B84, 0xB808, WORD_LEN, 0}, +{ 0x8B86, 0x7825, WORD_LEN, 0}, +{ 0x8B88, 0x085D, WORD_LEN, 0}, +{ 0x8B8A, 0x005E, WORD_LEN, 0}, +{ 0x8B8C, 0x8D06, WORD_LEN, 0}, +{ 0x8B8E, 0xE001, WORD_LEN, 0}, +{ 0x8B90, 0xAD06, WORD_LEN, 0}, +{ 0x8B92, 0xD805, WORD_LEN, 0}, +{ 0x8B94, 0xF02F, WORD_LEN, 0}, +{ 0x8B96, 0x1530, WORD_LEN, 0}, +{ 0x8B98, 0x1082, WORD_LEN, 0}, +{ 0x8B9A, 0x1531, WORD_LEN, 0}, +{ 0x8B9C, 0x1080, WORD_LEN, 0}, +{ 0x8B9E, 0xD14D, WORD_LEN, 0}, +{ 0x8BA0, 0xBA08, WORD_LEN, 0}, +{ 0x8BA2, 0x7A05, WORD_LEN, 0}, +{ 0x8BA4, 0x8903, WORD_LEN, 0}, +{ 0x8BA6, 0x080F, WORD_LEN, 0}, +{ 0x8BA8, 0x0083, WORD_LEN, 0}, +{ 0x8BAA, 0x8902, WORD_LEN, 0}, +{ 0x8BAC, 0x8E44, WORD_LEN, 0}, +{ 0x8BAE, 0x0839, WORD_LEN, 0}, +{ 0x8BB0, 0x0082, WORD_LEN, 0}, +{ 0x8BB2, 0x1545, WORD_LEN, 0}, +{ 0x8BB4, 0x1082, WORD_LEN, 0}, +{ 0x8BB6, 0x1546, WORD_LEN, 0}, +{ 0x8BB8, 0x1080, WORD_LEN, 0}, +{ 0x8BBA, 0xBA08, WORD_LEN, 0}, +{ 0x8BBC, 0x7A05, WORD_LEN, 0}, +{ 0x8BBE, 0x0A29, WORD_LEN, 0}, +{ 0x8BC0, 0x005E, WORD_LEN, 0}, +{ 0x8BC2, 0x8D00, WORD_LEN, 0}, +{ 0x8BC4, 0x8D21, WORD_LEN, 0}, +{ 0x8BC6, 0xB808, WORD_LEN, 0}, +{ 0x8BC8, 0x7825, WORD_LEN, 0}, +{ 0x8BCA, 0xB88D, WORD_LEN, 0}, +{ 0x8BCC, 0x2841, WORD_LEN, 0}, +{ 0x8BCE, 0x0201, WORD_LEN, 0}, +{ 0x8BD0, 0xAD20, WORD_LEN, 0}, +{ 0x8BD2, 0xAD01, WORD_LEN, 0}, +{ 0x8BD4, 0x0A11, WORD_LEN, 0}, +{ 0x8BD6, 0x009E, WORD_LEN, 0}, +{ 0x8BD8, 0xD03D, WORD_LEN, 0}, +{ 0x8BDA, 0x8000, WORD_LEN, 0}, +{ 0x8BDC, 0x8021, WORD_LEN, 0}, +{ 0x8BDE, 0x7960, WORD_LEN, 0}, +{ 0x8BE0, 0x1550, WORD_LEN, 0}, +{ 0x8BE2, 0x1080, WORD_LEN, 0}, +{ 0x8BE4, 0xD800, WORD_LEN, 0}, +{ 0x8BE6, 0x09AA, WORD_LEN, 0}, +{ 0x8BE8, 0x0164, WORD_LEN, 0}, +{ 0x8BEA, 0x1D4D, WORD_LEN, 0}, +{ 0x8BEC, 0x1002, WORD_LEN, 0}, +{ 0x8BEE, 0xF005, WORD_LEN, 0}, +{ 0x8BF0, 0xD800, WORD_LEN, 0}, +{ 0x8BF2, 0x1D4D, WORD_LEN, 0}, +{ 0x8BF4, 0x1002, WORD_LEN, 0}, +{ 0x8BF6, 0x06B1, WORD_LEN, 0}, +{ 0x8BF8, 0x0684, WORD_LEN, 0}, +{ 0x8BFA, 0x78E0, WORD_LEN, 0}, +{ 0x8BFC, 0xC0F1, WORD_LEN, 0}, +{ 0x8BFE, 0x0E4E, WORD_LEN, 0}, +{ 0x8C00, 0x06A4, WORD_LEN, 0}, +{ 0x8C02, 0x7308, WORD_LEN, 0}, +{ 0x8C04, 0x0919, WORD_LEN, 0}, +{ 0x8C06, 0x0023, WORD_LEN, 0}, +{ 0x8C08, 0x721A, WORD_LEN, 0}, +{ 0x8C0A, 0xD026, WORD_LEN, 0}, +{ 0x8C0C, 0x1030, WORD_LEN, 0}, +{ 0x8C0E, 0x0082, WORD_LEN, 0}, +{ 0x8C10, 0x1031, WORD_LEN, 0}, +{ 0x8C12, 0x0081, WORD_LEN, 0}, +{ 0x8C14, 0xBA08, WORD_LEN, 0}, +{ 0x8C16, 0x7A25, WORD_LEN, 0}, +{ 0x8C18, 0xDD00, WORD_LEN, 0}, +{ 0x8C1A, 0xF005, WORD_LEN, 0}, +{ 0x8C1C, 0xDD01, WORD_LEN, 0}, +{ 0x8C1E, 0x7268, WORD_LEN, 0}, +{ 0x8C20, 0x7328, WORD_LEN, 0}, +{ 0x8C22, 0x2302, WORD_LEN, 0}, +{ 0x8C24, 0x0080, WORD_LEN, 0}, +{ 0x8C26, 0x2885, WORD_LEN, 0}, +{ 0x8C28, 0x0901, WORD_LEN, 0}, +{ 0x8C2A, 0x702F, WORD_LEN, 0}, +{ 0x8C2C, 0x0EFA, WORD_LEN, 0}, +{ 0x8C2E, 0x06A4, WORD_LEN, 0}, +{ 0x8C30, 0x7168, WORD_LEN, 0}, +{ 0x8C32, 0xD31C, WORD_LEN, 0}, +{ 0x8C34, 0x8BC6, WORD_LEN, 0}, +{ 0x8C36, 0x8B31, WORD_LEN, 0}, +{ 0x8C38, 0x780F, WORD_LEN, 0}, +{ 0x8C3A, 0xD226, WORD_LEN, 0}, +{ 0x8C3C, 0x663E, WORD_LEN, 0}, +{ 0x8C3E, 0xD123, WORD_LEN, 0}, +{ 0x8C40, 0xBE62, WORD_LEN, 0}, +{ 0x8C42, 0x7ECF, WORD_LEN, 0}, +{ 0x8C44, 0x89E4, WORD_LEN, 0}, +{ 0x8C46, 0x2214, WORD_LEN, 0}, +{ 0x8C48, 0x0381, WORD_LEN, 0}, +{ 0x8C4A, 0xED07, WORD_LEN, 0}, +{ 0x8C4C, 0x2840, WORD_LEN, 0}, +{ 0x8C4E, 0x020E, WORD_LEN, 0}, +{ 0x8C50, 0x7EE5, WORD_LEN, 0}, +{ 0x8C52, 0xB1CC, WORD_LEN, 0}, +{ 0x8C54, 0xF007, WORD_LEN, 0}, +{ 0x8C56, 0x7E12, WORD_LEN, 0}, +{ 0x8C58, 0xE601, WORD_LEN, 0}, +{ 0x8C5A, 0x7ECF, WORD_LEN, 0}, +{ 0x8C5C, 0xBE08, WORD_LEN, 0}, +{ 0x8C5E, 0x7FC5, WORD_LEN, 0}, +{ 0x8C60, 0xB1EC, WORD_LEN, 0}, +{ 0x8C62, 0x080D, WORD_LEN, 0}, +{ 0x8C64, 0x2003, WORD_LEN, 0}, +{ 0x8C66, 0xED0D, WORD_LEN, 0}, +{ 0x8C68, 0xD800, WORD_LEN, 0}, +{ 0x8C6A, 0xF01A, WORD_LEN, 0}, +{ 0x8C6C, 0x134D, WORD_LEN, 0}, +{ 0x8C6E, 0x0080, WORD_LEN, 0}, +{ 0x8C70, 0x080B, WORD_LEN, 0}, +{ 0x8C72, 0x0190, WORD_LEN, 0}, +{ 0x8C74, 0x8A0E, WORD_LEN, 0}, +{ 0x8C76, 0x080B, WORD_LEN, 0}, +{ 0x8C78, 0x0291, WORD_LEN, 0}, +{ 0x8C7A, 0xD801, WORD_LEN, 0}, +{ 0x8C7C, 0xF010, WORD_LEN, 0}, +{ 0x8C7E, 0x1330, WORD_LEN, 0}, +{ 0x8C80, 0x0081, WORD_LEN, 0}, +{ 0x8C82, 0x1331, WORD_LEN, 0}, +{ 0x8C84, 0x008D, WORD_LEN, 0}, +{ 0x8C86, 0xD802, WORD_LEN, 0}, +{ 0x8C88, 0xB908, WORD_LEN, 0}, +{ 0x8C8A, 0x79A5, WORD_LEN, 0}, +{ 0x8C8C, 0xB22A, WORD_LEN, 0}, +{ 0x8C8E, 0x1332, WORD_LEN, 0}, +{ 0x8C90, 0x0081, WORD_LEN, 0}, +{ 0x8C92, 0x1333, WORD_LEN, 0}, +{ 0x8C94, 0x008D, WORD_LEN, 0}, +{ 0x8C96, 0xB908, WORD_LEN, 0}, +{ 0x8C98, 0x79A5, WORD_LEN, 0}, +{ 0x8C9A, 0xB22B, WORD_LEN, 0}, +{ 0x8C9C, 0x0611, WORD_LEN, 0}, +{ 0x8C9E, 0x0684, WORD_LEN, 0}, +{ 0x8CA0, 0xFF80, WORD_LEN, 0}, +{ 0x8CA2, 0x0290, WORD_LEN, 0}, +{ 0x8CA4, 0x8000, WORD_LEN, 0}, +{ 0x8CA6, 0x008C, WORD_LEN, 0}, +{ 0x8CA8, 0x0000, WORD_LEN, 0}, +{ 0x8CAA, 0xF3BC, WORD_LEN, 0}, +{ 0x8CAC, 0xFF80, WORD_LEN, 0}, +{ 0x8CAE, 0x1120, WORD_LEN, 0}, +{ 0x8CB0, 0xFF80, WORD_LEN, 0}, +{ 0x8CB2, 0x08EC, WORD_LEN, 0}, +{ 0x8CB4, 0xFF80, WORD_LEN, 0}, +{ 0x8CB6, 0x0954, WORD_LEN, 0}, +{ 0x8CB8, 0xFF80, WORD_LEN, 0}, +{ 0x8CBA, 0x0970, WORD_LEN, 0}, +{ 0x8CBC, 0xFF80, WORD_LEN, 0}, +{ 0x8CBE, 0x0CD4, WORD_LEN, 0}, +{ 0x8CC0, 0xFF80, WORD_LEN, 0}, +{ 0x8CC2, 0x06C8, WORD_LEN, 0}, +{ 0x8CC4, 0xFF80, WORD_LEN, 0}, +{ 0x8CC6, 0x050C, WORD_LEN, 0}, +{ 0x8CC8, 0xFF80, WORD_LEN, 0}, +{ 0x8CCA, 0x0158, WORD_LEN, 0}, +{ 0x8CCC, 0x8000, WORD_LEN, 0}, +{ 0x8CCE, 0x0008, WORD_LEN, 0}, +{ 0x8CD0, 0xFF80, WORD_LEN, 0}, +{ 0x8CD2, 0x10C8, WORD_LEN, 0}, +{ 0x8CD4, 0xC0F1, WORD_LEN, 0}, +{ 0x8CD6, 0x0D7E, WORD_LEN, 0}, +{ 0x8CD8, 0x0684, WORD_LEN, 0}, +{ 0x8CDA, 0x17C8, WORD_LEN, 0}, +{ 0x8CDC, 0xF00D, WORD_LEN, 0}, +{ 0x8CDE, 0x1545, WORD_LEN, 0}, +{ 0x8CE0, 0x1080, WORD_LEN, 0}, +{ 0x8CE2, 0x1546, WORD_LEN, 0}, +{ 0x8CE4, 0x1081, WORD_LEN, 0}, +{ 0x8CE6, 0xB808, WORD_LEN, 0}, +{ 0x8CE8, 0x7825, WORD_LEN, 0}, +{ 0x8CEA, 0xB8E0, WORD_LEN, 0}, +{ 0x8CEC, 0xDE00, WORD_LEN, 0}, +{ 0x8CEE, 0xF208, WORD_LEN, 0}, +{ 0x8CF0, 0x8D00, WORD_LEN, 0}, +{ 0x8CF2, 0x8D21, WORD_LEN, 0}, { 0x8CF4, 0xB808, WORD_LEN, 0}, { 0x8CF6, 0x7825, WORD_LEN, 0}, -{ 0x8CF8, 0x16B8, WORD_LEN, 0}, -{ 0x8CFA, 0x1101, WORD_LEN, 0}, -{ 0x8CFC, 0x16BA, WORD_LEN, 0}, -{ 0x8CFE, 0x1102, WORD_LEN, 0}, -{ 0x8D00, 0x0EE6, WORD_LEN, 0}, -{ 0x8D02, 0x0664, WORD_LEN, 0}, -{ 0x8D04, 0x16B4, WORD_LEN, 0}, -{ 0x8D06, 0x1083, WORD_LEN, 0}, -{ 0x8D08, 0x1E3E, WORD_LEN, 0}, -{ 0x8D0A, 0x1002, WORD_LEN, 0}, -{ 0x8D0C, 0x153A, WORD_LEN, 0}, -{ 0x8D0E, 0x1080, WORD_LEN, 0}, -{ 0x8D10, 0x153B, WORD_LEN, 0}, -{ 0x8D12, 0x1081, WORD_LEN, 0}, -{ 0x8D14, 0x16B7, WORD_LEN, 0}, -{ 0x8D16, 0x1084, WORD_LEN, 0}, -{ 0x8D18, 0xB808, WORD_LEN, 0}, -{ 0x8D1A, 0x7825, WORD_LEN, 0}, -{ 0x8D1C, 0x16B8, WORD_LEN, 0}, -{ 0x8D1E, 0x1101, WORD_LEN, 0}, -{ 0x8D20, 0x16BA, WORD_LEN, 0}, -{ 0x8D22, 0x1102, WORD_LEN, 0}, -{ 0x8D24, 0x0EC2, WORD_LEN, 0}, -{ 0x8D26, 0x0664, WORD_LEN, 0}, -{ 0x8D28, 0x16B5, WORD_LEN, 0}, -{ 0x8D2A, 0x1083, WORD_LEN, 0}, -{ 0x8D2C, 0x1E3F, WORD_LEN, 0}, -{ 0x8D2E, 0x1002, WORD_LEN, 0}, -{ 0x8D30, 0x8E00, WORD_LEN, 0}, -{ 0x8D32, 0xB8A6, WORD_LEN, 0}, -{ 0x8D34, 0xAE00, WORD_LEN, 0}, -{ 0x8D36, 0x153A, WORD_LEN, 0}, +{ 0x8CF8, 0x2044, WORD_LEN, 0}, +{ 0x8CFA, 0x020E, WORD_LEN, 0}, +{ 0x8CFC, 0x8D00, WORD_LEN, 0}, +{ 0x8CFE, 0x8D21, WORD_LEN, 0}, +{ 0x8D00, 0xB808, WORD_LEN, 0}, +{ 0x8D02, 0x7825, WORD_LEN, 0}, +{ 0x8D04, 0x082F, WORD_LEN, 0}, +{ 0x8D06, 0x00DE, WORD_LEN, 0}, +{ 0x8D08, 0x7108, WORD_LEN, 0}, +{ 0x8D0A, 0x2186, WORD_LEN, 0}, +{ 0x8D0C, 0x0FFE, WORD_LEN, 0}, +{ 0x8D0E, 0x262F, WORD_LEN, 0}, +{ 0x8D10, 0xF04A, WORD_LEN, 0}, +{ 0x8D12, 0xF211, WORD_LEN, 0}, +{ 0x8D14, 0x17BC, WORD_LEN, 0}, +{ 0x8D16, 0xF002, WORD_LEN, 0}, +{ 0x8D18, 0x8A25, WORD_LEN, 0}, +{ 0x8D1A, 0xE906, WORD_LEN, 0}, +{ 0x8D1C, 0xB961, WORD_LEN, 0}, +{ 0x8D1E, 0xAA25, WORD_LEN, 0}, +{ 0x8D20, 0xD806, WORD_LEN, 0}, +{ 0x8D22, 0xF01E, WORD_LEN, 0}, +{ 0x8D24, 0x8A24, WORD_LEN, 0}, +{ 0x8D26, 0xB8A3, WORD_LEN, 0}, +{ 0x8D28, 0xAA25, WORD_LEN, 0}, +{ 0x8D2A, 0x2841, WORD_LEN, 0}, +{ 0x8D2C, 0x0201, WORD_LEN, 0}, +{ 0x8D2E, 0xAD20, WORD_LEN, 0}, +{ 0x8D30, 0xAD01, WORD_LEN, 0}, +{ 0x8D32, 0x0D56, WORD_LEN, 0}, +{ 0x8D34, 0x0144, WORD_LEN, 0}, +{ 0x8D36, 0x1545, WORD_LEN, 0}, { 0x8D38, 0x1081, WORD_LEN, 0}, -{ 0x8D3A, 0x153B, WORD_LEN, 0}, -{ 0x8D3C, 0x1080, WORD_LEN, 0}, +{ 0x8D3A, 0x1546, WORD_LEN, 0}, +{ 0x8D3C, 0x1082, WORD_LEN, 0}, { 0x8D3E, 0xB908, WORD_LEN, 0}, -{ 0x8D40, 0x7905, WORD_LEN, 0}, -{ 0x8D42, 0x16BA, WORD_LEN, 0}, -{ 0x8D44, 0x1100, WORD_LEN, 0}, -{ 0x8D46, 0x085B, WORD_LEN, 0}, -{ 0x8D48, 0x0042, WORD_LEN, 0}, -{ 0x8D4A, 0xD018, WORD_LEN, 0}, -{ 0x8D4C, 0x9E31, WORD_LEN, 0}, -{ 0x8D4E, 0x904D, WORD_LEN, 0}, -{ 0x8D50, 0x0A2B, WORD_LEN, 0}, -{ 0x8D52, 0x0063, WORD_LEN, 0}, -{ 0x8D54, 0x8E00, WORD_LEN, 0}, -{ 0x8D56, 0x16B0, WORD_LEN, 0}, -{ 0x8D58, 0x1081, WORD_LEN, 0}, -{ 0x8D5A, 0x1E3C, WORD_LEN, 0}, -{ 0x8D5C, 0x1042, WORD_LEN, 0}, -{ 0x8D5E, 0x16B1, WORD_LEN, 0}, -{ 0x8D60, 0x1081, WORD_LEN, 0}, -{ 0x8D62, 0x1E3D, WORD_LEN, 0}, -{ 0x8D64, 0x1042, WORD_LEN, 0}, -{ 0x8D66, 0x16B4, WORD_LEN, 0}, -{ 0x8D68, 0x1081, WORD_LEN, 0}, -{ 0x8D6A, 0x1E3E, WORD_LEN, 0}, -{ 0x8D6C, 0x1042, WORD_LEN, 0}, -{ 0x8D6E, 0x16B5, WORD_LEN, 0}, -{ 0x8D70, 0x1081, WORD_LEN, 0}, -{ 0x8D72, 0x1E3F, WORD_LEN, 0}, -{ 0x8D74, 0x1042, WORD_LEN, 0}, -{ 0x8D76, 0xB886, WORD_LEN, 0}, -{ 0x8D78, 0xF012, WORD_LEN, 0}, -{ 0x8D7A, 0x16B2, WORD_LEN, 0}, -{ 0x8D7C, 0x1081, WORD_LEN, 0}, -{ 0x8D7E, 0xB8A6, WORD_LEN, 0}, -{ 0x8D80, 0x1E3C, WORD_LEN, 0}, -{ 0x8D82, 0x1042, WORD_LEN, 0}, -{ 0x8D84, 0x16B3, WORD_LEN, 0}, -{ 0x8D86, 0x1081, WORD_LEN, 0}, -{ 0x8D88, 0x1E3D, WORD_LEN, 0}, -{ 0x8D8A, 0x1042, WORD_LEN, 0}, -{ 0x8D8C, 0x16B6, WORD_LEN, 0}, -{ 0x8D8E, 0x1081, WORD_LEN, 0}, -{ 0x8D90, 0x1E3E, WORD_LEN, 0}, -{ 0x8D92, 0x1042, WORD_LEN, 0}, -{ 0x8D94, 0x16B7, WORD_LEN, 0}, -{ 0x8D96, 0x1081, WORD_LEN, 0}, -{ 0x8D98, 0x1E3F, WORD_LEN, 0}, -{ 0x8D9A, 0x1042, WORD_LEN, 0}, -{ 0x8D9C, 0xAE00, WORD_LEN, 0}, -{ 0x8D9E, 0x0D92, WORD_LEN, 0}, -{ 0x8DA0, 0x0184, WORD_LEN, 0}, -{ 0x8DA2, 0x051D, WORD_LEN, 0}, -{ 0x8DA4, 0x0684, WORD_LEN, 0}, -{ 0x8DA6, 0x78E0, WORD_LEN, 0}, +{ 0x8D40, 0x7945, WORD_LEN, 0}, +{ 0x8D42, 0xB9E0, WORD_LEN, 0}, +{ 0x8D44, 0x26CC, WORD_LEN, 0}, +{ 0x8D46, 0x9022, WORD_LEN, 0}, +{ 0x8D48, 0xF20A, WORD_LEN, 0}, +{ 0x8D4A, 0x8D20, WORD_LEN, 0}, +{ 0x8D4C, 0x8D41, WORD_LEN, 0}, +{ 0x8D4E, 0xB908, WORD_LEN, 0}, +{ 0x8D50, 0x7945, WORD_LEN, 0}, +{ 0x8D52, 0xB983, WORD_LEN, 0}, +{ 0x8D54, 0x2941, WORD_LEN, 0}, +{ 0x8D56, 0x0202, WORD_LEN, 0}, +{ 0x8D58, 0xAD40, WORD_LEN, 0}, +{ 0x8D5A, 0xAD21, WORD_LEN, 0}, +{ 0x8D5C, 0x0561, WORD_LEN, 0}, +{ 0x8D5E, 0x0684, WORD_LEN, 0}, +{ 0x8D60, 0xC0F1, WORD_LEN, 0}, +{ 0x8D62, 0x0CEE, WORD_LEN, 0}, +{ 0x8D64, 0x06A4, WORD_LEN, 0}, +{ 0x8D66, 0x7098, WORD_LEN, 0}, +{ 0x8D68, 0xD284, WORD_LEN, 0}, +{ 0x8D6A, 0x1206, WORD_LEN, 0}, +{ 0x8D6C, 0x0086, WORD_LEN, 0}, +{ 0x8D6E, 0x2240, WORD_LEN, 0}, +{ 0x8D70, 0x0205, WORD_LEN, 0}, +{ 0x8D72, 0x264C, WORD_LEN, 0}, +{ 0x8D74, 0x8000, WORD_LEN, 0}, +{ 0x8D76, 0x20CA, WORD_LEN, 0}, +{ 0x8D78, 0x0101, WORD_LEN, 0}, +{ 0x8D7A, 0xF237, WORD_LEN, 0}, +{ 0x8D7C, 0x8AA7, WORD_LEN, 0}, +{ 0x8D7E, 0x6D69, WORD_LEN, 0}, +{ 0x8D80, 0x7B6D, WORD_LEN, 0}, +{ 0x8D82, 0x0B3F, WORD_LEN, 0}, +{ 0x8D84, 0x0012, WORD_LEN, 0}, +{ 0x8D86, 0x7068, WORD_LEN, 0}, +{ 0x8D88, 0x780D, WORD_LEN, 0}, +{ 0x8D8A, 0x2040, WORD_LEN, 0}, +{ 0x8D8C, 0x007C, WORD_LEN, 0}, +{ 0x8D8E, 0x20A8, WORD_LEN, 0}, +{ 0x8D90, 0x0640, WORD_LEN, 0}, +{ 0x8D92, 0x71CF, WORD_LEN, 0}, +{ 0x8D94, 0xFF80, WORD_LEN, 0}, +{ 0x8D96, 0x0158, WORD_LEN, 0}, +{ 0x8D98, 0x8924, WORD_LEN, 0}, +{ 0x8D9A, 0x2532, WORD_LEN, 0}, +{ 0x8D9C, 0x00C0, WORD_LEN, 0}, +{ 0x8D9E, 0xBD61, WORD_LEN, 0}, +{ 0x8DA0, 0x0819, WORD_LEN, 0}, +{ 0x8DA2, 0x0063, WORD_LEN, 0}, +{ 0x8DA4, 0x7DAF, WORD_LEN, 0}, +{ 0x8DA6, 0x76CF, WORD_LEN, 0}, { 0x8DA8, 0xFF80, WORD_LEN, 0}, -{ 0x8DAA, 0x050C, WORD_LEN, 0}, -{ 0x8DAC, 0xE280, WORD_LEN, 0}, -{ 0x8DAE, 0x24CA, WORD_LEN, 0}, -{ 0x8DB0, 0x7082, WORD_LEN, 0}, -{ 0x8DB2, 0x78E0, WORD_LEN, 0}, -{ 0x8DB4, 0x20E8, WORD_LEN, 0}, -{ 0x8DB6, 0x01A2, WORD_LEN, 0}, -{ 0x8DB8, 0x1002, WORD_LEN, 0}, -{ 0x8DBA, 0x0D02, WORD_LEN, 0}, -{ 0x8DBC, 0x1902, WORD_LEN, 0}, -{ 0x8DBE, 0x0094, WORD_LEN, 0}, -{ 0x8DC0, 0x7FE0, WORD_LEN, 0}, -{ 0x8DC2, 0x7028, WORD_LEN, 0}, -{ 0x8DC4, 0x7308, WORD_LEN, 0}, -{ 0x8DC6, 0x1000, WORD_LEN, 0}, -{ 0x8DC8, 0x0900, WORD_LEN, 0}, -{ 0x8DCA, 0x7904, WORD_LEN, 0}, -{ 0x8DCC, 0x7947, WORD_LEN, 0}, -{ 0x8DCE, 0x1B00, WORD_LEN, 0}, -{ 0x8DD0, 0x0064, WORD_LEN, 0}, -{ 0x8DD2, 0x7EE0, WORD_LEN, 0}, -{ 0x8DD4, 0xE280, WORD_LEN, 0}, -{ 0x8DD6, 0x24CA, WORD_LEN, 0}, -{ 0x8DD8, 0x7082, WORD_LEN, 0}, -{ 0x8DDA, 0x78E0, WORD_LEN, 0}, -{ 0x8DDC, 0x20E8, WORD_LEN, 0}, -{ 0x8DDE, 0x01A2, WORD_LEN, 0}, -{ 0x8DE0, 0x1102, WORD_LEN, 0}, -{ 0x8DE2, 0x0502, WORD_LEN, 0}, -{ 0x8DE4, 0x1802, WORD_LEN, 0}, -{ 0x8DE6, 0x00B4, WORD_LEN, 0}, -{ 0x8DE8, 0x7FE0, WORD_LEN, 0}, -{ 0x8DEA, 0x7028, WORD_LEN, 0}, -{ 0x8DEC, 0x0000, WORD_LEN, 0}, -{ 0x8DEE, 0x0000, WORD_LEN, 0}, -{ 0x8DF0, 0xFF80, WORD_LEN, 0}, -{ 0x8DF2, 0x0978, WORD_LEN, 0}, -{ 0x8DF4, 0xFF80, WORD_LEN, 0}, -{ 0x8DF6, 0x0A4C, WORD_LEN, 0}, -{ 0x8DF8, 0x0000, WORD_LEN, 0}, -{ 0x8DFA, 0x08DC, WORD_LEN, 0}, -{ 0x8DFC, 0x0000, WORD_LEN, 0}, -{ 0x8DFE, 0x0998, WORD_LEN, 0}, -{ 0x098E, 0x0016, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS +{ 0x8DAA, 0x0290, WORD_LEN, 0}, +{ 0x8DAC, 0x8EF1, WORD_LEN, 0}, +{ 0x8DAE, 0x2640, WORD_LEN, 0}, +{ 0x8DB0, 0x1601, WORD_LEN, 0}, +{ 0x8DB2, 0x61E9, WORD_LEN, 0}, +{ 0x8DB4, 0x090F, WORD_LEN, 0}, +{ 0x8DB6, 0x0002, WORD_LEN, 0}, +{ 0x8DB8, 0xAAA7, WORD_LEN, 0}, +{ 0x8DBA, 0xBB61, WORD_LEN, 0}, +{ 0x8DBC, 0x7B6D, WORD_LEN, 0}, +{ 0x8DBE, 0x7088, WORD_LEN, 0}, +{ 0x8DC0, 0xF005, WORD_LEN, 0}, +{ 0x8DC2, 0x8E26, WORD_LEN, 0}, +{ 0x8DC4, 0xAAA7, WORD_LEN, 0}, +{ 0x8DC6, 0xB961, WORD_LEN, 0}, +{ 0x8DC8, 0xAE26, WORD_LEN, 0}, +{ 0x8DCA, 0x0B1F, WORD_LEN, 0}, +{ 0x8DCC, 0x0013, WORD_LEN, 0}, +{ 0x8DCE, 0x1A07, WORD_LEN, 0}, +{ 0x8DD0, 0x0182, WORD_LEN, 0}, +{ 0x8DD2, 0xD26B, WORD_LEN, 0}, +{ 0x8DD4, 0x8A20, WORD_LEN, 0}, +{ 0x8DD6, 0x8A61, WORD_LEN, 0}, +{ 0x8DD8, 0xB908, WORD_LEN, 0}, +{ 0x8DDA, 0x7965, WORD_LEN, 0}, +{ 0x8DDC, 0xB9A3, WORD_LEN, 0}, +{ 0x8DDE, 0x2941, WORD_LEN, 0}, +{ 0x8DE0, 0x020C, WORD_LEN, 0}, +{ 0x8DE2, 0xAA80, WORD_LEN, 0}, +{ 0x8DE4, 0xAA21, WORD_LEN, 0}, +{ 0x8DE6, 0x04D1, WORD_LEN, 0}, +{ 0x8DE8, 0x0684, WORD_LEN, 0}, +{ 0x8DEA, 0x78E0, WORD_LEN, 0}, +{ 0x8DEC, 0xC0F1, WORD_LEN, 0}, +{ 0x8DEE, 0xC5E1, WORD_LEN, 0}, +{ 0x8DF0, 0xD363, WORD_LEN, 0}, +{ 0x8DF2, 0x8B24, WORD_LEN, 0}, +{ 0x8DF4, 0x8B45, WORD_LEN, 0}, +{ 0x8DF6, 0xB908, WORD_LEN, 0}, +{ 0x8DF8, 0x7945, WORD_LEN, 0}, +{ 0x8DFA, 0xE188, WORD_LEN, 0}, +{ 0x8DFC, 0x21CC, WORD_LEN, 0}, +{ 0x8DFE, 0x8422, WORD_LEN, 0}, +{ 0x8E00, 0xF41F, WORD_LEN, 0}, +{ 0x8E02, 0x8B26, WORD_LEN, 0}, +{ 0x8E04, 0x093B, WORD_LEN, 0}, +{ 0x8E06, 0x0051, WORD_LEN, 0}, +{ 0x8E08, 0xD15C, WORD_LEN, 0}, +{ 0x8E0A, 0xD80A, WORD_LEN, 0}, +{ 0x8E0C, 0xA90E, WORD_LEN, 0}, +{ 0x8E0E, 0xD05D, WORD_LEN, 0}, +{ 0x8E10, 0x8804, WORD_LEN, 0}, +{ 0x8E12, 0x1330, WORD_LEN, 0}, +{ 0x8E14, 0x0082, WORD_LEN, 0}, +{ 0x8E16, 0x1331, WORD_LEN, 0}, +{ 0x8E18, 0x008D, WORD_LEN, 0}, +{ 0x8E1A, 0xBA08, WORD_LEN, 0}, +{ 0x8E1C, 0x7AA5, WORD_LEN, 0}, +{ 0x8E1E, 0xB148, WORD_LEN, 0}, +{ 0x8E20, 0x8952, WORD_LEN, 0}, +{ 0x8E22, 0xA90F, WORD_LEN, 0}, +{ 0x8E24, 0x0813, WORD_LEN, 0}, +{ 0x8E26, 0x00A2, WORD_LEN, 0}, +{ 0x8E28, 0x132C, WORD_LEN, 0}, +{ 0x8E2A, 0x0083, WORD_LEN, 0}, +{ 0x8E2C, 0xDA00, WORD_LEN, 0}, +{ 0x8E2E, 0xA953, WORD_LEN, 0}, +{ 0x8E30, 0x7862, WORD_LEN, 0}, +{ 0x8E32, 0x780F, WORD_LEN, 0}, +{ 0x8E34, 0xF005, WORD_LEN, 0}, +{ 0x8E36, 0xDA01, WORD_LEN, 0}, +{ 0x8E38, 0xA953, WORD_LEN, 0}, +{ 0x8E3A, 0x6078, WORD_LEN, 0}, +{ 0x8E3C, 0x780F, WORD_LEN, 0}, +{ 0x8E3E, 0x080E, WORD_LEN, 0}, +{ 0x8E40, 0x0000, WORD_LEN, 0}, +{ 0x8E42, 0x0485, WORD_LEN, 0}, +{ 0x8E44, 0x0684, WORD_LEN, 0}, +{ 0x8E46, 0x78E0, WORD_LEN, 0}, +{ 0x8E48, 0xC0F1, WORD_LEN, 0}, +{ 0x8E4A, 0x0BFE, WORD_LEN, 0}, +{ 0x8E4C, 0x0684, WORD_LEN, 0}, +{ 0x8E4E, 0xD64D, WORD_LEN, 0}, +{ 0x8E50, 0x7508, WORD_LEN, 0}, +{ 0x8E52, 0x8E01, WORD_LEN, 0}, +{ 0x8E54, 0xD14A, WORD_LEN, 0}, +{ 0x8E56, 0x2046, WORD_LEN, 0}, +{ 0x8E58, 0x00C0, WORD_LEN, 0}, +{ 0x8E5A, 0xAE01, WORD_LEN, 0}, +{ 0x8E5C, 0x1145, WORD_LEN, 0}, +{ 0x8E5E, 0x0080, WORD_LEN, 0}, +{ 0x8E60, 0x1146, WORD_LEN, 0}, +{ 0x8E62, 0x0082, WORD_LEN, 0}, +{ 0x8E64, 0xB808, WORD_LEN, 0}, +{ 0x8E66, 0x7845, WORD_LEN, 0}, +{ 0x8E68, 0x0817, WORD_LEN, 0}, +{ 0x8E6A, 0x001E, WORD_LEN, 0}, +{ 0x8E6C, 0x8900, WORD_LEN, 0}, +{ 0x8E6E, 0x8941, WORD_LEN, 0}, +{ 0x8E70, 0xB808, WORD_LEN, 0}, +{ 0x8E72, 0x7845, WORD_LEN, 0}, +{ 0x8E74, 0x080B, WORD_LEN, 0}, +{ 0x8E76, 0x00DE, WORD_LEN, 0}, +{ 0x8E78, 0x70A9, WORD_LEN, 0}, +{ 0x8E7A, 0xFFBA, WORD_LEN, 0}, +{ 0x8E7C, 0x7508, WORD_LEN, 0}, +{ 0x8E7E, 0x1604, WORD_LEN, 0}, +{ 0x8E80, 0x1090, WORD_LEN, 0}, +{ 0x8E82, 0x0D93, WORD_LEN, 0}, +{ 0x8E84, 0x1400, WORD_LEN, 0}, +{ 0x8E86, 0x8EEA, WORD_LEN, 0}, +{ 0x8E88, 0x8E0B, WORD_LEN, 0}, +{ 0x8E8A, 0x214A, WORD_LEN, 0}, +{ 0x8E8C, 0x2040, WORD_LEN, 0}, +{ 0x8E8E, 0x8E2D, WORD_LEN, 0}, +{ 0x8E90, 0xBF08, WORD_LEN, 0}, +{ 0x8E92, 0x7F05, WORD_LEN, 0}, +{ 0x8E94, 0x8E0C, WORD_LEN, 0}, +{ 0x8E96, 0xB808, WORD_LEN, 0}, +{ 0x8E98, 0x7825, WORD_LEN, 0}, +{ 0x8E9A, 0x7710, WORD_LEN, 0}, +{ 0x8E9C, 0x21C2, WORD_LEN, 0}, +{ 0x8E9E, 0x244C, WORD_LEN, 0}, +{ 0x8EA0, 0x081D, WORD_LEN, 0}, +{ 0x8EA2, 0x03E3, WORD_LEN, 0}, +{ 0x8EA4, 0xD9FF, WORD_LEN, 0}, +{ 0x8EA6, 0x2702, WORD_LEN, 0}, +{ 0x8EA8, 0x1002, WORD_LEN, 0}, +{ 0x8EAA, 0x2A05, WORD_LEN, 0}, +{ 0x8EAC, 0x037E, WORD_LEN, 0}, +{ 0x8EAE, 0x0C7A, WORD_LEN, 0}, +{ 0x8EB0, 0x06A4, WORD_LEN, 0}, +{ 0x8EB2, 0x702F, WORD_LEN, 0}, +{ 0x8EB4, 0x7810, WORD_LEN, 0}, +{ 0x8EB6, 0x7F02, WORD_LEN, 0}, +{ 0x8EB8, 0x7FF0, WORD_LEN, 0}, +{ 0x8EBA, 0xF00B, WORD_LEN, 0}, +{ 0x8EBC, 0x78E2, WORD_LEN, 0}, +{ 0x8EBE, 0x2805, WORD_LEN, 0}, +{ 0x8EC0, 0x037E, WORD_LEN, 0}, +{ 0x8EC2, 0x0C66, WORD_LEN, 0}, +{ 0x8EC4, 0x06A4, WORD_LEN, 0}, +{ 0x8EC6, 0x702F, WORD_LEN, 0}, +{ 0x8EC8, 0x7810, WORD_LEN, 0}, +{ 0x8ECA, 0x671F, WORD_LEN, 0}, +{ 0x8ECC, 0x7FF0, WORD_LEN, 0}, +{ 0x8ECE, 0x7FEF, WORD_LEN, 0}, +{ 0x8ED0, 0x8E08, WORD_LEN, 0}, +{ 0x8ED2, 0xBF06, WORD_LEN, 0}, +{ 0x8ED4, 0xD12C, WORD_LEN, 0}, +{ 0x8ED6, 0xB8C3, WORD_LEN, 0}, +{ 0x8ED8, 0x78E5, WORD_LEN, 0}, +{ 0x8EDA, 0xB88F, WORD_LEN, 0}, +{ 0x8EDC, 0x1908, WORD_LEN, 0}, +{ 0x8EDE, 0x0024, WORD_LEN, 0}, +{ 0x8EE0, 0x2841, WORD_LEN, 0}, +{ 0x8EE2, 0x0201, WORD_LEN, 0}, +{ 0x8EE4, 0x1E26, WORD_LEN, 0}, +{ 0x8EE6, 0x1042, WORD_LEN, 0}, +{ 0x8EE8, 0x0D15, WORD_LEN, 0}, +{ 0x8EEA, 0x1423, WORD_LEN, 0}, +{ 0x8EEC, 0x1E27, WORD_LEN, 0}, +{ 0x8EEE, 0x1002, WORD_LEN, 0}, +{ 0x8EF0, 0x214C, WORD_LEN, 0}, +{ 0x8EF2, 0xA000, WORD_LEN, 0}, +{ 0x8EF4, 0x214A, WORD_LEN, 0}, +{ 0x8EF6, 0x2040, WORD_LEN, 0}, +{ 0x8EF8, 0x21C2, WORD_LEN, 0}, +{ 0x8EFA, 0x2442, WORD_LEN, 0}, +{ 0x8EFC, 0x8E21, WORD_LEN, 0}, +{ 0x8EFE, 0x214F, WORD_LEN, 0}, +{ 0x8F00, 0x0040, WORD_LEN, 0}, +{ 0x8F02, 0x090F, WORD_LEN, 0}, +{ 0x8F04, 0x2010, WORD_LEN, 0}, +{ 0x8F06, 0x2145, WORD_LEN, 0}, +{ 0x8F08, 0x0181, WORD_LEN, 0}, +{ 0x8F0A, 0xAE21, WORD_LEN, 0}, +{ 0x8F0C, 0xF003, WORD_LEN, 0}, +{ 0x8F0E, 0xB8A2, WORD_LEN, 0}, +{ 0x8F10, 0xAE01, WORD_LEN, 0}, +{ 0x8F12, 0x0FFE, WORD_LEN, 0}, +{ 0x8F14, 0xFFA3, WORD_LEN, 0}, +{ 0x8F16, 0x70A9, WORD_LEN, 0}, +{ 0x8F18, 0x038D, WORD_LEN, 0}, +{ 0x8F1A, 0x0684, WORD_LEN, 0}, +{ 0x8F1C, 0xC0F1, WORD_LEN, 0}, +{ 0x8F1E, 0xC5E1, WORD_LEN, 0}, +{ 0x8F20, 0xD518, WORD_LEN, 0}, +{ 0x8F22, 0x8D00, WORD_LEN, 0}, +{ 0x8F24, 0xB8E7, WORD_LEN, 0}, +{ 0x8F26, 0x20D1, WORD_LEN, 0}, +{ 0x8F28, 0x80E2, WORD_LEN, 0}, +{ 0x8F2A, 0xF20D, WORD_LEN, 0}, +{ 0x8F2C, 0xD117, WORD_LEN, 0}, +{ 0x8F2E, 0xB8A7, WORD_LEN, 0}, +{ 0x8F30, 0xAD00, WORD_LEN, 0}, +{ 0x8F32, 0xD017, WORD_LEN, 0}, +{ 0x8F34, 0x7228, WORD_LEN, 0}, +{ 0x8F36, 0x8123, WORD_LEN, 0}, +{ 0x8F38, 0xA040, WORD_LEN, 0}, +{ 0x8F3A, 0x7960, WORD_LEN, 0}, +{ 0x8F3C, 0xD801, WORD_LEN, 0}, +{ 0x8F3E, 0xD800, WORD_LEN, 0}, +{ 0x8F40, 0xAD05, WORD_LEN, 0}, +{ 0x8F42, 0x0F56, WORD_LEN, 0}, +{ 0x8F44, 0xFF83, WORD_LEN, 0}, +{ 0x8F46, 0x0381, WORD_LEN, 0}, +{ 0x8F48, 0x0684, WORD_LEN, 0}, +{ 0x8F4A, 0x78E0, WORD_LEN, 0}, +{ 0x8F4C, 0xD20D, WORD_LEN, 0}, +{ 0x8F4E, 0x8A21, WORD_LEN, 0}, +{ 0x8F50, 0xB9A1, WORD_LEN, 0}, +{ 0x8F52, 0x782F, WORD_LEN, 0}, +{ 0x8F54, 0x7FE0, WORD_LEN, 0}, +{ 0x8F56, 0xAA21, WORD_LEN, 0}, +{ 0x8F58, 0xD00E, WORD_LEN, 0}, +{ 0x8F5A, 0xD10C, WORD_LEN, 0}, +{ 0x8F5C, 0xA100, WORD_LEN, 0}, +{ 0x8F5E, 0xD00E, WORD_LEN, 0}, +{ 0x8F60, 0xA101, WORD_LEN, 0}, +{ 0x8F62, 0xD00E, WORD_LEN, 0}, +{ 0x8F64, 0xA102, WORD_LEN, 0}, +{ 0x8F66, 0xD00E, WORD_LEN, 0}, +{ 0x8F68, 0xA103, WORD_LEN, 0}, +{ 0x8F6A, 0xD009, WORD_LEN, 0}, +{ 0x8F6C, 0xA020, WORD_LEN, 0}, +{ 0x8F6E, 0xD005, WORD_LEN, 0}, +{ 0x8F70, 0xD988, WORD_LEN, 0}, +{ 0x8F72, 0xA820, WORD_LEN, 0}, +{ 0x8F74, 0xF1D4, WORD_LEN, 0}, +{ 0x8F76, 0x78E0, WORD_LEN, 0}, +{ 0x8F78, 0xFF80, WORD_LEN, 0}, +{ 0x8F7A, 0x10C8, WORD_LEN, 0}, +{ 0x8F7C, 0xFF80, WORD_LEN, 0}, +{ 0x8F7E, 0x0290, WORD_LEN, 0}, +{ 0x8F80, 0xFF80, WORD_LEN, 0}, +{ 0x8F82, 0x0158, WORD_LEN, 0}, +{ 0x8F84, 0xFF00, WORD_LEN, 0}, +{ 0x8F86, 0x0618, WORD_LEN, 0}, +{ 0x8F88, 0xFF80, WORD_LEN, 0}, +{ 0x8F8A, 0x1158, WORD_LEN, 0}, +{ 0x8F8C, 0x8000, WORD_LEN, 0}, +{ 0x8F8E, 0x0008, WORD_LEN, 0}, +{ 0x8F90, 0xFF80, WORD_LEN, 0}, +{ 0x8F92, 0x0F1C, WORD_LEN, 0}, +{ 0x8F94, 0xFF80, WORD_LEN, 0}, +{ 0x8F96, 0x0DEC, WORD_LEN, 0}, +{ 0x8F98, 0xFF80, WORD_LEN, 0}, +{ 0x8F9A, 0x0F4C, WORD_LEN, 0}, +{ 0x8F9C, 0x0000, WORD_LEN, 0}, +{ 0x8F9E, 0x0998, WORD_LEN, 0}, +{ 0x8FA0, 0xC0F1, WORD_LEN, 0}, +{ 0x8FA2, 0xC5E1, WORD_LEN, 0}, +{ 0x8FA4, 0xD02C, WORD_LEN, 0}, +{ 0x8FA6, 0x0982, WORD_LEN, 0}, +{ 0x8FA8, 0x0664, WORD_LEN, 0}, +{ 0x8FAA, 0x88AE, WORD_LEN, 0}, +{ 0x8FAC, 0x0D23, WORD_LEN, 0}, +{ 0x8FAE, 0x1051, WORD_LEN, 0}, +{ 0x8FB0, 0xD12A, WORD_LEN, 0}, +{ 0x8FB2, 0x1145, WORD_LEN, 0}, +{ 0x8FB4, 0x0080, WORD_LEN, 0}, +{ 0x8FB6, 0x1146, WORD_LEN, 0}, +{ 0x8FB8, 0x0082, WORD_LEN, 0}, +{ 0x8FBA, 0xB808, WORD_LEN, 0}, +{ 0x8FBC, 0x7845, WORD_LEN, 0}, +{ 0x8FBE, 0x0813, WORD_LEN, 0}, +{ 0x8FC0, 0x00DE, WORD_LEN, 0}, +{ 0x8FC2, 0xD027, WORD_LEN, 0}, +{ 0x8FC4, 0x8000, WORD_LEN, 0}, +{ 0x8FC6, 0x8041, WORD_LEN, 0}, +{ 0x8FC8, 0x7A60, WORD_LEN, 0}, +{ 0x8FCA, 0x1150, WORD_LEN, 0}, +{ 0x8FCC, 0x0080, WORD_LEN, 0}, +{ 0x8FCE, 0x02F9, WORD_LEN, 0}, +{ 0x8FD0, 0x0684, WORD_LEN, 0}, +{ 0x8FD2, 0x78E0, WORD_LEN, 0}, +{ 0x8FD4, 0xC0F1, WORD_LEN, 0}, +{ 0x8FD6, 0x0A7E, WORD_LEN, 0}, +{ 0x8FD8, 0x0684, WORD_LEN, 0}, +{ 0x8FDA, 0xD622, WORD_LEN, 0}, +{ 0x8FDC, 0x8EA9, WORD_LEN, 0}, +{ 0x8FDE, 0x8E2A, WORD_LEN, 0}, +{ 0x8FE0, 0xBD08, WORD_LEN, 0}, +{ 0x8FE2, 0x7D25, WORD_LEN, 0}, +{ 0x8FE4, 0x2550, WORD_LEN, 0}, +{ 0x8FE6, 0x10C2, WORD_LEN, 0}, +{ 0x8FE8, 0x2A41, WORD_LEN, 0}, +{ 0x8FEA, 0x0201, WORD_LEN, 0}, +{ 0x8FEC, 0xAE29, WORD_LEN, 0}, +{ 0x8FEE, 0x0F9A, WORD_LEN, 0}, +{ 0x8FF0, 0x05A4, WORD_LEN, 0}, +{ 0x8FF2, 0xAE4A, WORD_LEN, 0}, +{ 0x8FF4, 0x0D17, WORD_LEN, 0}, +{ 0x8FF6, 0x10DE, WORD_LEN, 0}, +{ 0x8FF8, 0x8E09, WORD_LEN, 0}, +{ 0x8FFA, 0x8E2A, WORD_LEN, 0}, +{ 0x8FFC, 0xB808, WORD_LEN, 0}, +{ 0x8FFE, 0x7825, WORD_LEN, 0}, +{ 0x9000, 0xB883, WORD_LEN, 0}, +{ 0x9002, 0x2841, WORD_LEN, 0}, +{ 0x9004, 0x0201, WORD_LEN, 0}, +{ 0x9006, 0xAE29, WORD_LEN, 0}, +{ 0x9008, 0xAE0A, WORD_LEN, 0}, +{ 0x900A, 0x02B5, WORD_LEN, 0}, +{ 0x900C, 0x0684, WORD_LEN, 0}, +{ 0x900E, 0x78E0, WORD_LEN, 0}, +{ 0x9010, 0xC0F1, WORD_LEN, 0}, +{ 0x9012, 0x0A42, WORD_LEN, 0}, +{ 0x9014, 0x06A4, WORD_LEN, 0}, +{ 0x9016, 0xDA34, WORD_LEN, 0}, +{ 0x9018, 0xD113, WORD_LEN, 0}, +{ 0x901A, 0xD514, WORD_LEN, 0}, +{ 0x901C, 0x76A9, WORD_LEN, 0}, +{ 0x901E, 0x0FD6, WORD_LEN, 0}, +{ 0x9020, 0x0664, WORD_LEN, 0}, +{ 0x9022, 0x70C9, WORD_LEN, 0}, +{ 0x9024, 0xD012, WORD_LEN, 0}, +{ 0x9026, 0xA504, WORD_LEN, 0}, +{ 0x9028, 0xD012, WORD_LEN, 0}, +{ 0x902A, 0x0295, WORD_LEN, 0}, +{ 0x902C, 0x06A4, WORD_LEN, 0}, +{ 0x902E, 0xA0C0, WORD_LEN, 0}, +{ 0x9030, 0xC0F1, WORD_LEN, 0}, +{ 0x9032, 0xC5E1, WORD_LEN, 0}, +{ 0x9034, 0xD50D, WORD_LEN, 0}, +{ 0x9036, 0xD110, WORD_LEN, 0}, +{ 0x9038, 0x2540, WORD_LEN, 0}, +{ 0x903A, 0x1D00, WORD_LEN, 0}, +{ 0x903C, 0x0FB6, WORD_LEN, 0}, +{ 0x903E, 0x0664, WORD_LEN, 0}, +{ 0x9040, 0xDA50, WORD_LEN, 0}, +{ 0x9042, 0xD00E, WORD_LEN, 0}, +{ 0x9044, 0x2540, WORD_LEN, 0}, +{ 0x9046, 0x1D01, WORD_LEN, 0}, +{ 0x9048, 0xA517, WORD_LEN, 0}, +{ 0x904A, 0xD00D, WORD_LEN, 0}, +{ 0x904C, 0x0279, WORD_LEN, 0}, +{ 0x904E, 0x06A4, WORD_LEN, 0}, +{ 0x9050, 0xA020, WORD_LEN, 0}, +{ 0x9052, 0x78E0, WORD_LEN, 0}, +{ 0x9054, 0xFF80, WORD_LEN, 0}, +{ 0x9056, 0x07A8, WORD_LEN, 0}, +{ 0x9058, 0xFF80, WORD_LEN, 0}, +{ 0x905A, 0x0290, WORD_LEN, 0}, +{ 0x905C, 0x8000, WORD_LEN, 0}, +{ 0x905E, 0x0008, WORD_LEN, 0}, +{ 0x9060, 0xFF80, WORD_LEN, 0}, +{ 0x9062, 0x02CC, WORD_LEN, 0}, +{ 0x9064, 0x0000, WORD_LEN, 0}, +{ 0x9066, 0xFA88, WORD_LEN, 0}, +{ 0x9068, 0xFF80, WORD_LEN, 0}, +{ 0x906A, 0x1168, WORD_LEN, 0}, +{ 0x906C, 0xFF80, WORD_LEN, 0}, +{ 0x906E, 0x0FD4, WORD_LEN, 0}, +{ 0x9070, 0x8000, WORD_LEN, 0}, +{ 0x9072, 0x0194, WORD_LEN, 0}, +{ 0x9074, 0x0000, WORD_LEN, 0}, +{ 0x9076, 0xFB08, WORD_LEN, 0}, +{ 0x9078, 0xFF80, WORD_LEN, 0}, +{ 0x907A, 0x0FA0, WORD_LEN, 0}, +{ 0x907C, 0x8000, WORD_LEN, 0}, +{ 0x907E, 0x01A0, WORD_LEN, 0}, +{ 0x9080, 0xE280, WORD_LEN, 0}, +{ 0x9082, 0x24CA, WORD_LEN, 0}, +{ 0x9084, 0x7082, WORD_LEN, 0}, +{ 0x9086, 0x78E0, WORD_LEN, 0}, +{ 0x9088, 0x20E8, WORD_LEN, 0}, +{ 0x908A, 0x01A2, WORD_LEN, 0}, +{ 0x908C, 0x1002, WORD_LEN, 0}, +{ 0x908E, 0x0D02, WORD_LEN, 0}, +{ 0x9090, 0x1902, WORD_LEN, 0}, +{ 0x9092, 0x0094, WORD_LEN, 0}, +{ 0x9094, 0x7FE0, WORD_LEN, 0}, +{ 0x9096, 0x7028, WORD_LEN, 0}, +{ 0x9098, 0x7308, WORD_LEN, 0}, +{ 0x909A, 0x1000, WORD_LEN, 0}, +{ 0x909C, 0x0900, WORD_LEN, 0}, +{ 0x909E, 0x7904, WORD_LEN, 0}, +{ 0x90A0, 0x7947, WORD_LEN, 0}, +{ 0x90A2, 0x1B00, WORD_LEN, 0}, +{ 0x90A4, 0x0064, WORD_LEN, 0}, +{ 0x90A6, 0x7EE0, WORD_LEN, 0}, +{ 0x90A8, 0xE280, WORD_LEN, 0}, +{ 0x90AA, 0x24CA, WORD_LEN, 0}, +{ 0x90AC, 0x7082, WORD_LEN, 0}, +{ 0x90AE, 0x78E0, WORD_LEN, 0}, +{ 0x90B0, 0x20E8, WORD_LEN, 0}, +{ 0x90B2, 0x01A2, WORD_LEN, 0}, +{ 0x90B4, 0x1102, WORD_LEN, 0}, +{ 0x90B6, 0x0502, WORD_LEN, 0}, +{ 0x90B8, 0x1802, WORD_LEN, 0}, +{ 0x90BA, 0x00B4, WORD_LEN, 0}, +{ 0x90BC, 0x7FE0, WORD_LEN, 0}, +{ 0x90BE, 0x7028, WORD_LEN, 0}, +{ 0x90C0, 0x0000, WORD_LEN, 0}, +{ 0x90C2, 0x0000, WORD_LEN, 0}, +{ 0x90C4, 0x0000, WORD_LEN, 0}, +{ 0x90C6, 0x0000, WORD_LEN, 0}, +{ 0x098E, 0x0000, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS { 0x8016, 0x086C, WORD_LEN, 0}, // MON_ADDRESS_LO +{ 0x8018, 0xFF80, WORD_LEN, 0}, // MON_ADDRESS_HI { 0x8002, 0x0001, WORD_LEN, 0}, // MON_CMD -//POLL_{0x800A,0x00,!=0x07,DELAY=10,TIMEOUT=100 //Wait for the core ready -////{ SEQUENCE_WAIT_MS,300, BYTE_LEN, 0}, -{ SEQUENCE_WAIT_MS,100, BYTE_LEN, 0}, -//char_settings -{ 0x30D4, 0x9080, WORD_LEN, 0}, // COLUMN_CORRECTION -{ 0x316E, 0xC400, WORD_LEN, 0}, // DAC_ECL -{ 0x305E, 0x10A0, WORD_LEN, 0}, // GLOBAL_GAIN -{ 0x3E00, 0x0010, WORD_LEN, 0}, // SAMP_CONTROL -{ 0x3E02, 0xED02, WORD_LEN, 0}, // SAMP_ADDR_EN -{ 0x3E04, 0xC88C, WORD_LEN, 0}, // SAMP_RD1_SIG -{ 0x3E06, 0xC88C, WORD_LEN, 0}, // SAMP_RD1_SIG_BOOST -{ 0x3E08, 0x700A, WORD_LEN, 0}, // SAMP_RD1_RST -{ 0x3E0A, 0x701E, WORD_LEN, 0}, // SAMP_RD1_RST_BOOST -{ 0x3E0C, 0x00FF, WORD_LEN, 0}, // SAMP_RST1_EN -{ 0x3E0E, 0x00FF, WORD_LEN, 0}, // SAMP_RST1_BOOST -{ 0x3E10, 0x00FF, WORD_LEN, 0}, // SAMP_RST1_CLOOP_SH -{ 0x3E12, 0x0000, WORD_LEN, 0}, // SAMP_RST_BOOST_SEQ -{ 0x3E14, 0xC78C, WORD_LEN, 0}, // SAMP_SAMP1_SIG -{ 0x3E16, 0x6E06, WORD_LEN, 0}, // SAMP_SAMP1_RST -{ 0x3E18, 0xA58C, WORD_LEN, 0}, // SAMP_TX_EN -{ 0x3E1A, 0xA58E, WORD_LEN, 0}, // SAMP_TX_BOOST -{ 0x3E1C, 0xA58E, WORD_LEN, 0}, // SAMP_TX_CLOOP_SH -{ 0x3E1E, 0xC0D0, WORD_LEN, 0}, // SAMP_TX_BOOST_SEQ -{ 0x3E20, 0xEB00, WORD_LEN, 0}, // SAMP_VLN_EN -{ 0x3E22, 0x00FF, WORD_LEN, 0}, // SAMP_VLN_HOLD -{ 0x3E24, 0xEB02, WORD_LEN, 0}, // SAMP_VCL_EN -{ 0x3E26, 0xEA02, WORD_LEN, 0}, // SAMP_COLCLAMP -{ 0x3E28, 0xEB0A, WORD_LEN, 0}, // SAMP_SH_VCL -{ 0x3E2A, 0xEC01, WORD_LEN, 0}, // SAMP_SH_VREF -{ 0x3E2C, 0xEB01, WORD_LEN, 0}, // SAMP_SH_VBST -{ 0x3E2E, 0x00FF, WORD_LEN, 0}, // SAMP_SPARE -{ 0x3E30, 0x00F3, WORD_LEN, 0}, // SAMP_READOUT -{ 0x3E32, 0x3DFA, WORD_LEN, 0}, // SAMP_RESET_DONE -{ 0x3E34, 0x00FF, WORD_LEN, 0}, // SAMP_VLN_CLAMP -{ 0x3E36, 0x00F3, WORD_LEN, 0}, // SAMP_ASC_INT -{ 0x3E38, 0x0000, WORD_LEN, 0}, // SAMP_RS_CLOOP_SH_R -{ 0x3E3A, 0xF802, WORD_LEN, 0}, // SAMP_RS_CLOOP_SH -{ 0x3E3C, 0x0FFF, WORD_LEN, 0}, // SAMP_RS_BOOST_SEQ -{ 0x3E3E, 0xEA10, WORD_LEN, 0}, // SAMP_TXLO_GND -{ 0x3E40, 0xEB05, WORD_LEN, 0}, // SAMP_VLN_PER_COL -{ 0x3E42, 0xE5C8, WORD_LEN, 0}, // SAMP_RD2_SIG -{ 0x3E44, 0xE5C8, WORD_LEN, 0}, // SAMP_RD2_SIG_BOOST -{ 0x3E46, 0x8C70, WORD_LEN, 0}, // SAMP_RD2_RST -{ 0x3E48, 0x8C71, WORD_LEN, 0}, // SAMP_RD2_RST_BOOST -{ 0x3E4A, 0x00FF, WORD_LEN, 0}, // SAMP_RST2_EN -{ 0x3E4C, 0x00FF, WORD_LEN, 0}, // SAMP_RST2_BOOST -{ 0x3E4E, 0x00FF, WORD_LEN, 0}, // SAMP_RST2_CLOOP_SH -{ 0x3E50, 0xE38D, WORD_LEN, 0}, // SAMP_SAMP2_SIG -{ 0x3E52, 0x8B0A, WORD_LEN, 0}, // SAMP_SAMP2_RST -{ 0x3E58, 0xEB0A, WORD_LEN, 0}, // SAMP_PIX_CLAMP_EN -{ 0x3E5C, 0x0A00, WORD_LEN, 0}, // SAMP_PIX_PULLUP_EN -{ 0x3E5E, 0x00FF, WORD_LEN, 0}, // SAMP_PIX_PULLDOWN_EN_R -{ 0x3E60, 0x00FF, WORD_LEN, 0}, // SAMP_PIX_PULLDOWN_EN_S -{ 0x3E90, 0x3C01, WORD_LEN, 0}, // RST_ADDR_EN -{ 0x3E92, 0x00FF, WORD_LEN, 0}, // RST_RST_EN -{ 0x3E94, 0x00FF, WORD_LEN, 0}, // RST_RST_BOOST -{ 0x3E96, 0x3C00, WORD_LEN, 0}, // RST_TX_EN -{ 0x3E98, 0x3C00, WORD_LEN, 0}, // RST_TX_BOOST -{ 0x3E9A, 0x3C00, WORD_LEN, 0}, // RST_TX_CLOOP_SH -{ 0x3E9C, 0xC0E0, WORD_LEN, 0}, // RST_TX_BOOST_SEQ -{ 0x3E9E, 0x00FF, WORD_LEN, 0}, // RST_RST_CLOOP_SH -{ 0x3EA0, 0x0000, WORD_LEN, 0}, // RST_RST_BOOST_SEQ -{ 0x3EA6, 0x3C00, WORD_LEN, 0}, // RST_PIX_PULLUP_EN -{ 0x3ED8, 0x3057, WORD_LEN, 0}, // DAC_LD_12_13 -{ 0x316C, 0xB44F, WORD_LEN, 0}, // DAC_TXLO -{ 0x316E, 0xC6FF, WORD_LEN, 0}, // DAC_ECL -{ 0x3ED2, 0xEA0A, WORD_LEN, 0}, // DAC_LD_6_7 -{ 0x3ED4, 0x00A3, WORD_LEN, 0}, // DAC_LD_8_9 -{ 0x3EDC, 0x6020, WORD_LEN, 0}, // DAC_LD_16_17 -{ 0x3EE6, 0xA541, WORD_LEN, 0}, // DAC_LD_26_27 -{ 0x31E0, 0x0001, WORD_LEN, 0}, // PIX_DEF_ID -{ 0x3ED0, 0x2409, WORD_LEN, 0}, // DAC_LD_4_5 -//{ 0x3EDA, 0x6000 // DAC_LD_14_15 // -{ 0x3EDE, 0x0A49, WORD_LEN, 0}, // DAC_LD_18_19 -{ 0x3EE0, 0x4910, WORD_LEN, 0}, // DAC_LD_20_21 -{ 0x3EE2, 0x09D2, WORD_LEN, 0}, // DAC_LD_22_23 -{ 0x30B6, 0x0008, WORD_LEN, 0}, // AUTOLR_CONTROL -{ 0x337C, 0x0006, WORD_LEN, 0}, // YUV_YCBCR_CONTROL -{ 0x3E1A, 0xA582, WORD_LEN, 0}, // SAMP_TX_BOOST -{ 0x3E2E, 0xEC05, WORD_LEN, 0}, // SAMP_SPARE -{ 0x3EE6, 0xA5C0, WORD_LEN, 0}, // DAC_LD_26_27 -{ 0x316C, 0xB43F, WORD_LEN, 0}, // DAC_TXLO -{ 0x316E, 0xC6FF, WORD_LEN, 0}, // DAC_ECL -//LOAD = Lens Correction 90% 04/29/10 12:58:28 -{ 0x381C, 0x0000, WORD_LEN, 0}, -{ 0xE02A, 0x0001, WORD_LEN, 0}, // IO_NV_MEM_COMMAND - // POLL IO_NV_MEM_STATUS::IO_NVMEM_STAT_OTPM_AVAIL => 0x00 -{ SEQUENCE_WAIT_MS,100, BYTE_LEN, 0}, -{ 0x3812, 0x2124, WORD_LEN, 0}, -//POLL_FIELD= IO_NV_MEM_STATUS, IO_NV_MEM_STATUS!=0xC1,DELAY=100,TIMEOUT=50 //5 sec +//delay = 100 { SEQUENCE_WAIT_MS,100, BYTE_LEN, 0}, -{ 0xD004, 0x04, BYTE_LEN, 0}, // PGA_SOLUTION -{ 0xD006, 0x0008, WORD_LEN, 0}, // PGA_ZONE_ADDR_0 -{ 0xD005, 0x00, BYTE_LEN, 0}, // PGA_CURRENT_ZONE -{ 0xD002, 0x8002, WORD_LEN, 0}, // PGA_ALGO -{ 0x3210, 0x49B8, WORD_LEN, 0}, // COLOR_PIPELINE_CONTROL -//[Step5-AWB_CCM] -//awb_setup -{ 0xAC02, 0x00FF , WORD_LEN, 0 }, // AWB_ALGO -{ 0xAC01, 0x7F, BYTE_LEN, 0 }, // AWB_MODE -//preawb_params -{ 0xAC3C, 0x39, BYTE_LEN, 0 }, //42 // AWB_MIN_ACCEPTED_PRE_AWB_R2G_RATIO -{ 0xAC3D, 0x6E, BYTE_LEN, 0 }, //50 // AWB_MAX_ACCEPTED_PRE_AWB_R2G_RATIO -{ 0xAC3E, 0x28, BYTE_LEN, 0 }, //13 // AWB_MIN_ACCEPTED_PRE_AWB_B2G_RATIO -{ 0xAC3F, 0x6B, BYTE_LEN, 0 }, //5B // AWB_MAX_ACCEPTED_PRE_AWB_B2G_RATIO -{ 0xAC40, 0x64, BYTE_LEN, 0 }, //52 // AWB_MIN_ACCEPTED_POST_AWB_R2G_RATIO -{ 0xAC41, 0x66, BYTE_LEN, 0 }, //56 // AWB_MAX_ACCEPTED_POST_AWB_R2G_RATIO -{ 0xAC42, 0x64, BYTE_LEN, 0 }, // AWB_MIN_ACCEPTED_POST_AWB_B2G_RATIO -{ 0xAC43, 0x66, BYTE_LEN, 0 }, // AWB_MAX_ACCEPTED_POST_AWB_B2G_RATIO -//awb_patch -{ 0xACB0, 0x31, BYTE_LEN, 0 }, // AWB_RG_MIN -{ 0xACB1, 0x5B, BYTE_LEN, 0 }, //50 // AWB_RG_MAX -{ 0xACB4, 0x2A, BYTE_LEN, 0 }, //13 // AWB_BG_MIN -{ 0xACB5, 0x5B, BYTE_LEN, 0 }, // AWB_BG_MAX -{ 0xACB2, 0x42, BYTE_LEN, 0 }, // AWB_RG_MIN_BRIGHT -{ 0xACB3, 0x4B, BYTE_LEN, 0 }, // AWB_RG_MAX_BRIGHT -{ 0xACB6, 0x36, BYTE_LEN, 0 }, // AWB_BG_MIN_BRIGHT -{ 0xACB7, 0x42, BYTE_LEN, 0 }, // AWB_BG_MAX_BRIGHT -{ 0xACB8, 0x00D0, WORD_LEN, 0}, // 0x0100 // AWB_START_NUM_INT_LINES -{ 0xACBA, 0x0090, WORD_LEN, 0}, // B0 // AWB_END_NUM_INT_LINES -//bright_DNP_patch -{ 0x098E, 0xAC09, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS -{ 0xAC09, 0x01, BYTE_LEN, 0}, // AWB_MODE_EX -{ 0xAC22, 0x0000, WORD_LEN, 0}, // AWB_SHARPNESS_TH -//soc5140_ccm_settings -{ 0x098E, 0x2C46, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS [AWB_LEFT_CCM_0] -{ 0xAC46, 0x010F, WORD_LEN, 0}, //0x015F // AWB_LEFT_CCM_0 -{ 0xAC48, 0xFFAE, WORD_LEN, 0}, //0xFFC2 // AWB_LEFT_CCM_1 -{ 0xAC4A, 0x0043, WORD_LEN, 0}, //0xFFDF // AWB_LEFT_CCM_2 -{ 0xAC4C, 0xFF7E, WORD_LEN, 0}, //0xFF7F // AWB_LEFT_CCM_3 -{ 0xAC4E, 0x01BD, WORD_LEN, 0}, //0x01BB // AWB_LEFT_CCM_4 -{ 0xAC50, 0xFFC5, WORD_LEN, 0}, //0xFFC6 // AWB_LEFT_CCM_5 -{ 0xAC52, 0xFFE1, WORD_LEN, 0}, //0xFFC7 // AWB_LEFT_CCM_6 -{ 0xAC54, 0xFF34, WORD_LEN, 0}, //0xFEFA // AWB_LEFT_CCM_7 -{ 0xAC56, 0x01EB, WORD_LEN, 0}, //0x023F // AWB_LEFT_CCM_8 -{ 0xAC58, 0x00A8, WORD_LEN, 0}, // AWB_LEFT_CCM_R2BRATIO -{ 0xAC5C, 0x0233, WORD_LEN, 0}, // AWB_RIGHT_CCM_0 -{ 0xAC5E, 0xFF23, WORD_LEN, 0}, // AWB_RIGHT_CCM_1 -{ 0xAC60, 0xFFAA, WORD_LEN, 0}, // AWB_RIGHT_CCM_2 -{ 0xAC62, 0xFF91, WORD_LEN, 0}, // AWB_RIGHT_CCM_3 -{ 0xAC64, 0x01AF, WORD_LEN, 0}, // AWB_RIGHT_CCM_4 -{ 0xAC66, 0xFFBF, WORD_LEN, 0}, // AWB_RIGHT_CCM_5 -{ 0xAC68, 0xFFE7, WORD_LEN, 0}, // AWB_RIGHT_CCM_6 -{ 0xAC6A, 0xFF4C, WORD_LEN, 0}, // AWB_RIGHT_CCM_7 -{ 0xAC6C, 0x01CE, WORD_LEN, 0}, // AWB_RIGHT_CCM_8 -{ 0xAC6E, 0x005A, WORD_LEN, 0}, // AWB_RIGHT_CCM_R2BRATIO -{ 0xAC72, 0x004D, WORD_LEN, 0}, // AWB_LL_CCM_0 -{ 0xAC74, 0x0096, WORD_LEN, 0}, // AWB_LL_CCM_1 -{ 0xAC76, 0x001D, WORD_LEN, 0}, // AWB_LL_CCM_2 -{ 0xAC78, 0x004D, WORD_LEN, 0}, // AWB_LL_CCM_3 -{ 0xAC7A, 0x0096, WORD_LEN, 0}, // AWB_LL_CCM_4 -{ 0xAC7C, 0x001D, WORD_LEN, 0}, // AWB_LL_CCM_5 -{ 0xAC7E, 0x004D, WORD_LEN, 0}, // AWB_LL_CCM_6 -{ 0xAC80, 0x0096, WORD_LEN, 0}, // AWB_LL_CCM_7 -{ 0xAC82, 0x001D, WORD_LEN, 0}, // AWB_LL_CCM_8 -{ 0xAC97, 0x80, BYTE_LEN, 0}, // AWB_LEFT_TINT_COEF_FOR_CCM_ROW_0 -{ 0xAC98, 0x80, BYTE_LEN, 0}, // AWB_LEFT_TINT_COEF_FOR_CCM_ROW_1 -{ 0xAC99, 0x74, BYTE_LEN, 0}, //0x64 // AWB_LEFT_TINT_COEF_FOR_CCM_ROW_2 -{ 0xAC9A, 0x7D, BYTE_LEN, 0}, //0x76 // AWB_RIGHT_TINT_COEF_FOR_CCM_ROW_0 -{ 0xAC9B, 0x80, BYTE_LEN, 0}, // AWB_RIGHT_TINT_COEF_FOR_CCM_ROW_1 -{ 0xAC9C, 0x7D, BYTE_LEN, 0}, //0x78 // AWB_RIGHT_TINT_COEF_FOR_CCM_ROW_2 -{ 0xB83E, 0x10, BYTE_LEN, 0}, // STAT_AWB_WINDOW_POS_X -{ 0xB83F, 0x10, BYTE_LEN, 0}, // STAT_AWB_WINDOW_POS_Y -{ 0xB840, 0xDF, BYTE_LEN, 0}, // STAT_AWB_WINDOW_SIZE_X -{ 0xB841, 0xCF, BYTE_LEN, 0}, // STAT_AWB_WINDOW_SIZE_Y -//soc5140_weighted2D_awb_settings -{ 0xB842, 0x0034, WORD_LEN, 0}, //0x0032 // STAT_AWB_GRAY_CHECKER_OFFSET_X -{ 0xB844, 0x003C, WORD_LEN, 0}, //0x0038 // STAT_AWB_GRAY_CHECKER_OFFSET_Y + +//[Lens Correction 90% 02/04/13 18:03:18] +//BITFIELD= 0x3210, 0x0008, 0 //PGA_ENABLE +{ 0x3210, 0x0008, WORD_LEN, 0}, +{ 0x3210, 0x49B0, WORD_LEN, 0}, // COLOR_PIPELINE_CONTROL +{ 0x3640, 0x0170, WORD_LEN, 0}, // P_G1_P0Q0 +{ 0x3642, 0x0BCC, WORD_LEN, 0}, // P_G1_P0Q1 +{ 0x3644, 0x7210, WORD_LEN, 0}, // P_G1_P0Q2 +{ 0x3646, 0x4C8D, WORD_LEN, 0}, // P_G1_P0Q3 +{ 0x3648, 0xF58D, WORD_LEN, 0}, // P_G1_P0Q4 +{ 0x364A, 0x0610, WORD_LEN, 0}, // P_R_P0Q0 +{ 0x364C, 0x8D6E, WORD_LEN, 0}, // P_R_P0Q1 +{ 0x364E, 0x6E90, WORD_LEN, 0}, // P_R_P0Q2 +{ 0x3650, 0x088F, WORD_LEN, 0}, // P_R_P0Q3 +{ 0x3652, 0xA890, WORD_LEN, 0}, // P_R_P0Q4 +{ 0x3654, 0x0550, WORD_LEN, 0}, // P_B_P0Q0 +{ 0x3656, 0x764C, WORD_LEN, 0}, // P_B_P0Q1 +{ 0x3658, 0x0FB0, WORD_LEN, 0}, // P_B_P0Q2 +{ 0x365A, 0x9A0D, WORD_LEN, 0}, // P_B_P0Q3 +{ 0x365C, 0xF4AD, WORD_LEN, 0}, // P_B_P0Q4 +{ 0x365E, 0x02F0, WORD_LEN, 0}, // P_G2_P0Q0 +{ 0x3660, 0x9A0E, WORD_LEN, 0}, // P_G2_P0Q1 +{ 0x3662, 0x77B0, WORD_LEN, 0}, // P_G2_P0Q2 +{ 0x3664, 0x416D, WORD_LEN, 0}, // P_G2_P0Q3 +{ 0x3666, 0xF24D, WORD_LEN, 0}, // P_G2_P0Q4 +{ 0x3680, 0x018A, WORD_LEN, 0}, // P_G1_P1Q0 +{ 0x3682, 0xD0AD, WORD_LEN, 0}, // P_G1_P1Q1 +{ 0x3684, 0xC62E, WORD_LEN, 0}, // P_G1_P1Q2 +{ 0x3686, 0x736D, WORD_LEN, 0}, // P_G1_P1Q3 +{ 0x3688, 0x0130, WORD_LEN, 0}, // P_G1_P1Q4 +{ 0x368A, 0x52ED, WORD_LEN, 0}, // P_R_P1Q0 +{ 0x368C, 0x682D, WORD_LEN, 0}, // P_R_P1Q1 +{ 0x368E, 0xF02B, WORD_LEN, 0}, // P_R_P1Q2 +{ 0x3690, 0xB68E, WORD_LEN, 0}, // P_R_P1Q3 +{ 0x3692, 0xF4AD, WORD_LEN, 0}, // P_R_P1Q4 +{ 0x3694, 0xC68D, WORD_LEN, 0}, // P_B_P1Q0 +{ 0x3696, 0x440D, WORD_LEN, 0}, // P_B_P1Q1 +{ 0x3698, 0x416E, WORD_LEN, 0}, // P_B_P1Q2 +{ 0x369A, 0xC0CE, WORD_LEN, 0}, // P_B_P1Q3 +{ 0x369C, 0xB46D, WORD_LEN, 0}, // P_B_P1Q4 +{ 0x369E, 0xD90A, WORD_LEN, 0}, // P_G2_P1Q0 +{ 0x36A0, 0xD76D, WORD_LEN, 0}, // P_G2_P1Q1 +{ 0x36A2, 0xFE0D, WORD_LEN, 0}, // P_G2_P1Q2 +{ 0x36A4, 0x0E0D, WORD_LEN, 0}, // P_G2_P1Q3 +{ 0x36A6, 0x0890, WORD_LEN, 0}, // P_G2_P1Q4 +{ 0x36C0, 0x70D0, WORD_LEN, 0}, // P_G1_P2Q0 +{ 0x36C2, 0x10CF, WORD_LEN, 0}, // P_G1_P2Q1 +{ 0x36C4, 0x4592, WORD_LEN, 0}, // P_G1_P2Q2 +{ 0x36C6, 0xB74D, WORD_LEN, 0}, // P_G1_P2Q3 +{ 0x36C8, 0xEEB3, WORD_LEN, 0}, // P_G1_P2Q4 +{ 0x36CA, 0x1991, WORD_LEN, 0}, // P_R_P2Q0 +{ 0x36CC, 0x9B8E, WORD_LEN, 0}, // P_R_P2Q1 +{ 0x36CE, 0x5DCD, WORD_LEN, 0}, // P_R_P2Q2 +{ 0x36D0, 0x1C8D, WORD_LEN, 0}, // P_R_P2Q3 +{ 0x36D2, 0x8C71, WORD_LEN, 0}, // P_R_P2Q4 +{ 0x36D4, 0x00F1, WORD_LEN, 0}, // P_B_P2Q0 +{ 0x36D6, 0x480F, WORD_LEN, 0}, // P_B_P2Q1 +{ 0x36D8, 0x26AF, WORD_LEN, 0}, // P_B_P2Q2 +{ 0x36DA, 0xC2EF, WORD_LEN, 0}, // P_B_P2Q3 +{ 0x36DC, 0xFC8F, WORD_LEN, 0}, // P_B_P2Q4 +{ 0x36DE, 0x0071, WORD_LEN, 0}, // P_G2_P2Q0 +{ 0x36E0, 0x8230, WORD_LEN, 0}, // P_G2_P2Q1 +{ 0x36E2, 0x60B2, WORD_LEN, 0}, // P_G2_P2Q2 +{ 0x36E4, 0x3E51, WORD_LEN, 0}, // P_G2_P2Q3 +{ 0x36E6, 0x8C74, WORD_LEN, 0}, // P_G2_P2Q4 +{ 0x3700, 0x492E, WORD_LEN, 0}, // P_G1_P3Q0 +{ 0x3702, 0x7FAD, WORD_LEN, 0}, // P_G1_P3Q1 +{ 0x3704, 0x93CE, WORD_LEN, 0}, // P_G1_P3Q2 +{ 0x3706, 0xC86F, WORD_LEN, 0}, // P_G1_P3Q3 +{ 0x3708, 0xC830, WORD_LEN, 0}, // P_G1_P3Q4 +{ 0x370A, 0x610E, WORD_LEN, 0}, // P_R_P3Q0 +{ 0x370C, 0x8EC8, WORD_LEN, 0}, // P_R_P3Q1 +{ 0x370E, 0xA930, WORD_LEN, 0}, // P_R_P3Q2 +{ 0x3710, 0xE88D, WORD_LEN, 0}, // P_R_P3Q3 +{ 0x3712, 0x2B51, WORD_LEN, 0}, // P_R_P3Q4 +{ 0x3714, 0xDECD, WORD_LEN, 0}, // P_B_P3Q0 +{ 0x3716, 0xBD8E, WORD_LEN, 0}, // P_B_P3Q1 +{ 0x3718, 0x2E50, WORD_LEN, 0}, // P_B_P3Q2 +{ 0x371A, 0x60AF, WORD_LEN, 0}, // P_B_P3Q3 +{ 0x371C, 0xBB11, WORD_LEN, 0}, // P_B_P3Q4 +{ 0x371E, 0x22CB, WORD_LEN, 0}, // P_G2_P3Q0 +{ 0x3720, 0xEEEC, WORD_LEN, 0}, // P_G2_P3Q1 +{ 0x3722, 0x0251, WORD_LEN, 0}, // P_G2_P3Q2 +{ 0x3724, 0x142D, WORD_LEN, 0}, // P_G2_P3Q3 +{ 0x3726, 0xE271, WORD_LEN, 0}, // P_G2_P3Q4 +{ 0x3740, 0x1D10, WORD_LEN, 0}, // P_G1_P4Q0 +{ 0x3742, 0xE94F, WORD_LEN, 0}, // P_G1_P4Q1 +{ 0x3744, 0x8735, WORD_LEN, 0}, // P_G1_P4Q2 +{ 0x3746, 0xC2CC, WORD_LEN, 0}, // P_G1_P4Q3 +{ 0x3748, 0x23F6, WORD_LEN, 0}, // P_G1_P4Q4 +{ 0x374A, 0xE90F, WORD_LEN, 0}, // P_R_P4Q0 +{ 0x374C, 0x1A30, WORD_LEN, 0}, // P_R_P4Q1 +{ 0x374E, 0xAEF3, WORD_LEN, 0}, // P_R_P4Q2 +{ 0x3750, 0xB2F2, WORD_LEN, 0}, // P_R_P4Q3 +{ 0x3752, 0x2195, WORD_LEN, 0}, // P_R_P4Q4 +{ 0x3754, 0xFFEE, WORD_LEN, 0}, // P_B_P4Q0 +{ 0x3756, 0xD8D0, WORD_LEN, 0}, // P_B_P4Q1 +{ 0x3758, 0xCC92, WORD_LEN, 0}, // P_B_P4Q2 +{ 0x375A, 0x0451, WORD_LEN, 0}, // P_B_P4Q3 +{ 0x375C, 0x5814, WORD_LEN, 0}, // P_B_P4Q4 +{ 0x375E, 0x2470, WORD_LEN, 0}, // P_G2_P4Q0 +{ 0x3760, 0x6151, WORD_LEN, 0}, // P_G2_P4Q1 +{ 0x3762, 0x9555, WORD_LEN, 0}, // P_G2_P4Q2 +{ 0x3764, 0xD5D3, WORD_LEN, 0}, // P_G2_P4Q3 +{ 0x3766, 0x3B56, WORD_LEN, 0}, // P_G2_P4Q4 +{ 0x3782, 0x03DC, WORD_LEN, 0}, // CENTER_ROW +{ 0x3784, 0x04E0, WORD_LEN, 0}, // CENTER_COLUMN +{ 0x3210, 0x49B8, WORD_LEN, 0}, // COLOR_PIPELINE_CONTROL +//BITFIELD= 0x3210, 0x0008, 1 //PGA_ENABLE +//{ 0x3210, 0x0008, WORD_LEN, 0}, + + + +//[*********Step6************] +//[Step6-AWB_CCM] +//[AWB_setup] + +{ 0xAC01, 0xBB, BYTE_LEN, 0}, // AWB_MODE +//[CCM] +{ 0xAC46, 0x0221, WORD_LEN, 0}, // AWB_LEFT_CCM_0 +{ 0xAC48, 0xFEAE, WORD_LEN, 0}, // AWB_LEFT_CCM_1 +{ 0xAC4A, 0x0032, WORD_LEN, 0}, // AWB_LEFT_CCM_2 +{ 0xAC4C, 0xFFC5, WORD_LEN, 0}, // AWB_LEFT_CCM_3 +{ 0xAC4E, 0x0154, WORD_LEN, 0}, // AWB_LEFT_CCM_4 +{ 0xAC50, 0xFFE7, WORD_LEN, 0}, // AWB_LEFT_CCM_5 +{ 0xAC52, 0xFFB1, WORD_LEN, 0}, // AWB_LEFT_CCM_6 +{ 0xAC54, 0xFEC5, WORD_LEN, 0}, // AWB_LEFT_CCM_7 +{ 0xAC56, 0x028A, WORD_LEN, 0}, // AWB_LEFT_CCM_8 +{ 0xAC58, 0x00C6, WORD_LEN, 0}, // AWB_LEFT_CCM_R2BRATIO +{ 0xAC5C, 0x01CD, WORD_LEN, 0}, // AWB_RIGHT_CCM_0 +{ 0xAC5E, 0xFF63, WORD_LEN, 0}, // AWB_RIGHT_CCM_1 +{ 0xAC60, 0xFFD0, WORD_LEN, 0}, // AWB_RIGHT_CCM_2 +{ 0xAC62, 0xFFCD, WORD_LEN, 0}, // AWB_RIGHT_CCM_3 +{ 0xAC64, 0x013B, WORD_LEN, 0}, // AWB_RIGHT_CCM_4 +{ 0xAC66, 0xFFF8, WORD_LEN, 0}, // AWB_RIGHT_CCM_5 +{ 0xAC68, 0xFFFB, WORD_LEN, 0}, // AWB_RIGHT_CCM_6 +{ 0xAC6A, 0xFF78, WORD_LEN, 0}, // AWB_RIGHT_CCM_7 +{ 0xAC6C, 0x018D, WORD_LEN, 0}, // AWB_RIGHT_CCM_8 +{ 0xAC6E, 0x0055, WORD_LEN, 0}, // AWB_RIGHT_CCM_R2BRATIO + +//[AWB] +{ 0xB842, 0x0037, WORD_LEN, 0}, // STAT_AWB_GRAY_CHECKER_OFFSET_X +{ 0xB844, 0x0044, WORD_LEN, 0}, // STAT_AWB_GRAY_CHECKER_OFFSET_Y +{ 0x3240, 0x0024, WORD_LEN, 0}, // AWB_XY_SCALE { 0x3240, 0x0024, WORD_LEN, 0}, // AWB_XY_SCALE { 0x3242, 0x0000, WORD_LEN, 0}, // AWB_WEIGHT_R0 { 0x3244, 0x0000, WORD_LEN, 0}, // AWB_WEIGHT_R1 { 0x3246, 0x0000, WORD_LEN, 0}, // AWB_WEIGHT_R2 -{ 0x3248, 0x7070, WORD_LEN, 0}, // AWB_WEIGHT_R3 -{ 0x324A, 0x38E0, WORD_LEN, 0}, // AWB_WEIGHT_R4 -{ 0x324C, 0x70E0, WORD_LEN, 0}, // AWB_WEIGHT_R5 -{ 0x324E, 0x01B8, WORD_LEN, 0}, // AWB_WEIGHT_R6 -{ 0x3250, 0x00AB, WORD_LEN, 0}, // AWB_WEIGHT_R7 +{ 0x3248, 0x7F00, WORD_LEN, 0}, // AWB_WEIGHT_R3 +{ 0x324A, 0xA500, WORD_LEN, 0}, // AWB_WEIGHT_R4 +{ 0x324C, 0x1540, WORD_LEN, 0}, // AWB_WEIGHT_R5 +{ 0x324E, 0x01AC, WORD_LEN, 0}, // AWB_WEIGHT_R6 +{ 0x3250, 0x003E, WORD_LEN, 0}, // AWB_WEIGHT_R7 + +//[Preawb_params] +{ 0xACB0, 0x32, BYTE_LEN, 0}, // AWB_RG_MIN +{ 0xACB1, 0x5A, BYTE_LEN, 0}, // AWB_RG_MAX +{ 0xACB2, 0x32, BYTE_LEN, 0}, // AWB_RG_MIN_BRIGHT +{ 0xACB3, 0x5A, BYTE_LEN, 0}, // AWB_RG_MAX_BRIGHT +{ 0xACB4, 0x23, BYTE_LEN, 0}, // AWB_BG_MIN +{ 0xACB5, 0x55, BYTE_LEN, 0}, // AWB_BG_MAX +{ 0xACB6, 0x49, BYTE_LEN, 0}, // AWB_BG_MIN_BRIGHT +{ 0xACB7, 0x55, BYTE_LEN, 0}, // AWB_BG_MAX_BRIGHT + +//[**********Step7*************] +//[Step7-CPIPE_Calibration] + +//[jpeg_setup] + { 0xD80F, 0x04, BYTE_LEN, 0}, // JPEG_QSCALE_0 { 0xD810, 0x08, BYTE_LEN, 0}, // JPEG_QSCALE_1 { 0xC8D2, 0x04, BYTE_LEN, 0}, // CAM_OUTPUT_1_JPEG_QSCALE_0 { 0xC8D3, 0x08, BYTE_LEN, 0}, // CAM_OUTPUT_1_JPEG_QSCALE_1 { 0xC8BC, 0x04, BYTE_LEN, 0}, // CAM_OUTPUT_0_JPEG_QSCALE_0 { 0xC8BD, 0x08, BYTE_LEN, 0}, // CAM_OUTPUT_0_JPEG_QSCALE_1 -//sys_settings -{ 0x301A, 0x10F4, WORD_LEN, 0}, // RESET_REGISTER -{ 0x301E, 0x0083, WORD_LEN, 0}, // DATA_PEDESTAL -{ 0x301A, 0x10FC, WORD_LEN, 0}, // RESET_REGISTER -{ 0xDC33, 0x20, BYTE_LEN, 0}, // SYS_FIRST_BLACK_LEVEL + +//[Sys_Settings] { 0xDC35, 0x04, BYTE_LEN, 0}, // SYS_UV_COLOR_BOOST -{ 0x326E, 0x0006, WORD_LEN, 0}, // LOW_PASS_YUV_FILTER +{ 0x326E, 0x0006, WORD_LEN, 0}, // RESERVED_SOC1_326E { 0xDC37, 0x62, BYTE_LEN, 0}, // SYS_BRIGHT_COLORKILL { 0x35A4, 0x0596, WORD_LEN, 0}, // BRIGHT_COLOR_KILL_CONTROLS -{ 0x35A2, 0x009C, WORD_LEN, 0}, // DARK_COLOR_KILL_CONTROLS -{ 0x098E, 0x5C02, WORD_LEN, 0}, // MCU_ADDR -{ 0xDC02, 0x003E, WORD_LEN, 0}, // SYS_ALGO -{ 0xDC36, 0x34, BYTE_LEN, 0}, // SYS_DARK_COLOR_KILL - // Refresh Mode - skip +{ 0x35A2, 0x0094, WORD_LEN, 0}, // DARK_COLOR_KILL_CONTROLS +{ 0xDC36, 0x23, BYTE_LEN, 0}, // SYS_DARK_COLOR_KILL + +//[Gamma_Curves_REV3] { 0xBC18, 0x00, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_0 { 0xBC19, 0x11, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_1 { 0xBC1A, 0x23, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_2 @@ -1200,107 +1534,100 @@ static struct reginfo sensor_init_data[] = { 0xBC28, 0xF7, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_16 { 0xBC29, 0xFB, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_17 { 0xBC2A, 0xFF, BYTE_LEN, 0}, // LL_GAMMA_CONTRAST_CURVE_18 -{ 0xBC2B, 0x00, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_0 -{ 0xBC2C, 0x0A, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_1 -{ 0xBC2D, 0x1C, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_2 -{ 0xBC2E, 0x36, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_3 -{ 0xBC2F, 0x53, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_4 -{ 0xBC30, 0x6F, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_5 -{ 0xBC31, 0x86, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_6 -{ 0xBC32, 0x99, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_7 -{ 0xBC33, 0xAB, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_8 -{ 0xBC34, 0xBB, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_9 -{ 0xBC35, 0xC6, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_10 -{ 0xBC36, 0xD0, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_11 -{ 0xBC37, 0xD9, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_12 -{ 0xBC38, 0xE2, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_13 -{ 0xBC39, 0xE9, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_14 -{ 0xBC3A, 0xEF, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_15 -{ 0xBC3B, 0xF5, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_16 -{ 0xBC3C, 0xFA, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_17 +{ 0xBC2B, 0x00, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_0 +{ 0xBC2C, 0x11, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_1 +{ 0xBC2D, 0x23, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_2 +{ 0xBC2E, 0x3F, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_3 +{ 0xBC2F, 0x67, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_4 +{ 0xBC30, 0x85, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_5 +{ 0xBC31, 0x9B, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_6 +{ 0xBC32, 0xAD, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_7 +{ 0xBC33, 0xBB, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_8 +{ 0xBC34, 0xC7, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_9 +{ 0xBC35, 0xD1, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_10 +{ 0xBC36, 0xDA, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_11 +{ 0xBC37, 0xE1, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_12 +{ 0xBC38, 0xE8, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_13 +{ 0xBC39, 0xEE, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_14 +{ 0xBC3A, 0xF3, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_15 +{ 0xBC3B, 0xF7, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_16 +{ 0xBC3C, 0xFB, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_17 { 0xBC3D, 0xFF, BYTE_LEN, 0}, // LL_GAMMA_NEUTRAL_CURVE_18 { 0xBC3E, 0x00, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_0 -{ 0xBC3F, 0x18, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_1 -{ 0xBC40, 0x25, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_2 -{ 0xBC41, 0x3A, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_3 -{ 0xBC42, 0x59, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_4 -{ 0xBC43, 0x70, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_5 -{ 0xBC44, 0x81, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_6 -{ 0xBC45, 0x90, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_7 -{ 0xBC46, 0x9E, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_8 -{ 0xBC47, 0xAB, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_9 -{ 0xBC48, 0xB6, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_10 -{ 0xBC49, 0xC1, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_11 -{ 0xBC4A, 0xCB, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_12 -{ 0xBC4B, 0xD5, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_13 -{ 0xBC4C, 0xDE, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_14 -{ 0xBC4D, 0xE7, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_15 -{ 0xBC4E, 0xEF, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_16 +{ 0xBC3F, 0x05, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_1 +{ 0xBC40, 0x0F, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_2 +{ 0xBC41, 0x21, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_3 +{ 0xBC42, 0x3C, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_4 +{ 0xBC43, 0x52, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_5 +{ 0xBC44, 0x67, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_6 +{ 0xBC45, 0x7B, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_7 +{ 0xBC46, 0x8D, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_8 +{ 0xBC47, 0x9E, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_9 +{ 0xBC48, 0xAD, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_10 +{ 0xBC49, 0xBA, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_11 +{ 0xBC4A, 0xC6, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_12 +{ 0xBC4B, 0xD1, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_13 +{ 0xBC4C, 0xDC, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_14 +{ 0xBC4D, 0xE5, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_15 +{ 0xBC4E, 0xEE, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_16 { 0xBC4F, 0xF7, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_17 { 0xBC50, 0xFF, BYTE_LEN, 0}, // LL_GAMMA_NR_CURVE_18 -{ 0xBC51, 0x04, BYTE_LEN, 0}, // LL_GAMMA_CURVE_SELECTOR -//BM_dampening + +//[BM_Dampening] { 0xB801, 0xE0, BYTE_LEN, 0}, // STAT_MODE { 0xB862, 0x04, BYTE_LEN, 0}, // STAT_BMTRACKING_SPEED -//AE + +//[AE] { 0xB829, 0x02, BYTE_LEN, 0}, // STAT_LL_BRIGHTNESS_METRIC_DIVISOR { 0xB863, 0x02, BYTE_LEN, 0}, // STAT_BM_MUL { 0xB827, 0x0F, BYTE_LEN, 0}, // STAT_AE_EV_SHIFT -{ 0xA409, 0x4A, BYTE_LEN, 0}, // AE_RULE_BASE_TARGET -{ 0xA805, 0x06, BYTE_LEN, 0}, // AE_TRACK_GATE -{ 0xA80D, 0x08, BYTE_LEN, 0}, -{ 0xA816, 0x0002, WORD_LEN, 0}, // AE_TRACK_MIN_INT_TIME_ROWS -{ 0xA401, 0x00, BYTE_LEN, 0}, // AE_RULE_MODE -{ 0xA80E, 0x06, BYTE_LEN, 0}, // AE_TRACK_MAX_BLACK_LEVEL -//BM_GM_start_stop -{ 0xC8E6, 0x014C, WORD_LEN, 0}, // RESERVED_CAM_E6 -{ 0xC8E8, 0x0040, WORD_LEN, 0}, // RESERVED_CAM_E8 +{ 0xA409, 0x42, BYTE_LEN, 0}, // AE_RULE_BASE_TARGET + +//[BM_GM_Start_Stop] { 0xBC52, 0x00C8, WORD_LEN, 0}, // LL_START_BRIGHTNESS_METRIC { 0xBC54, 0x0A28, WORD_LEN, 0}, // LL_END_BRIGHTNESS_METRIC -{ 0xBC58, 0x0100, WORD_LEN, 0}, //0x0000 // LL_START_GAIN_METRIC -{ 0xBC5A, 0x0480, WORD_LEN, 0}, //0x1000 // LL_END_GAIN_METRIC -{ 0xBC5E, 0x0227, WORD_LEN, 0}, // LL_START_APERTURE_GAIN_BM -{ 0xBC60, 0x0540, WORD_LEN, 0}, // LL_END_APERTURE_GAIN_BM -{ 0xBC66, 0x0154, WORD_LEN, 0}, // LL_START_APERTURE_GM -{ 0xBC68, 0x07D0, WORD_LEN, 0}, // LL_END_APERTURE_GM +{ 0xBC58, 0x00C8, WORD_LEN, 0}, // LL_START_GAIN_METRIC +{ 0xBC5A, 0x12C0, WORD_LEN, 0}, // LL_END_GAIN_METRIC +{ 0xBC5E, 0x00FA, WORD_LEN, 0}, // LL_START_APERTURE_GAIN_BM +{ 0xBC60, 0x0258, WORD_LEN, 0}, // LL_END_APERTURE_GAIN_BM +{ 0xBC66, 0x00FA, WORD_LEN, 0}, // LL_START_APERTURE_GM +{ 0xBC68, 0x0258, WORD_LEN, 0}, // LL_END_APERTURE_GM { 0xBC86, 0x00C8, WORD_LEN, 0}, // LL_START_FFNR_GM -{ 0xBC88, 0x0420, WORD_LEN, 0}, // LL_END_FFNR_GM +{ 0xBC88, 0x0640, WORD_LEN, 0}, // LL_END_FFNR_GM { 0xBCBC, 0x0040, WORD_LEN, 0}, // LL_SFFB_START_GAIN { 0xBCBE, 0x01FC, WORD_LEN, 0}, // LL_SFFB_END_GAIN { 0xBCCC, 0x00C8, WORD_LEN, 0}, // LL_SFFB_START_MAX_GM { 0xBCCE, 0x0640, WORD_LEN, 0}, // LL_SFFB_END_MAX_GM { 0xBC90, 0x00C8, WORD_LEN, 0}, // LL_START_GRB_GM { 0xBC92, 0x0640, WORD_LEN, 0}, // LL_END_GRB_GM -{ 0xBC0E, 0x0032, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_START_POS -{ 0xBC10, 0x0064, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_MID_POS -{ 0xBC12, 0x0FA0, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_END_POS -{ 0xBCAA, 0x03E8, WORD_LEN, 0}, // LL_CDC_THR_ADJ_START_POS -{ 0xBCAC, 0x012C, WORD_LEN, 0}, // LL_CDC_THR_ADJ_MID_POS +{ 0xBC0E, 0x0001, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_START_POS +{ 0xBC10, 0x0002, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_MID_POS +{ 0xBC12, 0x02BC, WORD_LEN, 0}, // LL_GAMMA_CURVE_ADJ_END_POS +{ 0xBCAA, 0x044C, WORD_LEN, 0}, // LL_CDC_THR_ADJ_START_POS +{ 0xBCAC, 0x00AF, WORD_LEN, 0}, // LL_CDC_THR_ADJ_MID_POS { 0xBCAE, 0x0009, WORD_LEN, 0}, // LL_CDC_THR_ADJ_END_POS { 0xBCD8, 0x00C8, WORD_LEN, 0}, // LL_PCR_START_BM { 0xBCDA, 0x0A28, WORD_LEN, 0}, // LL_PCR_END_BM //[Kernel] { 0x3380, 0x0504, WORD_LEN, 0}, // KERNEL_CONFIG -{ 0x3380, 0x0505, WORD_LEN, 0}, // KERNEL_CONFIG -{ 0x3380, 0x0584, WORD_LEN, 0}, // KERNEL_CONFIG -{ 0x3380, 0x0586, WORD_LEN, 0}, // KERNEL_CONFIG -{ 0x3380, 0x0587, WORD_LEN, 0}, // KERNEL_CONFIG - -//GRB -{ 0xBC94, 0x06, BYTE_LEN, 0}, // LL_GB_START_THRESHOLD_0 -{ 0xBC95, 0x05, BYTE_LEN, 0}, // LL_GB_START_THRESHOLD_1 -{ 0xBC9C, 0x09, BYTE_LEN, 0}, // RESERVED_LL_9C -{ 0xBC9D, 0x05, BYTE_LEN, 0}, // RESERVED_LL_9D - -//demosaic + +//[GRB] +{ 0xBC94, 0x0C, BYTE_LEN, 0}, // LL_GB_START_THRESHOLD_0 +{ 0xBC95, 0x08, BYTE_LEN, 0}, // LL_GB_START_THRESHOLD_1 +{ 0xBC9C, 0x3C, BYTE_LEN, 0}, // RESERVED_LL_9C +{ 0xBC9D, 0x28, BYTE_LEN, 0}, // RESERVED_LL_9D + +//[Demosaic_REV3] { 0x33B0, 0x2A16, WORD_LEN, 0}, // FFNR_ALPHA_BETA -{ 0xBC8A, 0x0E, BYTE_LEN, 0}, //0x00 // LL_START_FF_MIX_THRESH_Y -{ 0xBC8B, 0x4C, BYTE_LEN, 0}, // LL_END_FF_MIX_THRESH_Y -{ 0xBC8C, 0x00, BYTE_LEN, 0}, // LL_START_FF_MIX_THRESH_YGAIN -{ 0xBC8D, 0x24, BYTE_LEN, 0}, // LL_END_FF_MIX_THRESH_YGAIN +{ 0xBC8A, 0x02, BYTE_LEN, 0}, // LL_START_FF_MIX_THRESH_Y +{ 0xBC8B, 0x0F, BYTE_LEN, 0}, // LL_END_FF_MIX_THRESH_Y +{ 0xBC8C, 0xFF, BYTE_LEN, 0}, // LL_START_FF_MIX_THRESH_YGAIN +{ 0xBC8D, 0xFF, BYTE_LEN, 0}, // LL_END_FF_MIX_THRESH_YGAIN { 0xBC8E, 0xFF, BYTE_LEN, 0}, // LL_START_FF_MIX_THRESH_GAIN { 0xBC8F, 0x00, BYTE_LEN, 0}, // LL_END_FF_MIX_THRESH_GAIN + +//[CDC] { 0xBCB2, 0x20, BYTE_LEN, 0}, // LL_CDC_DARK_CLUS_SLOPE { 0xBCB3, 0x3A, BYTE_LEN, 0}, // LL_CDC_DARK_CLUS_SATUR { 0xBCB4, 0x39, BYTE_LEN, 0}, // RESERVED_LL_B4 @@ -1309,58 +1636,65 @@ static struct reginfo sensor_init_data[] = { 0xBCB8, 0x3A, BYTE_LEN, 0}, // RESERVED_LL_B8 { 0xBCB6, 0x80, BYTE_LEN, 0}, // RESERVED_LL_B6 { 0xBCB9, 0x24, BYTE_LEN, 0}, // RESERVED_LL_B9 +{ 0xBCAA, 0x03E8, WORD_LEN, 0}, // LL_CDC_THR_ADJ_START_POS +{ 0xBCAC, 0x012C, WORD_LEN, 0}, // LL_CDC_THR_ADJ_MID_POS +{ 0xBCAE, 0x0009, WORD_LEN, 0}, // LL_CDC_THR_ADJ_END_POS + +//[Aperture_calib] +{ 0x33BA, 0x0084, WORD_LEN, 0}, // APEDGE_CONTROL +{ 0x33BE, 0x0000, WORD_LEN, 0}, // UA_KNEE_L +{ 0x33C2, 0x8800, WORD_LEN, 0}, // UA_WEIGHTS +{ 0xBC5E, 0x0154, WORD_LEN, 0}, // LL_START_APERTURE_GAIN_BM +{ 0xBC60, 0x0640, WORD_LEN, 0}, // LL_END_APERTURE_GAIN_BM +{ 0xBC62, 0x0E, BYTE_LEN, 0}, // LL_START_APERTURE_KPGAIN +{ 0xBC63, 0x14, BYTE_LEN, 0}, // LL_END_APERTURE_KPGAIN +{ 0xBC64, 0x0E, BYTE_LEN, 0}, // LL_START_APERTURE_KNGAIN +{ 0xBC65, 0x14, BYTE_LEN, 0}, // LL_END_APERTURE_KNGAIN +{ 0xBCE2, 0x0A, BYTE_LEN, 0}, // LL_START_POS_KNEE +{ 0xBCE3, 0x2B, BYTE_LEN, 0}, // LL_END_POS_KNEE +{ 0xBCE4, 0x0A, BYTE_LEN, 0}, // LL_START_NEG_KNEE +{ 0xBCE5, 0x2B, BYTE_LEN, 0}, // LL_END_NEG_KNEE +{ 0x3210, 0x49B8, WORD_LEN, 0}, // COLOR_PIPELINE_CONTROL -//SFFB_rev3_noisemodel +//[SFFB_REV3_noisemodel] { 0xBCC0, 0x1F, BYTE_LEN, 0}, // LL_SFFB_RAMP_START { 0xBCC1, 0x03, BYTE_LEN, 0}, // LL_SFFB_RAMP_STOP -{ 0xBCC2, 0x3C, BYTE_LEN, 0}, // LL_SFFB_SLOPE_START +{ 0xBCC2, 0x2C, BYTE_LEN, 0}, // LL_SFFB_SLOPE_START { 0xBCC3, 0x10, BYTE_LEN, 0}, // LL_SFFB_SLOPE_STOP { 0xBCC4, 0x07, BYTE_LEN, 0}, // LL_SFFB_THSTART { 0xBCC5, 0x0B, BYTE_LEN, 0}, // LL_SFFB_THSTOP { 0xBCBA, 0x0009, WORD_LEN, 0}, // LL_SFFB_CONFIG -//[Step7-CPIPE_Preference] -//ftb_off +//[**********Step8*************] +//[FTB_Off] { 0xBC14, 0xFFFE, WORD_LEN, 0}, // LL_GAMMA_FADE_TO_BLACK_START_POS -{ 0xBC16, 0xFFFF, WORD_LEN, 0}, // LL_GAMMA_FADE_TO_BLACK_END_POS +{ 0xBC16, 0xFFFE, WORD_LEN, 0}, // LL_GAMMA_FADE_TO_BLACK_END_POS -//aperture_preference -{ 0xBC6A, 0x06, BYTE_LEN, 0}, // LL_START_APERTURE_INTEGER_GAIN +//[Aperture_preference] +{ 0xBC66, 0x0154, WORD_LEN, 0}, // LL_START_APERTURE_GM +{ 0xBC68, 0x07D0, WORD_LEN, 0}, // LL_END_APERTURE_GM +{ 0xBC6A, 0x04, BYTE_LEN, 0}, // LL_START_APERTURE_INTEGER_GAIN { 0xBC6B, 0x00, BYTE_LEN, 0}, // LL_END_APERTURE_INTEGER_GAIN { 0xBC6C, 0x00, BYTE_LEN, 0}, // LL_START_APERTURE_EXP_GAIN { 0xBC6D, 0x00, BYTE_LEN, 0}, // LL_END_APERTURE_EXP_GAIN -{ 0xBCE2, 0x0A, BYTE_LEN, 0}, // LL_START_POS_KNEE -{ 0xBCE3, 0x2B, BYTE_LEN, 0}, // LL_END_POS_KNEE -{ 0xBCE4, 0x0A, BYTE_LEN, 0}, // LL_START_NEG_KNEE -{ 0xBCE5, 0x2B, BYTE_LEN, 0}, // LL_END_NEG_KNEE -{ 0x33BA, 0x0084, WORD_LEN, 0}, // APEDGE_CONTROL -{ 0x33BE, 0x0000, WORD_LEN, 0}, // UA_KNEE_L -{ 0x33C2, 0x5600, WORD_LEN, 0}, // UA_WEIGHTS -{ 0xBC62, 0x10, BYTE_LEN, 0}, // LL_START_APERTURE_KPGAIN -{ 0xBC63, 0x1F, BYTE_LEN, 0}, // LL_END_APERTURE_KPGAIN -{ 0xBC64, 0x10, BYTE_LEN, 0}, // LL_START_APERTURE_KNGAIN -{ 0xBC65, 0x1F, BYTE_LEN, 0}, // LL_END_APERTURE_KNGAIN -{ 0xA81C, 0x0043, WORD_LEN, 0}, // AE_TRACK_MIN_AGAIN -{ 0xA81E, 0x0102, WORD_LEN, 0}, // AE_TRACK_TARGET_AGAIN -{ 0xA820, 0x0102, WORD_LEN, 0}, // AE_TRACK_MAX_AGAIN -{ 0xA822, 0x0080, WORD_LEN, 0}, // AE_TRACK_MIN_DGAIN -{ 0xA824, 0x0080, WORD_LEN, 0}, // AE_TRACK_MAX_DGAIN - -//min_fps -{ 0xA818, 0x07D0, WORD_LEN, 0}, // AE_TRACK_TARGET_INT_TIME_ROWS -{ 0xA81A, 0x0A00, WORD_LEN, 0}, //0x0810(10.9Fps) //0x0FF4(5Fps) // AE_TRACK_MAX_INT_TIME_ROWS - -//ccm_saturation -{ 0xBC56, 0x80, BYTE_LEN, 0}, //0xA8 // LL_START_CCM_SATURATION -{ 0xBC57, 0x10, BYTE_LEN, 0}, // LL_END_CCM_SATURATION - -//DCCM + +//[Gain_max] +{ 0xA81C, 0x0040, WORD_LEN, 0}, // AE_TRACK_MIN_AGAIN +{ 0xA820, 0x012C, WORD_LEN, 0}, // AE_TRACK_MAX_AGAIN +{ 0xA822, 0x0060, WORD_LEN, 0}, // AE_TRACK_MIN_DGAIN +{ 0xA824, 0x00E5, WORD_LEN, 0}, // AE_TRACK_MAX_DGAIN + +//[Saturation_REV3] +{ 0xBC56, 0x64, BYTE_LEN, 0}, // LL_START_CCM_SATURATION +{ 0xBC57, 0x1E, BYTE_LEN, 0}, // LL_END_CCM_SATURATION + +//[DCCM_REV3] { 0xBCDE, 0x03, BYTE_LEN, 0}, // LL_START_SYS_THRESHOLD { 0xBCDF, 0x50, BYTE_LEN, 0}, // LL_STOP_SYS_THRESHOLD { 0xBCE0, 0x08, BYTE_LEN, 0}, // LL_START_SYS_GAIN { 0xBCE1, 0x03, BYTE_LEN, 0}, // LL_STOP_SYS_GAIN -//sobel +//[Sobel_REV3] { 0xBCD0, 0x000A, WORD_LEN, 0}, // LL_SFFB_SOBEL_FLAT_START { 0xBCD2, 0x00FE, WORD_LEN, 0}, // LL_SFFB_SOBEL_FLAT_STOP { 0xBCD4, 0x001E, WORD_LEN, 0}, // LL_SFFB_SOBEL_SHARP_START @@ -1371,17 +1705,109 @@ static struct reginfo sensor_init_data[] = { 0xBCC9, 0x40, BYTE_LEN, 0}, // LL_SFFB_FLATNESS_STOP { 0xBCCA, 0x04, BYTE_LEN, 0}, // LL_SFFB_TRANSITION_START { 0xBCCB, 0x00, BYTE_LEN, 0}, // LL_SFFB_TRANSITION_STOP -//SFFB_slope_zero_enable -{ 0xBCE6, 0x03 , BYTE_LEN, 0 }, // LL_SFFB_ZERO_ENABLE -//manual_FD(auto) -{ 0x8417, 0x02, BYTE_LEN, 0 }, // SEQ_STATE_CFG_1_FD -//tx_setting -{ 0xC8ED, 0x02, BYTE_LEN, 0 }, // CAM_TX_ENABLE_MODE Context A,B time -//cdc_off -{ 0x8404, 0x06, BYTE_LEN, 0 }, // SEQ_CMD -///{ SEQUENCE_WAIT_MS,300, WORD_LEN, 0}, -{ SEQUENCE_WAIT_MS,100, WORD_LEN, 0}, -{ SEQUENCE_END, 0x00, 0, 0} + +//[SFFB_slope_zero_enable] +{ 0xBCE6, 0x03, BYTE_LEN, 0}, // LL_SFFB_ZERO_ENABLE +{ 0xBCE6, 0x03, BYTE_LEN, 0}, // LL_SFFB_ZERO_ENABLE + + +//[AE_preference] +{ 0xA410, 0x04, BYTE_LEN, 0}, // AE_RULE_TARGET_AE_6 +{ 0xA411, 0x06, BYTE_LEN, 0}, // AE_RULE_TARGET_AE_7 + + +//[**********Step9*************] +//[JPEG Quantization] +//[Sepia effect] +{ 0xDC3A, 0x23, BYTE_LEN, 0}, // SYS_SEPIA_CR +{ 0xDC3B, 0xB2, BYTE_LEN, 0}, // SYS_SEPIA_CB + + +//[Touch Focus + Fast Focus AF_AFM_INIT] +{ 0x8411, 0x00, BYTE_LEN, 0}, // SEQ_STATE_CFG_0_AF +{ 0x8419, 0x04, BYTE_LEN, 0}, // SEQ_STATE_CFG_1_AF + +{ 0xB002, 0x0002, WORD_LEN, 0}, // AF_MODE +{ 0xC40A, 0x0030, WORD_LEN, 0}, // AFM_POS_MIN +{ 0xC40C, 0x00A0, WORD_LEN, 0}, // AFM_POS_MAX +{ 0xB045, 0x000C, WORD_LEN, 0}, // AF_MODE_EX + + +//AF Window size +{ 0xB854, 0x60, BYTE_LEN, 0}, // STAT_SM_WINDOW_POS_X +{ 0xB855, 0x60, BYTE_LEN, 0}, // STAT_SM_WINDOW_POS_Y +{ 0xB856, 0x40, BYTE_LEN, 0}, // STAT_SM_WINDOW_SIZE_X +{ 0xB857, 0x40, BYTE_LEN, 0}, // STAT_SM_WINDOW_SIZE_Y +{ 0xB012, 0x0A, BYTE_LEN, 0}, // AF_FS_NUM_STEPS +{ 0xB018, 0x00, BYTE_LEN, 0}, // AF_FS_POS_0 +{ 0xB019, 0x30, BYTE_LEN, 0}, // AF_FS_POS_1 +{ 0xB01A, 0x48, BYTE_LEN, 0}, // AF_FS_POS_2 +{ 0xB01B, 0x60, BYTE_LEN, 0}, // AF_FS_POS_3 +{ 0xB01C, 0x78, BYTE_LEN, 0}, // AF_FS_POS_4 +{ 0xB01D, 0x90, BYTE_LEN, 0}, // AF_FS_POS_5 +{ 0xB01E, 0xA8, BYTE_LEN, 0}, // AF_FS_POS_6 +{ 0xB01F, 0xC0, BYTE_LEN, 0}, // AF_FS_POS_7 +{ 0xB020, 0xE0, BYTE_LEN, 0}, // AF_FS_POS_8 +{ 0xB021, 0xFF, BYTE_LEN, 0}, // AF_FS_POS_9 +{ 0xB022, 0x00, BYTE_LEN, 0}, // AF_FS_POS_10 +{ 0xB011, 0x00, BYTE_LEN, 0}, // AF_FS_INIT_POS + +//INIT PATCH PAGE used in FF +{ 0x098E, 0xD40E, WORD_LEN, 0}, // LOGICAL_ADDRESS_ACCESS +{ 0xD40E, 0x0000, WORD_LEN, 0}, +{ 0xD40F, 0x0000, WORD_LEN, 0}, +{ 0xD410, 0x0000, WORD_LEN, 0}, +{ 0xD411, 0x0000, WORD_LEN, 0}, +{ 0xD412, 0x0000, WORD_LEN, 0}, +{ 0xD413, 0x0000, WORD_LEN, 0}, +{ 0xD414, 0x0000, WORD_LEN, 0}, +{ 0xD415, 0x0000, WORD_LEN, 0}, +{ 0xD416, 0x0000, WORD_LEN, 0}, +{ 0xD417, 0x0000, WORD_LEN, 0}, +{ 0xD418, 0x0000, WORD_LEN, 0}, +{ 0xD418, 0x0000, WORD_LEN, 0}, +{ 0xD419, 0x0000, WORD_LEN, 0}, +{ 0xD41A, 0x0000, WORD_LEN, 0}, +{ 0xD41B, 0x0000, WORD_LEN, 0}, +{ 0xD41C, 0x0000, WORD_LEN, 0}, +{ 0xD41D, 0x0000, WORD_LEN, 0}, +{ 0xD41E, 0x0000, WORD_LEN, 0}, +{ 0xD420, 0x0000, WORD_LEN, 0}, +{ 0xD406, 0x0000, WORD_LEN, 0}, +{ 0xD407, 0x0000, WORD_LEN, 0}, +{ 0xD422, 0x0000, WORD_LEN, 0}, +{ 0xD423, 0x0000, WORD_LEN, 0}, +{ 0xD424, 0x0000, WORD_LEN, 0}, +{ 0xD425, 0x0000, WORD_LEN, 0}, +{ 0xD426, 0x0000, WORD_LEN, 0}, +{ 0xD427, 0x0000, WORD_LEN, 0}, +{ 0xD428, 0x0000, WORD_LEN, 0}, +{ 0xD429, 0x0000, WORD_LEN, 0}, +{ 0xD42A, 0x0000, WORD_LEN, 0}, +{ 0xD42B, 0x0000, WORD_LEN, 0}, +{ 0xD400, 0x0001, WORD_LEN, 0}, +{ 0xD401, 0x0000, WORD_LEN, 0}, +{ 0xD402, 0x0028, WORD_LEN, 0}, +{ 0xD403, 0x0080, WORD_LEN, 0}, +{ 0xD404, 0x0000, WORD_LEN, 0}, +{ 0xD405, 0x0000, WORD_LEN, 0}, +{ 0xD406, 0x0000, WORD_LEN, 0}, +{ 0xD407, 0x0000, WORD_LEN, 0}, +{ 0xD408, 0x0030, WORD_LEN, 0}, +{ 0xD409, 0x0040, WORD_LEN, 0}, +{ 0xD40A, 0x0050, WORD_LEN, 0}, +{ 0xD40B, 0x0070, WORD_LEN, 0}, +{ 0xD40C, 0x0080, WORD_LEN, 0}, +{ 0xD40D, 0x0090, WORD_LEN, 0}, + +{ 0x0018, 0x2008, WORD_LEN, 0}, // STANDBY_CONTROL_AND_STATUS + +{SEQUENCE_WAIT_MS,100, WORD_LEN, 0}, + + { SEQUENCE_END, 0x00, 0, 0} + + + }; /* 720p 15fps @ 1280x720 */ @@ -1413,6 +1839,7 @@ static struct reginfo sensor_720p[]= {0x8404, 0x06, BYTE_LEN, 0 }, // SEQ_CMD {SEQUENCE_WAIT_MS,100, WORD_LEN, 0}, + { SEQUENCE_END, 0x00, 0, 0} }; @@ -1426,11 +1853,13 @@ static struct reginfo sensor_1080p[]= #if ADJUST_FOR_CAPTURE_FALG static struct reginfo sensor_qsxga[] = { + {0x098E, 0x48C0,WORD_LEN,0}, // LOGICAL_ADDRESS_ACCESS [CAM_OUTPUT_1_IMAGE_WIDTH] {0xC8C0, 0x0A20,WORD_LEN,0}, // CAM_OUTPUT_1_IMAGE_WIDTH {0xC8C2, 0x0798,WORD_LEN,0}, // CAM_OUTPUT_1_IMAGE_HEIGHT {0x8404, 0x06 ,BYTE_LEN,0}, // SEQ_CMD {SEQUENCE_WAIT_MS,100,WORD_LEN,0}, + {SEQUENCE_END, 0x00, 0, 0} }; #else @@ -1451,6 +1880,7 @@ static struct reginfo sensor_qxga[] = {0xC8C2, 0x0602,WORD_LEN,0}, // CAM_OUTPUT_1_IMAGE_HEIGHT {0x8404, 0x06 ,BYTE_LEN,0}, // SEQ_CMD {SEQUENCE_WAIT_MS,100,WORD_LEN,0}, + {SEQUENCE_END, 0x00, 0, 0} }; #else @@ -1469,6 +1899,7 @@ static struct reginfo sensor_uxga[] = {0xC8C2, 0x04b2,WORD_LEN,0}, // CAM_OUTPUT_1_IMAGE_HEIGHT {0x8404, 0x06 ,BYTE_LEN,0}, // SEQ_CMD {SEQUENCE_WAIT_MS,100,WORD_LEN,0}, + {SEQUENCE_END, 0x00, 0, 0} }; #else @@ -1493,6 +1924,7 @@ static struct reginfo sensor_xga[] = {0xC8C2, 0x0302,WORD_LEN,0}, // CAM_OUTPUT_1_IMAGE_HEIGHT {0x8404, 0x06 ,BYTE_LEN,0}, // SEQ_CMD {SEQUENCE_WAIT_MS,100,WORD_LEN,0}, + {SEQUENCE_END, 0x00, 0, 0} }; #else @@ -2112,6 +2544,14 @@ static struct v4l2_queryctrl sensor_controls[] = .default_value = 125, }, { + .id = V4L2_CID_FOCUSZONE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "FocusZone Control", + .minimum = -1, + .maximum = 1, + .step = 1, + .default_value = 0, + },{ .id = V4L2_CID_FOCUS_AUTO, .type = V4L2_CTRL_TYPE_BOOLEAN, .name = "Focus Control", @@ -2119,7 +2559,7 @@ static struct v4l2_queryctrl sensor_controls[] = .maximum = 1, .step = 1, .default_value = 0, - },{ + },/*{ .id = V4L2_CID_FOCUS_CONTINUOUS, .type = V4L2_CTRL_TYPE_BOOLEAN, .name = "Focus Control", @@ -2127,7 +2567,7 @@ static struct v4l2_queryctrl sensor_controls[] = .maximum = 1, .step = 1, .default_value = 0, - }, + },*/ #endif #if CONFIG_SENSOR_Flash @@ -2193,18 +2633,33 @@ static const struct sensor_datafmt sensor_colour_fmts[] = { {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG}, {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG} }; -enum sensor_work_state +enum sensor_wq_cmd +{ + WqCmd_af_init, + WqCmd_af_single, + WqCmd_af_special_pos, + WqCmd_af_far_pos, + WqCmd_af_near_pos, + WqCmd_af_continues, + WqCmd_af_return_idle, +}; +enum sensor_wq_result { - sensor_work_ready = 0, - sensor_working, + WqRet_success = 0, + WqRet_fail = -1, + WqRet_inval = -2 }; struct sensor_work { struct i2c_client *client; struct delayed_work dwork; - enum sensor_work_state state; + enum sensor_wq_cmd cmd; + wait_queue_head_t done; + enum sensor_wq_result result; + bool wait; + int var; + int zone_center_pos[2]; }; - typedef struct sensor_info_priv_s { int whiteBalance; @@ -2263,6 +2718,9 @@ struct sensor struct rk29camera_gpio_res *sensor_gpio_res; }; + +static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf); + static struct sensor* to_sensor(const struct i2c_client *client) { return container_of(i2c_get_clientdata(client), struct sensor, subdev); @@ -2512,6 +2970,57 @@ static int sensor_read(struct i2c_client *client, u16 reg, u16 *val) return err; } +static int sensor_read1(struct i2c_client *client, struct reginfo *reg_info) +{ + int err,cnt; + u8 buf[2]; + struct i2c_msg msg[2]; + + buf[0] = reg_info->reg >> 8; + buf[1] = reg_info->reg & 0xFF; + + + msg[0].addr = client->addr; + msg[0].flags = client->flags; + msg[0].buf = buf; + msg[0].len = sizeof(buf); + msg[0].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg[0].read_type = 2; /* fpga i2c:0==I2C_NO_STOP : direct use number not enum for don't want include spi_fpga.h */ + + msg[1].addr = client->addr; + msg[1].flags = client->flags|I2C_M_RD; + msg[1].buf = buf; + if (reg_info->reg_len == WORD_LEN) { + msg[1].len = 2; + } else if (reg_info->reg_len == BYTE_LEN) { + msg[1].len = 1; + } + msg[1].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ + msg[1].read_type = 2; /* fpga i2c:0==I2C_NO_STOP : direct use number not enum for don't want include spi_fpga.h */ + + cnt = 3; + err = -EAGAIN; + while ((cnt-- > 0) && (err < 0)) { /* ddl@rock-chips.com : Transfer again if transent is failed */ + err = i2c_transfer(client->adapter, msg, 2); + + if (err >= 0) { + if (reg_info->reg_len == WORD_LEN) { + reg_info->val = buf[0]; + reg_info->val <<= 8; + reg_info->val |= buf[1]; + } else if (reg_info->reg_len == BYTE_LEN) { + reg_info->val = buf[0]; + } + return 0; + } else { + SENSOR_TR("\n %s read reg(0x%x val:0x%x) failed, try to read again! \n",SENSOR_NAME_STRING(),reg_info->reg, reg_info->val); + udelay(10); + } + } + + return err; +} + /* write a array of registers */ static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray) { @@ -2532,7 +3041,8 @@ static int sensor_write_array(struct i2c_client *client, struct reginfo *regarra while (regarray[i].reg != SEQUENCE_END) { num =1; - j= i+1; + j= i+1; + #if 0 while((regarray[j].reg_len ==regarray[i].reg_len)&®array[j].reg != SEQUENCE_END) { temp = regarray[j].reg - regarray[j-1].reg; @@ -2540,7 +3050,8 @@ static int sensor_write_array(struct i2c_client *client, struct reginfo *regarra break; num++; j++; - } + } + #endif err = sensor_write_Multiple_data(client, ®array[i], num) ; if (err < 0) { @@ -2561,7 +3072,7 @@ static int sensor_write_array(struct i2c_client *client, struct reginfo *regarra #endif } - i=i+num; + i=i+num; } sensor_write_array_end: sensor_task_lock(client,0); @@ -2595,11 +3106,14 @@ static int sensor_write_init_data(struct i2c_client *client, struct reginfo *reg goto sensor_write_array_end; while (regarray[i].reg != SEQUENCE_END) { - - if(ti < 167){ + #if 0 + if(ti < 167){ num = table[ti]; ti++; - } + } + #else + num = 1; + #endif err = sensor_write_Multiple_data(client, ®array[i], num) ; if (err < 0) { @@ -2690,72 +3204,55 @@ static int sensor_readchk_array(struct i2c_client *client, struct reginfo *regar #endif #if CONFIG_SENSOR_Focus -static struct reginfo sensor_af_init0[] = -{ - { 0xC400, 0x88, BYTE_LEN, 0 }, // AFM_ALGO - { 0x8419, 0x05, BYTE_LEN, 0 }, // SEQ_STATE_CFG_1_AF - { 0xC400, 0x08, BYTE_LEN, 0 }, // AFM_ALGO - //AF_settings - { 0xB002, 0x0305, WORD_LEN, 0}, // AF_MODE - { 0xB004, 0x0002, WORD_LEN, 0}, // AF_ALGO - - { 0xB008, 0x0003, WORD_LEN, 0}, // AF_ZONE_WEIGHTS_HI - { 0xB00A, 0xFFFF, WORD_LEN, 0}, // AF_ZONE_WEIGHTS_HI - { 0xB00C, 0xFFFF, WORD_LEN, 0}, // AF_ZONE_WEIGHTS_LO - { 0xB00E, 0xFFFF, WORD_LEN, 0}, // AF_ZONE_WEIGHTS_LO - {SEQUENCE_END, 0x00, 0, 0} -}; -static struct reginfo sensor_af_init1[] = -{ -//set_posMin/Max -{ 0xC40A, 0x0028, WORD_LEN, 0 }, // AFM_POS_MIN -{ 0xC40C, 0x00BE, WORD_LEN, 0 }, // AFM_POS_MAX -//AF_postition_settings -{ 0xB018, 0x00, BYTE_LEN, 0}, // AF_FS_POS_0 -{ 0xB019, 0x20, BYTE_LEN, 0}, // AF_FS_POS_1 -{ 0xB01A, 0x40, BYTE_LEN, 0}, // AF_FS_POS_2 -{ 0xB01B, 0x60, BYTE_LEN, 0}, // AF_FS_POS_3 -{ 0xB01C, 0x80, BYTE_LEN, 0}, // AF_FS_POS_4 -{ 0xB01D, 0xA0, BYTE_LEN, 0}, // AF_FS_POS_5 -{ 0xB01E, 0xC0, BYTE_LEN, 0}, // AF_FS_POS_6 -{ 0xB01A, 0x38, BYTE_LEN, 0}, // AF_FS_POS_2 -{ 0xB01B, 0x50, BYTE_LEN, 0}, // AF_FS_POS_3 -{ 0xB01C, 0x68, BYTE_LEN, 0}, // AF_FS_POS_4 -{ 0xB01D, 0x80, BYTE_LEN, 0}, // AF_FS_POS_5 -{ 0xB01E, 0x98, BYTE_LEN, 0}, // AF_FS_POS_6 -{ 0xB01F, 0xB0, BYTE_LEN, 0}, // AF_FS_POS_7 -{ 0xB020, 0xC0, BYTE_LEN, 0}, // AF_FS_POS_8 -{ 0xB012, 0x09, BYTE_LEN, 0}, // AF_FS_NUM_STEPS -//2nd_scan_option -{ 0xB013, 0x55, BYTE_LEN, 0}, // AF_FS_NUM_STEPS2 -{ 0xB014, 0x06, BYTE_LEN, 0}, // AF_FS_STEP_SIZE -{ 0x8404, 0x05, BYTE_LEN, 0}, // SEQ_CMD -//{ SEQUENCE_WAIT_MS,300, WORD_LEN, 0}, -{ SEQUENCE_WAIT_MS,100, WORD_LEN, 0}, -//{ 0x3EDA, 0x6060 // DAC_LD_14_15 -{ 0x0018, 0x2008, WORD_LEN, 0}, // STANDBY_CONTROL_AND_STATUS -//{ SEQUENCE_WAIT_MS,100, WORD_LEN, 0}, -{ SEQUENCE_WAIT_MS,30, WORD_LEN, 0}, -{ 0x3EDA, 0x6060, WORD_LEN, 0 }, // DAC_LD_14_15 -{SEQUENCE_END, 0x00, 0, 0} -}; - static struct reginfo sensor_af_trigger[] = { - {0x098e,0xb006, WORD_LEN, 0 }, - {0xb006,0x01, BYTE_LEN, 0 }, + { 0xB854, 0x4040, WORD_LEN, 0}, // STAT_SM_WINDOW_POS_X; POS_Y + { 0xB856, 0x4040, WORD_LEN, 0}, // STAT_SM_WINDOW_SIZE_X; SIZE_Y + { 0xB006, 0x01, BYTE_LEN, 0}, //run AF - af.progress {SEQUENCE_END, 0x00, 0, 0} }; -static int sensor_af_single(struct i2c_client *client) +static int sensor_af_touch_zone(struct i2c_client *client, int *zone_center_pos) { int ret = 0; + + zone_center_pos[0] = zone_center_pos[0]*0x100/2000; + zone_center_pos[1] = zone_center_pos[1]*0x100/2000; + zone_center_pos[0] = zone_center_pos[0]/0x40*0x40; + zone_center_pos[1] = zone_center_pos[1]/0x40*0x40; + + sensor_af_trigger[0].val = (zone_center_pos[0]<<8)|zone_center_pos[1]; + +sensor_af_zone_end: + return ret; +} +static int sensor_af_single(struct i2c_client *client) +{ + int ret = 0; + char cnt=0; + struct reginfo reg; + ret = sensor_write_array(client, sensor_af_trigger); - if (ret<0) + if (ret<0) { SENSOR_TR("%s sensor auto focus trigger fail!!\n",SENSOR_NAME_STRING()); - else - SENSOR_DG("%s sensor auto focus trigger success!\n",SENSOR_NAME_STRING()); + } else { + + reg.reg_len = BYTE_LEN; + reg.reg = 0xb006; + reg.val = 0x01; + + do { + msleep(30); + sensor_read1(client,®); + + } while ((reg.val != 0) && (cnt++ < 50)); + + SENSOR_DG("%s sensor auto focus trigger(0x%x) success! state: %d, cnt: %d\n",SENSOR_NAME_STRING(), + sensor_af_trigger[0].val,reg.val,cnt); + } + + sensor_af_single_end: return ret; } @@ -2768,62 +3265,232 @@ sensor_af_const_end: return ret; } -static int sensor_af_zoneupdate(struct i2c_client *client) +static int sensor_af_init(struct i2c_client *client) { int ret = 0; - struct i2c_msg msg[2]; - u8 buf[2][6] = - { - {0xb0,0x08,0x00,0x03,0xff,0xff}, - {0xb0,0x0c,0xff,0xff,0xff,0xff}, - }; - - msg[0].addr = client->addr; - msg[0].flags = client->flags; - msg[0].buf = buf[0]; - msg[0].len = sizeof(buf); - msg[0].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ - msg[0].read_type = 0; /* fpga i2c:0==I2C_NORMAL : direct use number not enum for don't want include spi_fpga.h */ + return 0; +} +static int sensor_af_downfirmware(struct i2c_client *client) +{ + struct sensor *sensor = to_sensor(client); + int ret=0; + struct soc_camera_device *icd = client->dev.platform_data; + struct v4l2_mbus_framefmt mf; + + SENSOR_DG("%s %s Enter\n",SENSOR_NAME_STRING(), __FUNCTION__); + + if (sensor_af_init(client)) { + sensor->info_priv.funmodule_state &= (~SENSOR_AF_IS_OK); + ret = -1; + } else { + sensor->info_priv.funmodule_state |= SENSOR_AF_IS_OK; + + mf.width = icd->user_width; + mf.height = icd->user_height; + mf.code = sensor->info_priv.fmt.code; + mf.colorspace = sensor->info_priv.fmt.colorspace; + mf.field = V4L2_FIELD_NONE; + if (sensor_fmt_videochk(NULL, &mf) == true) { /* ddl@rock-chips.com: focus mode fix const auto focus in video */ + ret = sensor_af_const(client); + } else { + switch (sensor->info_priv.auto_focus) + { + case SENSOR_AF_MODE_AUTO: + { + ret = sensor_af_single(client); + break; + } + case SENSOR_AF_MODE_CLOSE: + { + ret = 0; + break; + } + case SENSOR_AF_MODE_CONTINUOUS: + { + ret = sensor_af_const(client); + break; + } + default: + { + SENSOR_DG("%s focus mode(0x%x) is unkonwn\n",SENSOR_NAME_STRING(),sensor->info_priv.auto_focus); + goto sensor_af_downfirmware_end; + } + } + } + SENSOR_DG("%s sensor_af_downfirmware set focus mode(0x%x) ret:0x%x\n",SENSOR_NAME_STRING(), sensor->info_priv.auto_focus,ret); + } - msg[1].addr = client->addr; - msg[1].flags = client->flags; - msg[1].buf = buf[1]; - msg[1].len = sizeof(buf); - msg[1].scl_rate = CONFIG_SENSOR_I2C_SPEED; /* ddl@rock-chips.com : 100kHz */ - msg[1].read_type = 0; /* fpga i2c:0==I2C_NORMAL : direct use number not enum for don't want include spi_fpga.h */ - - ret = i2c_transfer(client->adapter, &msg[0], 1); - ret |= i2c_transfer(client->adapter, &msg[1], 1); - if (ret >= 0) { - return 0; +sensor_af_downfirmware_end: + + return ret; +} +static void sensor_af_workqueue(struct work_struct *work) +{ + struct sensor_work *sensor_work = container_of(work, struct sensor_work, dwork.work); + struct i2c_client *client = sensor_work->client; + struct sensor *sensor = to_sensor(client); + //struct af_cmdinfo cmdinfo; + + SENSOR_DG("%s %s Enter, cmd:0x%x \n",SENSOR_NAME_STRING(), __FUNCTION__,sensor_work->cmd); + + mutex_lock(&sensor->wq_lock); + + switch (sensor_work->cmd) + { + case WqCmd_af_init: + { + if (sensor_af_downfirmware(client) < 0) { + SENSOR_TR("%s Sensor_af_init is failed in sensor_af_workqueue!\n",SENSOR_NAME_STRING()); + } + break; + } + case WqCmd_af_single: + { + if ((sensor_work->zone_center_pos[0] >=0) && (sensor_work->zone_center_pos[1]>=0)) + sensor_af_touch_zone(client,sensor_work->zone_center_pos); + + if (sensor_af_single(client) < 0) { + SENSOR_TR("%s Sensor_af_single is failed in sensor_af_workqueue!\n",SENSOR_NAME_STRING()); + sensor_work->result = WqRet_fail; + } else { + sensor_work->result = WqRet_success; + } + break; + } + #if 0 + case WqCmd_af_special_pos: + { + sensor_af_idlechk(client); + + cmdinfo.cmd_tag = StepFocus_Spec_Tag; + cmdinfo.cmd_para[0] = sensor_work->var; + cmdinfo.validate_bit = 0x81; + if (sensor_af_cmdset(client, StepMode_Cmd, &cmdinfo) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + case WqCmd_af_near_pos: + { + sensor_af_idlechk(client); + cmdinfo.cmd_tag = StepFocus_Near_Tag; + cmdinfo.validate_bit = 0x80; + if (sensor_af_cmdset(client, StepMode_Cmd, &cmdinfo) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + case WqCmd_af_far_pos: + { + sensor_af_idlechk(client); + cmdinfo.cmd_tag = StepFocus_Far_Tag; + cmdinfo.validate_bit = 0x80; + if (sensor_af_cmdset(client, StepMode_Cmd, &cmdinfo) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + #endif + case WqCmd_af_continues: + { + if (sensor_af_const(client) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + #if 0 + case WqCmd_af_return_idle: + { + if (sensor_af_idlechk(client) < 0) + sensor_work->result = WqRet_fail; + else + sensor_work->result = WqRet_success; + break; + } + #endif + default: + SENSOR_TR("Unknow command(%d) in %s af workqueue!",sensor_work->cmd,SENSOR_NAME_STRING()); + break; + } +set_end: + if (sensor_work->wait == false) { + kfree((void*)sensor_work); } else { - SENSOR_TR("\n %s sensor auto focus zone set fail!!\n",SENSOR_NAME_STRING()); + wake_up(&sensor_work->done); } - -sensor_af_zoneupdate_end: - return ret; + mutex_unlock(&sensor->wq_lock); + return; } -static int sensor_af_init(struct i2c_client *client) +static int sensor_af_workqueue_set(struct soc_camera_device *icd, enum sensor_wq_cmd cmd, int var, bool wait, int *zone_pos) { - int ret = 0; + struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); + struct sensor *sensor = to_sensor(client); + struct sensor_work *wk; + int ret=0; - ret = sensor_write_array(client, sensor_af_init0); - if (ret<0) { - SENSOR_DG("%s sensor auto focus init_0 fail!!",SENSOR_NAME_STRING()); - } else { - SENSOR_DG("%s sensor auto focus init_0 sucess!!",SENSOR_NAME_STRING()); - if (sensor_af_zoneupdate(client) == 0) { - ret = sensor_write_array(client, sensor_af_init1); - if (ret<0) { - SENSOR_DG("%s sensor auto focus init_1 fail!!",SENSOR_NAME_STRING()); - }else{ - SENSOR_DG("%s sensor auto focus init_1 success!!",SENSOR_NAME_STRING()); - } - } - } + if (sensor->sensor_wq == NULL) { + ret = -EINVAL; + goto sensor_af_workqueue_set_end; + } - return ret; + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) != SENSOR_AF_IS_OK) { + if (cmd != WqCmd_af_init) { + SENSOR_TR("%s %s cmd(%d) ingore,because af module isn't ready!",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + ret = -1; + goto sensor_af_workqueue_set_end; + } + } + + wk = kzalloc(sizeof(struct sensor_work), GFP_KERNEL); + if (wk) { + wk->client = client; + INIT_DELAYED_WORK(&wk->dwork, sensor_af_workqueue); + wk->cmd = cmd; + wk->result = WqRet_inval; + wk->wait = wait; + wk->var = var; + + if (zone_pos) { + *zone_pos += 1000; + *(zone_pos+1) += 1000; + *(zone_pos+2) += 1000; + *(zone_pos+3) += 1000; + wk->zone_center_pos[0] = ((*zone_pos + *(zone_pos+2))>>1); + wk->zone_center_pos[1] = ((*(zone_pos+1) + *(zone_pos+3))>>1); + } + + init_waitqueue_head(&wk->done); + + /* ddl@rock-chips.com: + * video_lock is been locked in v4l2_ioctl function, but auto focus may slow, + * As a result any other ioctl calls will proceed very, very slowly since each call + * will have to wait for the AF to finish. Camera preview is pause,because VIDIOC_QBUF + * and VIDIOC_DQBUF is sched. so unlock video_lock here. + */ + if (wait == true) { + queue_delayed_work(sensor->sensor_wq,&(wk->dwork),0); + mutex_unlock(&icd->video_lock); + if (wait_event_timeout(wk->done, (wk->result != WqRet_inval), msecs_to_jiffies(5000)) == 0) { //hhb + SENSOR_TR("%s %s cmd(%d) is timeout!\n",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + } + ret = wk->result; + kfree((void*)wk); + mutex_lock(&icd->video_lock); + } else { + queue_delayed_work(sensor->sensor_wq,&(wk->dwork),msecs_to_jiffies(10)); + } + + } else { + SENSOR_TR("%s %s cmd(%d) ingore,because struct sensor_work malloc failed!",SENSOR_NAME_STRING(),__FUNCTION__,cmd); + ret = -1; + } +sensor_af_workqueue_set_end: + return ret; } #endif @@ -2859,12 +3526,20 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd if (sensor->sensor_io_request && sensor->sensor_io_request->sensor_ioctrl) { sensor->sensor_io_request->sensor_ioctrl(icd->pdev,Cam_Flash, on); + printk( "Sensor_Flash on = %d\n", on ); +#if 0 if(on){ //flash off after 2 secs - hrtimer_cancel(&(flash_off_timer.timer)); - hrtimer_start(&(flash_off_timer.timer),ktime_set(0, 800*1000*1000),HRTIMER_MODE_REL); + if ( flash_off_timer.status ){ + hrtimer_cancel(&(flash_off_timer.timer)); } - } + hrtimer_start(&(flash_off_timer.timer),ktime_set(0, 800*1000*1000),HRTIMER_MODE_REL); + flash_off_timer.status = 1; + }else{ + flash_off_timer.status = 0; + } +#endif + } break; } default: @@ -2878,12 +3553,11 @@ sensor_power_end: return ret; } -static enum hrtimer_restart flash_off_func(struct hrtimer *timer){ - struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer); - sensor_ioctrl(fps_timer->icd,Sensor_Flash,0); - SENSOR_DG("%s %s !!!!!!",SENSOR_NAME_STRING(),__FUNCTION__); - return 0; - +static enum hrtimer_restart flash_off_func(struct hrtimer *hrtimer){ + struct flash_timer *fps_timer = container_of(hrtimer, struct flash_timer, timer); + sensor_ioctrl(fps_timer->icd,Sensor_Flash,0); + printk("%s %s = 0x%x !!!!!!",SENSOR_NAME_STRING(),__FUNCTION__, fps_timer ); + return 0; } static int sensor_init(struct v4l2_subdev *sd, u32 val) @@ -3075,13 +3749,15 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val) SENSOR_DG("%s auto focus module init is success!\n",SENSOR_NAME_STRING()); } #endif - #if CONFIG_SENSOR_Flash + #ifdef CONFIG_SENSOR_Flash qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH); if (qctrl) sensor->info_priv.flash = qctrl->default_value; flash_off_timer.icd = icd; flash_off_timer.timer.function = flash_off_func; + printk( "flash_off_timer.timer.function\n" ); + #endif #endif SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),((val == 0)?__FUNCTION__:"sensor_reinit"),icd->user_width,icd->user_height); @@ -3518,8 +4194,6 @@ static int sensor_cb(void *arg) memcpy(imageuv_addr,tempaddr,32); return 0; } - - static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) { struct i2c_client *client = v4l2_get_subdevdata(sd); @@ -4021,8 +4695,10 @@ static int sensor_set_flash(struct soc_camera_device *icd, const struct v4l2_que { if ((value >= qctrl->minimum) && (value <= qctrl->maximum)) { if (value == 3) { /* ddl@rock-chips.com: torch */ + printk("=====sensor_set_flash====== Flash On\n"); sensor_ioctrl(icd, Sensor_Flash, Flash_Torch); /* Flash On */ } else { + printk("=====sensor_set_flash====== Flash off\n"); sensor_ioctrl(icd, Sensor_Flash, Flash_Off); } SENSOR_DG("%s..%s : %x\n",SENSOR_NAME_STRING(),__FUNCTION__, value); @@ -4090,22 +4766,22 @@ sensor_set_focus_relative_end: return ret; } -static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value) +static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value, int *zone_pos) { struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); struct sensor *sensor = to_sensor(client); int ret = 0; - + if ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK) && (sensor->info_priv.affm_reinit == 0)) { switch (value) { case SENSOR_AF_MODE_AUTO: { - ret = sensor_af_single(client); + ret = sensor_af_workqueue_set(icd, WqCmd_af_single, 0, true, zone_pos); break; } - case SENSOR_AF_MODE_MACRO: + /*case SENSOR_AF_MODE_MACRO: { ret = sensor_set_focus_absolute(icd, qctrl, 0xff); break; @@ -4116,10 +4792,10 @@ static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l ret = sensor_set_focus_absolute(icd, qctrl, 0x00); break; } - + */ case SENSOR_AF_MODE_CONTINUOUS: { - ret = sensor_af_const(client); + ret = sensor_af_workqueue_set(icd, WqCmd_af_continues, 0, true,NULL); break; } default: @@ -4136,6 +4812,7 @@ static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l } return ret; + } #endif static int sensor_g_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl) @@ -4448,6 +5125,7 @@ static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_c } #endif #if CONFIG_SENSOR_Focus + #if 0 case V4L2_CID_FOCUS_ABSOLUTE: { if ((ext_ctrl->value < qctrl->minimum) || (ext_ctrl->value > qctrl->maximum)) @@ -4473,24 +5151,36 @@ static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_c sensor_set_focus_relative(icd, qctrl,ext_ctrl->value); break; } + #endif case V4L2_CID_FOCUS_AUTO: { - if (ext_ctrl->value == 1) { - if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_AUTO) != 0) - return -EINVAL; - sensor->info_priv.auto_focus = SENSOR_AF_MODE_AUTO; + if (ext_ctrl->value) { + if ((ext_ctrl->value==1) || (SENSOR_AF_MODE_AUTO == sensor->info_priv.auto_focus)) { + if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_AUTO,ext_ctrl->rect) != 0) { + if(0 == (sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)) { + sensor->info_priv.auto_focus = SENSOR_AF_MODE_AUTO; + } + return -EINVAL; + } + } + if (ext_ctrl->value == 1) + sensor->info_priv.auto_focus = SENSOR_AF_MODE_AUTO; } else if (SENSOR_AF_MODE_AUTO == sensor->info_priv.auto_focus){ if (ext_ctrl->value == 0) sensor->info_priv.auto_focus = SENSOR_AF_MODE_CLOSE; - } + } break; } case V4L2_CID_FOCUS_CONTINUOUS: { if (SENSOR_AF_MODE_CONTINUOUS != sensor->info_priv.auto_focus) { if (ext_ctrl->value == 1) { - if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_CONTINUOUS) != 0) - return -EINVAL; + if (sensor_set_focus_mode(icd, qctrl,SENSOR_AF_MODE_CONTINUOUS,NULL) != 0) { + if(0 == (sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)) { + sensor->info_priv.auto_focus = SENSOR_AF_MODE_CONTINUOUS; + } + return -EINVAL; + } sensor->info_priv.auto_focus = SENSOR_AF_MODE_CONTINUOUS; } } else { @@ -4575,13 +5265,33 @@ static int sensor_s_stream(struct v4l2_subdev *sd, int enable) { struct i2c_client *client = v4l2_get_subdevdata(sd); struct sensor *sensor = to_sensor(client); - + #if CONFIG_SENSOR_Focus + struct soc_camera_device *icd = client->dev.platform_data; + struct v4l2_mbus_framefmt mf; + #endif + if (enable == 1) { sensor->info_priv.enable = 1; + #if CONFIG_SENSOR_Focus + mf.width = icd->user_width; + mf.height = icd->user_height; + mf.code = sensor->info_priv.fmt.code; + mf.colorspace = sensor->info_priv.fmt.colorspace; + mf.field = V4L2_FIELD_NONE; + /* If auto focus firmware haven't download success, must download firmware again when in video or preview stream on */ + if (sensor_fmt_capturechk(sd, &mf) == false) { + if ((sensor->info_priv.affm_reinit == 1) || ((sensor->info_priv.funmodule_state & SENSOR_AF_IS_OK)==0)) { + sensor_af_workqueue_set(icd, WqCmd_af_init, 0, false,NULL); + sensor->info_priv.affm_reinit = 0; + } + } + #endif } else if (enable == 0) { - sensor->info_priv.enable = 0; + sensor->info_priv.enable = 0; + #if CONFIG_SENSOR_Focus + flush_workqueue(sensor->sensor_wq); + #endif } - return 0; } @@ -4654,9 +5364,9 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) struct i2c_client *client = v4l2_get_subdevdata(sd); struct soc_camera_device *icd = client->dev.platform_data; struct sensor *sensor = to_sensor(client); -#if CONFIG_SENSOR_Flash +//#if CONFIG_SENSOR_Flash int i; -#endif +//#endif int ret = 0; rk29_camera_sensor_cb_s *icd_cb =NULL; @@ -4806,7 +5516,15 @@ static int sensor_probe(struct i2c_client *client, i2c_set_clientdata(client, NULL); kfree(sensor); sensor = NULL; + } else { + #if CONFIG_SENSOR_Focus + sensor->sensor_wq = create_singlethread_workqueue(SENSOR_NAME_STRING(_af_workqueue)); + if (sensor->sensor_wq == NULL) + SENSOR_TR("%s create fail!", SENSOR_NAME_STRING(_af_workqueue)); + mutex_init(&sensor->wq_lock); + #endif } + flash_off_timer.status = 0; hrtimer_init(&(flash_off_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL); SENSOR_DG("\n%s..%s..%d ret = %x \n",__FUNCTION__,__FILE__,__LINE__,ret); return ret; diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index a10198c62cfa..8923b586944a 100755 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h @@ -360,6 +360,7 @@ enum { V4L2_IDENT_SIV121D= 64141, /* ddl@rock-chips.com : sid130B support */ + V4L2_IDENT_HM5065 = 64151, /* Don't just add new IDs at the end: KEEP THIS LIST ORDERED BY ID! */ }; -- 2.34.1