From f960165f25cd6112893e321e1ad01e8a0d721cd6 Mon Sep 17 00:00:00 2001 From: Josua Grawitter Date: Sun, 1 Feb 2009 11:44:22 +0100 Subject: [PATCH] Add sensor MT9M001 Signed-off-by: Josua Grawitter --- micron.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 88 insertions(+), 19 deletions(-) diff --git a/micron.c b/micron.c index a2c0e34..f924c6f 100644 --- a/micron.c +++ b/micron.c @@ -277,6 +277,94 @@ struct sn9c20x_i2c_regs mt9v011_init[] = { {0xff, 0xffff}, }; +struct sn9c20x_i2c_regs mt9m001_init[] = { + {0x07, 0x0000}, + {0x07, 0x0002}, + {0x0d, 0x0001}, + {0x0d, 0x0000}, + {0x01, 0x000e}, + {0x02, 0x0014}, + {0x03, 0x03c1}, + {0x04, 0x0501}, + {0x05, 0x0083}, + {0x06, 0x0006}, + {0x0d, 0x0002}, + {0x09, 0x0000}, + {0x0a, 0x0000}, + {0x0b, 0x0000}, + {0x0c, 0x0000}, + {0x11, 0x0000}, + {0x1e, 0x8000}, + {0x20, 0x1105}, + {0x2b, 0x0008}, + {0x2c, 0x0010}, + {0x2d, 0x0014}, + {0x2e, 0x0008}, + {0x5f, 0x8904}, + {0x60, 0x0000}, + {0x61, 0x0000}, + {0x62, 0x0498}, + {0x63, 0x0000}, + {0x68, 0x0000}, + {0x20, 0x111d}, + {0x06, 0x00f2}, + {0x05, 0x0013}, + {0x20, 0x511d}, + {0x20, 0xd11d}, + {0x09, 0x03e8}, + {0x07, 0x0003}, + {0x2b, 0x0010}, + {0x2c, 0x0010}, + {0x2d, 0x0010}, + {0x2e, 0x0010}, + {0x07, 0x0002}, + {0x06, 0x00f2}, + {0x05, 0x0013}, + {0x09, 0x043c}, + {0x07, 0x0003}, + {0x2b, 0x0023}, + {0x2c, 0x003f}, + {0x2d, 0x003a}, + {0x2e, 0x0023}, + {0x07, 0x0002}, + {0x09, 0x0879}, + {0x07, 0x0003}, + {0x2b, 0x0027}, + {0x2c, 0x003f}, + {0x2d, 0x0039}, + {0x2e, 0x0027}, + {0x07, 0x0002}, + {0x09, 0x0b4c}, + {0x07, 0x0003}, + {0x2b, 0x0029}, + {0x2c, 0x003f}, + {0x2d, 0x0035}, + {0x2e, 0x0029}, + {0x07, 0x0002}, + {0x09, 0x0e1f}, + {0x07, 0x0003}, + {0x2d, 0x0030}, + {0x07, 0x0002}, + {0x09, 0x103e}, + {0x07, 0x0003}, + {0x2d, 0x002b}, + {0x07, 0x0002}, + {0x09, 0x10f2}, + {0x07, 0x0003}, + {0x2b, 0x002a}, + {0x2c, 0x003f}, + {0x2d, 0x002a}, + {0x2c, 0x002a}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0000}, +}; + struct sn9c20x_i2c_regs mt9m111_init[] = { {0xf0, 0x0000}, /* Reset sensor */ @@ -362,25 +450,6 @@ int mt9m111_set_autowhitebalance(struct usb_sn9c20x *dev) return ret; } - -struct sn9c20x_i2c_regs mt9m001_init[] = { - {0x07, 0x0000}, {0x07, 0x0002}, {0x0d, 0x0001}, {0x0d, 0x0000}, - {0x01, 0x000e}, {0x02, 0x0014}, {0x03, 0x03c1}, {0x04, 0x0501}, - {0x05, 0x0083}, {0x06, 0x0006}, {0x0d, 0x0002}, {0x09, 0x0000}, - {0x0a, 0x0000}, {0x0b, 0x0000}, {0x0c, 0x0000}, {0x11, 0x0000}, - {0x1e, 0x8000}, {0x20, 0x1105}, {0x2b, 0x0008}, {0x2c, 0x0010}, - {0x2d, 0x0014}, {0x2e, 0x0008}, {0x5f, 0x8904}, {0x60, 0x0000}, - {0x61, 0x0000}, {0x62, 0x0498}, {0x63, 0x0000}, {0x68, 0x0000}, - {0x20, 0x111d}, {0x06, 0x00f2}, {0x05, 0x0013}, {0x20, 0x111d}, - {0x20, 0x111d}, {0x07, 0x0003}, {0x2b, 0x0010}, {0x2c, 0x0010}, - {0x2d, 0x0010}, {0x2e, 0x0010}, {0x07, 0x0002}, {0x07, 0x0003}, - {0x2c, 0x001d}, {0x2d, 0x001d}, {0x07, 0x0002}, {0x06, 0x00f2}, - {0x05, 0x0013}, {0x09, 0x0387}, {0x07, 0x0003}, {0x2b, 0x0028}, - {0x2c, 0x003f}, {0x2d, 0x003f}, {0x2e, 0x0028}, {0x07, 0x0002}, - {0x09, 0x04f1}, {0x07, 0x0003}, {0x2b, 0x0024}, {0x2c, 0x0039}, - {0x2d, 0x0039}, {0x2e, 0x0024}, {0x07, 0x0002}, {0xff, 0xffff}, -}; - int mt9v111_select_address_space(struct usb_sn9c20x *dev, __u8 address_space) { __u8 buf[2]; -- 2.11.4.GIT