6 * @author Tiago Madeira
12 * @brief Register names, Hex Addresses and common functions for the
13 * Omnivision Image Sensor chips.
15 * @note Copyright (C) Neekhil (OV7660)
17 * @note Copyright (C) Tiago Madeira (OV7670)
19 * @note Copyright (C) Dave Neuer (OV965x)
23 * This program is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2 of the License, or
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
43 /* Register names & Hex Addresses for Omnivision OV7660 Image Sensor. */
45 #define OV7660_CTL_GAIN 0x00
46 #define OV7660_CTL_BLUE 0x01
47 #define OV7660_CTL_RED 0x02
48 #define OV7660_CTL_VREF 0x03
49 #define OV7660_CTL_COM1 0x04
50 #define OV7660_CTL_BAVE 0x05
51 #define OV7660_CTL_GEAVE 0x06
52 #define OV7660_CTL_AECHH 0x07
53 #define OV7660_CTL_RAVE 0x08
54 #define OV7660_CTL_COM2 0x09
55 #define OV7660_CTL_PID 0x0a
56 #define OV7660_CTL_VER 0x0b
57 #define OV7660_CTL_COM3 0x0c
58 #define OV7660_CTL_COM4 0x0d
59 #define OV7660_CTL_COM5 0x0e
60 #define OV7660_CTL_COM6 0x0f
61 #define OV7660_CTL_AECH 0x10
62 #define OV7660_CTL_CLKRC 0x11
63 #define OV7660_CTL_COM7 0x12
64 #define OV7660_CTL_COM8 0x13
65 #define OV7660_CTL_COM9 0x14
66 #define OV7660_CTL_COM10 0x15
67 /* RSVD 0x16 is Reserved */
68 #define OV7660_CTL_HSTART 0x17
69 #define OV7660_CTL_HSTOP 0x18
70 #define OV7660_CTL_VSTRT 0x19
71 #define OV7660_CTL_VSTOP 0x1a
72 #define OV7660_CTL_PSHFT 0x1b
73 #define OV7660_CTL_MIDH 0x1c
74 #define OV7660_CTL_MIDL 0x1d
75 #define OV7660_CTL_MVFP 0x1e
76 #define OV7660_CTL_LAEC 0x1f
77 #define OV7660_CTL_BOS 0x20
78 #define OV7660_CTL_GBOS 0x21
79 #define OV7660_CTL_GROS 0x22
80 #define OV7660_CTL_ROS 0x23
81 #define OV7660_CTL_AEW 0x24
82 #define OV7660_CTL_AEB 0x25
83 #define OV7660_CTL_VPT 0x26
84 #define OV7660_CTL_BBIAS 0x27
85 #define OV7660_CTL_GbBIAS 0x28
86 /* RSVD 0x29 is Reserved */
87 #define OV7660_CTL_EXHCH 0x2a
88 #define OV7660_CTL_EXHCL 0x2b
89 #define OV7660_CTL_RBIAS 0x2c
90 #define OV7660_CTL_ADVFL 0x2d
91 #define OV7660_CTL_ADVFH 0x2e
92 #define OV7660_CTL_YAVE 0x2f
93 #define OV7660_CTL_HSYST 0x30
94 #define OV7660_CTL_HSYEN 0x31
95 #define OV7660_CTL_HREF 0x32
96 #define OV7660_CTL_CHLF 0x33
97 #define OV7660_CTL_ARBLM 0x34
98 /* RSVD 0x35 is Reserved */
99 /* RSVD 0x36 is Reserved */
100 #define OV7660_CTL_ADC 0x37
101 #define OV7660_CTL_ACOM 0x38
102 #define OV7660_CTL_OFON 0x39
103 #define OV7660_CTL_TSLB 0x3a
104 #define OV7660_CTL_COM11 0x3b
105 #define OV7660_CTL_COM12 0x3c
106 #define OV7660_CTL_COM13 0x3d
107 #define OV7660_CTL_COM14 0x3e
108 #define OV7660_CTL_EDGE 0x3f
109 #define OV7660_CTL_COM15 0x40
110 #define OV7660_CTL_COM16 0x41
111 #define OV7660_CTL_COM17 0x42
112 /* RSVD 0x43 is Reserved */
113 /* RSVD 0x44 is Reserved */
114 /* RSVD 0x45 is Reserved */
115 /* RSVD 0x46 is Reserved */
116 /* RSVD 0x47 is Reserved */
117 /* RSVD 0x48 is Reserved */
118 /* RSVD 0x49 is Reserved */
119 /* RSVD 0x4a is Reserved */
120 /* RSVD 0x4b is Reserved */
121 /* RSVD 0x4c is Reserved */
122 /* RSVD 0x4d is Reserved */
123 /* RSVD 0x4e is Reserved */
124 #define OV7660_CTL_MTX1 0x4f
125 #define OV7660_CTL_MTX2 0x50
126 #define OV7660_CTL_MTX3 0x51
127 #define OV7660_CTL_MTX4 0x52
128 #define OV7660_CTL_MTX5 0x53
129 #define OV7660_CTL_MTX6 0x54
130 #define OV7660_CTL_MTX7 0x55
131 #define OV7660_CTL_MTX8 0x56
132 #define OV7660_CTL_MTX9 0x57
133 #define OV7660_CTL_MTXS 0x58
134 /* RSVD 0x59 is Reserved */
135 /* RSVD 0x60 is Reserved */
136 /* RSVD 0x61 is Reserved */
137 #define OV7660_CTL_LCC1 0x62
138 #define OV7660_CTL_LCC2 0x63
139 #define OV7660_CTL_LCC3 0x64
140 #define OV7660_CTL_LCC4 0x65
141 #define OV7660_CTL_LCC5 0x66
142 #define OV7660_CTL_MANU 0x67
143 #define OV7660_CTL_MANV 0x68
144 #define OV7660_CTL_HV 0x69
145 #define OV7660_CTL_GGAIN 0x6a
146 #define OV7660_CTL_DBLV 0x6b
149 /* RSVD 0x8b is Reserved */
150 /* RSVD 0x8c is Reserved */
151 /* RSVD 0x8d is Reserved */
152 /* RSVD 0x8e is Reserved */
153 /* RSVD 0x8f is Reserved */
154 /* RSVD 0x90 is Reserved */
155 /* RSVD 0x91 is Reserved */
156 #define OV7660_CTL_DM_LNL 0x92
157 #define OV7660_CTL_DM_LNH 0x93
158 /* RSVD 0x94 is Reserved */
159 /* RSVD 0x95 is Reserved */
160 /* RSVD 0x96 is Reserved */
161 /* RSVD 0x97 is Reserved */
162 /* RSVD 0x98 is Reserved */
163 /* RSVD 0x99 is Reserved */
164 /* RSVD 0x9a is Reserved */
165 /* RSVD 0x9b is Reserved */
166 /* RSVD 0x9c is Reserved */
167 #define OV7660_CTL_BD50ST 0x9d
168 #define OV7660_CTL_BD60ST 0x9e
169 /* RSVD 0x9f is Reserved */
171 /* RSVD 0xa1 is Reserved */
172 /* RSVD 0xa2 is Reserved */
173 /* RSVD 0xa3 is Reserved */
174 /* RSVD 0xa4 is Reserved */
175 /* RSVD 0xa5 is Reserved */
176 /* All other are factory reserved ! */
178 /* Common functions and data for the Omnivision OV7670 sensor. */
180 #define OV7670_CTL_GAIN 0x00
181 #define OV7670_CTL_BLUE 0x01
182 #define OV7670_CTL_RED 0x02
183 #define OV7670_CTL_VREF 0x03
184 #define OV7670_CTL_COM1 0x04
185 #define OV7670_CTL_BAVE 0x05
186 #define OV7670_CTL_GbAVE 0x06
187 #define OV7670_CTL_AECHH 0x07
188 #define OV7670_CTL_RAVE 0x08
189 #define OV7670_CTL_COM2 0x09
190 #define OV7670_CTL_PID 0x0a
191 #define OV7670_CTL_VER 0x0b
192 #define OV7670_CTL_COM3 0x0c
193 #define OV7670_CTL_COM4 0x0d
194 #define OV7670_CTL_COM5 0x0e
195 #define OV7670_CTL_COM6 0x0f
196 #define OV7670_CTL_AECH 0x10
197 #define OV7670_CTL_CLKRC 0x11
198 #define OV7670_CTL_COM7 0x12
199 #define OV7670_CTL_COM8 0x13
200 #define OV7670_CTL_COM9 0x14
201 #define OV7670_CTL_COM10 0x15
202 #define OV7670_CTL_HSTART 0x17
203 #define OV7670_CTL_HSTOP 0x18
204 #define OV7670_CTL_VSTRT 0x19
205 #define OV7670_CTL_VSTOP 0x1a
206 #define OV7670_CTL_PSHFT 0x1b
207 #define OV7670_CTL_MIDH 0x1c
208 #define OV7670_CTL_MIDL 0x1d
209 #define OV7670_CTL_MVFP 0x1e
210 #define OV7670_VFLIP_BIT 0x10
211 #define OV7670_CTL_LAEC 0x1f
212 #define OV7670_CTL_ADCCTR0 0x20
213 #define OV7670_CTL_ADCCTR1 0x21
214 #define OV7670_CTL_ADCCTR2 0x22
215 #define OV7670_CTL_ADCCTR3 0x23
216 #define OV7670_CTL_AEW 0x24
217 #define OV7670_CTL_AEB 0x25
218 #define OV7670_CTL_VPT 0x26
219 #define OV7670_CTL_BBIAS 0x27
220 #define OV7670_CTL_GbBIAS 0x28
221 #define OV7670_CTL_EXHCH 0x2a
222 #define OV7670_CTL_EXHCL 0x2b
223 #define OV7670_CTL_RBIAS 0x2c
224 #define OV7670_CTL_ADVFL 0x2d
225 #define OV7670_CTL_ADVFH 0x2e
226 #define OV7670_CTL_YAVE 0x2f
227 #define OV7670_CTL_HSYST 0x30
228 #define OV7670_CTL_HSYEN 0x31
229 #define OV7670_CTL_HREF 0x32
230 #define OV7670_CTL_CHLF 0x33
231 #define OV7670_CTL_ARBLM 0x34
232 #define OV7670_CTL_ADC 0x37
233 #define OV7670_CTL_ACOM 0x38
234 #define OV7670_CTL_OFON 0x39
235 #define OV7670_CTL_TSLB 0x3a
236 #define OV7670_CTL_COM11 0x3b
237 #define OV7670_CTL_COM12 0x3c
238 #define OV7670_CTL_COM13 0x3d
239 #define OV7670_CTL_COM14 0x3e
240 #define OV7670_CTL_EDGE 0x3f
241 #define OV7670_CTL_COM15 0x40
242 #define OV7670_CTL_COM16 0x41
243 #define OV7670_CTL_COM17 0x42
244 #define OV7670_CTL_AWBC1 0x43
245 #define OV7670_CTL_AWBC2 0x44
246 #define OV7670_CTL_AWBC3 0x45
247 #define OV7670_CTL_AWBC4 0x46
248 #define OV7670_CTL_AWBC5 0x47
249 #define OV7670_CTL_AWBC6 0x48
250 #define OV7670_CTL_REG4B 0x4b
251 #define OV7670_CTL_DNSTH 0x4c
252 #define OV7670_CTL_MTX1 0x4f
253 #define OV7670_CTL_MTX2 0x50
254 #define OV7670_CTL_MTX3 0x51
255 #define OV7670_CTL_MTX4 0x52
256 #define OV7670_CTL_MTX5 0x53
257 #define OV7670_CTL_MTX6 0x54
258 #define OV7670_CTL_BRIGHT 0x55
259 #define OV7670_CTL_CONTRAS 0x56
260 #define OV7670_CTL_CONTRAS_CENTER 0x57
261 #define OV7670_CTL_MTXS 0x58
262 #define OV7670_CTL_LCC1 0x62
263 #define OV7670_CTL_LCC2 0x63
264 #define OV7670_CTL_LCC3 0x64
265 #define OV7670_CTL_LCC4 0x65
266 #define OV7670_CTL_LCC5 0x66
267 #define OV7670_CTL_MANU 0x67
268 #define OV7670_CTL_MANV 0x68
269 #define OV7670_CTL_GFIX 0x69
270 #define OV7670_CTL_GGAIN 0x6a
271 #define OV7670_CTL_DBLV 0x6b
272 #define OV7670_CTL_AWBCTR3 0x6c
273 #define OV7670_CTL_AWBCTR2 0x6d
274 #define OV7670_CTL_AWBCTR1 0x6e
275 #define OV7670_CTL_AWBCTR0 0x6f
276 #define OV7670_CTL_SCALING_XSC 0x70
277 #define OV7670_CTL_SCALING_YSC 0x71
278 #define OV7670_CTL_SCALING_DCWCTR 0x72
279 #define OV7670_CTL_SCALING_PCLK_DIV 0x73
280 #define OV7670_CTL_REG74 0x74
281 #define OV7670_CTL_REG75 0x75
282 #define OV7670_CTL_REG76 0x76
283 #define OV7670_CTL_REG77 0x77
284 #define OV7670_CTL_SLOP 0x7a
285 #define OV7670_CTL_GAM1 0x7b
286 #define OV7670_CTL_GAM2 0x7c
287 #define OV7670_CTL_GAM3 0x7d
288 #define OV7670_CTL_GAM4 0x7e
289 #define OV7670_CTL_GAM5 0x7f
290 #define OV7670_CTL_GAM6 0x80
291 #define OV7670_CTL_GAM7 0x81
292 #define OV7670_CTL_GAM8 0x82
293 #define OV7670_CTL_GAM9 0x83
294 #define OV7670_CTL_GAM10 0x84
295 #define OV7670_CTL_GAM11 0x85
296 #define OV7670_CTL_GAM12 0x86
297 #define OV7670_CTL_GAM13 0x87
298 #define OV7670_CTL_GAM14 0x88
299 #define OV7670_CTL_GAM15 0x89
300 #define OV7670_CTL_RGB444 0x8c
301 #define OV7670_CTL_DM_LNL 0x92
302 #define OV7670_CTL_DM_LNH 0x93
303 #define OV7670_CTL_LCC6 0x94
304 #define OV7670_CTL_LCC7 0x95
305 #define OV7670_CTL_BD50ST 0x9d
306 #define OV7670_CTL_BD60ST 0x9e
307 #define OV7670_CTL_HAECC1 0x9f
308 #define OV7670_CTL_HAECC2 0xa0
309 #define OV7670_CTL_SCALING_PCLK_DELAY 0xa2
310 #define OV7670_CTL_NT_CTRL 0xa4
311 #define OV7670_CTL_BD50MAX 0xa5
312 #define OV7670_CTL_HAECC3 0xa6
313 #define OV7670_CTL_HAECC4 0xa7
314 #define OV7670_CTL_HAECC5 0xa8
315 #define OV7670_CTL_HAECC6 0xa9
316 #define OV7670_CTL_HAECC7 0xaa
317 #define OV7670_CTL_BD60MAX 0xab
318 #define OV7670_CTL_STR_OPT 0xac
319 #define OV7670_CTL_STR_R 0xad
320 #define OV7670_CTL_STR_G 0xae
321 #define OV7670_CTL_STR_B 0xaf
322 #define OV7670_CTL_ABLC1 0xb1
323 #define OV7670_CTL_THL_ST 0xb3
324 #define OV7670_CTL_THL_DLT 0xb5
325 #define OV7670_CTL_AD_CHB 0xbe
326 #define OV7670_CTL_AH_CHR 0xbf
327 #define OV7670_CTL_AD_CHGb 0xc0
328 #define OV7670_CTL_AD_CHGr 0xc1
329 #define OV7670_CTL_SATCTR 0xc9
331 /* Common functions and data for the Omnivision OV965x sensor series. */
333 #define OV965X_CTL_GAIN 0x00
334 #define OV965X_CTL_BLUE 0x01
335 #define OV965X_CTL_RED 0x02
336 #define OV965X_CTL_VREF 0x03
337 #define OV965X_CTL_COM1 0x04
338 #define OV965X_CTL_BAVE 0x05
339 #define OV965X_CTL_GEAVE 0x06
340 #define OV965X_CTL_RAVE 0x08
341 #define OV965X_CTL_COM2 0x09
342 #define OV965X_CTL_PID 0x0a
343 #define OV965X_CTL_VER 0x0b
344 #define OV965X_CTL_COM3 0x0c
345 #define OV965X_CTL_COM4 0x0d
346 #define OV965X_CTL_COM5 0x0e
347 #define OV965X_CTL_COM6 0x0f
348 #define OV965X_CTL_AECH 0x10
349 #define OV965X_CTL_CLKRC 0x11
350 #define OV965X_CTL_COM7 0x12
351 #define OV965X_CTL_COM8 0x13
352 #define OV965X_CTL_COM9 0x14
353 #define OV965X_CTL_COM10 0x15
354 #define OV965X_CTL_HSTART 0x17
355 #define OV965X_CTL_HSTOP 0x18
356 #define OV965X_CTL_VSTRT 0x19
357 #define OV965X_CTL_VSTOP 0x1a
358 #define OV965X_CTL_PSHIFT 0x1b
359 #define OV965X_CTL_MIDH 0x1c
360 #define OV965X_CTL_MIDL 0x1d
361 #define OV965X_CTL_MVFP 0x1e
362 #define OV965X_CTL_LAEC 0x1f
363 #define OV965X_CTL_BOS 0x20
364 #define OV965X_CTL_GBOS 0x21
365 #define OV965X_CTL_GROS 0x22
366 #define OV965X_CTL_ROS 0x23
367 #define OV965X_CTL_AEW 0x24
368 #define OV965X_CTL_AEB 0x25
369 #define OV965X_CTL_VPT 0x26
370 #define OV965X_CTL_BBIAS 0x27
371 #define OV965X_CTL_GbBIAS 0x28
372 #define OV965X_CTL_Gr_COM 0x29
373 #define OV965X_CTL_EXHCH 0x2a
374 #define OV965X_CTL_EXHCL 0x2b
375 #define OV965X_CTL_RBIAS 0x2c
376 #define OV965X_CTL_ADVFL 0x2d
377 #define OV965X_CTL_ADVFH 0x2e
378 #define OV965X_CTL_YAVE 0x2f
379 #define OV965X_CTL_HSYST 0x30
380 #define OV965X_CTL_HSYEN 0x31
381 #define OV965X_CTL_HREF 0x32
382 #define OV965X_CTL_CHLF 0x33
383 #define OV965X_CTL_ARBLM 0x34
384 #define OV965X_CTL_ADC 0x37
385 #define OV965X_CTL_ACOM 0x38
386 #define OV965X_CTL_OFON 0x39
387 #define OV965X_CTL_TSLB 0x3a
388 #define OV965X_CTL_COM11 0x3b
389 #define OV965X_CTL_COM12 0x3c
390 #define OV965X_CTL_COM13 0x3d
391 #define OV965X_CTL_COM14 0x3e
392 #define OV965X_CTL_EDGE 0x3f
393 #define OV965X_CTL_COM15 0x40
394 #define OV965X_CTL_COM16 0x41
395 #define OV965X_CTL_COM17 0x42
396 #define OV965X_CTL_MTX1 0x4f
397 #define OV965X_CTL_MTX2 0x50
398 #define OV965X_CTL_MTX3 0x51
399 #define OV965X_CTL_MTX4 0x52
400 #define OV965X_CTL_MTX5 0x53
401 #define OV965X_CTL_MTX6 0x54
402 #define OV965X_CTL_MTX7 0x55
403 #define OV965X_CTL_MTX8 0x56
404 #define OV965X_CTL_MTX9 0x57
405 #define OV965X_CTL_LCC1 0x62
406 #define OV965X_CTL_LCC2 0x63
407 #define OV965X_CTL_LCC3 0x64
408 #define OV965X_CTL_LCC4 0x65
409 #define OV965X_CTL_LCC5 0x66
410 #define OV965X_CTL_MANU 0x67
411 #define OV965X_CTL_MANV 0x68
412 #define OV965X_CTL_HV 0x69
413 #define OV965X_CTL_MBD 0x6a
414 #define OV965X_CTL_DBLV 0x6b
415 #define OV965X_CTL_COM21 0x8b
416 #define OV965X_CTL_COM22 0x8c
417 #define OV965X_CTL_COM23 0x8d
418 #define OV965X_CTL_COM24 0x8e
419 #define OV965X_CTL_DBLC1 0x8f
420 #define OV965X_CTL_DBLC_B 0x90
421 #define OV965X_CTL_DBLC_R 0x91
422 #define OV965X_CTL_DM_LNL 0x92
423 #define OV965X_CTL_DM_LNH 0x93
424 #define OV965X_CTL_LCCFB 0x9d
425 #define OV965X_CTL_LCCFR 0x9e
426 #define OV965X_CTL_DBLC_Gb 0x9f
427 #define OV965X_CTL_DBLC_Gr 0xa0
428 #define OV965X_CTL_AECHM 0xa1
429 #define OV965X_CTL_COM25 0xa4 /* all bits reserved */
430 #define OV965X_CTL_COM26 0xa5 /* all bits reserved */
431 #define OV965X_CTL_G_GAIN 0xa6 /* reserved */
432 #define OV965X_CTL_VGA_ST 0xa7 /* reserved */
433 #define OV965X_CTL_ACOM2 0xa8 /* reserved */
435 #define OV965X_COM7_SCCB_RESET 0x80
436 #define OV965X_COM7_OUTPUT_VGA 0x40
437 #define OV965X_COM7_OUTPUT_CIF 0x20
438 #define OV965X_COM7_OUTPUT_QVGA 0x10
439 #define OV965X_COM7_OUTPUT_QCIF 0x08
440 #define OV965X_COM7_OUTPUT_RGB 0x04
441 #define OV965X_COM7_OUTPUT_RAW_RGB 0x05
443 #define OV965X_VREF_ADC_HIGH2(x) ((x) << 6)
444 #define OV965X_VREF_VSTOP_LOW3(x) (0x38 & ((x) << 3))
445 #define OV965X_VREF_VSTART_LOW3(x) (0x07 & (x))
447 #define OV965X_COM2_OUTPUT_DRIVE_CAP_1X 0x00
448 #define OV965X_COM2_OUTPUT_DRIVE_CAP_2X 0x01
449 #define OV965X_COM2_OUTPUT_DRIVE_CAP_3X 0x02
450 #define OV965X_COM2_OUTPUT_DRIVE_CAP_4X 0x03
451 #define OV965X_COM2_SOFT_SLEEP 0x10
453 #define OV965X_COM5_15FPS_48MHZ_RGB 0x80
454 #define OV965X_COM5_SLAM_MODE 0x10
456 #define OV965X_COM6_BLACK_LINE_HREF_ENABLE 0x80
457 #define OV965X_COM6_ADBLC_BIAS_ENABLE 0x08
458 #define OV965X_COM6_ADBLC_OFFSET_2_CHANNEL 0x04 /* else 4-channel */
459 #define OV965X_COM6_TIMING_RESET_ON_FMT_CHANGE 0x02
460 #define OV965X_COM6_ADBLC_ENABLE 0x01
462 #define OV965X_CLKRC_DBL_CLK_ENABLE 0x80
463 #define OV965X_CLKRC_INPUT_CLK_NO_SCALE 0x40
465 #define OV965X_COM8_FAST_AGC_AEC 0x80
466 #define OV965X_COM8_AEC_STEP_SIZE_NOLIMIT 0x40 /* otherwise VSYNC */
467 #define OV965X_COM8_BANDING_FILTER_ON 0x20
468 #define OV965X_COM8_AGC_ENABLE 0x04
469 #define OV965X_COM8_AWB_ENABLE 0x02
470 #define OV965X_COM8_AEC_ENABLE 0x01
472 #define OV965X_COM9_MAX_AGC_128X (0x06 << 4)
473 #define OV965X_COM9_MAX_AGC_64X (0x05 << 4)
474 #define OV965X_COM9_MAX_AGC_32X (0x04 << 4)
475 #define OV965X_COM9_MAX_AGC_16X (0x03 << 4)
476 #define OV965X_COM9_MAX_AGC_8X (0x02 << 4)
477 #define OV965X_COM9_MAX_AGC_4X (0x01 << 4)
478 #define OV965X_COM9_RELAX_EXPOSURE_TIMING 0x08
479 #define OV965X_COM9_DROP_VSYNC_ON_FRAME_DROP 0x04
480 #define OV965X_COM9_DROP_FRAME_ON_BIG_AEC 0x02
481 #define OV965X_COM9_FREEZE_AGC_AEC 0x01
483 #define OV965X_MVFP_MIRROR 0x20
484 #define OV965X_MVFP_VFLIP 0x10
486 #define OV965X_Gr_COM_BYPASS_ANALOG_BLC 0x20
487 #define OV965X_Gr_COM_BYPASS_REGULATOR 0x10
489 #define OV965X_BIAS_SUBTRACT 0x80
490 #define OV965X_BIAS_VALUE(x) ((~0x80) & (x))
492 #define OV965X_HREF_EDGE_OFT_TO_DATA_OUT(x) ((x) << 6)
493 #define OV965X_HREF_HSTOP_LOW3(x) ((~0xc0) & ((x) << 3))
494 #define OV965X_HREF_HSTART_LOW3(x) ((~0xf8) & (x))
496 #define OV965X_TSLB_BITWISE_REVERSE 0x20
497 #define OV965X_TSLB_FIXED_UV_OUTPUT 0x10
498 #define OV965X_TSLB_OUTPUT_SEQ_YUYV 0x00
499 #define OV965X_TSLB_OUTPUT_SEQ_YVYU 0x04
500 #define OV965X_TSLB_OUTPUT_SEQ_VYUY 0x08
501 #define OV965X_TSLB_OUTPUT_SEQ_UYVY 0x0c
502 #define OV965X_TSLB_DIGITAL_BLC_ENABLE 0x01
504 #define OV965X_COM11_NIGHT_MODE_ENABLE 0x80
505 #define OV965X_COM11_NM_NORMAL_FRAME_RATE 0x00
506 #define OV965X_COM11_NM_HALF_FRAME_RATE 0x20
507 #define OV965X_COM11_NM_QUARTER_FRAME_RATE 0x40
508 #define OV965X_COM11_NM_EIGHTH_FRAME_RATE 0x60
509 #define OV965X_COM11_FULL_FRAME_CALC_WIND 0x00
510 #define OV965X_COM11_HALF_FRAME_CALC_WIND 0x08
511 #define OV965X_COM11_QUARTER_FRAME_CALC_WIND 0x10
512 #define OV965X_COM11_MANUAL_BANDING_FILTER 0x01
514 #define OV965X_COM13_ONLY_Y_CHANNEL_GAMMA 0x40
515 #define OV965X_COM13_GAMMA_RAW_PRE_INTERP 0x80
516 #define OV965X_COM13_ENABLE_COLOR_MATRIX 0x10
517 #define OV965X_COM13_DELAY_UV_CHANNEL 0x00
518 #define OV965X_COM13_DELAY_Y_CHANNEL 0x08
519 #define OV965X_COM13_OUTPUT_DELAY(x) ((~0xf8) & (x))
521 #define OV965X_COM14_YUV_EDGE_ENHANCE 0x02
522 #define OV965X_COM14_EDGE_ENHANCE_FACTOR_DBL 0x01
524 #define OV965X_EDGE_EDGE_ENHANCE_LOW4(x) ((x) << 4)
525 #define OV965X_EDGE_EDGE_ENHANCE_FACTOR(x) (0xf0 & (x))
527 #define OV965X_COM15_OUTPUT_RANGE_10_TO_F0 0x00
528 #define OV965X_COM15_OUTPUT_RANGE_O1_TO_FE 0x80
529 #define OV965X_COM15_OUTPUT_RANGE_O0_TO_FF 0xc0
530 #define OV965X_COM15_OUTPUT_RGB_565 0x10
531 #define OV965X_COM15_OUTPUT_RGB_555 0x30
532 #define OV965X_COM15_SWAP_R_AND_B 0x08
534 int ov7660_set_exposure(struct usb_microdia
*);
535 int ov7660_sleep(struct usb_microdia
*dev
);
536 int ov7660_wakeup(struct usb_microdia
*dev
);
537 int ov7660_reset(struct usb_microdia
*dev
);
539 int ov7670_auto_flip(struct usb_microdia
*, __u8
);
540 int ov7670_flip_detect(struct usb_microdia
*dev
);
542 int soi968_set_exposure(struct usb_microdia
*dev
);
543 int soi968_button_detect(struct usb_microdia
*dev
);
545 int ov965x_set_hvflip(struct usb_microdia
*);
546 int ov965x_set_exposure(struct usb_microdia
*);
547 int ov965x_flip_detect(struct usb_microdia
*dev
);
548 int ov965x_get_yavg(struct usb_microdia
*dev
);
550 int ov_initialize(struct usb_microdia
*dev
);
551 int ov_set_autogain(struct usb_microdia
*dev
);
552 int ov_set_autoexposure(struct usb_microdia
*dev
);