diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-01-21 11:28:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:46 -0400 |
commit | 4763fa84d9942137b011629be2e7547a23cdfbc6 (patch) | |
tree | 5741c5f949f7f67476dfacd3d15bf97c161300a1 | |
parent | c41507ba06c2fbe5a1de908ef5bd1b2c4d9b13c0 (diff) |
V4L/DVB (11635): gspca - m5602-ov7660: Initial checkin of sensor skeleton code
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/m5602/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov7660.c | 92 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov7660.h | 367 |
3 files changed, 460 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/m5602/Makefile b/drivers/media/video/gspca/m5602/Makefile index 9fa3644f4869..c819d785b3f1 100644 --- a/drivers/media/video/gspca/m5602/Makefile +++ b/drivers/media/video/gspca/m5602/Makefile | |||
@@ -2,6 +2,7 @@ obj-$(CONFIG_USB_M5602) += gspca_m5602.o | |||
2 | 2 | ||
3 | gspca_m5602-objs := m5602_core.o \ | 3 | gspca_m5602-objs := m5602_core.o \ |
4 | m5602_ov9650.o \ | 4 | m5602_ov9650.o \ |
5 | m5602_ov7660.o \ | ||
5 | m5602_mt9m111.o \ | 6 | m5602_mt9m111.o \ |
6 | m5602_po1030.o \ | 7 | m5602_po1030.o \ |
7 | m5602_s5k83a.o \ | 8 | m5602_s5k83a.o \ |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c new file mode 100644 index 000000000000..466de667a60d --- /dev/null +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * Driver for the ov7660 sensor | ||
3 | * | ||
4 | * Copyright (C) 2009 Erik Andrén | ||
5 | * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. | ||
6 | * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br> | ||
7 | * | ||
8 | * Portions of code to USB interface and ALi driver software, | ||
9 | * Copyright (c) 2006 Willem Duinker | ||
10 | * v4l2 interface modeled after the V4L2 driver | ||
11 | * for SN9C10x PC Camera Controllers | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License as | ||
15 | * published by the Free Software Foundation, version 2. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include "m5602_ov7660.h" | ||
20 | |||
21 | const static struct ctrl ov7660_ctrls[] = {}; | ||
22 | |||
23 | static struct v4l2_pix_format ov7660_modes[] = { | ||
24 | { | ||
25 | 640, | ||
26 | 480, | ||
27 | V4L2_PIX_FMT_SBGGR8, | ||
28 | V4L2_FIELD_NONE, | ||
29 | .sizeimage = | ||
30 | 640 * 480, | ||
31 | .bytesperline = 640, | ||
32 | .colorspace = V4L2_COLORSPACE_SRGB, | ||
33 | .priv = 0 | ||
34 | } | ||
35 | }; | ||
36 | |||
37 | static void ov7660_dump_registers(struct sd *sd); | ||
38 | |||
39 | int ov7660_probe(struct sd *sd) | ||
40 | { | ||
41 | return -ENODEV; | ||
42 | } | ||
43 | |||
44 | int ov7660_init(struct sd *sd) | ||
45 | { | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | int ov7660_start(struct sd *sd) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | int ov7660_stop(struct sd *sd) | ||
55 | { | ||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | void ov7660_disconnect(struct sd *sd) {} | ||
60 | |||
61 | static void ov7660_dump_registers(struct sd *sd) | ||
62 | { | ||
63 | int address; | ||
64 | info("Dumping the ov7660 register state"); | ||
65 | for (address = 0; address < 0xa9; address++) { | ||
66 | u8 value; | ||
67 | m5602_read_sensor(sd, address, &value, 1); | ||
68 | info("register 0x%x contains 0x%x", | ||
69 | address, value); | ||
70 | } | ||
71 | |||
72 | info("ov7660 register state dump complete"); | ||
73 | |||
74 | info("Probing for which registers that are read/write"); | ||
75 | for (address = 0; address < 0xff; address++) { | ||
76 | u8 old_value, ctrl_value; | ||
77 | u8 test_value[2] = {0xff, 0xff}; | ||
78 | |||
79 | m5602_read_sensor(sd, address, &old_value, 1); | ||
80 | m5602_write_sensor(sd, address, test_value, 1); | ||
81 | m5602_read_sensor(sd, address, &ctrl_value, 1); | ||
82 | |||
83 | if (ctrl_value == test_value[0]) | ||
84 | info("register 0x%x is writeable", address); | ||
85 | else | ||
86 | info("register 0x%x is read only", address); | ||
87 | |||
88 | /* Restore original value */ | ||
89 | m5602_write_sensor(sd, address, &old_value, 1); | ||
90 | } | ||
91 | } | ||
92 | |||
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/video/gspca/m5602/m5602_ov7660.h new file mode 100644 index 000000000000..67bde9bb28c8 --- /dev/null +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.h | |||
@@ -0,0 +1,367 @@ | |||
1 | /* | ||
2 | * Driver for the ov7660 sensor | ||
3 | * | ||
4 | * Copyright (C) 2009 Erik Andrén | ||
5 | * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. | ||
6 | * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br> | ||
7 | * | ||
8 | * Portions of code to USB interface and ALi driver software, | ||
9 | * Copyright (c) 2006 Willem Duinker | ||
10 | * v4l2 interface modeled after the V4L2 driver | ||
11 | * for SN9C10x PC Camera Controllers | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License as | ||
15 | * published by the Free Software Foundation, version 2. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #ifndef M5602_OV7660_H_ | ||
20 | #define M5602_OV7660_H_ | ||
21 | |||
22 | #include "m5602_sensor.h" | ||
23 | |||
24 | #define OV7660_GAIN 0x00 | ||
25 | #define OV7660_BLUE_GAIN 0x01 | ||
26 | #define OV7660_RED_GAIN 0x02 | ||
27 | #define OV7660_VREF 0x03 | ||
28 | #define OV7660_COM1 0x04 | ||
29 | #define OV7660_BAVE 0x05 | ||
30 | #define OV7660_GEAVE 0x06 | ||
31 | #define OV7660_AECHH 0x07 | ||
32 | #define OV7660_RAVE 0x08 | ||
33 | #define OV7660_COM2 0x09 | ||
34 | #define OV7660_PID 0x0a | ||
35 | #define OV7660_VER 0x0b | ||
36 | #define OV7660_COM3 0x0c | ||
37 | #define OV7660_COM4 0x0d | ||
38 | #define OV7660_COM5 0x0e | ||
39 | #define OV7660_COM6 0x0f | ||
40 | #define OV7660_AECH 0x10 | ||
41 | #define OV7660_CLKRC 0x11 | ||
42 | #define OV7660_COM7 0x12 | ||
43 | #define OV7660_COM8 0x13 | ||
44 | #define OV7660_COM9 0x14 | ||
45 | #define OV7660_COM10 0x15 | ||
46 | #define OV7660_RSVD16 0x16 | ||
47 | #define OV7660_HSTART 0x17 | ||
48 | #define OV7660_HSTOP 0x18 | ||
49 | #define OV7660_VSTART 0x19 | ||
50 | #define OV7660_VSTOP 0x1a | ||
51 | #define OV7660_PSHFT 0x1b | ||
52 | #define OV7660_MIDH 0x1c | ||
53 | #define OV7660_MIDL 0x1d | ||
54 | #define OV7660_MVFP 0x1e | ||
55 | #define OV7660_LAEC 0x1f | ||
56 | #define OV7660_BOS 0x20 | ||
57 | #define OV7660_GBOS 0x21 | ||
58 | #define OV7660_GROS 0x22 | ||
59 | #define OV7660_ROS 0x23 | ||
60 | #define OV7660_AEW 0x24 | ||
61 | #define OV7660_AEB 0x25 | ||
62 | #define OV7660_VPT 0x26 | ||
63 | #define OV7660_BBIAS 0x27 | ||
64 | #define OV7660_GbBIAS 0x28 | ||
65 | #define OV7660_RSVD29 0x29 | ||
66 | #define OV7660_RBIAS 0x2c | ||
67 | #define OV7660_HREF 0x32 | ||
68 | #define OV7660_ADC 0x37 | ||
69 | #define OV7660_OFON 0x39 | ||
70 | #define OV7660_TSLB 0x3a | ||
71 | #define OV7660_COM12 0x3c | ||
72 | #define OV7660_COM13 0x3d | ||
73 | #define OV7660_LCC1 0x62 | ||
74 | #define OV7660_LCC2 0x63 | ||
75 | #define OV7660_LCC3 0x64 | ||
76 | #define OV7660_LCC4 0x65 | ||
77 | #define OV7660_LCC5 0x66 | ||
78 | #define OV7660_HV 0x69 | ||
79 | #define OV7660_RSVDA1 0xa1 | ||
80 | |||
81 | #define DEFAULT_GAIN 0x0e | ||
82 | #define DEFAULT_RED_GAIN 0x80 | ||
83 | #define DEFAULT_BLUE_GAIN 0x80 | ||
84 | #define DEFAULT_SATURATION 0x00 | ||
85 | #define DEFAULT_EXPOSURE 0x20 | ||
86 | |||
87 | int ov7660_probe(struct sd *sd); | ||
88 | int ov7660_init(struct sd *sd); | ||
89 | int ov7660_start(struct sd *sd); | ||
90 | int ov7660_stop(struct sd *sd); | ||
91 | void ov7660_disconnect(struct sd *sd); | ||
92 | |||
93 | const static struct m5602_sensor ov7660 = { | ||
94 | .name = "ov7660", | ||
95 | .i2c_slave_id = 0x42, | ||
96 | .i2c_regW = 1, | ||
97 | .probe = ov7660_probe, | ||
98 | .init = ov7660_init, | ||
99 | .start = ov7660_start, | ||
100 | .stop = ov7660_stop, | ||
101 | .disconnect = ov7660_disconnect, | ||
102 | }; | ||
103 | |||
104 | static const unsigned char preinit_ov7660[][4] = | ||
105 | { | ||
106 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | ||
107 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | ||
108 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
109 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
110 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
111 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d}, | ||
112 | {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00}, | ||
113 | {BRIDGE, M5602_XB_GPIO_DIR, 0x03}, | ||
114 | {BRIDGE, M5602_XB_GPIO_DIR, 0x03}, | ||
115 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
116 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
117 | |||
118 | {SENSOR, OV7660_OFON, 0x0c}, | ||
119 | {SENSOR, OV7660_COM2, 0x11}, | ||
120 | {SENSOR, OV7660_COM7, 0x05}, | ||
121 | |||
122 | {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, | ||
123 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04}, | ||
124 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
125 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06}, | ||
126 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00}, | ||
127 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08}, | ||
128 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
129 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
130 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
131 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
132 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
133 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05}, | ||
134 | {BRIDGE, M5602_XB_GPIO_DAT, 0x00}, | ||
135 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
136 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00} | ||
137 | }; | ||
138 | |||
139 | static const unsigned char init_ov7660[][4] = | ||
140 | { | ||
141 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | ||
142 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | ||
143 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
144 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
145 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
146 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d}, | ||
147 | {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00}, | ||
148 | {BRIDGE, M5602_XB_GPIO_DIR, 0x03}, | ||
149 | {BRIDGE, M5602_XB_GPIO_DIR, 0x03}, | ||
150 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
151 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
152 | |||
153 | {SENSOR, OV7660_OFON, 0x0c}, | ||
154 | {SENSOR, OV7660_COM2, 0x11}, | ||
155 | {SENSOR, OV7660_COM7, 0x05}, | ||
156 | |||
157 | {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, | ||
158 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04}, | ||
159 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
160 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06}, | ||
161 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00}, | ||
162 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08}, | ||
163 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
164 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
165 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
166 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
167 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
168 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05}, | ||
169 | {BRIDGE, M5602_XB_GPIO_DAT, 0x00}, | ||
170 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
171 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00}, | ||
172 | |||
173 | {SENSOR, OV7660_COM7, 0x80}, | ||
174 | {SENSOR, OV7660_CLKRC, 0x80}, | ||
175 | {SENSOR, OV7660_BLUE_GAIN, 0x80}, | ||
176 | {SENSOR, OV7660_RED_GAIN, 0x80}, | ||
177 | {SENSOR, OV7660_COM9, 0x4c}, | ||
178 | {SENSOR, OV7660_OFON, 0x43}, | ||
179 | {SENSOR, OV7660_COM12, 0x28}, | ||
180 | {SENSOR, OV7660_COM8, 0x00}, | ||
181 | {SENSOR, OV7660_COM10, 0x40}, | ||
182 | {SENSOR, OV7660_HSTART, 0x0c}, | ||
183 | {SENSOR, OV7660_HSTOP, 0x61}, | ||
184 | {SENSOR, OV7660_HREF, 0xa4}, | ||
185 | {SENSOR, OV7660_PSHFT, 0x0b}, | ||
186 | {SENSOR, OV7660_VSTART, 0x01}, | ||
187 | {SENSOR, OV7660_VSTOP, 0x7a}, | ||
188 | {SENSOR, OV7660_VREF, 0x00}, | ||
189 | {SENSOR, OV7660_COM7, 0x05}, | ||
190 | {SENSOR, OV7660_COM6, 0x4b}, | ||
191 | {SENSOR, OV7660_BBIAS, 0x98}, | ||
192 | {SENSOR, OV7660_GbBIAS, 0x98}, | ||
193 | {SENSOR, OV7660_RSVD29, 0x98}, | ||
194 | {SENSOR, OV7660_RBIAS, 0x98}, | ||
195 | {SENSOR, OV7660_COM1, 0x00}, | ||
196 | {SENSOR, OV7660_AECH, 0x00}, | ||
197 | {SENSOR, OV7660_AECHH, 0x00}, | ||
198 | {SENSOR, OV7660_ADC, 0x04}, | ||
199 | {SENSOR, OV7660_COM13, 0x00}, | ||
200 | {SENSOR, OV7660_RSVDA1, 0x23}, | ||
201 | {SENSOR, OV7660_TSLB, 0x0d}, | ||
202 | {SENSOR, OV7660_HV, 0x80}, | ||
203 | {SENSOR, OV7660_LCC1, 0x00}, | ||
204 | {SENSOR, OV7660_LCC2, 0x00}, | ||
205 | {SENSOR, OV7660_LCC3, 0x10}, | ||
206 | {SENSOR, OV7660_LCC4, 0x40}, | ||
207 | {SENSOR, OV7660_LCC5, 0x01}, | ||
208 | |||
209 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06}, | ||
210 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
211 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
212 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
213 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81}, | ||
214 | {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82}, | ||
215 | {BRIDGE, M5602_XB_SIG_INI, 0x01}, | ||
216 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
217 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x08}, | ||
218 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
219 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
220 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x01}, | ||
221 | {BRIDGE, M5602_XB_VSYNC_PARA, 0xec}, | ||
222 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
223 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
224 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
225 | {BRIDGE, M5602_XB_SIG_INI, 0x02}, | ||
226 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x00}, | ||
227 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x27}, | ||
228 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x02}, | ||
229 | {BRIDGE, M5602_XB_HSYNC_PARA, 0xae}, | ||
230 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
231 | |||
232 | {SENSOR, OV7660_BLUE_GAIN, 0x80}, | ||
233 | {SENSOR, OV7660_RED_GAIN, 0x80}, | ||
234 | |||
235 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x02}, | ||
236 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
237 | |||
238 | {SENSOR, OV7660_AECH, DEFAULT_EXPOSURE}, | ||
239 | {SENSOR, OV7660_COM1, 0x00}, | ||
240 | {SENSOR, OV7660_GAIN, DEFAULT_GAIN}, | ||
241 | |||
242 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06}, | ||
243 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
244 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
245 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
246 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81}, | ||
247 | {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82}, | ||
248 | {BRIDGE, M5602_XB_SIG_INI, 0x01}, | ||
249 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
250 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x08}, | ||
251 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
252 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
253 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x01}, | ||
254 | {BRIDGE, M5602_XB_VSYNC_PARA, 0xec}, | ||
255 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
256 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
257 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
258 | {BRIDGE, M5602_XB_SIG_INI, 0x02}, | ||
259 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x00}, | ||
260 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x27}, | ||
261 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x02}, | ||
262 | {BRIDGE, M5602_XB_HSYNC_PARA, 0xae}, | ||
263 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
264 | |||
265 | {SENSOR, OV7660_OFON, 0x0c}, | ||
266 | {SENSOR, OV7660_COM2, 0x11}, | ||
267 | {SENSOR, OV7660_COM7, 0x05}, | ||
268 | |||
269 | {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, | ||
270 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04}, | ||
271 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
272 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06}, | ||
273 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00}, | ||
274 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08}, | ||
275 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
276 | |||
277 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
278 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
279 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
280 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
281 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05}, | ||
282 | {BRIDGE, M5602_XB_GPIO_DAT, 0x00}, | ||
283 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
284 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00}, | ||
285 | |||
286 | {SENSOR, OV7660_COM7, 0x80}, | ||
287 | {SENSOR, OV7660_CLKRC, 0x80}, | ||
288 | {SENSOR, OV7660_BLUE_GAIN, 0x80}, | ||
289 | {SENSOR, OV7660_RED_GAIN, 0x80}, | ||
290 | {SENSOR, OV7660_COM9, 0x4c}, | ||
291 | {SENSOR, OV7660_OFON, 0x43}, | ||
292 | {SENSOR, OV7660_COM12, 0x28}, | ||
293 | {SENSOR, OV7660_COM8, 0x00}, | ||
294 | {SENSOR, OV7660_COM10, 0x40}, | ||
295 | {SENSOR, OV7660_HSTART, 0x0c}, | ||
296 | {SENSOR, OV7660_HSTOP, 0x61}, | ||
297 | {SENSOR, OV7660_HREF, 0xa4}, | ||
298 | {SENSOR, OV7660_PSHFT, 0x0b}, | ||
299 | {SENSOR, OV7660_VSTART, 0x01}, | ||
300 | {SENSOR, OV7660_VSTOP, 0x7a}, | ||
301 | {SENSOR, OV7660_VREF, 0x00}, | ||
302 | {SENSOR, OV7660_COM7, 0x05}, | ||
303 | {SENSOR, OV7660_COM6, 0x4b}, | ||
304 | {SENSOR, OV7660_BBIAS, 0x98}, | ||
305 | {SENSOR, OV7660_GbBIAS, 0x98}, | ||
306 | {SENSOR, OV7660_RSVD29, 0x98}, | ||
307 | {SENSOR, OV7660_RBIAS, 0x98}, | ||
308 | {SENSOR, OV7660_COM1, 0x00}, | ||
309 | {SENSOR, OV7660_AECH, 0x00}, | ||
310 | {SENSOR, OV7660_AECHH, 0x00}, | ||
311 | {SENSOR, OV7660_ADC, 0x04}, | ||
312 | {SENSOR, OV7660_COM13, 0x00}, | ||
313 | {SENSOR, OV7660_RSVDA1, 0x23}, | ||
314 | {SENSOR, OV7660_TSLB, 0x0d}, | ||
315 | {SENSOR, OV7660_HV, 0x80}, | ||
316 | {SENSOR, OV7660_LCC1, 0x00}, | ||
317 | {SENSOR, OV7660_LCC2, 0x00}, | ||
318 | {SENSOR, OV7660_LCC3, 0x10}, | ||
319 | {SENSOR, OV7660_LCC4, 0x40}, | ||
320 | {SENSOR, OV7660_LCC5, 0x01}, | ||
321 | |||
322 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06}, | ||
323 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
324 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, | ||
325 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c}, | ||
326 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81}, | ||
327 | {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82}, | ||
328 | {BRIDGE, M5602_XB_SIG_INI, 0x01}, | ||
329 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
330 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x08}, | ||
331 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
332 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
333 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x01}, | ||
334 | {BRIDGE, M5602_XB_VSYNC_PARA, 0xec}, /* 492 */ | ||
335 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
336 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
337 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
338 | {BRIDGE, M5602_XB_SIG_INI, 0x02}, | ||
339 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00}, | ||
340 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x27}, /* 39 */ | ||
341 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x02}, | ||
342 | {BRIDGE, M5602_XB_VSYNC_PARA, 0xae}, /* 686 */ | ||
343 | {BRIDGE, M5602_XB_SIG_INI, 0x00}, | ||
344 | |||
345 | {SENSOR, OV7660_BLUE_GAIN, 0x80}, | ||
346 | {SENSOR, OV7660_RED_GAIN, 0x80}, | ||
347 | |||
348 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | ||
349 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | ||
350 | |||
351 | {SENSOR, OV7660_AECH, 0x20}, | ||
352 | {SENSOR, OV7660_COM1, 0x00}, | ||
353 | {SENSOR, OV7660_GAIN, DEFAULT_GAIN}, | ||
354 | {SENSOR, OV7660_OFON, 0x0c}, | ||
355 | {SENSOR, OV7660_COM2, 0x11}, | ||
356 | {SENSOR, OV7660_COM7, 0x05}, | ||
357 | |||
358 | {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, | ||
359 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04}, | ||
360 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | ||
361 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06}, | ||
362 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00}, | ||
363 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08}, | ||
364 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0} | ||
365 | }; | ||
366 | |||
367 | #endif | ||