From e454ddd45aaf59fd3ad98a9ec35e70051270a579 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Mon, 14 Jan 2019 16:36:37 +0300 Subject: [PATCH 093/122] lvds: add OV10640 imager This adds OV10640 imager support (RDACM24B) Signed-off-by: Vladimir Barinov --- drivers/media/i2c/soc_camera/ov10640.c | 685 +++++++++ drivers/media/i2c/soc_camera/ov10640.h | 2407 ++++++++++++++++++++++++++++++++ drivers/media/i2c/soc_camera/ov106xx.c | 13 +- 3 files changed, 3104 insertions(+), 1 deletion(-) create mode 100644 drivers/media/i2c/soc_camera/ov10640.c create mode 100644 drivers/media/i2c/soc_camera/ov10640.h diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c new file mode 100644 index 0000000..8746988 --- /dev/null +++ b/drivers/media/i2c/soc_camera/ov10640.c @@ -0,0 +1,685 @@ +/* + * OmniVision ov10640 sensor camera driver + * + * Copyright (C) 2015-2017 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "max9286.h" +#include "ov10640.h" + +#define OV10640_I2C_ADDR 0x30 + +#define OV10640_PID 0x300a +#define OV10640_VER 0x300b +#define OV10640_VERSION_REG 0xa640 + +#define OV10640_MEDIA_BUS_FMT MEDIA_BUS_FMT_SBGGR12_1X12 + +struct ov10640_priv { + struct v4l2_subdev sd; + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; + int subsampling; + int fps_denominator; + int init_complete; + u8 id[6]; + int dvp_order; + /* serializers */ + int max9286_addr; + int max9271_addr; + int ti9x4_addr; + int ti9x3_addr; + int port; + int gpio_resetb; + int gpio_fsin; +}; + +static inline struct ov10640_priv *to_ov10640(const struct i2c_client *client) +{ + return container_of(i2c_get_clientdata(client), struct ov10640_priv, sd); +} + +static inline struct v4l2_subdev *ov10640_to_sd(struct v4l2_ctrl *ctrl) +{ + return &container_of(ctrl->handler, struct ov10640_priv, hdl)->sd; +} + +static void ov10640_s_port(struct i2c_client *client, int fwd_en) +{ + struct ov10640_priv *priv = to_ov10640(client); + int tmp_addr; + + if (priv->max9286_addr) { + tmp_addr = client->addr; + client->addr = priv->max9286_addr; /* Deserializer I2C address */ + reg8_write(client, 0x0a, fwd_en ? 0x11 << priv->port : 0); /* Enable/disable reverse/forward control for this port */ + usleep_range(5000, 5500); /* wait 5ms */ + client->addr = tmp_addr; + }; +} + +static int ov10640_set_regs(struct i2c_client *client, + const struct ov10640_reg *regs, int nr_regs) +{ + int i; + + for (i = 0; i < nr_regs; i++) { + if (regs[i].reg == OV10640_DELAY) { + mdelay(regs[i].val); + continue; + } + + if (reg16_write(client, regs[i].reg, regs[i].val)) { + usleep_range(100, 150); /* wait 100ns */ + reg16_write(client, regs[i].reg, regs[i].val); + } + } + + return 0; +} + +static int ov10640_s_stream(struct v4l2_subdev *sd, int enable) +{ + return 0; +} + +static int ov10640_set_window(struct v4l2_subdev *sd) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + dev_dbg(&client->dev, "L=%d T=%d %dx%d\n", priv->rect.left, priv->rect.top, priv->rect.width, priv->rect.height); + + /* horiz crop start (reverse) */ + reg16_write(client, 0x3074, (OV10640_MAX_WIDTH - priv->rect.width - priv->rect.left) >> 8); + reg16_write(client, 0x3075, (OV10640_MAX_WIDTH - priv->rect.width - priv->rect.left) & 0xff); + /* horiz crop end (reverse) */ + reg16_write(client, 0x3078, (OV10640_MAX_WIDTH - priv->rect.left - 1) >> 8); + reg16_write(client, 0x3079, (OV10640_MAX_WIDTH - priv->rect.left - 1) & 0xff); + /* vert crop start */ + reg16_write(client, 0x3076, priv->rect.top >> 8); + reg16_write(client, 0x3077, priv->rect.top & 0xff); + /* vert crop end */ + reg16_write(client, 0x307a, (priv->rect.top + priv->rect.height + 1) >> 8); + reg16_write(client, 0x307b, (priv->rect.top + priv->rect.height + 1) & 0xff); + /* horiz output */ + reg16_write(client, 0x307c, priv->rect.width >> 8); + reg16_write(client, 0x307d, priv->rect.width & 0xff); + /* vert output */ + reg16_write(client, 0x307e, priv->rect.height >> 8); + reg16_write(client, 0x307f, priv->rect.height & 0xff); + + return 0; +}; + +static int ov10640_get_fmt(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_format *format) +{ + struct v4l2_mbus_framefmt *mf = &format->format; + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + if (format->pad) + return -EINVAL; + + mf->width = priv->rect.width; + mf->height = priv->rect.height; + mf->code = OV10640_MEDIA_BUS_FMT; + mf->colorspace = V4L2_COLORSPACE_SMPTE170M; + mf->field = V4L2_FIELD_NONE; + + return 0; +} + +static int ov10640_set_fmt(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_format *format) +{ + struct v4l2_mbus_framefmt *mf = &format->format; + + mf->code = OV10640_MEDIA_BUS_FMT; + mf->colorspace = V4L2_COLORSPACE_SMPTE170M; + mf->field = V4L2_FIELD_NONE; + + if (format->which == V4L2_SUBDEV_FORMAT_TRY) + cfg->try_fmt = *mf; + + return 0; +} + +static int ov10640_enum_mbus_code(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_mbus_code_enum *code) +{ + if (code->pad || code->index > 0) + return -EINVAL; + + code->code = OV10640_MEDIA_BUS_FMT; + + return 0; +} + +static int ov10640_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + memcpy(edid->edid, priv->id, 6); + + edid->edid[6] = 0xff; + edid->edid[7] = client->addr; + edid->edid[8] = OV10640_VERSION_REG >> 8; + edid->edid[9] = OV10640_VERSION_REG & 0xff; + + return 0; +} + +static int ov10640_set_selection(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_selection *sel) +{ + struct v4l2_rect *rect = &sel->r; + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || + sel->target != V4L2_SEL_TGT_CROP) + return -EINVAL; + + rect->left = ALIGN(rect->left, 2); + rect->top = ALIGN(rect->top, 2); + rect->width = ALIGN(rect->width, 2); + rect->height = ALIGN(rect->height, 2); + + if ((rect->left + rect->width > OV10640_MAX_WIDTH) || + (rect->top + rect->height > OV10640_MAX_HEIGHT)) + *rect = priv->rect; + + priv->rect.left = rect->left; + priv->rect.top = rect->top; + priv->rect.width = rect->width; + priv->rect.height = rect->height; + + ov10640_set_window(sd); + + return 0; +} + +static int ov10640_get_selection(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_selection *sel) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) + return -EINVAL; + + switch (sel->target) { + case V4L2_SEL_TGT_CROP_BOUNDS: + sel->r.left = 0; + sel->r.top = 0; + sel->r.width = OV10640_MAX_WIDTH; + sel->r.height = OV10640_MAX_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; + sel->r.width = OV10640_MAX_WIDTH; + sel->r.height = OV10640_MAX_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; + return 0; + default: + return -EINVAL; + } +} + +static int ov10640_g_mbus_config(struct v4l2_subdev *sd, + struct v4l2_mbus_config *cfg) +{ + cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | + V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; + cfg->type = V4L2_MBUS_CSI2; + + return 0; +} + +#ifdef CONFIG_VIDEO_ADV_DEBUG +static int ov10640_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; + u8 val = 0; + + ret = reg16_read(client, (u16)reg->reg, &val); + if (ret < 0) + return ret; + + reg->val = val; + reg->size = sizeof(u16); + + return 0; +} + +static int ov10640_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + + return reg16_write(client, (u16)reg->reg, (u8)reg->val); +} +#endif + +static struct v4l2_subdev_core_ops ov10640_core_ops = { +#ifdef CONFIG_VIDEO_ADV_DEBUG + .g_register = ov10640_g_register, + .s_register = ov10640_s_register, +#endif +}; + +static int ov10640_s_ctrl(struct v4l2_ctrl *ctrl) +{ + struct v4l2_subdev *sd = ov10640_to_sd(ctrl); + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + int ret = -EINVAL; + u8 val = 0; + u16 val16 = 0; + + if (!priv->init_complete) + return 0; + + switch (ctrl->id) { + case V4L2_CID_BRIGHTNESS: + case V4L2_CID_CONTRAST: + case V4L2_CID_SATURATION: + case V4L2_CID_HUE: + case V4L2_CID_GAMMA: + break; + case V4L2_CID_GAIN: + reg16_write(client, 0x30EC, ctrl->val); // L + reg16_write(client, 0x30EE, ctrl->val); // S + reg16_write(client, 0x30F0, ctrl->val); // VS + break; + case V4L2_CID_ANALOGUE_GAIN: + reg16_read(client, 0x30EB, &val); + val &= ~(0x3f << 0); // VS, S, L - Gauss curve + val |= ((ctrl->val / 2) << 0); // L + val |= (ctrl->val << 2); // S + val |= ((ctrl->val / 2) << 4); // VS + reg16_write(client, 0x30EB, val); + break; + case V4L2_CID_EXPOSURE: + val16 = 0xfff - ctrl->val; + + reg16_write(client, 0x30E6, val16 >> 8); // L + reg16_write(client, 0x30E7, val16 & 0xff); // L + + reg16_write(client, 0x30E8, val16 >> 8); // S + reg16_write(client, 0x30E9, val16 & 0xff); // S + +// reg16_write(client, 0x30EA, val >> 8); // VS - fractional ... + break; + case V4L2_CID_EXPOSURE_AUTO: + reg16_read(client, 0x30FA, &val); + val &= ~(0x1 << 6); + val |= (ctrl->val << 6); + reg16_write(client, 0x30FA, val); + break; + case V4L2_CID_HFLIP: + reg16_read(client, 0x3128, &val); + val &= ~(0x1 << 0); + val |= (ctrl->val << 0); + reg16_write(client, 0x3128, val); + + reg16_read(client, 0x3291, &val); + val &= ~(0x1 << 1); + val |= (ctrl->val << 1); + reg16_write(client, 0x3291, val); + + reg16_read(client, 0x3090, &val); + val &= ~(0x1 << 2); + val |= (ctrl->val << 2); + ret = reg16_write(client, 0x3090, val); + break; + case V4L2_CID_VFLIP: + reg16_read(client, 0x3128, &val); + val &= ~(0x1 << 1); + val |= (ctrl->val << 1); + reg16_write(client, 0x3128, val); + + reg16_read(client, 0x3291, &val); + val &= ~(0x1 << 2); + val |= (ctrl->val << 2); + reg16_write(client, 0x3291, val); + + reg16_read(client, 0x3090, &val); + val &= ~(0x1 << 3); + val |= (ctrl->val << 3); + ret = reg16_write(client, 0x3090, val); + break; + case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: + ret = 0; + break; + } + + return ret; +} + +static const struct v4l2_ctrl_ops ov10640_ctrl_ops = { + .s_ctrl = ov10640_s_ctrl, +}; + +static struct v4l2_subdev_video_ops ov10640_video_ops = { + .s_stream = ov10640_s_stream, + .g_mbus_config = ov10640_g_mbus_config, +}; + +static const struct v4l2_subdev_pad_ops ov10640_subdev_pad_ops = { + .get_edid = ov10640_get_edid, + .enum_mbus_code = ov10640_enum_mbus_code, + .get_selection = ov10640_get_selection, + .set_selection = ov10640_set_selection, + .get_fmt = ov10640_get_fmt, + .set_fmt = ov10640_set_fmt, +}; + +static struct v4l2_subdev_ops ov10640_subdev_ops = { + .core = &ov10640_core_ops, + .video = &ov10640_video_ops, + .pad = &ov10640_subdev_pad_ops, +}; + +static void ov10640_otp_id_read(struct i2c_client *client) +{ + struct ov10640_priv *priv = to_ov10640(client); + int i; + int otp_bank0_allzero = 1; + + reg16_write(client, 0x349C, 1); + usleep_range(25000, 25500); /* wait 25 ms */ + + for (i = 0; i < 6; i++) { + /* first 6 bytes are equal on all ov10640 */ + reg16_read(client, 0x349e + i + 6, &priv->id[i]); + if (priv->id[i]) + otp_bank0_allzero = 0; + } + + if (otp_bank0_allzero) { + reg16_write(client, 0x3495, 0x41); /* bank#1 */ + reg16_write(client, 0x349C, 1); + usleep_range(25000, 25500); /* wait 25 ms */ + + for (i = 0; i < 6; i++) + reg16_read(client, 0x34ae + i, &priv->id[i]); + } +} + +static ssize_t ov10640_otp_id_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov10640_priv *priv = to_ov10640(client); + + return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", + priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +} + +static DEVICE_ATTR(otp_id_ov10640, S_IRUGO, ov10640_otp_id_show, NULL); + +static int ov10640_initialize(struct i2c_client *client) +{ + struct ov10640_priv *priv = to_ov10640(client); + u16 pid; + u8 val = 0; + int ret = 0; + + ov10640_s_port(client, 1); + + /* check and show product ID and manufacturer ID */ + reg16_read(client, OV10640_PID, &val); + pid = val; + reg16_read(client, OV10640_VER, &val); + pid = (pid << 8) | val; + + if (pid != OV10640_VERSION_REG) { + dev_err(&client->dev, "Product ID error %x\n", pid); + ret = -ENODEV; + goto out; + } + + /* Read OTP IDs */ + ov10640_otp_id_read(client); + /* Program wizard registers */ + ov10640_set_regs(client, ov10640_regs_wizard_r1e, ARRAY_SIZE(ov10640_regs_wizard_r1e)); + + dev_info(&client->dev, "ov10640 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, OV10640_MAX_WIDTH, OV10640_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +out: + ov10640_s_port(client, 0); + + return ret; +} + +static int ov10640_parse_dt(struct device_node *np, struct ov10640_priv *priv) +{ + struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); + int i; + struct device_node *endpoint = NULL, *rendpoint = NULL; + int tmp_addr = 0; + + for (i = 0; ; i++) { + endpoint = of_graph_get_next_endpoint(np, endpoint); + if (!endpoint) + break; + + of_node_put(endpoint); + + of_property_read_u32(endpoint, "dvp-order", &priv->dvp_order); + + rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); + if (!rendpoint) + continue; + + if (!of_property_read_u32(rendpoint, "max9271-addr", &priv->max9271_addr) && + !of_property_read_u32(rendpoint->parent->parent, "reg", &priv->max9286_addr) && + !kstrtouint(strrchr(rendpoint->full_name, '@') + 1, 0, &priv->port)) + break; + + if (!of_property_read_u32(rendpoint, "ti9x3-addr", &priv->ti9x3_addr) && + !of_property_match_string(rendpoint->parent->parent, "compatible", "ti,ti9x4") && + !of_property_read_u32(rendpoint->parent->parent, "reg", &priv->ti9x4_addr) && + !kstrtouint(strrchr(rendpoint->full_name, '@') + 1, 0, &priv->port)) + break; + } + + if (!priv->max9286_addr && !priv->ti9x4_addr) { + dev_err(&client->dev, "deserializer does not present for OV10640\n"); + return -EINVAL; + } + + ov10640_s_port(client, 1); + + /* setup I2C translator address */ + tmp_addr = client->addr; + if (priv->max9286_addr) { + client->addr = priv->max9271_addr; /* Serializer I2C address */ + + reg8_write(client, 0x09, tmp_addr << 1); /* Sensor translated I2C address */ + reg8_write(client, 0x0A, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ + usleep_range(2000, 2500); /* wait 2ms */ + }; + + if (priv->ti9x4_addr) { + client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ + + reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ + usleep_range(2000, 2500); /* wait 2ms */ + reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ + reg8_write(client, 0x5d, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ + +// reg8_write(client, 0x6e, 0x9a); /* GPIO0 - fsin, GPIO1 - resetb */ +// udelay(100); + } + client->addr = tmp_addr; + + return 0; +} + +static int ov10640_probe(struct i2c_client *client, + const struct i2c_device_id *did) +{ + struct ov10640_priv *priv; + struct v4l2_ctrl *ctrl; + int ret; + + priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + v4l2_i2c_subdev_init(&priv->sd, client, &ov10640_subdev_ops); + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + priv->rect.left = 0; + priv->rect.top = 0; + priv->rect.width = OV10640_MAX_WIDTH; + priv->rect.height = OV10640_MAX_HEIGHT; + priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_BRIGHTNESS, 0, 0xff, 1, 0x30); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_CONTRAST, 0, 4, 1, 2); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_SATURATION, 0, 0xff, 1, 0xff); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_HUE, 0, 255, 1, 0); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_GAMMA, 0, 0xffff, 1, 0x233); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_GAIN, 0, 0x3f, 1, 0x1); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_ANALOGUE_GAIN, 0, 3, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_EXPOSURE, 0, 0xfff, 1, 0x448); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_EXPOSURE_AUTO, 0, 1, 1, 0); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_VFLIP, 0, 1, 1, 0); + ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); + if (ctrl) + ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; + priv->sd.ctrl_handler = &priv->hdl; + + ret = priv->hdl.error; + if (ret) + goto cleanup; + + v4l2_ctrl_handler_setup(&priv->hdl); + + priv->pad.flags = MEDIA_PAD_FL_SOURCE; + priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; + ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); + if (ret < 0) + goto cleanup; + + ret = ov10640_parse_dt(client->dev.of_node, priv); + if (ret) + goto cleanup; + + ret = ov10640_initialize(client); + if (ret < 0) + goto cleanup; + + ret = v4l2_async_register_subdev(&priv->sd); + if (ret) + goto cleanup; + + if (device_create_file(&client->dev, &dev_attr_otp_id_ov10640) != 0) { + dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); + goto cleanup; + } + + priv->init_complete = 1; + + return 0; + +cleanup: + media_entity_cleanup(&priv->sd.entity); + v4l2_ctrl_handler_free(&priv->hdl); + v4l2_device_unregister_subdev(&priv->sd); +#ifdef CONFIG_SOC_CAMERA_OV10640 + v4l_err(client, "failed to probe @ 0x%02x (%s)\n", + client->addr, client->adapter->name); +#endif + return ret; +} + +static int ov10640_remove(struct i2c_client *client) +{ + struct ov10640_priv *priv = i2c_get_clientdata(client); + + device_remove_file(&client->dev, &dev_attr_otp_id_ov10640); + v4l2_async_unregister_subdev(&priv->sd); + media_entity_cleanup(&priv->sd.entity); + v4l2_ctrl_handler_free(&priv->hdl); + v4l2_device_unregister_subdev(&priv->sd); + + return 0; +} + +#ifdef CONFIG_SOC_CAMERA_OV10640 +static const struct i2c_device_id ov10640_id[] = { + { "ov10640", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, ov10640_id); + +static const struct of_device_id ov10640_of_ids[] = { + { .compatible = "ovti,ov10640", }, + { } +}; +MODULE_DEVICE_TABLE(of, ov10640_of_ids); + +static struct i2c_driver ov10640_i2c_driver = { + .driver = { + .name = "ov10640", + .of_match_table = ov10640_of_ids, + }, + .probe = ov10640_probe, + .remove = ov10640_remove, + .id_table = ov10640_id, +}; + +module_i2c_driver(ov10640_i2c_driver); + +MODULE_DESCRIPTION("SoC Camera driver for OV10640"); +MODULE_AUTHOR("Vladimir Barinov"); +MODULE_LICENSE("GPL"); +#endif diff --git a/drivers/media/i2c/soc_camera/ov10640.h b/drivers/media/i2c/soc_camera/ov10640.h new file mode 100644 index 0000000..dbc6c0b --- /dev/null +++ b/drivers/media/i2c/soc_camera/ov10640.h @@ -0,0 +1,2407 @@ +/* + * OmniVision ov10640 sensor camera wizard 1280x800@30/UYVY/BT601/8bit + * + * Copyright (C) 2015-2017 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +//#define OV10640_DISPLAY_PATTERN +#define OV10640_FSIN_ENABLE + +#define OV10640_MAX_WIDTH 1280 +#define OV10640_MAX_HEIGHT 1080 + +#define OV10640_DELAY 0xffff + +#define OV10640_SENSOR_WIDTH 1292 +#define OV10640_SENSOR_HEIGHT 1092 + +#define OV10640_X_START ((OV10640_SENSOR_WIDTH - OV10640_MAX_WIDTH) / 2) +#define OV10640_Y_START ((OV10640_SENSOR_HEIGHT - OV10640_MAX_HEIGHT) / 2) +#define OV10640_X_END (OV10640_X_START + OV10640_MAX_WIDTH - 1) +#define OV10640_Y_END (OV10640_Y_START + OV10640_MAX_HEIGHT - 1) + +struct ov10640_reg { + u16 reg; + u8 val; +}; + +/* DVP_1280x1080_COMB12_raw 60fps */ +static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { +{0x3013, 0x01}, +{OV10640_DELAY, 10}, +{0x31be, 0x01}, +{0x3133, 0xb7}, +{0x3134, 0xca}, +{0x3135, 0xcc}, +{0x313f, 0x80}, +{0x3132, 0x24}, +{0x3000, 0x03}, +{0x3001, 0x62}, +{0x3002, 0x07}, +//{0x3002, 0x0f}, // for 30fps wizard +{0x3004, 0x03}, +#if 0 +{0x3005, 0x62}, +#else +{0x3005, 0x48}, +#endif +{0x3006, 0x07}, +{0x3007, 0x01}, +{0x3023, 0x05}, +{0x3032, 0x35}, +{0x3033, 0x04}, +{0x3054, 0x00}, +{0x3055, 0x0f}, +{0x3056, 0x01}, +{0x3057, 0xff}, +{0x3058, 0xaf}, +{0x3059, 0x44}, +{0x305a, 0x02}, +{0x305b, 0x00}, +{0x305c, 0x30}, +{0x305d, 0x9e}, +{0x305e, 0x19}, +{0x305f, 0x18}, +{0x3060, 0xf9}, +{0x3061, 0xf0}, +#ifdef OV10640_FSIN_ENABLE +{0x308c, 0xb2}, +#else +{0x308c, 0x03}, +#endif +{0x308f, 0x10}, +{0x3090, 0x00}, +{0x3091, 0x00}, +{0x30eb, 0x00}, +{0x30a3, 0x08}, +{0x30ad, 0x03}, +{0x30ae, 0x80}, +{0x30af, 0x80}, +{0x30b0, 0xff}, +{0x30b1, 0x3f}, +{0x30b2, 0x22}, +{0x30b9, 0x22}, +{0x30bb, 0x00}, +{0x30bc, 0x00}, +{0x30bd, 0x00}, +{0x30be, 0x00}, +{0x30bf, 0x00}, +{0x30c0, 0x00}, +{0x30c1, 0x00}, +{0x30c2, 0x00}, +{0x30c3, 0x00}, +{0x30c4, 0x80}, +{0x30c5, 0x00}, +{0x30c6, 0x80}, +{0x30c7, 0x00}, +{0x30c8, 0x80}, +{0x3119, 0x44}, +{0x311a, 0x01}, +{0x311b, 0x4a}, +{0x3074, 0x00}, +{0x3075, 0x00}, +{0x3076, 0x00}, +{0x3077, 0x02}, +{0x3078, 0x05}, +{0x3079, 0x07}, +{0x307a, 0x04}, +{0x307b, 0x41}, +{0x307c, 0x05}, +{0x307d, 0x00}, +{0x307e, 0x04}, +{0x307f, 0x38}, +#if 0 +{0x3080, 0x05}, +{0x3081, 0xbe}, +#else +{0x3080, 0x06}, // minimal VTS for FPDLINK3 +{0x3081, 0xe0}, +#endif +{0x3082, 0x04}, +{0x3083, 0x57}, +{0x3084, 0x00}, +{0x3085, 0x04}, +{0x3086, 0x00}, +{0x3087, 0x04}, +{0x3088, 0x00}, +{0x3089, 0x40}, +{0x308d, 0x92}, +{0x3094, 0xa5}, +{0x30e6, 0x04}, +{0x30e7, 0x48}, +{0x30e8, 0x04}, +{0x30e9, 0x48}, +{0x30ea, 0x11}, +{0x30ec, 0x01}, +{0x30fa, 0x06}, +{0x3120, 0x00}, +{0x3121, 0x01}, +{0x3122, 0x00}, +{0x3127, 0x63}, +{0x3128, 0xc0}, +#ifdef OV10640_DISPLAY_PATTERN +{0x3129, 0x80}, +#else +{0x3129, 0x00}, +#endif +{0x31be, 0x01}, +{0x30a5, 0x78}, +{0x30a6, 0x40}, +{0x30a7, 0x78}, +{0x30a8, 0x80}, +{0x30a9, 0x79}, +{0x30aa, 0x00}, +{0x30ab, 0x79}, +{0x30ac, 0xf8}, +{0x3440, 0x04}, +{0x3444, 0x28}, +{0x344e, 0x2c}, +{0x3457, 0x33}, +{0x345e, 0x38}, +{0x3461, 0xa8}, +{0x7002, 0xaa}, +{0x7001, 0xdf}, +{0x7048, 0x00}, +{0x7049, 0x02}, +{0x704a, 0x02}, +{0x704b, 0x00}, +{0x704c, 0x01}, +{0x704d, 0x00}, +{0x7043, 0x04}, +{0x7040, 0x3c}, +{0x7047, 0x00}, +{0x7044, 0x01}, +{0x7000, 0x1f}, +{0x7084, 0x01}, +{0x7085, 0x03}, +{0x7086, 0x02}, +{0x7087, 0x40}, +{0x7088, 0x01}, +{0x7089, 0x20}, +{0x707f, 0x04}, +{0x707c, 0x3c}, +{0x7083, 0x00}, +{0x7080, 0x01}, +{0x7003, 0xdf}, +{0x70c0, 0x00}, +{0x70c1, 0x02}, +{0x70c2, 0x02}, +{0x70c3, 0x00}, +{0x70c4, 0x01}, +{0x70c5, 0x00}, +{0x70b8, 0x03}, +{0x70b9, 0x98}, +{0x70bc, 0x00}, +{0x70bd, 0x80}, +{0x7004, 0x02}, +{0x7005, 0x00}, +{0x7006, 0x01}, +{0x7007, 0x80}, +{0x7008, 0x02}, +{0x7009, 0x00}, +{0x700a, 0x04}, +{0x700b, 0x00}, +{0x700e, 0x00}, +{0x700f, 0x60}, +{0x701a, 0x02}, +{0x701b, 0x00}, +{0x701c, 0x01}, +{0x701d, 0x80}, +{0x701e, 0x02}, +{0x701f, 0x00}, +{0x7020, 0x04}, +{0x7021, 0x00}, +{0x7024, 0x00}, +{0x7025, 0x60}, +{0x70e7, 0x00}, +{0x70e4, 0x10}, +{0x70e5, 0x00}, +{0x70e6, 0x00}, +{0x70eb, 0x00}, +{0x70e8, 0x10}, +{0x70e9, 0x00}, +{0x70ea, 0x00}, +{0x70ef, 0x00}, +{0x70ec, 0xfd}, +{0x70ed, 0x00}, +{0x70ee, 0x00}, +{0x70eb, 0x00}, +{0x70f0, 0xfd}, +{0x70f1, 0x00}, +{0x70f2, 0x00}, +{0x30fb, 0x06}, +{0x30fc, 0x80}, +{0x30fd, 0x02}, +{0x30fe, 0x93}, +{0x6000, 0xc1}, +{0x6001, 0xb9}, +{0x6002, 0xba}, +{0x6003, 0xa4}, +{0x6004, 0xa4}, +{0x6005, 0xb5}, +{0x6006, 0xa0}, +{0x6007, 0x82}, +{0x6008, 0xa7}, +{0x6009, 0xa7}, +{0x600a, 0xb7}, +{0x600b, 0x5c}, +{0x600c, 0x9e}, +{0x600d, 0xc0}, +{0x600e, 0xd2}, +{0x600f, 0x33}, +{0x6010, 0xcc}, +{0x6011, 0xe2}, +{0x6012, 0xc1}, +{0x6013, 0xab}, +{0x6014, 0xab}, +{0x6015, 0xb7}, +{0x6016, 0x00}, +{0x6017, 0x00}, +{0x6018, 0x00}, +{0x6019, 0x00}, +{0x601a, 0x00}, +{0x601b, 0x00}, +{0x601c, 0x00}, +{0x601d, 0x00}, +{0x601e, 0x00}, +{0x601f, 0x00}, +{0x6020, 0x00}, +{0x6021, 0x00}, +{0x6022, 0x00}, +{0x6023, 0x9c}, +{0x6024, 0x94}, +{0x6025, 0x90}, +{0x6026, 0xc5}, +{0x6027, 0x00}, +{0x6028, 0x54}, +{0x6029, 0x2a}, +{0x602a, 0x61}, +{0x602b, 0xd2}, +{0x602c, 0xcc}, +{0x602d, 0x04}, +{0x602e, 0x35}, +{0x602f, 0xb1}, +{0x6030, 0xb2}, +{0x6031, 0xb3}, +{0x6032, 0xd2}, +{0x6033, 0xd3}, +{0x6034, 0x11}, +{0x6035, 0x31}, +{0x6036, 0xcc}, +{0x6037, 0x06}, +{0x6038, 0xd2}, +{0x6039, 0x00}, +{0x603a, 0xce}, +{0x603b, 0x18}, +{0x603c, 0xcf}, +{0x603d, 0x1e}, +{0x603e, 0xd0}, +{0x603f, 0x24}, +{0x6040, 0xc5}, +{0x6041, 0xd2}, +{0x6042, 0xbc}, +{0x6043, 0xcc}, +{0x6044, 0x52}, +{0x6045, 0x2b}, +{0x6046, 0xd2}, +{0x6047, 0xd3}, +{0x6048, 0x01}, +{0x6049, 0xcc}, +{0x604a, 0x0a}, +{0x604b, 0xd2}, +{0x604c, 0xd3}, +{0x604d, 0x0f}, +{0x604e, 0x1a}, +{0x604f, 0x2a}, +{0x6050, 0xd4}, +{0x6051, 0xe3}, +{0x6052, 0xba}, +{0x6053, 0x56}, +{0x6054, 0xd3}, +{0x6055, 0x2e}, +{0x6056, 0x54}, +{0x6057, 0x26}, +{0x6058, 0xd2}, +{0x6059, 0xcc}, +{0x605a, 0x60}, +{0x605b, 0xd2}, +{0x605c, 0xd3}, +{0x605d, 0x27}, +{0x605e, 0x27}, +{0x605f, 0x08}, +{0x6060, 0x1a}, +{0x6061, 0xcc}, +{0x6062, 0x88}, +{0x6063, 0x00}, +{0x6064, 0x12}, +{0x6065, 0x2c}, +{0x6066, 0x60}, +{0x6067, 0xc2}, +{0x6068, 0xb9}, +{0x6069, 0xa5}, +{0x606a, 0xa5}, +{0x606b, 0xb5}, +{0x606c, 0xa0}, +{0x606d, 0x82}, +{0x606e, 0x5c}, +{0x606f, 0xd4}, +{0x6070, 0xab}, +{0x6071, 0xd4}, +{0x6072, 0xab}, +{0x6073, 0xd3}, +{0x6074, 0x01}, +{0x6075, 0x7c}, +{0x6076, 0x74}, +{0x6077, 0x00}, +{0x6078, 0x61}, +{0x6079, 0x2a}, +{0x607a, 0xd2}, +{0x607b, 0xcc}, +{0x607c, 0xdf}, +{0x607d, 0xc6}, +{0x607e, 0x35}, +{0x607f, 0xd2}, +{0x6080, 0xcc}, +{0x6081, 0x06}, +{0x6082, 0x31}, +{0x6083, 0xd2}, +{0x6084, 0x00}, +{0x6085, 0xbb}, +{0x6086, 0xcc}, +{0x6087, 0x18}, +{0x6088, 0xc6}, +{0x6089, 0xd2}, +{0x608a, 0xbd}, +{0x608b, 0xcc}, +{0x608c, 0x52}, +{0x608d, 0x2b}, +{0x608e, 0xd2}, +{0x608f, 0xd3}, +{0x6090, 0x01}, +{0x6091, 0xcc}, +{0x6092, 0x0a}, +{0x6093, 0xd2}, +{0x6094, 0xd3}, +{0x6095, 0x0f}, +{0x6096, 0x1a}, +{0x6097, 0x71}, +{0x6098, 0x2a}, +{0x6099, 0xd4}, +{0x609a, 0xe3}, +{0x609b, 0xd3}, +{0x609c, 0x22}, +{0x609d, 0x70}, +{0x609e, 0xca}, +{0x609f, 0x26}, +{0x60a0, 0xd2}, +{0x60a1, 0xcc}, +{0x60a2, 0x60}, +{0x60a3, 0xd2}, +{0x60a4, 0xd3}, +{0x60a5, 0x27}, +{0x60a6, 0x27}, +{0x60a7, 0x08}, +{0x60a8, 0x1a}, +{0x60a9, 0xcc}, +{0x60aa, 0x88}, +{0x60ab, 0x00}, +{0x60ac, 0x12}, +{0x60ad, 0x2c}, +{0x60ae, 0x60}, +{0x60af, 0x00}, +{0x60b0, 0x00}, +{0x60b1, 0xc0}, +{0x60b2, 0xb9}, +{0x60b3, 0xa3}, +{0x60b4, 0xa3}, +{0x60b5, 0xb5}, +{0x60b6, 0x00}, +{0x60b7, 0xa0}, +{0x60b8, 0x82}, +{0x60b9, 0x5c}, +{0x60ba, 0xd4}, +{0x60bb, 0x8b}, +{0x60bc, 0x9d}, +{0x60bd, 0xd3}, +{0x60be, 0x21}, +{0x60bf, 0xb0}, +{0x60c0, 0xb0}, +{0x60c1, 0xb7}, +{0x60c2, 0x05}, +{0x60c3, 0xd3}, +{0x60c4, 0x0a}, +{0x60c5, 0xd3}, +{0x60c6, 0x10}, +{0x60c7, 0x9c}, +{0x60c8, 0x94}, +{0x60c9, 0x90}, +{0x60ca, 0xc8}, +{0x60cb, 0xba}, +{0x60cc, 0x7c}, +{0x60cd, 0x74}, +{0x60ce, 0x00}, +{0x60cf, 0x61}, +{0x60d0, 0x2a}, +{0x60d1, 0x00}, +{0x60d2, 0xd2}, +{0x60d3, 0xcc}, +{0x60d4, 0xdf}, +{0x60d5, 0xc4}, +{0x60d6, 0x35}, +{0x60d7, 0xd3}, +{0x60d8, 0x13}, +{0x60d9, 0xd2}, +{0x60da, 0xcc}, +{0x60db, 0x06}, +{0x60dc, 0x31}, +{0x60dd, 0xd2}, +{0x60de, 0xcc}, +{0x60df, 0x15}, +{0x60e0, 0xd2}, +{0x60e1, 0xbb}, +{0x60e2, 0xcc}, +{0x60e3, 0x1a}, +{0x60e4, 0xd2}, +{0x60e5, 0xbe}, +{0x60e6, 0xce}, +{0x60e7, 0x52}, +{0x60e8, 0xcf}, +{0x60e9, 0x56}, +{0x60ea, 0xd0}, +{0x60eb, 0x5b}, +{0x60ec, 0x2b}, +{0x60ed, 0xd2}, +{0x60ee, 0xd3}, +{0x60ef, 0x01}, +{0x60f0, 0xcc}, +{0x60f1, 0x0a}, +{0x60f2, 0xd2}, +{0x60f3, 0xd3}, +{0x60f4, 0x0f}, +{0x60f5, 0xd9}, +{0x60f6, 0xb4}, +{0x60f7, 0xda}, +{0x60f8, 0xbb}, +{0x60f9, 0x1a}, +{0x60fa, 0xd4}, +{0x60fb, 0xe3}, +{0x60fc, 0xd4}, +{0x60fd, 0x96}, +{0x60fe, 0x27}, +{0x60ff, 0x00}, +{0x6100, 0xd2}, +{0x6101, 0xcc}, +{0x6102, 0x60}, +{0x6103, 0xd2}, +{0x6104, 0xd3}, +{0x6105, 0x2d}, +{0x6106, 0xd9}, +{0x6107, 0xcc}, +{0x6108, 0xda}, +{0x6109, 0xd2}, +{0x610a, 0x1a}, +{0x610b, 0x12}, +{0x610c, 0xcc}, +{0x610d, 0x88}, +{0x610e, 0xd6}, +{0x610f, 0x9e}, +{0x6110, 0xb9}, +{0x6111, 0xba}, +{0x6112, 0xaf}, +{0x6113, 0xdc}, +{0x6114, 0x00}, +{0x6115, 0xd5}, +{0x6116, 0xba}, +{0x6117, 0x00}, +{0x6118, 0x00}, +{0x6119, 0x00}, +{0x611a, 0x00}, +{0x611b, 0x00}, +{0x611c, 0x00}, +{0x611d, 0x00}, +{0x611e, 0x00}, +{0x611f, 0xaa}, +{0x6120, 0xaa}, +{0x6121, 0xb7}, +{0x6122, 0x00}, +{0x6123, 0x00}, +{0x6124, 0x00}, +{0x6125, 0x00}, +{0x6126, 0x00}, +{0x6127, 0xa6}, +{0x6128, 0xa6}, +{0x6129, 0xb7}, +{0x612a, 0x00}, +{0x612b, 0xd5}, +{0x612c, 0x71}, +{0x612d, 0xd3}, +{0x612e, 0x30}, +{0x612f, 0xba}, +{0x6130, 0x00}, +{0x6131, 0x00}, +{0x6132, 0x00}, +{0x6133, 0x00}, +{0x6134, 0xd3}, +{0x6135, 0x10}, +{0x6136, 0x70}, +{0x6137, 0x00}, +{0x6138, 0x00}, +{0x6139, 0x00}, +{0x613a, 0x00}, +{0x613b, 0xd5}, +{0x613c, 0xba}, +{0x613d, 0xb0}, +{0x613e, 0xb0}, +{0x613f, 0xb7}, +{0x6140, 0x9d}, +{0x6141, 0x02}, +{0x6142, 0xd3}, +{0x6143, 0x0a}, +{0x6144, 0x9d}, +{0x6145, 0x9d}, +{0x6146, 0xd3}, +{0x6147, 0x10}, +{0x6148, 0x9c}, +{0x6149, 0x94}, +{0x614a, 0x90}, +{0x614b, 0xc8}, +{0x614c, 0xba}, +{0x614d, 0xd2}, +{0x614e, 0x60}, +{0x614f, 0x2c}, +{0x6150, 0x50}, +{0x6151, 0x11}, +{0x6152, 0xcc}, +{0x6153, 0x00}, +{0x6154, 0x30}, +{0x6155, 0xd5}, +{0x6156, 0xba}, +{0x6157, 0xb0}, +{0x6158, 0xb0}, +{0x6159, 0xb7}, +{0x615a, 0x9d}, +{0x615b, 0x02}, +{0x615c, 0xd3}, +{0x615d, 0x0a}, +{0x615e, 0x9d}, +{0x615f, 0x9d}, +{0x6160, 0xd3}, +{0x6161, 0x10}, +{0x6162, 0x9c}, +{0x6163, 0x94}, +{0x6164, 0x90}, +{0x6165, 0xc8}, +{0x6166, 0xba}, +{0x6167, 0xd5}, +{0x6168, 0x01}, +{0x6169, 0x1a}, +{0x616a, 0xcc}, +{0x616b, 0x12}, +{0x616c, 0x12}, +{0x616d, 0x00}, +{0x616e, 0xcc}, +{0x616f, 0x9c}, +{0x6170, 0xd2}, +{0x6171, 0xcc}, +{0x6172, 0x60}, +{0x6173, 0xd2}, +{0x6174, 0x04}, +{0x6175, 0xd5}, +{0x6176, 0x1a}, +{0x6177, 0xcc}, +{0x6178, 0x12}, +{0x6179, 0x00}, +{0x617a, 0x12}, +{0x617b, 0xcc}, +{0x617c, 0x9c}, +{0x617d, 0xd2}, +{0x617e, 0xcc}, +{0x617f, 0x60}, +{0x6180, 0xd2}, +{0x6181, 0x1a}, +{0x6182, 0xcc}, +{0x6183, 0x12}, +{0x6184, 0x00}, +{0x6185, 0x12}, +{0x6186, 0xcc}, +{0x6187, 0x9c}, +{0x6188, 0xd2}, +{0x6189, 0xcc}, +{0x618a, 0x60}, +{0x618b, 0xd2}, +{0x618c, 0x1a}, +{0x618d, 0xcc}, +{0x618e, 0x12}, +{0x618f, 0x00}, +{0x6190, 0x12}, +{0x6191, 0xcc}, +{0x6192, 0x9c}, +{0x6193, 0xd2}, +{0x6194, 0xcc}, +{0x6195, 0x60}, +{0x6196, 0xd2}, +{0x6197, 0xd5}, +{0x6198, 0x1a}, +{0x6199, 0xcc}, +{0x619a, 0x12}, +{0x619b, 0x12}, +{0x619c, 0x00}, +{0x619d, 0xcc}, +{0x619e, 0x8a}, +{0x619f, 0xd2}, +{0x61a0, 0xcc}, +{0x61a1, 0x74}, +{0x61a2, 0xd2}, +{0x61a3, 0xd5}, +{0x61a4, 0x1a}, +{0x61a5, 0xcc}, +{0x61a6, 0x12}, +{0x61a7, 0x00}, +{0x61a8, 0x12}, +{0x61a9, 0xcc}, +{0x61aa, 0x8a}, +{0x61ab, 0xd2}, +{0x61ac, 0xcc}, +{0x61ad, 0x74}, +{0x61ae, 0xd2}, +{0x61af, 0x1a}, +{0x61b0, 0xcc}, +{0x61b1, 0x12}, +{0x61b2, 0x00}, +{0x61b3, 0x12}, +{0x61b4, 0xcc}, +{0x61b5, 0x8a}, +{0x61b6, 0xd2}, +{0x61b7, 0xcc}, +{0x61b8, 0x74}, +{0x61b9, 0xd2}, +{0x61ba, 0x1a}, +{0x61bb, 0xcc}, +{0x61bc, 0x12}, +{0x61bd, 0x00}, +{0x61be, 0x12}, +{0x61bf, 0xcc}, +{0x61c0, 0x8a}, +{0x61c1, 0xd2}, +{0x61c2, 0xcc}, +{0x61c3, 0x74}, +{0x61c4, 0xd2}, +{0x61c5, 0xd5}, +{0x61c6, 0xcc}, +{0x61c7, 0x12}, +{0x61c8, 0x00}, +{0x61c9, 0x12}, +{0x61ca, 0xcc}, +{0x61cb, 0x9c}, +{0x61cc, 0xd5}, +{0x6400, 0x04}, +{0x6401, 0x04}, +{0x6402, 0x00}, +{0x6403, 0xff}, +{0x6404, 0x00}, +{0x6405, 0x08}, +{0x6406, 0x00}, +{0x6407, 0xff}, +{0x6408, 0x04}, +{0x6409, 0x70}, +{0x640a, 0x00}, +{0x640b, 0xff}, +{0x640c, 0x05}, +{0x640d, 0x14}, +{0x640e, 0x04}, +{0x640f, 0x71}, +{0x6410, 0x05}, +{0x6411, 0x74}, +{0x6412, 0x00}, +{0x6413, 0xff}, +{0x6414, 0x05}, +{0x6415, 0x54}, +{0x6416, 0x05}, +{0x6417, 0x44}, +{0x6418, 0x04}, +{0x6419, 0x30}, +{0x641a, 0x05}, +{0x641b, 0x46}, +{0x641c, 0x00}, +{0x641d, 0xff}, +{0x641e, 0x04}, +{0x641f, 0x31}, +{0x6420, 0x04}, +{0x6421, 0x30}, +{0x6422, 0x00}, +{0x6423, 0xff}, +{0x6424, 0x04}, +{0x6425, 0x20}, +{0x6426, 0x05}, +{0x6427, 0x06}, +{0x6428, 0x00}, +{0x6429, 0xff}, +{0x642a, 0x08}, +{0x642b, 0x2a}, +{0x642c, 0x08}, +{0x642d, 0x31}, +{0x642e, 0x00}, +{0x642f, 0xff}, +{0x6430, 0x08}, +{0x6431, 0x2a}, +{0x6432, 0x08}, +{0x6433, 0x31}, +{0x6434, 0x06}, +{0x6435, 0x20}, +{0x6436, 0x07}, +{0x6437, 0x00}, +{0x6438, 0x08}, +{0x6439, 0x40}, +{0x643a, 0x00}, +{0x643b, 0xff}, +{0x643c, 0x08}, +{0x643d, 0x2a}, +{0x643e, 0x08}, +{0x643f, 0x36}, +{0x6440, 0x06}, +{0x6441, 0x10}, +{0x6442, 0x07}, +{0x6443, 0x00}, +{0x6444, 0x08}, +{0x6445, 0x40}, +{0x6446, 0x00}, +{0x6447, 0xff}, +{0x6448, 0x08}, +{0x6449, 0x2a}, +{0x644a, 0x08}, +{0x644b, 0x3b}, +{0x644c, 0x06}, +{0x644d, 0x00}, +{0x644e, 0x07}, +{0x644f, 0x00}, +{0x6450, 0x08}, +{0x6451, 0x40}, +{0x6452, 0x00}, +{0x6453, 0xff}, +{0x6454, 0x06}, +{0x6455, 0x00}, +{0x6456, 0x07}, +{0x6457, 0x05}, +{0x6458, 0x01}, +{0x6459, 0xaf}, +{0x645a, 0x01}, +{0x645b, 0x0f}, +{0x645c, 0x01}, +{0x645d, 0x90}, +{0x645e, 0x01}, +{0x645f, 0xc8}, +{0x6460, 0x00}, +{0x6461, 0xff}, +{0x6462, 0x01}, +{0x6463, 0xac}, +{0x6464, 0x01}, +{0x6465, 0x0c}, +{0x6466, 0x01}, +{0x6467, 0x90}, +{0x6468, 0x01}, +{0x6469, 0xe8}, +{0x646a, 0x00}, +{0x646b, 0xff}, +{0x646c, 0x01}, +{0x646d, 0xad}, +{0x646e, 0x01}, +{0x646f, 0x0d}, +{0x6470, 0x01}, +{0x6471, 0x90}, +{0x6472, 0x01}, +{0x6473, 0xe8}, +{0x6474, 0x00}, +{0x6475, 0xff}, +{0x6476, 0x01}, +{0x6477, 0xae}, +{0x6478, 0x01}, +{0x6479, 0x0e}, +{0x647a, 0x01}, +{0x647b, 0x90}, +{0x647c, 0x01}, +{0x647d, 0xe8}, +{0x647e, 0x00}, +{0x647f, 0xff}, +{0x6480, 0x01}, +{0x6481, 0xb0}, +{0x6482, 0x01}, +{0x6483, 0xb1}, +{0x6484, 0x01}, +{0x6485, 0xb2}, +{0x6486, 0x01}, +{0x6487, 0xb3}, +{0x6488, 0x01}, +{0x6489, 0xb4}, +{0x648a, 0x01}, +{0x648b, 0xb5}, +{0x648c, 0x01}, +{0x648d, 0xb6}, +{0x648e, 0x01}, +{0x648f, 0xb7}, +{0x6490, 0x01}, +{0x6491, 0xb8}, +{0x6492, 0x01}, +{0x6493, 0xb9}, +{0x6494, 0x01}, +{0x6495, 0xba}, +{0x6496, 0x01}, +{0x6497, 0xbb}, +{0x6498, 0x01}, +{0x6499, 0xbc}, +{0x649a, 0x01}, +{0x649b, 0xbd}, +{0x649c, 0x01}, +{0x649d, 0xbe}, +{0x649e, 0x01}, +{0x649f, 0xbf}, +{0x64a0, 0x01}, +{0x64a1, 0xc0}, +{0x64a2, 0x00}, +{0x64a3, 0xff}, +{0x64a4, 0x06}, +{0x64a5, 0x00}, +{0x64a6, 0x01}, +{0x64a7, 0xf6}, +{0x64a8, 0x04}, +{0x64a9, 0x30}, +{0x64aa, 0x00}, +{0x64ab, 0xff}, +{0x64ac, 0x06}, +{0x64ad, 0x10}, +{0x64ae, 0x01}, +{0x64af, 0xf6}, +{0x64b0, 0x04}, +{0x64b1, 0x30}, +{0x64b2, 0x06}, +{0x64b3, 0x00}, +{0x64b4, 0x00}, +{0x64b5, 0xff}, +{0x64b6, 0x06}, +{0x64b7, 0x20}, +{0x64b8, 0x01}, +{0x64b9, 0xf6}, +{0x64ba, 0x04}, +{0x64bb, 0x30}, +{0x64bc, 0x06}, +{0x64bd, 0x00}, +{0x64be, 0x00}, +{0x64bf, 0xff}, +{0x64c0, 0x04}, +{0x64c1, 0x31}, +{0x64c2, 0x04}, +{0x64c3, 0x30}, +{0x64c4, 0x01}, +{0x64c5, 0x20}, +{0x64c6, 0x01}, +{0x64c7, 0x31}, +{0x64c8, 0x01}, +{0x64c9, 0x32}, +{0x64ca, 0x01}, +{0x64cb, 0x33}, +{0x64cc, 0x01}, +{0x64cd, 0x34}, +{0x64ce, 0x01}, +{0x64cf, 0x35}, +{0x64d0, 0x01}, +{0x64d1, 0x36}, +{0x64d2, 0x01}, +{0x64d3, 0x37}, +{0x64d4, 0x01}, +{0x64d5, 0x38}, +{0x64d6, 0x01}, +{0x64d7, 0x39}, +{0x64d8, 0x01}, +{0x64d9, 0x3a}, +{0x64da, 0x01}, +{0x64db, 0x3b}, +{0x64dc, 0x01}, +{0x64dd, 0x3c}, +{0x64de, 0x01}, +{0x64df, 0x3d}, +{0x64e0, 0x01}, +{0x64e1, 0x3e}, +{0x64e2, 0x01}, +{0x64e3, 0x3f}, +{0x64e4, 0x02}, +{0x64e5, 0xa0}, +{0x64e6, 0x00}, +{0x64e7, 0xff}, +{0x64e8, 0x04}, +{0x64e9, 0x31}, +{0x64ea, 0x04}, +{0x64eb, 0x30}, +{0x64ec, 0x01}, +{0x64ed, 0x00}, +{0x64ee, 0x01}, +{0x64ef, 0x11}, +{0x64f0, 0x01}, +{0x64f1, 0x12}, +{0x64f2, 0x01}, +{0x64f3, 0x13}, +{0x64f4, 0x01}, +{0x64f5, 0x14}, +{0x64f6, 0x01}, +{0x64f7, 0x15}, +{0x64f8, 0x01}, +{0x64f9, 0x16}, +{0x64fa, 0x01}, +{0x64fb, 0x17}, +{0x64fc, 0x01}, +{0x64fd, 0x18}, +{0x64fe, 0x01}, +{0x64ff, 0x19}, +{0x6500, 0x01}, +{0x6501, 0x1a}, +{0x6502, 0x01}, +{0x6503, 0x1b}, +{0x6504, 0x01}, +{0x6505, 0x1c}, +{0x6506, 0x01}, +{0x6507, 0x1d}, +{0x6508, 0x01}, +{0x6509, 0x1e}, +{0x650a, 0x01}, +{0x650b, 0x1f}, +{0x650c, 0x02}, +{0x650d, 0xa0}, +{0x650e, 0x00}, +{0x650f, 0xff}, +{0x6510, 0x04}, +{0x6511, 0x20}, +{0x6512, 0x05}, +{0x6513, 0x86}, +{0x6514, 0x03}, +{0x6515, 0x0b}, +{0x6516, 0x05}, +{0x6517, 0x86}, +{0x6518, 0x00}, +{0x6519, 0x00}, +{0x651a, 0x05}, +{0x651b, 0x06}, +{0x651c, 0x00}, +{0x651d, 0x04}, +{0x651e, 0x05}, +{0x651f, 0x04}, +{0x6520, 0x00}, +{0x6521, 0x04}, +{0x6522, 0x05}, +{0x6523, 0x00}, +{0x6524, 0x05}, +{0x6525, 0x0a}, +{0x6526, 0x03}, +{0x6527, 0x9a}, +{0x6528, 0x05}, +{0x6529, 0x86}, +{0x652a, 0x00}, +{0x652b, 0x00}, +{0x652c, 0x05}, +{0x652d, 0x06}, +{0x652e, 0x00}, +{0x652f, 0x01}, +{0x6530, 0x05}, +{0x6531, 0x04}, +{0x6532, 0x00}, +{0x6533, 0x04}, +{0x6534, 0x05}, +{0x6535, 0x00}, +{0x6536, 0x05}, +{0x6537, 0x0a}, +{0x6538, 0x03}, +{0x6539, 0x99}, +{0x653a, 0x05}, +{0x653b, 0x06}, +{0x653c, 0x00}, +{0x653d, 0x00}, +{0x653e, 0x05}, +{0x653f, 0x04}, +{0x6540, 0x00}, +{0x6541, 0x04}, +{0x6542, 0x05}, +{0x6543, 0x00}, +{0x6544, 0x05}, +{0x6545, 0x0a}, +{0x6546, 0x03}, +{0x6547, 0x98}, +{0x6548, 0x05}, +{0x6549, 0x06}, +{0x654a, 0x00}, +{0x654b, 0x00}, +{0x654c, 0x05}, +{0x654d, 0x04}, +{0x654e, 0x00}, +{0x654f, 0x04}, +{0x6550, 0x05}, +{0x6551, 0x00}, +{0x6552, 0x05}, +{0x6553, 0x0a}, +{0x6554, 0x03}, +{0x6555, 0x97}, +{0x6556, 0x05}, +{0x6557, 0x06}, +{0x6558, 0x05}, +{0x6559, 0x04}, +{0x655a, 0x00}, +{0x655b, 0x04}, +{0x655c, 0x05}, +{0x655d, 0x00}, +{0x655e, 0x05}, +{0x655f, 0x0a}, +{0x6560, 0x03}, +{0x6561, 0x96}, +{0x6562, 0x05}, +{0x6563, 0x06}, +{0x6564, 0x05}, +{0x6565, 0x04}, +{0x6566, 0x00}, +{0x6567, 0x04}, +{0x6568, 0x05}, +{0x6569, 0x00}, +{0x656a, 0x05}, +{0x656b, 0x0a}, +{0x656c, 0x03}, +{0x656d, 0x95}, +{0x656e, 0x05}, +{0x656f, 0x06}, +{0x6570, 0x05}, +{0x6571, 0x04}, +{0x6572, 0x00}, +{0x6573, 0x04}, +{0x6574, 0x05}, +{0x6575, 0x00}, +{0x6576, 0x05}, +{0x6577, 0x0a}, +{0x6578, 0x03}, +{0x6579, 0x94}, +{0x657a, 0x05}, +{0x657b, 0x06}, +{0x657c, 0x00}, +{0x657d, 0x00}, +{0x657e, 0x05}, +{0x657f, 0x04}, +{0x6580, 0x00}, +{0x6581, 0x04}, +{0x6582, 0x05}, +{0x6583, 0x00}, +{0x6584, 0x05}, +{0x6585, 0x0a}, +{0x6586, 0x03}, +{0x6587, 0x93}, +{0x6588, 0x05}, +{0x6589, 0x06}, +{0x658a, 0x00}, +{0x658b, 0x00}, +{0x658c, 0x05}, +{0x658d, 0x04}, +{0x658e, 0x00}, +{0x658f, 0x04}, +{0x6590, 0x05}, +{0x6591, 0x00}, +{0x6592, 0x05}, +{0x6593, 0x0a}, +{0x6594, 0x03}, +{0x6595, 0x92}, +{0x6596, 0x05}, +{0x6597, 0x06}, +{0x6598, 0x05}, +{0x6599, 0x04}, +{0x659a, 0x00}, +{0x659b, 0x04}, +{0x659c, 0x05}, +{0x659d, 0x00}, +{0x659e, 0x05}, +{0x659f, 0x0a}, +{0x65a0, 0x03}, +{0x65a1, 0x91}, +{0x65a2, 0x05}, +{0x65a3, 0x06}, +{0x65a4, 0x05}, +{0x65a5, 0x04}, +{0x65a6, 0x00}, +{0x65a7, 0x04}, +{0x65a8, 0x05}, +{0x65a9, 0x00}, +{0x65aa, 0x05}, +{0x65ab, 0x0a}, +{0x65ac, 0x03}, +{0x65ad, 0x90}, +{0x65ae, 0x05}, +{0x65af, 0x06}, +{0x65b0, 0x05}, +{0x65b1, 0x04}, +{0x65b2, 0x00}, +{0x65b3, 0x04}, +{0x65b4, 0x05}, +{0x65b5, 0x00}, +{0x65b6, 0x05}, +{0x65b7, 0x0a}, +{0x65b8, 0x02}, +{0x65b9, 0x90}, +{0x65ba, 0x05}, +{0x65bb, 0x06}, +{0x65bc, 0x00}, +{0x65bd, 0xff}, +{0x65be, 0x04}, +{0x65bf, 0x70}, +{0x65c0, 0x08}, +{0x65c1, 0x76}, +{0x65c2, 0x00}, +{0x65c3, 0xff}, +{0x65c4, 0x08}, +{0x65c5, 0x76}, +{0x65c6, 0x04}, +{0x65c7, 0x0c}, +{0x65c8, 0x05}, +{0x65c9, 0x07}, +{0x65ca, 0x04}, +{0x65cb, 0x04}, +{0x65cc, 0x00}, +{0x65cd, 0xff}, +{0x65ce, 0x00}, +{0x65cf, 0xff}, +{0x65d0, 0x00}, +{0x65d1, 0xff}, +{0x30eb, 0x04}, +{0x30ed, 0x5a}, +{0x30ee, 0x01}, +{0x30ef, 0x80}, +{0x30f1, 0x5a}, +{0x303a, 0x04}, +{0x303b, 0x7f}, +{0x303c, 0xfe}, +{0x303d, 0x19}, +{0x303e, 0xd7}, +{0x303f, 0x09}, +{0x3040, 0x78}, +{0x3042, 0x05}, +{0x328a, 0x10}, +{0x3012, 0x01}, // stream on +}; + +/* DVP_1280x1080_COMB12_raw 30fps */ +static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { +/* ov10640_R1E_setting_3x12_1280x1080_MIPIin_4lane_raw */ +{0x3013, 0x01}, +{OV10640_DELAY, 10}, +{0x328a, 0x11}, +{0x313f, 0x80}, +{0x3132, 0x24}, + +/* PLL settings */ +{0x3000, 0x03}, +{0x3001, 0x60}, +{0x3002, 0x0f}, +{0x3004, 0x03}, +{0x3005, 0x44}, +{0x3006, 0x07}, +{0x3007, 0x01}, + +{0x3014, 0x03}, +{0x3023, 0x05}, +{0x3032, 0x35}, +{0x3033, 0x04}, +{0x3054, 0x00}, +{0x3055, 0x03}, +{0x3056, 0x01}, +{0x3057, 0xff}, +{0x3058, 0xaf}, +{0x3059, 0x44}, +{0x305a, 0x02}, +{0x305b, 0x00}, +{0x305c, 0x30}, +{0x305d, 0x9c}, +{0x305e, 0x19}, +{0x305f, 0x18}, +{0x3060, 0xf9}, +{0x3061, 0xf0}, +{0x308a, 0x00}, +{0x308b, 0x00}, +#ifdef OV10640_FSIN_ENABLE +{0x308c, 0xb2}, +#else +{0x308c, 0x03}, +#endif +{0x308f, 0x10}, +{0x3090, 0x04}, /* c:enable flip and mirror */ +{0x3091, 0x00}, +{0x30eb, 0x00}, +{0x30a3, 0x08}, +{0x30ad, 0x03}, +{0x30ae, 0x80}, +{0x30af, 0x80}, +{0x30b0, 0xff}, +{0x30b1, 0x3f}, +{0x30b2, 0x22}, +{0x30b9, 0x22}, +{0x30bb, 0x00}, +{0x30bc, 0x00}, +{0x30bd, 0x00}, +{0x30be, 0x00}, +{0x30bf, 0x00}, +{0x30c0, 0x00}, +{0x30c1, 0x00}, +{0x30c2, 0x00}, +{0x30c3, 0x00}, +{0x30c4, 0x80}, +{0x30c5, 0x00}, +{0x30c6, 0x80}, +{0x30c7, 0x00}, +{0x30c8, 0x80}, +{0x3119, 0x49}, +{0x311a, 0x01}, +{0x311b, 0x4a}, + +/* Crop Setting */ +{0x3074, 0x00}, // crop_h_start +{0x3075, 0x00}, +{0x3076, 0x00}, // crop_v_start +{0x3077, 0xf0}, +{0x3078, 0x05}, // crop_h_end +{0x3079, 0x09}, +{0x307a, 0x04}, // crop_v_end +{0x307b, 0x18}, +{0x307c, 0x05}, // dvp_h_size +{0x307d, 0x08}, +{0x307e, 0x03}, // dvp_v_size +{0x307f, 0x28}, +{0x3080, 0x07}, // hts +{0x3081, 0x44}, +{0x3082, 0x03}, // vts +{0x3083, 0x5c}, +{0x3084, 0x00}, // win_hoffs +{0x3085, 0x00}, +{0x3086, 0x00}, // win_voffs +{0x3087, 0x00}, + +{0x3088, 0x00}, +{0x3089, 0x40}, +{0x308d, 0x92}, +{0x3094, 0xa5}, +{0x30e6, 0x04}, +{0x30e7, 0x48}, +{0x30e8, 0x04}, +{0x30e9, 0x48}, +{0x30e9, 0x05}, +{0x30ec, 0x01}, +{0x30fa, 0x06}, +{0x3120, 0x00}, +{0x3121, 0x20}, /* VSYNC delay */ +{0x3122, 0x00}, +{0x3127, 0x43}, /* 43 :dpc off, 63 */ +{0x3128, 0xc0}, +#ifdef OV10640_DISPLAY_PATTERN +{0x3129, 0x80}, +#else +{0x3129, 0x00}, +#endif +{0x31be, 0x00}, +{0x30a5, 0x78}, +{0x30a6, 0x40}, +{0x30a7, 0x78}, +{0x30a8, 0x80}, +{0x30a9, 0x78}, +{0x30aa, 0xe0}, +{0x30ab, 0xf9}, +{0x30ac, 0xc0}, +{0x3440, 0x04}, +{0x3444, 0x28}, +{0x344e, 0x2c}, +{0x3457, 0x33}, +{0x345e, 0x38}, +{0x3461, 0xa8}, +{0x7002, 0xaa}, +{0x7001, 0xdf}, +{0x7048, 0x00}, +{0x7049, 0x02}, +{0x704a, 0x02}, +{0x704b, 0x00}, +{0x704c, 0x01}, +{0x704d, 0x00}, +{0x7043, 0x04}, +{0x7040, 0x3c}, +{0x7047, 0x00}, +{0x7044, 0x01}, +{0x7000, 0x1f}, +{0x7084, 0x01}, +{0x7085, 0x03}, +{0x7086, 0x02}, +{0x7087, 0x40}, +{0x7088, 0x01}, +{0x7089, 0x20}, +{0x707f, 0x04}, +{0x707c, 0x3c}, +{0x7083, 0x00}, +{0x7080, 0x01}, +{0x7003, 0xdf}, +{0x70c0, 0x00}, +{0x70c1, 0x02}, +{0x70c2, 0x02}, +{0x70c3, 0x00}, +{0x70c4, 0x01}, +{0x70c5, 0x00}, +{0x70b8, 0x03}, +{0x70b9, 0x98}, +{0x70bc, 0x00}, +{0x70bd, 0x80}, +{0x7004, 0x02}, +{0x7005, 0x00}, +{0x7006, 0x01}, +{0x7007, 0x80}, +{0x7008, 0x02}, +{0x7009, 0x00}, +{0x700a, 0x04}, +{0x700b, 0x00}, +{0x700e, 0x00}, +{0x700f, 0x60}, +{0x701a, 0x02}, +{0x701b, 0x00}, +{0x701c, 0x01}, +{0x701d, 0x80}, +{0x701e, 0x02}, +{0x701f, 0x00}, +{0x7020, 0x04}, +{0x7021, 0x00}, +{0x7024, 0x00}, +{0x7025, 0x60}, +{0x70e7, 0x00}, +{0x70e4, 0x10}, +{0x70e5, 0x00}, +{0x70e6, 0x00}, +{0x70eb, 0x00}, +{0x70e8, 0x10}, +{0x70e9, 0x00}, +{0x70ea, 0x00}, +{0x70ef, 0x00}, +{0x70ec, 0xfd}, +{0x70ed, 0x00}, +{0x70ee, 0x00}, +{0x70eb, 0x00}, +{0x70f0, 0xfd}, +{0x70f1, 0x00}, +{0x70f2, 0x00}, +{0x30fb, 0x06}, +{0x30fc, 0x80}, +{0x30fd, 0x02}, +{0x30fe, 0x93}, +{0x6000, 0xc1}, +{0x6001, 0xb9}, +{0x6002, 0xba}, +{0x6003, 0xa4}, +{0x6004, 0xb5}, +{0x6005, 0xa0}, +{0x6006, 0x82}, +{0x6007, 0xa7}, +{0x6008, 0xb7}, +{0x6009, 0x5c}, +{0x600a, 0x9e}, +{0x600b, 0xc0}, +{0x600c, 0xd2}, +{0x600d, 0x33}, +{0x600e, 0xcc}, +{0x600f, 0xe2}, +{0x6010, 0xc1}, +{0x6011, 0xab}, +{0x6012, 0xb7}, +{0x6013, 0x00}, +{0x6014, 0x00}, +{0x6015, 0x00}, +{0x6016, 0x00}, +{0x6017, 0x00}, +{0x6018, 0x00}, +{0x6019, 0x00}, +{0x601a, 0x00}, +{0x601b, 0x00}, +{0x601c, 0x00}, +{0x601d, 0x00}, +{0x601e, 0x9c}, +{0x601f, 0x94}, +{0x6020, 0x90}, +{0x6021, 0xc5}, +{0x6022, 0x01}, +{0x6023, 0x54}, +{0x6024, 0x2a}, +{0x6025, 0x61}, +{0x6026, 0xd2}, +{0x6027, 0xcc}, +{0x6028, 0x04}, +{0x6029, 0x35}, +{0x602a, 0xb1}, +{0x602b, 0xb2}, +{0x602c, 0xb3}, +{0x602d, 0xd2}, +{0x602e, 0xd3}, +{0x602f, 0x12}, +{0x6030, 0x31}, +{0x6031, 0xcc}, +{0x6032, 0x06}, +{0x6033, 0xd2}, +{0x6034, 0xc4}, +{0x6035, 0xce}, +{0x6036, 0x18}, +{0x6037, 0xcf}, +{0x6038, 0x1e}, +{0x6039, 0xd0}, +{0x603a, 0x24}, +{0x603b, 0xc5}, +{0x603c, 0xd2}, +{0x603d, 0xbc}, +{0x603e, 0xcc}, +{0x603f, 0x52}, +{0x6040, 0x2b}, +{0x6041, 0xd2}, +{0x6042, 0xd3}, +{0x6043, 0x02}, +{0x6044, 0xcc}, +{0x6045, 0x0a}, +{0x6046, 0xd2}, +{0x6047, 0xd3}, +{0x6048, 0x0f}, +{0x6049, 0x1a}, +{0x604a, 0x2a}, +{0x604b, 0xd4}, +{0x604c, 0xf6}, +{0x604d, 0xba}, +{0x604e, 0x56}, +{0x604f, 0xd3}, +{0x6050, 0x2e}, +{0x6051, 0x54}, +{0x6052, 0x26}, +{0x6053, 0xd2}, +{0x6054, 0xcc}, +{0x6055, 0x60}, +{0x6056, 0xd2}, +{0x6057, 0xd3}, +{0x6058, 0x27}, +{0x6059, 0x27}, +{0x605a, 0x08}, +{0x605b, 0x1a}, +{0x605c, 0xcc}, +{0x605d, 0x88}, +{0x605e, 0x00}, +{0x605f, 0x12}, +{0x6060, 0x2c}, +{0x6061, 0x60}, +{0x6062, 0xc2}, +{0x6063, 0xb9}, +{0x6064, 0xa5}, +{0x6065, 0xb5}, +{0x6066, 0xa0}, +{0x6067, 0x82}, +{0x6068, 0x5c}, +{0x6069, 0xd4}, +{0x606a, 0xbe}, +{0x606b, 0xd4}, +{0x606c, 0xbe}, +{0x606d, 0xd3}, +{0x606e, 0x01}, +{0x606f, 0x7c}, +{0x6070, 0x74}, +{0x6071, 0x00}, +{0x6072, 0x61}, +{0x6073, 0x2a}, +{0x6074, 0xd2}, +{0x6075, 0xcc}, +{0x6076, 0xdf}, +{0x6077, 0xc6}, +{0x6078, 0x35}, +{0x6079, 0xd2}, +{0x607a, 0xcc}, +{0x607b, 0x06}, +{0x607c, 0x31}, +{0x607d, 0xd2}, +{0x607e, 0xc5}, +{0x607f, 0xbb}, +{0x6080, 0xcc}, +{0x6081, 0x18}, +{0x6082, 0xc6}, +{0x6083, 0xd2}, +{0x6084, 0xbd}, +{0x6085, 0xcc}, +{0x6086, 0x52}, +{0x6087, 0x2b}, +{0x6088, 0xd2}, +{0x6089, 0xd3}, +{0x608a, 0x01}, +{0x608b, 0xcc}, +{0x608c, 0x0a}, +{0x608d, 0xd2}, +{0x608e, 0xd3}, +{0x608f, 0x0f}, +{0x6090, 0x1a}, +{0x6091, 0x71}, +{0x6092, 0x2a}, +{0x6093, 0xd4}, +{0x6094, 0xf6}, +{0x6095, 0xd3}, +{0x6096, 0x22}, +{0x6097, 0x70}, +{0x6098, 0xca}, +{0x6099, 0x26}, +{0x609a, 0xd2}, +{0x609b, 0xcc}, +{0x609c, 0x60}, +{0x609d, 0xd2}, +{0x609e, 0xd3}, +{0x609f, 0x27}, +{0x60a0, 0x27}, +{0x60a1, 0x08}, +{0x60a2, 0x1a}, +{0x60a3, 0xcc}, +{0x60a4, 0x88}, +{0x60a5, 0x12}, +{0x60a6, 0x2c}, +{0x60a7, 0x60}, +{0x60a8, 0x00}, +{0x60a9, 0x00}, +{0x60aa, 0xc0}, +{0x60ab, 0xb9}, +{0x60ac, 0xa3}, +{0x60ad, 0xb5}, +{0x60ae, 0x00}, +{0x60af, 0xa0}, +{0x60b0, 0x82}, +{0x60b1, 0x5c}, +{0x60b2, 0xd4}, +{0x60b3, 0xa0}, +{0x60b4, 0x9d}, +{0x60b5, 0xd3}, +{0x60b6, 0x26}, +{0x60b7, 0xb0}, +{0x60b8, 0xb7}, +{0x60b9, 0x00}, +{0x60ba, 0xd3}, +{0x60bb, 0x0a}, +{0x60bc, 0xd3}, +{0x60bd, 0x10}, +{0x60be, 0x9c}, +{0x60bf, 0x94}, +{0x60c0, 0x90}, +{0x60c1, 0xc8}, +{0x60c2, 0xba}, +{0x60c3, 0x7c}, +{0x60c4, 0x74}, +{0x60c5, 0x00}, +{0x60c6, 0x61}, +{0x60c7, 0x2a}, +{0x60c8, 0x00}, +{0x60c9, 0xd2}, +{0x60ca, 0xcc}, +{0x60cb, 0xdf}, +{0x60cc, 0xc4}, +{0x60cd, 0x35}, +{0x60ce, 0xd2}, +{0x60cf, 0xcc}, +{0x60d0, 0x06}, +{0x60d1, 0x31}, +{0x60d2, 0xd2}, +{0x60d3, 0xcc}, +{0x60d4, 0x15}, +{0x60d5, 0xd2}, +{0x60d6, 0xbb}, +{0x60d7, 0xcc}, +{0x60d8, 0x1a}, +{0x60d9, 0xd2}, +{0x60da, 0xbe}, +{0x60db, 0xce}, +{0x60dc, 0x52}, +{0x60dd, 0xcf}, +{0x60de, 0x56}, +{0x60df, 0xd0}, +{0x60e0, 0x5b}, +{0x60e1, 0x2b}, +{0x60e2, 0xd2}, +{0x60e3, 0xd3}, +{0x60e4, 0x01}, +{0x60e5, 0xcc}, +{0x60e6, 0x0a}, +{0x60e7, 0xd2}, +{0x60e8, 0xd3}, +{0x60e9, 0x0f}, +{0x60ea, 0xd9}, +{0x60eb, 0xc7}, +{0x60ec, 0xda}, +{0x60ed, 0xce}, +{0x60ee, 0x1a}, +{0x60ef, 0xd4}, +{0x60f0, 0xf6}, +{0x60f1, 0xd4}, +{0x60f2, 0xa9}, +{0x60f3, 0x27}, +{0x60f4, 0x00}, +{0x60f5, 0xd2}, +{0x60f6, 0xcc}, +{0x60f7, 0x60}, +{0x60f8, 0xd2}, +{0x60f9, 0xd3}, +{0x60fa, 0x2d}, +{0x60fb, 0xd9}, +{0x60fc, 0xdf}, +{0x60fd, 0xda}, +{0x60fe, 0xe5}, +{0x60ff, 0x1a}, +{0x6100, 0x12}, +{0x6101, 0xcc}, +{0x6102, 0x88}, +{0x6103, 0xd6}, +{0x6104, 0xb1}, +{0x6105, 0xb9}, +{0x6106, 0xba}, +{0x6107, 0xaf}, +{0x6108, 0xdc}, +{0x6109, 0x00}, +{0x610a, 0xcb}, +{0x610b, 0xc3}, +{0x610c, 0xb9}, +{0x610d, 0xa4}, +{0x610e, 0xb5}, +{0x610f, 0x5c}, +{0x6110, 0x12}, +{0x6111, 0x2a}, +{0x6112, 0x61}, +{0x6113, 0xd2}, +{0x6114, 0xcc}, +{0x6115, 0xdf}, +{0x6116, 0xc7}, +{0x6117, 0x35}, +{0x6118, 0xd2}, +{0x6119, 0xcc}, +{0x611a, 0x06}, +{0x611b, 0x31}, +{0x611c, 0xc6}, +{0x611d, 0xbb}, +{0x611e, 0xd2}, +{0x611f, 0xcc}, +{0x6120, 0x18}, +{0x6121, 0xd2}, +{0x6122, 0xbe}, +{0x6123, 0xcc}, +{0x6124, 0x52}, +{0x6125, 0xc7}, +{0x6126, 0xd2}, +{0x6127, 0xcc}, +{0x6128, 0x0a}, +{0x6129, 0xb4}, +{0x612a, 0xb7}, +{0x612b, 0x94}, +{0x612c, 0xd2}, +{0x612d, 0x12}, +{0x612e, 0x26}, +{0x612f, 0x42}, +{0x6130, 0x46}, +{0x6131, 0x42}, +{0x6132, 0xd3}, +{0x6133, 0x20}, +{0x6134, 0x27}, +{0x6135, 0x00}, +{0x6136, 0x1a}, +{0x6137, 0xcc}, +{0x6138, 0x88}, +{0x6139, 0x60}, +{0x613a, 0x2c}, +{0x613b, 0x12}, +{0x613c, 0x40}, +{0x613d, 0xb8}, +{0x613e, 0x90}, +{0x613f, 0xd5}, +{0x6140, 0xba}, +{0x6141, 0x00}, +{0x6142, 0x00}, +{0x6143, 0x00}, +{0x6144, 0x00}, +{0x6145, 0x00}, +{0x6146, 0x00}, +{0x6147, 0xaa}, +{0x6148, 0xb7}, +{0x6149, 0x00}, +{0x614a, 0x00}, +{0x614b, 0x00}, +{0x614c, 0x00}, +{0x614d, 0xa6}, +{0x614e, 0xb7}, +{0x614f, 0x00}, +{0x6150, 0xd5}, +{0x6151, 0x00}, +{0x6152, 0x71}, +{0x6153, 0xd3}, +{0x6154, 0x30}, +{0x6155, 0xba}, +{0x6156, 0x00}, +{0x6157, 0x00}, +{0x6158, 0x00}, +{0x6159, 0x00}, +{0x615a, 0xd3}, +{0x615b, 0x10}, +{0x615c, 0x70}, +{0x615d, 0x00}, +{0x615e, 0x00}, +{0x615f, 0x00}, +{0x6160, 0x00}, +{0x6161, 0xd5}, +{0x6162, 0xba}, +{0x6163, 0xb0}, +{0x6164, 0xb7}, +{0x6165, 0x00}, +{0x6166, 0x9d}, +{0x6167, 0xd3}, +{0x6168, 0x0a}, +{0x6169, 0x9d}, +{0x616a, 0x9d}, +{0x616b, 0xd3}, +{0x616c, 0x10}, +{0x616d, 0x9c}, +{0x616e, 0x94}, +{0x616f, 0x90}, +{0x6170, 0xc8}, +{0x6171, 0xba}, +{0x6172, 0xd2}, +{0x6173, 0x60}, +{0x6174, 0x2c}, +{0x6175, 0x50}, +{0x6176, 0x11}, +{0x6177, 0xcc}, +{0x6178, 0x00}, +{0x6179, 0x30}, +{0x617a, 0xd5}, +{0x617b, 0x00}, +{0x617c, 0xba}, +{0x617d, 0xb0}, +{0x617e, 0xb7}, +{0x617f, 0x00}, +{0x6180, 0x9d}, +{0x6181, 0xd3}, +{0x6182, 0x0a}, +{0x6183, 0x9d}, +{0x6184, 0x9d}, +{0x6185, 0xd3}, +{0x6186, 0x10}, +{0x6187, 0x9c}, +{0x6188, 0x94}, +{0x6189, 0x90}, +{0x618a, 0xc8}, +{0x618b, 0xba}, +{0x618c, 0xd5}, +{0x618d, 0x00}, +{0x618e, 0x01}, +{0x618f, 0x1a}, +{0x6190, 0xcc}, +{0x6191, 0x12}, +{0x6192, 0x12}, +{0x6193, 0x00}, +{0x6194, 0xcc}, +{0x6195, 0x9c}, +{0x6196, 0xd2}, +{0x6197, 0xcc}, +{0x6198, 0x60}, +{0x6199, 0xd2}, +{0x619a, 0x04}, +{0x619b, 0xd5}, +{0x619c, 0x1a}, +{0x619d, 0xcc}, +{0x619e, 0x12}, +{0x619f, 0x00}, +{0x61a0, 0x12}, +{0x61a1, 0xcc}, +{0x61a2, 0x9c}, +{0x61a3, 0xd2}, +{0x61a4, 0xcc}, +{0x61a5, 0x60}, +{0x61a6, 0xd2}, +{0x61a7, 0x1a}, +{0x61a8, 0xcc}, +{0x61a9, 0x12}, +{0x61aa, 0x00}, +{0x61ab, 0x12}, +{0x61ac, 0xcc}, +{0x61ad, 0x9c}, +{0x61ae, 0xd2}, +{0x61af, 0xcc}, +{0x61b0, 0x60}, +{0x61b1, 0xd2}, +{0x61b2, 0x1a}, +{0x61b3, 0xcc}, +{0x61b4, 0x12}, +{0x61b5, 0x00}, +{0x61b6, 0x12}, +{0x61b7, 0xcc}, +{0x61b8, 0x9c}, +{0x61b9, 0xd2}, +{0x61ba, 0xcc}, +{0x61bb, 0x60}, +{0x61bc, 0xd2}, +{0x61bd, 0xd5}, +{0x61be, 0x1a}, +{0x61bf, 0xcc}, +{0x61c0, 0x12}, +{0x61c1, 0x12}, +{0x61c2, 0x00}, +{0x61c3, 0xcc}, +{0x61c4, 0x8a}, +{0x61c5, 0xd2}, +{0x61c6, 0xcc}, +{0x61c7, 0x74}, +{0x61c8, 0xd2}, +{0x61c9, 0xd5}, +{0x61ca, 0x1a}, +{0x61cb, 0xcc}, +{0x61cc, 0x12}, +{0x61cd, 0x00}, +{0x61ce, 0x12}, +{0x61cf, 0xcc}, +{0x61d0, 0x8a}, +{0x61d1, 0xd2}, +{0x61d2, 0xcc}, +{0x61d3, 0x74}, +{0x61d4, 0xd2}, +{0x61d5, 0x1a}, +{0x61d6, 0xcc}, +{0x61d7, 0x12}, +{0x61d8, 0x00}, +{0x61d9, 0x12}, +{0x61da, 0xcc}, +{0x61db, 0x8a}, +{0x61dc, 0xd2}, +{0x61dd, 0xcc}, +{0x61de, 0x74}, +{0x61df, 0xd2}, +{0x61e0, 0x1a}, +{0x61e1, 0xcc}, +{0x61e2, 0x12}, +{0x61e3, 0x00}, +{0x61e4, 0x12}, +{0x61e5, 0xcc}, +{0x61e6, 0x8a}, +{0x61e7, 0xd2}, +{0x61e8, 0xcc}, +{0x61e9, 0x74}, +{0x61ea, 0xd2}, +{0x61eb, 0xd5}, +{0x61ec, 0xcc}, +{0x61ed, 0x12}, +{0x61ee, 0x00}, +{0x61ef, 0x12}, +{0x61f0, 0xcc}, +{0x61f1, 0x9c}, +{0x61f2, 0xd5}, +{0x6400, 0x04}, +{0x6401, 0x04}, +{0x6402, 0x00}, +{0x6403, 0xff}, +{0x6404, 0x00}, +{0x6405, 0x08}, +{0x6406, 0x00}, +{0x6407, 0xff}, +{0x6408, 0x04}, +{0x6409, 0x70}, +{0x640a, 0x00}, +{0x640b, 0xff}, +{0x640c, 0x05}, +{0x640d, 0x14}, +{0x640e, 0x04}, +{0x640f, 0x71}, +{0x6410, 0x05}, +{0x6411, 0x74}, +{0x6412, 0x00}, +{0x6413, 0xff}, +{0x6414, 0x05}, +{0x6415, 0x54}, +{0x6416, 0x05}, +{0x6417, 0x44}, +{0x6418, 0x04}, +{0x6419, 0x30}, +{0x641a, 0x05}, +{0x641b, 0x46}, +{0x641c, 0x00}, +{0x641d, 0xff}, +{0x641e, 0x04}, +{0x641f, 0x31}, +{0x6420, 0x04}, +{0x6421, 0x30}, +{0x6422, 0x00}, +{0x6423, 0xff}, +{0x6424, 0x04}, +{0x6425, 0x20}, +{0x6426, 0x05}, +{0x6427, 0x06}, +{0x6428, 0x00}, +{0x6429, 0xff}, +{0x642a, 0x08}, +{0x642b, 0x2a}, +{0x642c, 0x08}, +{0x642d, 0x31}, +{0x642e, 0x00}, +{0x642f, 0xff}, +{0x6430, 0x08}, +{0x6431, 0x2a}, +{0x6432, 0x08}, +{0x6433, 0x31}, +{0x6434, 0x06}, +{0x6435, 0x20}, +{0x6436, 0x07}, +{0x6437, 0x00}, +{0x6438, 0x08}, +{0x6439, 0x40}, +{0x643a, 0x00}, +{0x643b, 0xff}, +{0x643c, 0x08}, +{0x643d, 0x2a}, +{0x643e, 0x08}, +{0x643f, 0x36}, +{0x6440, 0x06}, +{0x6441, 0x10}, +{0x6442, 0x07}, +{0x6443, 0x00}, +{0x6444, 0x08}, +{0x6445, 0x40}, +{0x6446, 0x00}, +{0x6447, 0xff}, +{0x6448, 0x08}, +{0x6449, 0x2a}, +{0x644a, 0x08}, +{0x644b, 0x3b}, +{0x644c, 0x06}, +{0x644d, 0x00}, +{0x644e, 0x07}, +{0x644f, 0x00}, +{0x6450, 0x08}, +{0x6451, 0x40}, +{0x6452, 0x00}, +{0x6453, 0xff}, +{0x6454, 0x06}, +{0x6455, 0x00}, +{0x6456, 0x07}, +{0x6457, 0x05}, +{0x6458, 0x01}, +{0x6459, 0xaf}, +{0x645a, 0x01}, +{0x645b, 0x0f}, +{0x645c, 0x01}, +{0x645d, 0x90}, +{0x645e, 0x01}, +{0x645f, 0xc8}, +{0x6460, 0x00}, +{0x6461, 0xff}, +{0x6462, 0x01}, +{0x6463, 0xac}, +{0x6464, 0x01}, +{0x6465, 0x0c}, +{0x6466, 0x01}, +{0x6467, 0x90}, +{0x6468, 0x01}, +{0x6469, 0xe8}, +{0x646a, 0x00}, +{0x646b, 0xff}, +{0x646c, 0x01}, +{0x646d, 0xad}, +{0x646e, 0x01}, +{0x646f, 0x0d}, +{0x6470, 0x01}, +{0x6471, 0x90}, +{0x6472, 0x01}, +{0x6473, 0xe8}, +{0x6474, 0x00}, +{0x6475, 0xff}, +{0x6476, 0x01}, +{0x6477, 0xae}, +{0x6478, 0x01}, +{0x6479, 0x0e}, +{0x647a, 0x01}, +{0x647b, 0x90}, +{0x647c, 0x01}, +{0x647d, 0xe8}, +{0x647e, 0x00}, +{0x647f, 0xff}, +{0x6480, 0x01}, +{0x6481, 0xb0}, +{0x6482, 0x01}, +{0x6483, 0xb1}, +{0x6484, 0x01}, +{0x6485, 0xb2}, +{0x6486, 0x01}, +{0x6487, 0xb3}, +{0x6488, 0x01}, +{0x6489, 0xb4}, +{0x648a, 0x01}, +{0x648b, 0xb5}, +{0x648c, 0x01}, +{0x648d, 0xb6}, +{0x648e, 0x01}, +{0x648f, 0xb7}, +{0x6490, 0x01}, +{0x6491, 0xb8}, +{0x6492, 0x01}, +{0x6493, 0xb9}, +{0x6494, 0x01}, +{0x6495, 0xba}, +{0x6496, 0x01}, +{0x6497, 0xbb}, +{0x6498, 0x01}, +{0x6499, 0xbc}, +{0x649a, 0x01}, +{0x649b, 0xbd}, +{0x649c, 0x01}, +{0x649d, 0xbe}, +{0x649e, 0x01}, +{0x649f, 0xbf}, +{0x64a0, 0x01}, +{0x64a1, 0xc0}, +{0x64a2, 0x00}, +{0x64a3, 0xff}, +{0x64a4, 0x06}, +{0x64a5, 0x00}, +{0x64a6, 0x01}, +{0x64a7, 0xf6}, +{0x64a8, 0x04}, +{0x64a9, 0x30}, +{0x64aa, 0x00}, +{0x64ab, 0xff}, +{0x64ac, 0x06}, +{0x64ad, 0x10}, +{0x64ae, 0x01}, +{0x64af, 0xf6}, +{0x64b0, 0x04}, +{0x64b1, 0x30}, +{0x64b2, 0x06}, +{0x64b3, 0x00}, +{0x64b4, 0x00}, +{0x64b5, 0xff}, +{0x64b6, 0x06}, +{0x64b7, 0x20}, +{0x64b8, 0x01}, +{0x64b9, 0xf6}, +{0x64ba, 0x04}, +{0x64bb, 0x30}, +{0x64bc, 0x06}, +{0x64bd, 0x00}, +{0x64be, 0x00}, +{0x64bf, 0xff}, +{0x64c0, 0x04}, +{0x64c1, 0x31}, +{0x64c2, 0x04}, +{0x64c3, 0x30}, +{0x64c4, 0x01}, +{0x64c5, 0x20}, +{0x64c6, 0x01}, +{0x64c7, 0x31}, +{0x64c8, 0x01}, +{0x64c9, 0x32}, +{0x64ca, 0x01}, +{0x64cb, 0x33}, +{0x64cc, 0x01}, +{0x64cd, 0x34}, +{0x64ce, 0x01}, +{0x64cf, 0x35}, +{0x64d0, 0x01}, +{0x64d1, 0x36}, +{0x64d2, 0x01}, +{0x64d3, 0x37}, +{0x64d4, 0x01}, +{0x64d5, 0x38}, +{0x64d6, 0x01}, +{0x64d7, 0x39}, +{0x64d8, 0x01}, +{0x64d9, 0x3a}, +{0x64da, 0x01}, +{0x64db, 0x3b}, +{0x64dc, 0x01}, +{0x64dd, 0x3c}, +{0x64de, 0x01}, +{0x64df, 0x3d}, +{0x64e0, 0x01}, +{0x64e1, 0x3e}, +{0x64e2, 0x01}, +{0x64e3, 0x3f}, +{0x64e4, 0x02}, +{0x64e5, 0xa0}, +{0x64e6, 0x00}, +{0x64e7, 0xff}, +{0x64e8, 0x04}, +{0x64e9, 0x31}, +{0x64ea, 0x04}, +{0x64eb, 0x30}, +{0x64ec, 0x01}, +{0x64ed, 0x00}, +{0x64ee, 0x01}, +{0x64ef, 0x11}, +{0x64f0, 0x01}, +{0x64f1, 0x12}, +{0x64f2, 0x01}, +{0x64f3, 0x13}, +{0x64f4, 0x01}, +{0x64f5, 0x14}, +{0x64f6, 0x01}, +{0x64f7, 0x15}, +{0x64f8, 0x01}, +{0x64f9, 0x16}, +{0x64fa, 0x01}, +{0x64fb, 0x17}, +{0x64fc, 0x01}, +{0x64fd, 0x18}, +{0x64fe, 0x01}, +{0x64ff, 0x19}, +{0x6500, 0x01}, +{0x6501, 0x1a}, +{0x6502, 0x01}, +{0x6503, 0x1b}, +{0x6504, 0x01}, +{0x6505, 0x1c}, +{0x6506, 0x01}, +{0x6507, 0x1d}, +{0x6508, 0x01}, +{0x6509, 0x1e}, +{0x650a, 0x01}, +{0x650b, 0x1f}, +{0x650c, 0x02}, +{0x650d, 0xa0}, +{0x650e, 0x00}, +{0x650f, 0xff}, +{0x6510, 0x04}, +{0x6511, 0x20}, +{0x6512, 0x05}, +{0x6513, 0x86}, +{0x6514, 0x03}, +{0x6515, 0x0b}, +{0x6516, 0x05}, +{0x6517, 0x86}, +{0x6518, 0x00}, +{0x6519, 0x00}, +{0x651a, 0x05}, +{0x651b, 0x06}, +{0x651c, 0x00}, +{0x651d, 0x04}, +{0x651e, 0x05}, +{0x651f, 0x04}, +{0x6520, 0x00}, +{0x6521, 0x04}, +{0x6522, 0x05}, +{0x6523, 0x00}, +{0x6524, 0x05}, +{0x6525, 0x0a}, +{0x6526, 0x03}, +{0x6527, 0x9a}, +{0x6528, 0x05}, +{0x6529, 0x86}, +{0x652a, 0x00}, +{0x652b, 0x00}, +{0x652c, 0x05}, +{0x652d, 0x06}, +{0x652e, 0x00}, +{0x652f, 0x01}, +{0x6530, 0x05}, +{0x6531, 0x04}, +{0x6532, 0x00}, +{0x6533, 0x04}, +{0x6534, 0x05}, +{0x6535, 0x00}, +{0x6536, 0x05}, +{0x6537, 0x0a}, +{0x6538, 0x03}, +{0x6539, 0x99}, +{0x653a, 0x05}, +{0x653b, 0x06}, +{0x653c, 0x00}, +{0x653d, 0x00}, +{0x653e, 0x05}, +{0x653f, 0x04}, +{0x6540, 0x00}, +{0x6541, 0x04}, +{0x6542, 0x05}, +{0x6543, 0x00}, +{0x6544, 0x05}, +{0x6545, 0x0a}, +{0x6546, 0x03}, +{0x6547, 0x98}, +{0x6548, 0x05}, +{0x6549, 0x06}, +{0x654a, 0x00}, +{0x654b, 0x00}, +{0x654c, 0x05}, +{0x654d, 0x04}, +{0x654e, 0x00}, +{0x654f, 0x04}, +{0x6550, 0x05}, +{0x6551, 0x00}, +{0x6552, 0x05}, +{0x6553, 0x0a}, +{0x6554, 0x03}, +{0x6555, 0x97}, +{0x6556, 0x05}, +{0x6557, 0x06}, +{0x6558, 0x05}, +{0x6559, 0x04}, +{0x655a, 0x00}, +{0x655b, 0x04}, +{0x655c, 0x05}, +{0x655d, 0x00}, +{0x655e, 0x05}, +{0x655f, 0x0a}, +{0x6560, 0x03}, +{0x6561, 0x96}, +{0x6562, 0x05}, +{0x6563, 0x06}, +{0x6564, 0x05}, +{0x6565, 0x04}, +{0x6566, 0x00}, +{0x6567, 0x04}, +{0x6568, 0x05}, +{0x6569, 0x00}, +{0x656a, 0x05}, +{0x656b, 0x0a}, +{0x656c, 0x03}, +{0x656d, 0x95}, +{0x656e, 0x05}, +{0x656f, 0x06}, +{0x6570, 0x05}, +{0x6571, 0x04}, +{0x6572, 0x00}, +{0x6573, 0x04}, +{0x6574, 0x05}, +{0x6575, 0x00}, +{0x6576, 0x05}, +{0x6577, 0x0a}, +{0x6578, 0x03}, +{0x6579, 0x94}, +{0x657a, 0x05}, +{0x657b, 0x06}, +{0x657c, 0x00}, +{0x657d, 0x00}, +{0x657e, 0x05}, +{0x657f, 0x04}, +{0x6580, 0x00}, +{0x6581, 0x04}, +{0x6582, 0x05}, +{0x6583, 0x00}, +{0x6584, 0x05}, +{0x6585, 0x0a}, +{0x6586, 0x03}, +{0x6587, 0x93}, +{0x6588, 0x05}, +{0x6589, 0x06}, +{0x658a, 0x00}, +{0x658b, 0x00}, +{0x658c, 0x05}, +{0x658d, 0x04}, +{0x658e, 0x00}, +{0x658f, 0x04}, +{0x6590, 0x05}, +{0x6591, 0x00}, +{0x6592, 0x05}, +{0x6593, 0x0a}, +{0x6594, 0x03}, +{0x6595, 0x92}, +{0x6596, 0x05}, +{0x6597, 0x06}, +{0x6598, 0x05}, +{0x6599, 0x04}, +{0x659a, 0x00}, +{0x659b, 0x04}, +{0x659c, 0x05}, +{0x659d, 0x00}, +{0x659e, 0x05}, +{0x659f, 0x0a}, +{0x65a0, 0x03}, +{0x65a1, 0x91}, +{0x65a2, 0x05}, +{0x65a3, 0x06}, +{0x65a4, 0x05}, +{0x65a5, 0x04}, +{0x65a6, 0x00}, +{0x65a7, 0x04}, +{0x65a8, 0x05}, +{0x65a9, 0x00}, +{0x65aa, 0x05}, +{0x65ab, 0x0a}, +{0x65ac, 0x03}, +{0x65ad, 0x90}, +{0x65ae, 0x05}, +{0x65af, 0x06}, +{0x65b0, 0x05}, +{0x65b1, 0x04}, +{0x65b2, 0x00}, +{0x65b3, 0x04}, +{0x65b4, 0x05}, +{0x65b5, 0x00}, +{0x65b6, 0x05}, +{0x65b7, 0x0a}, +{0x65b8, 0x02}, +{0x65b9, 0x90}, +{0x65ba, 0x05}, +{0x65bb, 0x06}, +{0x65bc, 0x00}, +{0x65bd, 0xff}, +{0x65be, 0x04}, +{0x65bf, 0x70}, +{0x65c0, 0x08}, +{0x65c1, 0x76}, +{0x65c2, 0x00}, +{0x65c3, 0xff}, +{0x65c4, 0x08}, +{0x65c5, 0x76}, +{0x65c6, 0x04}, +{0x65c7, 0x0c}, +{0x65c8, 0x05}, +{0x65c9, 0x07}, +{0x65ca, 0x04}, +{0x65cb, 0x04}, +{0x65cc, 0x00}, +{0x65cd, 0xff}, +{0x65ce, 0x00}, +{0x65cf, 0xff}, +{0x65d0, 0x00}, +{0x65d1, 0xff}, +{0x30eb, 0x04}, +{0x30ed, 0x5a}, +{0x30ee, 0x01}, +{0x30ef, 0x80}, +{0x30f1, 0x5a}, +{0x303a, 0x04}, +{0x303b, 0x7f}, +{0x303c, 0xfe}, +{0x303d, 0x19}, +{0x303e, 0xd7}, +{0x303f, 0x09}, +{0x3040, 0x78}, +{0x3042, 0x05}, +{0x328a, 0x10}, + +{0x3291, 0x03}, /* 7:enable flip and mirror offset may on 20150330 */ + +/* change settings to 1280x1080 COMB12 30 fps, 96MHz */ +{0x3012, 0x0}, +{0x3000, 0x3}, +{0x3001, 0x50}, +{0x3002, 0x0a}, +{0x3004, 0x3}, +{0x3005, 0x48}, +{0x3006, 0x7}, +{0x308f, 0x10}, +{0x3127, 0x63}, +{0x3074, OV10640_X_START >> 8}, +{0x3075, OV10640_X_START & 0xff}, +{0x3076, OV10640_Y_START >> 8}, +{0x3077, OV10640_Y_START & 0xff}, +{0x3078, OV10640_X_END >> 8}, +{0x3079, OV10640_X_END & 0xff}, +{0x307a, OV10640_Y_END >> 8}, +{0x307b, OV10640_Y_END & 0xff}, +{0x307c, OV10640_MAX_WIDTH >> 8}, +{0x307d, OV10640_MAX_WIDTH & 0xff}, +{0x307e, OV10640_MAX_HEIGHT >> 8}, +{0x307f, OV10640_MAX_HEIGHT & 0xff}, +{0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS +{0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, +{0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS +{0x3083, (OV10640_SENSOR_HEIGHT + 208) & 0xff}, +{0x3084, 0x0}, +{0x3085, 0x0}, +{0x3086, 0x0}, +{0x3087, 0x0}, +{0x346d, 0x14}, +{0x3444, 0x28}, +{0x3091, 0x0}, +{0x3119, 0x44}, // COMB12 +{0x3012, 0x1}, +}; diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c index aaadcc2..b0a3c90 100644 --- a/drivers/media/i2c/soc_camera/ov106xx.c +++ b/drivers/media/i2c/soc_camera/ov106xx.c @@ -10,6 +10,7 @@ */ #include "ov10635.c" +#include "ov10640.c" #include "ov490_ov10640.c" #include "ov495_ov2775.c" #include "ar0132.c" @@ -28,6 +29,7 @@ static enum { ID_OV10635, + ID_OV10640, ID_OV490_OV10640, ID_OV495_OV2775, ID_AR0132, @@ -63,6 +65,12 @@ static int ov106xx_probe(struct i2c_client *client, goto out; } + ret = ov10640_probe(client, did); + if (!ret) { + chip_id = ID_OV10640; + goto out; + } + ret = ov10635_probe(client, did); if (!ret) { chip_id = ID_OV10635; @@ -159,6 +167,9 @@ static int ov106xx_remove(struct i2c_client *client) case ID_OV10635: ov10635_remove(client); break; + case ID_OV10640: + ov10640_remove(client); + break; case ID_OV490_OV10640: ov490_remove(client); break; @@ -233,6 +244,6 @@ static struct i2c_driver ov106xx_i2c_driver = { module_i2c_driver(ov106xx_i2c_driver); -MODULE_DESCRIPTION("SoC Camera driver for OV10635, OV490+OV10640, OV495+OV2775, AR0132/140/143/220/223/323, AP0101+AR014X"); +MODULE_DESCRIPTION("SoC Camera driver for OV10635/10640/OV490/OV495, AR0132/140/143/220/223/323, AP0101"); MODULE_AUTHOR("Vladimir Barinov"); MODULE_LICENSE("GPL"); -- 2.7.4