diff options
Diffstat (limited to 'drivers/media/video/wmt_v4l2/sensors/nt99141')
-rwxr-xr-x | drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c | 448 | ||||
-rwxr-xr-x | drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h | 537 |
2 files changed, 985 insertions, 0 deletions
diff --git a/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c new file mode 100755 index 00000000..cfd725ec --- /dev/null +++ b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c @@ -0,0 +1,448 @@ +/* + * Driver for nt99141 CMOS Image Sensor from Novatek + * + * 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 <asm/errno.h> +#include "../cmos-subdev.h" +#include "../../wmt-vid.h" +#include "nt99141.h" + +//#define sensor_write_array(sd, arr, sz) cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr) + +#define sensor_read(sd, reg) \ + wmt_vid_i2c_read16addr(sd->i2c_addr, reg) + +#define sensor_write(sd, reg, val) \ + wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val) + +static int sensor_fps; +static int sensor_set_fps(struct cmos_subdev *sd, int fps); +static struct timer_list day_night_timer; +static struct cmos_subdev *day_night_sd; +static struct work_struct day_night_work; + +static void sensor_write_array(struct cmos_subdev *sd, uint32_t *arr, size_t sz) +{ + uint32_t reg, data; + int i; + + for (i = 0; i < sz; i += 2) { + reg = arr[i]; + data = arr[i+1]; + + if (reg == 0xffff) + msleep(data); + else + wmt_vid_i2c_write16addr(sd->i2c_addr, reg ,data); + } +} + +struct cmos_win_size { + char *name; + int width; + int height; + uint32_t *regs; + size_t size; +}; + +#define CMOS_WIN_SIZE(n, w, h, r) \ + {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) } + +static const struct cmos_win_size cmos_supported_win_sizes[] = { + CMOS_WIN_SIZE("QVGA", 320, 240, nt99141_320_240_regs), + CMOS_WIN_SIZE("VGA", 640, 480, nt99141_640_480_regs), + CMOS_WIN_SIZE("720p", 1280, 720, nt99141_1280_720_regs), +}; + +static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) { + if (cmos_supported_win_sizes[i].width == *width && + cmos_supported_win_sizes[i].height == *height) { + *width = cmos_supported_win_sizes[i].width; + *height = cmos_supported_win_sizes[i].height; + return &cmos_supported_win_sizes[i]; + } + } + return NULL; +} + +static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value) +{ + uint32_t *regs; + size_t size; + + switch (value) { + case WHITE_BALANCE_AUTO: + regs = nt99141_wb_auto; + size = ARRAY_SIZE(nt99141_wb_auto); + break; + case WHITE_BALANCE_INCANDESCENCE: + regs = nt99141_wb_incandescent; + size = ARRAY_SIZE(nt99141_wb_incandescent); + break; + case WHITE_BALANCE_DAYLIGHT: + regs = nt99141_wb_daylight; + size = ARRAY_SIZE(nt99141_wb_daylight); + break; + case WHITE_BALANCE_CLOUDY: + regs = nt99141_wb_cloudy; + size = ARRAY_SIZE(nt99141_wb_cloudy); + break; + case WHITE_BALANCE_FLUORESCENT: + regs = nt99141_wb_fluorescent; + size = ARRAY_SIZE(nt99141_wb_fluorescent); + break; + default: + return -EINVAL; + } + + sensor_write_array(sd, regs, size); + msleep(100); + return 0; +} + +static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value) +{ + uint32_t *regs; + size_t size; + + switch (value) { + case SCENE_MODE_AUTO: + regs = nt99141_scene_mode_auto; + size = ARRAY_SIZE(nt99141_scene_mode_auto); + break; + case SCENE_MODE_NIGHTSHOT: + regs = nt99141_scene_mode_night; + size = ARRAY_SIZE(nt99141_scene_mode_night); + break; + default: + return -EINVAL; + } + + sensor_write_array(sd, regs, size); + return 0; +} + +static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value) +{ + uint32_t *regs; + size_t size; + + switch (value) { + case -2: + regs = nt99141_exposure_neg6; + size = ARRAY_SIZE(nt99141_exposure_neg6); + break; + case -1: + regs = nt99141_exposure_neg3; + size = ARRAY_SIZE(nt99141_exposure_neg3); + break; + case 0: + regs = nt99141_exposure_zero; + size = ARRAY_SIZE(nt99141_exposure_zero); + break; + case 1: + regs = nt99141_exposure_pos3; + size = ARRAY_SIZE(nt99141_exposure_pos3); + break; + case 2: + regs = nt99141_exposure_pos6; + size = ARRAY_SIZE(nt99141_exposure_pos6); + break; + default: + return -EINVAL; + } + + sensor_write_array(sd, regs, size); + return 0; +} + +static int sensor_s_hflip(struct cmos_subdev *sd, int value) +{ + uint32_t data = sensor_read(sd, 0x3022); + + switch (value) { + case 0: + data &= ~0x02; + break; + case 1: + data |= 0x02; + break; + default: + return -EINVAL; + } + + return sensor_write(sd, 0x3022, data); +} + +static int sensor_s_vflip(struct cmos_subdev *sd, int value) +{ + uint32_t data = sensor_read(sd, 0x3022); + + switch (value) { + case 0: + data &= ~0x01; + break; + case 1: + data |= 0x01; + break; + default: + return -EINVAL; + } + + return sensor_write(sd, 0x3022, data); +} + + +static int sensor_s_DayNightMode(struct cmos_subdev *sd) +{ + uint32_t Data_EV = 0 ; + + Data_EV = sensor_read(sd, 0x32d6); + + if(Data_EV > 0x9A) + { + sensor_write(sd, 0x302a, 0x08); + } + else + { + sensor_write(sd, 0x302a, 0x04); + } + + return 0; + +} + +static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc) +{ + switch (qc->id) { + case V4L2_CID_VFLIP: + case V4L2_CID_HFLIP: + return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0); + case V4L2_CID_CAMERA_SCENE_MODE: + return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0); + case V4L2_CID_DO_WHITE_BALANCE: + return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0); + case V4L2_CID_EXPOSURE: + return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0); + } + return -EINVAL; +} + +static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl) +{ + switch (ctrl->id) { + case V4L2_CID_CAMERA_SCENE_MODE: + return sensor_s_scenemode(sd, ctrl->value); + case V4L2_CID_DO_WHITE_BALANCE: + return sensor_s_wb(sd, ctrl->value); + case V4L2_CID_EXPOSURE: + return sensor_s_exposure(sd, ctrl->value); + case V4L2_CID_HFLIP: + return sensor_s_hflip(sd, ctrl->value); + case V4L2_CID_VFLIP: + return sensor_s_vflip(sd, ctrl->value); + default: + case WMT_V4L2_CID_CAMERA_FLASH: + return -EINVAL; + } + return -EINVAL; +} + +static int sensor_g_mbus_fmt(struct cmos_subdev *sd, + struct v4l2_mbus_framefmt *mf) +{ + return -EINVAL; +} + +static int sensor_s_mbus_fmt(struct cmos_subdev *sd, + struct v4l2_mbus_framefmt *mf) +{ + const struct cmos_win_size *win; + + win = cmos_select_win(&mf->width, &mf->height); + if (!win) { + pr_err("%s, s_mbus_fmt failed, width %d, height %d\n", + sd->name, mf->width, mf->height); + return -EINVAL; + } + + sensor_write_array(sd, win->regs, win->size); + sensor_set_fps(sd,sensor_fps); + msleep(200); + + return 0; +} + +static int sensor_try_mbus_fmt(struct cmos_subdev *sd, + struct v4l2_mbus_framefmt *mf) +{ + return 0; +} + +static int sensor_enum_framesizes(struct cmos_subdev *sd, + struct v4l2_frmsizeenum *fsize) +{ + int i; + int num_valid = -1; + __u32 index = fsize->index; + + for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) { + const struct cmos_win_size *win = &cmos_supported_win_sizes[index]; + if (index == ++num_valid) { + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = win->width; + fsize->discrete.height = win->height; + return 0; + } + } + + return -EINVAL; +} + +static int sensor_set_fps(struct cmos_subdev *sd, int fps) +{ + switch(fps){ + case 5: + sensor_write_array(sd, nt99141_5fps_regs, + ARRAY_SIZE(nt99141_5fps_regs)); + break; + case 10: + sensor_write_array(sd, nt99141_10fps_regs, + ARRAY_SIZE(nt99141_10fps_regs)); + break; + case 15: + sensor_write_array(sd, nt99141_15fps_regs, + ARRAY_SIZE(nt99141_15fps_regs)); + break; + case 20: + sensor_write_array(sd, nt99141_20fps_regs, + ARRAY_SIZE(nt99141_20fps_regs)); + case 25: + sensor_write_array(sd, nt99141_25fps_regs, + ARRAY_SIZE(nt99141_25fps_regs)); + case 30: + sensor_write_array(sd, nt99141_30fps_regs, + ARRAY_SIZE(nt99141_30fps_regs)); + default: + break; + } + + return 0; +} + +static int sensor_g_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms) +{ + return 0; +} + +static int sensor_s_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms) +{ + struct v4l2_captureparm *cp = &parms->parm.capture; + struct v4l2_fract *tpf = &cp->timeperframe; + + if (tpf->numerator == 0 || tpf->denominator == 0) { + return 0; + } + + sensor_fps = tpf->denominator;//cause tpf->numerator == 1 in HAL + + + return 0; +} + +static int sensor_identify(struct cmos_subdev *sd) +{ + uint32_t data = 0; + + data |= (sensor_read(sd, 0x3000) & 0xff) << 8; + data |= (sensor_read(sd, 0x3001) & 0xff); + + return (data == sd->id) ? 0 : -EINVAL; +} + +static void day_night_do_work(struct work_struct *work) +{ + sensor_s_DayNightMode(day_night_sd); +} + +static void day_night_timer_func(unsigned long __data) +{ + schedule_work(&day_night_work); + mod_timer(&day_night_timer, jiffies + msecs_to_jiffies(3000)); +} + +static int sensor_init(struct cmos_subdev *sd) +{ + if (sensor_identify(sd)) + return -1; + + sensor_write_array(sd, nt99141_default_regs_init, + ARRAY_SIZE(nt99141_default_regs_init)); + + day_night_sd = sd; + INIT_WORK(&day_night_work, day_night_do_work); + setup_timer(&day_night_timer, day_night_timer_func, (unsigned long)sd); + mod_timer(&day_night_timer, jiffies + msecs_to_jiffies(3000)); + + return 0; +} + +static int sensor_exit(struct cmos_subdev *sd) +{ + sensor_write_array(sd, nt99141_default_regs_exit, + ARRAY_SIZE(nt99141_default_regs_exit)); + cancel_work_sync(&day_night_work); + del_timer_sync(&day_night_timer); + + return 0; +} + +static struct cmos_subdev_ops nt99141_ops = { + .identify = sensor_identify, + .init = sensor_init, + .exit = sensor_exit, + .queryctrl = sensor_queryctrl, + .s_ctrl = sensor_s_ctrl, + .s_mbus_fmt = sensor_s_mbus_fmt, + .g_mbus_fmt = sensor_g_mbus_fmt, + .try_mbus_fmt = sensor_try_mbus_fmt, + .enum_framesizes = sensor_enum_framesizes, + .g_parm = sensor_g_parm, + .s_parm = sensor_s_parm, + +}; + +struct cmos_subdev nt99141 = { + .name = "nt99141", + .i2c_addr = 0x2a, + .id = 0x1410, + .max_width = 1280, + .max_height = 720, + .ops = &nt99141_ops, +}; + +#if 0 +static int __init nt99141_init(void) +{ + return cmos_register_sudbdev(&nt99141); +} + +static void __exit nt99141_exit(void) +{ + cmos_unregister_subdev(&nt99141); + return; +} + +module_init(nt99141_init); +module_exit(nt99141_exit); + +MODULE_LICENSE("GPL"); +#endif diff --git a/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h new file mode 100755 index 00000000..be3b87c0 --- /dev/null +++ b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h @@ -0,0 +1,537 @@ +#ifndef NT99141_H +#define NT99141_H + +// Scene Mode +uint32_t nt99141_scene_mode_auto[] = { + 0x32C4,0x28, + 0x302a,0x04, +}; + +uint32_t nt99141_scene_mode_night[] = { + 0x32C4,0x30, + 0x302a,0x08, +}; + + +// White Balance +uint32_t nt99141_wb_auto [] = { + 0x3201, 0x7F, +}; + +uint32_t nt99141_wb_incandescent [] = { + 0x3201, 0x6F, + 0x3290, 0x01, // 304 / 256 = 1.187 + 0x3291, 0x30, + 0x3296, 0x01, // 459 / 256 = 1.793 + 0x3297, 0xCB, + 0x3060, 0x01, +}; + +uint32_t nt99141_wb_fluorescent [] = { + 0x3201, 0x6F, + 0x3290, 0x01, // 368 / 256 = 1.437 + 0x3291, 0x70, + 0x3296, 0x01, // 511 / 256 = 1.996 + 0x3297, 0xFF, + 0x3060, 0x01, +}; + +uint32_t nt99141_wb_daylight [] = { + 0x3201, 0x6F, + 0x3290, 0x01, // 312 / 256 = 1.218 + 0x3291, 0x38, + 0x3296, 0x01, // 360 / 256 = 1.406 + 0x3297, 0x68, + 0x3060, 0x01, +}; + +uint32_t nt99141_wb_cloudy [] = { + 0x3201, 0x6F, + 0x3290, 0x01, // 337 / 256 = 1.316 + 0x3291, 0x51, + 0x3296, 0x01, // 256 / 256 = 1.0 + 0x3297, 0x00, + 0x3060, 0x01, +}; + +uint32_t nt99141_wb_tungsten [] = { + 0x3201, 0x6F, + 0x3290, 0x01, // 256 / 256 = 1.0 + 0x3291, 0x00, + 0x3296, 0x02, // 560 / 256 = 2.1875 + 0x3297, 0x30, + 0x3060, 0x01, +}; + + +// Exposure +uint32_t nt99141_exposure_neg6[] = { + 0x32F2, 0x40, +}; + +uint32_t nt99141_exposure_neg3[] = { + 0x32F2, 0x60, +}; + +uint32_t nt99141_exposure_zero[] = { + 0x32F2, 0x80, +}; + +uint32_t nt99141_exposure_pos3[] = { + 0x32F2, 0xA0, +}; + +uint32_t nt99141_exposure_pos6[] = { + 0x32F2, 0xC0, +}; + +// Resolution +uint32_t nt99141_320_240_regs[] = { + //[YUYV_320x240_PCLK_74MHZ_15.00_30.03_Fps] + 0x32BF, 0x60, + 0x32C0, 0x6A, + 0x32C1, 0x6A, + 0x32C2, 0x6A, + 0x32C3, 0x00, + 0x32C4, 0x2F, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x6A, + 0x32CA, 0x8A, + 0x32CB, 0x8A, + 0x32CC, 0x8A, + 0x32CD, 0x8A, + 0x32DB, 0x7B, + 0x32E0, 0x01, + 0x32E1, 0x40, + 0x32E2, 0x00, + 0x32E3, 0xF0, + 0x32E4, 0x02, + 0x32E5, 0x02, + 0x32E6, 0x02, + 0x32E7, 0x03, + 0x3200, 0x3E, + 0x3201, 0x0F, + 0x3028, 0x24, + 0x3029, 0x20, + 0x302A, 0x04, + 0x3022, 0x24, + 0x3023, 0x24, + 0x3002, 0x00, + 0x3003, 0xA4, + 0x3004, 0x00, + 0x3005, 0x04, + 0x3006, 0x04, + 0x3007, 0x63, + 0x3008, 0x02, + 0x3009, 0xD3, + 0x300A, 0x06, + 0x300B, 0x8A, + 0x300C, 0x02, + 0x300D, 0xE0, + 0x300E, 0x03, + 0x300F, 0xC0, + 0x3010, 0x02, + 0x3011, 0xD0, + 0x32B8, 0x43, + 0x32B9, 0x35, + 0x32BB, 0x87, + 0x32BC, 0x3C, + 0x32BD, 0x40, + 0x32BE, 0x38, + 0x320A, 0xB2, + 0x3201, 0x7F, + 0x3021, 0x06, + 0x3060, 0x01, + +}; + +uint32_t nt99141_640_480_regs[] = { + //[YUYV_640x480__PCLK_74MHZ_15.00_30.03_Fps] + 0x32BF, 0x60, + 0x32C0, 0x6A, + 0x32C1, 0x6A, + 0x32C2, 0x6A, + 0x32C3, 0x00, + 0x32C4, 0x2F, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x6A, + 0x32CA, 0x8A, + 0x32CB, 0x8A, + 0x32CC, 0x8A, + 0x32CD, 0x8A, + 0x32DB, 0x7B, + 0x32E0, 0x02, + 0x32E1, 0x80, + 0x32E2, 0x01, + 0x32E3, 0xE0, + 0x32E4, 0x00, + 0x32E5, 0x80, + 0x32E6, 0x00, + 0x32E7, 0x80, + 0x3200, 0x3E, + 0x3201, 0x0F, + 0x3028, 0x24, + 0x3029, 0x20, + 0x302A, 0x04, + 0x3022, 0x24, + 0x3023, 0x24, + 0x3002, 0x00, + 0x3003, 0xA4, + 0x3004, 0x00, + 0x3005, 0x04, + 0x3006, 0x04, + 0x3007, 0x63, + 0x3008, 0x02, + 0x3009, 0xD3, + 0x300A, 0x06, + 0x300B, 0x8A, + 0x300C, 0x02, + 0x300D, 0xE0, + 0x300E, 0x03, + 0x300F, 0xC0, + 0x3010, 0x02, + 0x3011, 0xD0, + 0x32B8, 0x3F, + 0x32B9, 0x31, + 0x32BB, 0x87, + 0x32BC, 0x38, + 0x32BD, 0x3C, + 0x32BE, 0x34, + 0x3201, 0x7F, + 0x320A, 0xB2, + 0x3021, 0x06, + 0x3060, 0x01, + 0x320A, 0xB2, +}; + +uint32_t nt99141_1280_720_regs[] = { + //[YUYV_1280x720_PCLK_74mhz_15.00_30.03_Fps] + + 0x32BF, 0x60, + 0x32C0, 0x6A, + 0x32C1, 0x6A, + 0x32C2, 0x6A, + 0x32C3, 0x00, + 0x32C4, 0x2F, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x6A, + 0x32CA, 0x8A, + 0x32CB, 0x8A, + 0x32CC, 0x8A, + 0x32CD, 0x8A, + 0x32DB, 0x7B, + 0x32E0, 0x05, + 0x32E1, 0x00, + 0x32E2, 0x02, + 0x32E3, 0xD0, + 0x32E4, 0x00, + 0x32E5, 0x00, + 0x32E6, 0x00, + 0x32E7, 0x00, + 0x3200, 0x3E, + 0x3201, 0x0F, + 0x3028, 0x24, + 0x3029, 0x20, + 0x302A, 0x04, + 0x3022, 0x24, + 0x3023, 0x24, + 0x3002, 0x00, + 0x3003, 0x04, + 0x3004, 0x00, + 0x3005, 0x04, + 0x3006, 0x05, + 0x3007, 0x03, + 0x3008, 0x02, + 0x3009, 0xD3, + 0x300A, 0x06, + 0x300B, 0x8A, + 0x300C, 0x02, + 0x300D, 0xE0, + 0x300E, 0x05, + 0x300F, 0x00, + 0x3010, 0x02, + 0x3011, 0xD0, + 0x32B8, 0x3F, + 0x32B9, 0x31, + 0x32BB, 0x87, + 0x32BC, 0x38, + 0x32BD, 0x3C, + 0x32BE, 0x34, + 0x320A, 0x00, + 0x3201, 0x7F, + 0x3021, 0x06, + 0x3060, 0x01, + + +}; + +uint32_t nt99141_5fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x84, + 0x32C1, 0x84, + 0x32C2, 0x84, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x84, + 0x32CA, 0xA4, + 0x32CB, 0xA4, + 0x32CC, 0xA4, + 0x32CD, 0xA4, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + +uint32_t nt99141_10fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x74, + 0x32C1, 0x74, + 0x32C2, 0x74, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x74, + 0x32CA, 0x94, + 0x32CB, 0x94, + 0x32CC, 0x94, + 0x32CD, 0x94, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + +uint32_t nt99141_15fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x6A, + 0x32C1, 0x6A, + 0x32C2, 0x6A, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x6A, + 0x32CA, 0x8A, + 0x32CB, 0x8A, + 0x32CC, 0x8A, + 0x32CD, 0x8A, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + + +uint32_t nt99141_20fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x64, + 0x32C1, 0x64, + 0x32C2, 0x64, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x64, + 0x32CA, 0x84, + 0x32CB, 0x84, + 0x32CC, 0x84, + 0x32CD, 0x84, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + + +uint32_t nt99141_25fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x60, + 0x32C1, 0x60, + 0x32C2, 0x60, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x60, + 0x32CA, 0x80, + 0x32CB, 0x80, + 0x32CC, 0x80, + 0x32CD, 0x80, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + + +uint32_t nt99141_30fps_regs[] = { + 0x32BF, 0x60, + 0x32C0, 0x5A, + 0x32C1, 0x5A, + 0x32C2, 0x5A, + 0x32C3, 0x00, + //0x32C4, 0x20, + 0x32C5, 0x20, + 0x32C6, 0x20, + 0x32C7, 0x00, + 0x32C8, 0xDD, + 0x32C9, 0x5A, + 0x32CA, 0x7A, + 0x32CB, 0x7A, + 0x32CC, 0x7A, + 0x32CD, 0x7A, + 0x32DB, 0x7B, + 0x32D0, 0x01, +}; + +// init +uint32_t nt99141_default_regs_init[]= { + 0x3109,0x04, + 0x3040,0x04, + 0x3041,0x02, + 0x3042,0xFF, + 0x3043,0x08, + 0x3052,0xE0, + 0x305F,0x33, + 0x3100,0x07, + 0x3106,0x03, + 0x3105,0x01, + 0x3108,0x05, + 0x3110,0x22, + 0x3111,0x57, + 0x3112,0x22, + 0x3113,0x55, + 0x3114,0x05, + 0x3135,0x00, + 0x32F0,0x01, + 0x3210,0x05, + 0x3211,0x05, + 0x3212,0x05, + 0x3213,0x05, + 0x3214,0x05, + 0x3215,0x05, + 0x3216,0x05, + 0x3217,0x05, + 0x3218,0x05, + 0x3219,0x05, + 0x321A,0x05, + 0x321B,0x05, + 0x321C,0x05, + 0x321D,0x05, + 0x321E,0x05, + 0x321F,0x05, + 0x3231,0xFF, + 0x3290,0x01, + 0x3291,0x80, + 0x3296,0x01, + 0x3297,0x73, + 0x3250,0x80, + 0x3251,0x03, + 0x3252,0xFF, + 0x3253,0x00, + 0x3254,0x03, + 0x3255,0xFF, + 0x3256,0x00, + 0x3257,0x50, + 0x3270,0x00, + 0x3271,0x14, + 0x3272,0x22, + 0x3273,0x36, + 0x3274,0x4A, + 0x3275,0x5A, + 0x3276,0x73, + 0x3277,0x88, + 0x3278,0x98, + 0x3279,0xA7, + 0x327A,0xC0, + 0x327B,0xD4, + 0x327C,0xE6, + 0x327D,0xF5, + 0x327E,0xFF, + 0x3302,0x00, + 0x3303,0x40, + 0x3304,0x00, + 0x3305,0x96, + 0x3306,0x00, + 0x3307,0x29, + 0x3308,0x07, + 0x3309,0xBA, + 0x330A,0x06, + 0x330B,0xF5, + 0x330C,0x01, + 0x330D,0x51, + 0x330E,0x01, + 0x330F,0x30, + 0x3310,0x07, + 0x3311,0x16, + 0x3312,0x07, + 0x3313,0xBA, + 0x3326,0x02, + 0x32F6,0x0F, + 0x32F9,0x42, + 0x32FA,0x24, + 0x3325,0x4A, + 0x3330,0x00, + 0x3331,0x0A, + 0x3332,0xFF, + 0x3338,0x30, + 0x3339,0x84, + 0x333A,0x00, + 0x333F,0x07, + 0x3360,0x10, + 0x3361,0x18, + 0x3362,0x1f, + 0x3363,0x37, + 0x3364,0x80, + 0x3365,0x76, + 0x3366,0x70, + 0x3367,0x68, + 0x3368,0x30, + 0x3369,0x28, + 0x336A,0x20, + 0x336B,0x10, + 0x336C,0x00, + 0x336D,0x20, + 0x336E,0x1C, + 0x336F,0x18, + 0x3370,0x0E, + 0x3371,0x38, + 0x3372,0x3C, + 0x3373,0x3F, + 0x3374,0x3F, + 0x338A,0x34, + 0x338B,0x7F, + 0x338C,0x10, + 0x338D,0x23, + 0x338E,0x7F, + 0x338F,0x14, + 0x3375,0x10, + 0x3376,0x12, + 0x3377,0x14, + 0x3378,0x16, + + 0x3012,0x02, + 0x3013,0xD0, + 0x3024,0x0a, + 0x3069,0x01, + 0x306A,0x03, +}; + +uint32_t nt99141_default_regs_exit[]={ + +}; + +#endif |