5 * System Control Registers
7 #define OV3640_AGC_H 0x3000
8 #define OV3640_AGC_L 0x3001
9 #define OV3640_AEC_H 0x3002
10 #define OV3640_AEC_L 0x3003
11 #define OV3640_AECL 0x3004
12 #define OV3640_RED 0x3005
13 #define OV3640_GREEN 0x3006
14 #define OV3640_BLUE 0x3007
15 #define OV3640_PIDH 0x300A
16 #define OV3640_PIDL 0x300B
17 #define OV3640_SCCB_ID 0x300C
18 #define OV3640_PCLK 0x300D
19 #define OV3640_PCLK_HREFQUAL_OUT (1 << 5)
20 #define OV3640_PCLK_REVERSE (1 << 4)
21 #define OV3640_PCLK_DIVBY4 (1 << 1)
22 #define OV3640_PCLK_DIVBY2 1
24 #define OV3640_PLL_1 0x300E
25 #define OV3640_PLL_1_RXPLL_MASK 0x3F
27 #define OV3640_PLL_2 0x300F
28 #define OV3640_PLL_2_FREQDIV_MASK (0x3 << 6)
29 #define OV3640_PLL_2_FREQDIV_1 (0x0 << 6)
30 #define OV3640_PLL_2_FREQDIV_1_5 (0x1 << 6)
31 #define OV3640_PLL_2_FREQDIV_2 (0x2 << 6)
32 #define OV3640_PLL_2_FREQDIV_3 (0x3 << 6)
34 #define OV3640_PLL_2_BIT8DIV_MASK (0x3 << 4)
35 #define OV3640_PLL_2_BIT8DIV_1 (0x0 << 4)
36 #define OV3640_PLL_2_BIT8DIV_1_2 (0x1 << 4)
37 #define OV3640_PLL_2_BIT8DIV_4 (0x2 << 4)
38 #define OV3640_PLL_2_BIT8DIV_5 (0x3 << 4)
39 #define OV3640_PLL_2_BYPASS (1 << 3)
41 #define OV3640_PLL_2_INDIV_MASK 0x3
42 #define OV3640_PLL_2_INDIV_1 0x0
43 #define OV3640_PLL_2_INDIV_1_5 0x1
44 #define OV3640_PLL_2_INDIV_2 0x2
45 #define OV3640_PLL_2_INDIV_3 0x3
47 #define OV3640_PLL_3 0x3010
48 #define OV3640_PLL_3_DVPDIV_MASK (0x3 << 6)
49 #define OV3640_PLL_3_DVPDIV_1 (0x0 << 6)
50 #define OV3640_PLL_3_DVPDIV_2 (0x1 << 6)
51 #define OV3640_PLL_3_DVPDIV_8 (0x2 << 6)
52 #define OV3640_PLL_3_DVPDIV_16 (0x3 << 6)
54 #define OV3640_PLL_3_LANEDIV2LANES (1 << 5)
55 #define OV3640_PLL_3_SENSORDIV2 (1 << 4)
57 #define OV3640_PLL_3_SCALEDIV_MASK 0xF
59 #define OV3640_CLK 0x3011
60 #define OV3640_CLK_DFREQDBL (1 << 7)
61 #define OV3640_CLK_SLAVEMODE (1 << 6)
62 #define OV3640_CLK_DIV_MASK 0x3F
64 #define OV3640_SYS 0x3012
65 #define OV3640_SYS_SRST (1 << 7)
66 #define OV3640_SYS_BASERES_MASK (0x7 << 4)
67 #define OV3640_SYS_BASERES_QXGA (0x0 << 4)
68 #define OV3640_SYS_BASERES_XGA (0x1 << 4)
69 #define OV3640_SYS_BASERES_SXGA (0x7 << 4)
71 #define OV3640_AUTO_1 0x3013
72 #define OV3640_AUTO_1_FASTAEC (1 << 7)
73 #define OV3640_AUTO_1_AECBIGSTEPS (1 << 6)
74 #define OV3640_AUTO_1_BANDINGFILTEREN (1 << 5)
75 #define OV3640_AUTO_1_AUTOBANDINGFILTER (1 << 4)
76 #define OV3640_AUTO_1_EXTRBRIGHTEXPEN (1 << 3)
77 #define OV3640_AUTO_1_AGCEN (1 << 2)
78 #define OV3640_AUTO_1_AECEN 1
80 #define OV3640_AUTO_2 0x3014
81 #define OV3640_AUTO_2_MANBANDING50 (1 << 7)
82 #define OV3640_AUTO_2_AUTOBANDINGDETEN (1 << 6)
83 #define OV3640_AUTO_2_AGCADDLT1F (1 << 5)
84 #define OV3640_AUTO_2_FREEZEAECAGC (1 << 4)
85 #define OV3640_AUTO_2_NIGHTMODEEN (1 << 3)
86 #define OV3640_AUTO_2_BANDINGSMOOTHSW (1 << 2)
87 #define OV3640_AUTO_2_MANEXTRBRIGHTEXPEN (1 << 1)
88 #define OV3640_AUTO_2_BANDINGFILTEREN 1
90 #define OV3640_AUTO_3 0x3015
91 #define OV3640_AUTO_3_DUMMYFC_MASK (0x7 << 4)
92 #define OV3640_AUTO_3_DUMMYFC_NONE (0x0 << 4)
93 #define OV3640_AUTO_3_DUMMYFC_1FRAME (0x1 << 4)
94 #define OV3640_AUTO_3_DUMMYFC_2FRAME (0x2 << 4)
95 #define OV3640_AUTO_3_DUMMYFC_3FRAME (0x3 << 4)
96 #define OV3640_AUTO_3_DUMMYFC_7FRAME (0x7 << 4)
98 #define OV3640_AUTO_3_AGCGAINCEIL_MASK 0x7
99 #define OV3640_AUTO_3_AGCGAINCEIL_2X 0x0
100 #define OV3640_AUTO_3_AGCGAINCEIL_4X 0x1
101 #define OV3640_AUTO_3_AGCGAINCEIL_8X 0x2
102 #define OV3640_AUTO_3_AGCGAINCEIL_16X 0x3
103 #define OV3640_AUTO_3_AGCGAINCEIL_32X 0x4
104 #define OV3640_AUTO_3_AGCGAINCEIL_64X 0x5
105 #define OV3640_AUTO_3_AGCGAINCEIL_128X 0x6
106 #define OV3640_AUTO_3_AGCGAINCEIL_128X_2 0x7
108 #define OV3640_AUTO_5 0x3017
109 #define OV3640_AUTO_5_MANBANDINGCNT_MASK 0x3F
111 #define OV3640_WPT_HISH 0x3018
112 #define OV3640_BPT_HISL 0x3019
113 #define OV3640_VPT 0x301A
114 #define OV3640_YAVG 0x301B
115 #define OV3640_AECG_MAX50 0x301C
116 #define OV3640_AECG_MAX60 0x301D
117 #define OV3640_RZM_H 0x301E
118 #define OV3640_RZM_L 0x301F
120 #define OV3640_HS_H 0x3020
121 #define OV3640_HS_L 0x3021
122 #define OV3640_VS_H 0x3022
123 #define OV3640_VS_L 0x3023
124 #define OV3640_HW_H 0x3024
125 #define OV3640_HW_L 0x3025
126 #define OV3640_VH_H 0x3026
127 #define OV3640_VH_L 0x3027
128 #define OV3640_HTS_H 0x3028
129 #define OV3640_HTS_L 0x3029
130 #define OV3640_VTS_H 0x302A
131 #define OV3640_VTS_L 0x302B
132 #define OV3640_EXHTS 0x302C
133 #define OV3640_EXVTS_H 0x302D
134 #define OV3640_EXVTS_L 0x302E
136 #define OV3640_WEIGHT0 0x3030
137 #define OV3640_WEIGHT1 0x3031
138 #define OV3640_WEIGHT2 0x3032
139 #define OV3640_WEIGHT3 0x3033
140 #define OV3640_WEIGHT4 0x3034
141 #define OV3640_WEIGHT5 0x3035
142 #define OV3640_WEIGHT6 0x3036
143 #define OV3640_WEIGHT7 0x3037
144 #define OV3640_AHS_H 0x3038
145 #define OV3640_AHS_L 0x3039
146 #define OV3640_AVS_H 0x303A
147 #define OV3640_AVS_L 0x303B
148 #define OV3640_AHW_H 0x303C
149 #define OV3640_AHW_L 0x303D
150 #define OV3640_AVH_H 0x303E
151 #define OV3640_AVH_L 0x303F
153 #define OV3640_HISTO0 0x3040
154 #define OV3640_HISTO1 0x3041
155 #define OV3640_HISTO2 0x3042
156 #define OV3640_HISTO3 0x3043
157 #define OV3640_HISTO4 0x3044
158 #define OV3640_HISTO5 0x3045
159 #define OV3640_HISTO6 0x3046
160 #define OV3640_HISTO7 0x3047
161 #define OV3640_D56C1 0x3048
163 #define OV3640_BLC9 0x3069
165 #define OV3640_BD50_H 0x3070
166 #define OV3640_BD50_L 0x3071
167 #define OV3640_BD60_H 0x3072
168 #define OV3640_BD60_L 0x3073
169 #define OV3640_VSYNCOPT 0x3075
170 #define OV3640_TMC1 0x3077
171 #define OV3640_TMC1_CHSYNCSWAP (1 << 7)
172 #define OV3640_TMC1_HREFSWAP (1 << 6)
173 #define OV3640_TMC1_HREFPOL_NEG (1 << 3)
174 #define OV3640_TMC1_VSYNCPOL_NEG (1 << 1)
175 #define OV3640_TMC1_HSYNCPOL_NEG 1
177 #define OV3640_TMC2 0x3078
178 #define OV3640_TMC2_VSYNCDROP (1 << 1)
179 #define OV3640_TMC2_FRAMEDATADROP 1
181 #define OV3640_TMC3 0x3079
182 #define OV3640_TMC3_VSLATCH (1 << 7)
184 #define OV3640_TMC4 0x307A
185 #define OV3640_TMC5 0x307B
186 #define OV3640_TMC5_AWB_GAINWRITE_DIS (1 << 7)
187 #define OV3640_TMC5_DCOLORBAREN (1 << 3)
188 #define OV3640_TMC5_DCOLORBARPAT_MASK 0x7
190 #define OV3640_TMC6 0x307C
191 #define OV3640_TMC6_DGAINEN (1 << 5)
192 #define OV3640_TMC6_HMIRROR (1 << 1)
193 #define OV3640_TMC6_VFLIP (1 << 0)
195 #define OV3640_TMC7 0x307D
196 #define OV3640_TMC7_COLORBARTESTPATEN (1 << 7)
197 #define OV3640_TMC7_AVGHIST_SENSOR (1 << 5)
199 #define OV3640_TMC8 0x307E
201 #define OV3640_TMCA 0x3080
202 #define OV3640_TMCB 0x3081
203 #define OV3640_TMCB_MIRROROPTEN (1 << 7)
204 #define OV3640_TMCB_OTPFASTMEMCLK (1 << 6)
205 #define OV3640_TMCB_SWAPBYTESOUT 1
207 #define OV3640_TMCF 0x3085
208 #define OV3640_TMC10 0x3086
209 #define OV3640_TMC10_SYSRST (1 << 3)
210 #define OV3640_TMC10_REGSLEEPOPT (1 << 2)
211 #define OV3640_TMC10_SLEEPOPT (1 << 1)
212 #define OV3640_TMC10_SLEEPEN 1
214 #define OV3640_TMC11 0x3087
215 #define OV3640_ISP_XOUT_H 0x3088
216 #define OV3640_ISP_XOUT_L 0x3089
217 #define OV3640_ISP_YOUT_H 0x308A
218 #define OV3640_ISP_YOUT_L 0x308B
219 #define OV3640_TMC13 0x308D
220 #define OV3640_5060 0x308E
221 #define OV3640_OTP 0x308F
223 #define OV3640_IO_CTRL0 0x30B0
224 #define OV3640_IO_CTRL1 0x30B1
225 #define OV3640_IO_CTRL2 0x30B2
226 #define OV3640_DVP0 0x30B4
227 #define OV3640_DVP1 0x30B5
228 #define OV3640_DVP2 0x30B6
229 #define OV3640_DVP3 0x30B7
230 #define OV3640_DSPC0 0x30B8
231 #define OV3640_DSPC1 0x30B9
232 #define OV3640_DSPC2 0x30BA
233 #define OV3640_DSPC3 0x30BB
234 #define OV3640_DSPC7 0x30BF
236 * END - System Control Registers
242 #define OV3640_SC_CTRL0 0x3100
243 #define OV3640_SC_CTRL2 0x3102
244 #define OV3640_SC_SYN_CTRL0 0x3104
245 #define OV3640_SC_SYN_CTRL1 0x3105
246 #define OV3640_SC_SYN_CTRL2 0x3106
247 #define OV3640_SC_SYN_CTRL3 0x3107
255 #define OV3640_CIF_CTRL0 0x3200
256 #define OV3640_CIF_CTRL4 0x3204
258 * END - CIF Registers
264 #define OV3640_DSP_CTRL_0 0x3300
265 #define OV3640_DSP_CTRL_1 0x3301
266 #define OV3640_DSP_CTRL_2 0x3302
267 #define OV3640_DSP_CTRL_4 0x3304
268 #define OV3640_AWB_CTRL_3 0x3308
270 #define OV3640_YST1 0x331B
271 #define OV3640_YST2 0x331C
272 #define OV3640_YST3 0x331D
273 #define OV3640_YST4 0x331E
274 #define OV3640_YST5 0x331F
276 #define OV3640_YST6 0x3320
277 #define OV3640_YST7 0x3321
278 #define OV3640_YST8 0x3322
279 #define OV3640_YST9 0x3323
280 #define OV3640_YST10 0x3324
281 #define OV3640_YST11 0x3325
282 #define OV3640_YST12 0x3326
283 #define OV3640_YST13 0x3327
284 #define OV3640_YST14 0x3328
285 #define OV3640_YST15 0x3329
286 #define OV3640_YSLP15 0x332A
287 #define OV3640_MISC_CTRL 0x332B
288 #define OV3640_DNS_TH 0x332C
289 #define OV3640_Y_EDGE_MT 0x332D
290 #define OV3640_Y_EDGE_TH_TM 0x332E
291 #define OV3640_BASE1 0x332F
293 #define OV3640_BASE2 0x3330
294 #define OV3640_OFFSET 0x3331
295 #define OV3640_CMXSIGN_MISC 0x333F
297 #define OV3640_CMX_1 0x3340
298 #define OV3640_CMX_2 0x3341
299 #define OV3640_CMX_3 0x3342
300 #define OV3640_CMX_4 0x3343
301 #define OV3640_CMX_5 0x3344
302 #define OV3640_CMX_6 0x3345
303 #define OV3640_CMX_7 0x3346
304 #define OV3640_CMX_8 0x3347
305 #define OV3640_CMX_9 0x3348
306 #define OV3640_CMXSIGN 0x3349
308 #define OV3640_SGNSET 0x3354
309 #define OV3640_SDE_CTRL 0x3355
310 #define OV3640_HUE_COS 0x3356
311 #define OV3640_HUE_SIN 0x3357
312 #define OV3640_SAT_U 0x3358
313 #define OV3640_SAT_V 0x3359
314 #define OV3640_UREG 0x335A
315 #define OV3640_VREG 0x335B
316 #define OV3640_YOFFSET 0x335C
317 #define OV3640_YGAIN 0x335D
318 #define OV3640_YBRIGHT 0x335E
319 #define OV3640_SIZE_IN_MISC 0x335F
321 #define OV3640_HSIZE_IN_L 0x3360
322 #define OV3640_VSIZE_IN_L 0x3361
323 #define OV3640_SIZE_OUT_MISC 0x3362
324 #define OV3640_HSIZE_OUT_L 0x3363
325 #define OV3640_VSIZE_OUT_L 0x3364
327 #define OV3640_R_XY0 0x3367
328 #define OV3640_R_X0 0x3368
329 #define OV3640_R_Y0 0x3369
330 #define OV3640_R_A1 0x336A
331 #define OV3640_R_A2_B2 0x336B
332 #define OV3640_R_B1 0x336C
333 #define OV3640_G_XY0 0x336D
334 #define OV3640_G_X0 0x336E
335 #define OV3640_G_Y0 0x336F
337 #define OV3640_G_A1 0x3370
338 #define OV3640_G_A2_B2 0x3371
339 #define OV3640_G_B1 0x3372
340 #define OV3640_B_XY0 0x3373
341 #define OV3640_B_X0 0x3374
342 #define OV3640_B_Y0 0x3375
343 #define OV3640_B_A1 0x3376
344 #define OV3640_B_A2_B2 0x3377
345 #define OV3640_B_B1 0x3378
347 #define OV3640_MISC_DCW_SIZE 0x33A4
348 #define OV3640_DCW_OH 0x33A5
349 #define OV3640_DCW_OV 0x33A6
350 #define OV3640_R_GAIN_M 0x33A7
351 #define OV3640_G_GAIN_M 0x33A8
352 #define OV3640_B_GAIN_M 0x33A9
353 #define OV3640_OVLY_MISC1 0x33AA
354 #define OV3640_OVLY_LEFT 0x33AB
355 #define OV3640_OVLY_TOP 0x33AC
356 #define OV3640_OVLY_MISC2 0x33AD
357 #define OV3640_OVLY_RIGHT 0x33AE
358 #define OV3640_OVLY_BOTTEM 0x33AF
360 #define OV3640_OVLY_MISC3 0x33B0
361 #define OV3640_OVLY_EXT_WIDTH_H 0x33B1
362 #define OV3640_OVLY_EXT_WIDTH_L 0x33B2
363 #define OV3640_OVLY_Y 0x33B3
364 #define OV3640_OVLY_U 0x33B4
365 #define OV3640_OVLY_V 0x33B5
367 * END - DSP Registers
373 #define OV3640_FMT_MUX_CTRL0 0x3400
374 #define OV3640_ISP_PAD_CTR2 0x3403
375 #define OV3640_FMT_CTRL00 0x3404
376 #define OV3640_FMT_CTRL00_UV_sel_SHIFT 7
377 #define OV3640_FMT_CTRL00_UV_sel_MASK (0x1 << \
378 OV3640_FMT_CTRL00_UV_sel_SHIFT)
379 #define OV3640_FMT_CTRL00_UV_sel_USE_UV_avg_Y (0x0 << \
380 OV3640_FMT_CTRL00_UV_sel_SHIFT)
381 #define OV3640_FMT_CTRL00_UV_sel_USE_U0Y0_V0Y1 (0x1 << \
382 OV3640_FMT_CTRL00_UV_sel_SHIFT)
384 #define OV3640_FMT_CTRL00_YUV422_in_SHIFT 6
385 #define OV3640_FMT_CTRL00_YUV422_in_MASK (0x1 << \
386 OV3640_FMT_CTRL00_YUV422_in_SHIFT)
387 #define OV3640_FMT_CTRL00_YUV422_in_DISABLE (0x0 << \
388 OV3640_FMT_CTRL00_YUV422_in_SHIFT)
389 #define OV3640_FMT_CTRL00_YUV422_in_ENABLE (0x1 << \
390 OV3640_FMT_CTRL00_YUV422_in_SHIFT)
392 #define OV3640_FMT_CTRL00_FMT_SHIFT 0
393 #define OV3640_FMT_CTRL00_FMT_MASK (0x3F << \
394 OV3640_FMT_CTRL00_FMT_SHIFT)
395 #define OV3640_DITHER_CTRL0 0x3405
397 * END - FMT MUX Registers
403 #define OV3640_OUT_CTRL00 0x3600
404 #define OV3640_OUT_CTRL00_VSYNCSEL2 (1 << 7)
405 #define OV3640_OUT_CTRL00_VSYNCGATE (1 << 6)
406 #define OV3640_OUT_CTRL00_PCLKPOL_NEG (1 << 4)
407 #define OV3640_OUT_CTRL00_HREFPOL_NEG (1 << 3)
408 #define OV3640_OUT_CTRL00_VSYNCPOL_NEG (1 << 2)
409 #define OV3640_OUT_CTRL00_VSYNCSEL (1 << 1)
410 #define OV3640_OUT_CTRL00_DVPOUTDATAORDERINV 1
412 #define OV3640_OUT_CTRL01 0x3601
413 #define OV3640_OUT_CTRL01_PCLKGATEEN (1 << 7)
414 #define OV3640_OUT_CTRL01_CCIR656EN (1 << 4)
415 #define OV3640_OUT_CTRL01_MIPIBIT8 1
417 #define OV3640_MIPI_CTRL02 0x3602
418 #define OV3640_MIPI_CTRL02_DVPDISABLE (1 << 4)
419 #define OV3640_MIPI_CTRL02_MIPILINESYNCEN (1 << 2)
420 #define OV3640_MIPI_CTRL02_MIPIGATESCEN (1 << 1)
422 #define OV3640_MIPI_CTRL03 0x3603
423 #define OV3640_MIPI_CTRL03_ECC_PHBYTEORDER (1 << 2)
424 #define OV3640_MIPI_CTRL03_ECC_PHBITORDER (1 << 1)
426 #define OV3640_OUT_CTRL08 0x3608
427 #define OV3640_OUT_CTRL08_HREF_DLY_SHIFT 4
428 #define OV3640_OUT_CTRL08_HREF_DLY_MASK (0xF << \
429 OV3640_OUT_CTRL08_HREF_DLY_SHIFT)
432 #define OV3640_OUT_CTRL09 0x3609
433 #define OV3640_OUT_CTRL0A 0x360A
434 #define OV3640_OUT_CTRL0B 0x360B
435 #define OV3640_MIPI_CTRL0C 0x360C
436 #define OV3640_MIPI_CTRL0C_VIRTUALCH_ID_MASK (0x3 << 6)
438 #define OV3640_OUT_CTRL0D 0x360D
439 #define OV3640_MIPI_CTRL0E 0x360E
440 #define OV3640_MIPI_CTRL0E_WKUPDELAY_MASK 0x3F
443 #define OV3640_MIPI_CTRL10 0x3610
444 #define OV3640_MIPI_CTRL10_WIDTH_MAN_L_MASK 0xFF
446 #define OV3640_MIPI_CTRL11 0x3611
447 #define OV3640_MIPI_CTRL11_WIDTH_MAN_H_MASK (0x7 << 5)
449 #define OV3640_CLIP_MIN 0x3614
450 #define OV3640_CLIP_MAX 0x3615
451 #define OV3640_OUT_CTRL16 0x3616
452 #define OV3640_OUT_CTRL1D 0x361D
453 #define OV3640_OUT_CTRL1E 0x361E
454 #define OV3640_MIPI_CTRL1F 0x361F
455 #define OV3640_MIPI_CTRL1F_PCLK_PERIOD_MASK 0xFF
457 #define OV3640_MIPI_CTRL22 0x3622
458 #define OV3640_MIPI_CTRL22_MIN_HS_ZERO_NUI_SHIFT 2
459 #define OV3640_MIPI_CTRL22_MIN_HS_ZERO_NUI_MASK (0x3F << \
460 OV3640_MIPI_CTRL22_MIN_HS_ZERO_NUI_SHIFT)
461 #define OV3640_MIPI_CTRL22_MIN_HS_ZERO_H_MASK 0x3
463 #define OV3640_MIPI_CTRL23 0x3623
464 #define OV3640_MIPI_CTRL23_MIN_HS_ZERO_L_MASK 0xFF
466 #define OV3640_MIPI_CTRL24 0x3624
467 #define OV3640_MIPI_CTRL24_MIN_HS_TRAIL_NUI_SHIFT 2
468 #define OV3640_MIPI_CTRL24_MIN_HS_TRAIL_NUI_MASK (0x3F << \
469 OV3640_MIPI_CTRL24_MIN_HS_TRAIL_NUI_SHIFT)
470 #define OV3640_MIPI_CTRL24_MIN_HS_TRAIL_H_MASK 0x3
472 #define OV3640_MIPI_CTRL25 0x3625
473 #define OV3640_MIPI_CTRL25_MIN_HS_TRAIL_L_MASK 0xFF
475 #define OV3640_MIPI_CTRL26 0x3626
476 #define OV3640_MIPI_CTRL26_MIN_CLK_ZERO_NUI_SHIFT 2
477 #define OV3640_MIPI_CTRL26_MIN_CLK_ZERO_NUI_MASK (0x3F << \
478 OV3640_MIPI_CTRL26_MIN_CLK_ZERO_NUI_SHIFT)
479 #define OV3640_MIPI_CTRL26_MIN_CLK_ZERO_H_MASK 0x3
481 #define OV3640_MIPI_CTRL27 0x3627
482 #define OV3640_MIPI_CTRL27_MIN_CLK_ZERO_L_MASK 0xFF
484 #define OV3640_MIPI_CTRL28 0x3628
485 #define OV3640_MIPI_CTRL28_MIN_CLK_PREPARE_NUI_SHIFT 2
486 #define OV3640_MIPI_CTRL28_MIN_CLK_PREPARE_NUI_MASK (0x3F << \
487 OV3640_MIPI_CTRL28_MIN_CLK_PREPARE_NUI_SHIFT)
488 #define OV3640_MIPI_CTRL28_MIN_CLK_PREPARE_H_MASK 0x3
490 #define OV3640_MIPI_CTRL29 0x3629
491 #define OV3640_MIPI_CTRL29_MIN_CLK_PREPARE_L_MASK 0xFF
493 #define OV3640_MIPI_CTRL2A 0x362A
494 #define OV3640_MIPI_CTRL2A_MAX_CLK_PREPARE_NUI_SHIFT 2
495 #define OV3640_MIPI_CTRL2A_MAX_CLK_PREPARE_NUI_MASK (0x3F << \
496 OV3640_MIPI_CTRL2A_MAX_CLK_PREPARE_NUI_SHIFT)
497 #define OV3640_MIPI_CTRL2A_MAX_CLK_PREPARE_H_MASK 0x3
499 #define OV3640_MIPI_CTRL2B 0x362B
500 #define OV3640_MIPI_CTRL2B_MAX_CLK_PREPARE_L_MASK 0xFF
502 #define OV3640_MIPI_CTRL2C 0x362C
503 #define OV3640_MIPI_CTRL2C_MIN_CLK_POST_NUI_SHIFT 2
504 #define OV3640_MIPI_CTRL2C_MIN_CLK_POST_NUI_MASK (0x3F << \
505 OV3640_MIPI_CTRL2C_MIN_CLK_POST_NUI_SHIFT)
506 #define OV3640_MIPI_CTRL2C_MIN_CLK_POST_H_MASK 0x3
508 #define OV3640_MIPI_CTRL2D 0x362D
509 #define OV3640_MIPI_CTRL2D_MIN_CLK_POST_L_MASK 0xFF
511 #define OV3640_MIPI_CTRL2E 0x362E
512 #define OV3640_MIPI_CTRL2E_MIN_CLK_TRAIL_NUI_SHIFT 2
513 #define OV3640_MIPI_CTRL2E_MIN_CLK_TRAIL_NUI_MASK (0x3F << \
514 OV3640_MIPI_CTRL2E_MIN_CLK_TRAIL_NUI_SHIFT)
515 #define OV3640_MIPI_CTRL2E_MIN_CLK_TRAIL_H_MASK 0x3
517 #define OV3640_MIPI_CTRL2F 0x362F
518 #define OV3640_MIPI_CTRL2F_MIN_CLK_TRAIL_L_MASK 0xFF
520 #define OV3640_MIPI_CTRL30 0x3630
521 #define OV3640_MIPI_CTRL30_MIN_LPX_P_NUI_SHIFT 2
522 #define OV3640_MIPI_CTRL30_MIN_LPX_P_NUI_MASK (0x3F << \
523 OV3640_MIPI_CTRL30_MIN_LPX_P_NUI_SHIFT)
524 #define OV3640_MIPI_CTRL30_MIN_LPX_P_H_MASK 0x3
526 #define OV3640_MIPI_CTRL31 0x3631
527 #define OV3640_MIPI_CTRL31_MIN_LPX_P_L_MASK 0xFF
529 #define OV3640_MIPI_CTRL32 0x3632
530 #define OV3640_MIPI_CTRL32_MIN_HS_PREPARE_NUI_SHIFT 2
531 #define OV3640_MIPI_CTRL32_MIN_HS_PREPARE_NUI_MASK (0x3F << \
532 OV3640_MIPI_CTRL32_MIN_HS_PREPARE_NUI_SHIFT)
533 #define OV3640_MIPI_CTRL32_MIN_HS_PREPARE_H_MASK 0x3
535 #define OV3640_MIPI_CTRL33 0x3633
536 #define OV3640_MIPI_CTRL33_MIN_HS_PREPARE_L_MASK 0xFF
538 #define OV3640_MIPI_CTRL34 0x3634
539 #define OV3640_MIPI_CTRL34_MAX_HS_PREPARE_NUI_SHIFT 2
540 #define OV3640_MIPI_CTRL34_MAX_HS_PREPARE_NUI_MASK (0x3F << \
541 OV3640_MIPI_CTRL34_MAX_HS_PREPARE_NUI_SHIFT)
542 #define OV3640_MIPI_CTRL34_MAX_HS_PREPARE_H_MASK 0x3
544 #define OV3640_MIPI_CTRL35 0x3635
545 #define OV3640_MIPI_CTRL35_MAX_HS_PREPARE_L_MASK 0xFF
547 #define OV3640_MIPI_CTRL36 0x3636
548 #define OV3640_MIPI_CTRL36_MIN_HS_EXIT_NUI_SHIFT 2
549 #define OV3640_MIPI_CTRL36_MIN_HS_EXIT_NUI_MASK (0x3F << \
550 OV3640_MIPI_CTRL36_MIN_HS_EXIT_NUI_SHIFT)
551 #define OV3640_MIPI_CTRL36_MIN_HS_EXIT_H_MASK 0x3
553 #define OV3640_MIPI_CTRL37 0x3637
554 #define OV3640_MIPI_CTRL37_MIN_HS_EXIT_L_MASK 0xFF
556 #define OV3640_OUT_CTRL3C 0x363C
557 #define OV3640_MIPI_CTRL3D 0x363D
558 #define OV3640_MIPI_CTRL3D_JPGPADEN (1 << 6)
559 #define OV3640_OUT_CTRL3E 0x363E
560 #define OV3640_OUT_CTRL3F 0x363F
562 #define OV3640_OUT_CTRL40 0x3640
563 #define OV3640_OUT_CTRL43 0x3643
564 #define OV3640_OUT_CTRL44 0x3644
565 #define OV3640_OUT_CTRL46 0x3646
566 #define OV3640_MIPI_CTRL4C 0x364C
567 #define OV3640_MIPI_CTRL4C_ECC_PHBYTEORDER2 (1 << 2)
569 * END - OUT_TOP Registers
574 #define OV3640_INTR_MASK0 0x3700
575 #define OV3640_INTR_MASK1 0x3701
576 #define OV3640_INTR0 0x3708
577 #define OV3640_INTR1 0x3709
582 #endif /* ifndef OV3640_REGS_H */