Lines Matching +full:0 +full:x4001

32 #define OV5640_DEFAULT_SLAVE_ID 0x3c
34 #define OV5640_REG_SYS_RESET02 0x3002
35 #define OV5640_REG_SYS_CLOCK_ENABLE02 0x3006
36 #define OV5640_REG_SYS_CTRL0 0x3008
37 #define OV5640_REG_SYS_CTRL0_SW_PWDN 0x42
38 #define OV5640_REG_SYS_CTRL0_SW_PWUP 0x02
39 #define OV5640_REG_CHIP_ID 0x300a
40 #define OV5640_REG_IO_MIPI_CTRL00 0x300e
41 #define OV5640_REG_PAD_OUTPUT_ENABLE01 0x3017
42 #define OV5640_REG_PAD_OUTPUT_ENABLE02 0x3018
43 #define OV5640_REG_PAD_OUTPUT00 0x3019
44 #define OV5640_REG_SYSTEM_CONTROL1 0x302e
45 #define OV5640_REG_SC_PLL_CTRL0 0x3034
46 #define OV5640_REG_SC_PLL_CTRL1 0x3035
47 #define OV5640_REG_SC_PLL_CTRL2 0x3036
48 #define OV5640_REG_SC_PLL_CTRL3 0x3037
49 #define OV5640_REG_SLAVE_ID 0x3100
50 #define OV5640_REG_SCCB_SYS_CTRL1 0x3103
51 #define OV5640_REG_SYS_ROOT_DIVIDER 0x3108
52 #define OV5640_REG_AWB_R_GAIN 0x3400
53 #define OV5640_REG_AWB_G_GAIN 0x3402
54 #define OV5640_REG_AWB_B_GAIN 0x3404
55 #define OV5640_REG_AWB_MANUAL_CTRL 0x3406
56 #define OV5640_REG_AEC_PK_EXPOSURE_HI 0x3500
57 #define OV5640_REG_AEC_PK_EXPOSURE_MED 0x3501
58 #define OV5640_REG_AEC_PK_EXPOSURE_LO 0x3502
59 #define OV5640_REG_AEC_PK_MANUAL 0x3503
60 #define OV5640_REG_AEC_PK_REAL_GAIN 0x350a
61 #define OV5640_REG_AEC_PK_VTS 0x350c
62 #define OV5640_REG_TIMING_DVPHO 0x3808
63 #define OV5640_REG_TIMING_DVPVO 0x380a
64 #define OV5640_REG_TIMING_HTS 0x380c
65 #define OV5640_REG_TIMING_VTS 0x380e
66 #define OV5640_REG_TIMING_TC_REG20 0x3820
67 #define OV5640_REG_TIMING_TC_REG21 0x3821
68 #define OV5640_REG_AEC_CTRL00 0x3a00
69 #define OV5640_REG_AEC_B50_STEP 0x3a08
70 #define OV5640_REG_AEC_B60_STEP 0x3a0a
71 #define OV5640_REG_AEC_CTRL0D 0x3a0d
72 #define OV5640_REG_AEC_CTRL0E 0x3a0e
73 #define OV5640_REG_AEC_CTRL0F 0x3a0f
74 #define OV5640_REG_AEC_CTRL10 0x3a10
75 #define OV5640_REG_AEC_CTRL11 0x3a11
76 #define OV5640_REG_AEC_CTRL1B 0x3a1b
77 #define OV5640_REG_AEC_CTRL1E 0x3a1e
78 #define OV5640_REG_AEC_CTRL1F 0x3a1f
79 #define OV5640_REG_HZ5060_CTRL00 0x3c00
80 #define OV5640_REG_HZ5060_CTRL01 0x3c01
81 #define OV5640_REG_SIGMADELTA_CTRL0C 0x3c0c
82 #define OV5640_REG_FRAME_CTRL01 0x4202
83 #define OV5640_REG_FORMAT_CONTROL00 0x4300
84 #define OV5640_REG_VFIFO_HSIZE 0x4602
85 #define OV5640_REG_VFIFO_VSIZE 0x4604
86 #define OV5640_REG_JPG_MODE_SELECT 0x4713
87 #define OV5640_REG_CCIR656_CTRL00 0x4730
88 #define OV5640_REG_POLARITY_CTRL00 0x4740
89 #define OV5640_REG_MIPI_CTRL00 0x4800
90 #define OV5640_REG_DEBUG_MODE 0x4814
91 #define OV5640_REG_ISP_FORMAT_MUX_CTRL 0x501f
92 #define OV5640_REG_PRE_ISP_TEST_SET1 0x503d
93 #define OV5640_REG_SDE_CTRL0 0x5580
94 #define OV5640_REG_SDE_CTRL1 0x5581
95 #define OV5640_REG_SDE_CTRL3 0x5583
96 #define OV5640_REG_SDE_CTRL4 0x5584
97 #define OV5640_REG_SDE_CTRL5 0x5585
98 #define OV5640_REG_AVG_READOUT 0x56a1
101 OV5640_MODE_QQVGA_160_120 = 0,
115 OV5640_15_FPS = 0,
122 OV5640_FMT_MUX_YUV422 = 0,
156 "MIPI CSI-2 virtual channel (0..3), default 0");
282 {0x3103, 0x11, 0, 0}, {0x3008, 0x82, 0, 5}, {0x3008, 0x42, 0, 0},
283 {0x3103, 0x03, 0, 0}, {0x3630, 0x36, 0, 0},
284 {0x3631, 0x0e, 0, 0}, {0x3632, 0xe2, 0, 0}, {0x3633, 0x12, 0, 0},
285 {0x3621, 0xe0, 0, 0}, {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0},
286 {0x3715, 0x78, 0, 0}, {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0},
287 {0x3705, 0x1a, 0, 0}, {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0},
288 {0x3901, 0x0a, 0, 0}, {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0},
289 {0x3601, 0x33, 0, 0}, {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0},
290 {0x371b, 0x20, 0, 0}, {0x471c, 0x50, 0, 0}, {0x3a13, 0x43, 0, 0},
291 {0x3a18, 0x00, 0, 0}, {0x3a19, 0xf8, 0, 0}, {0x3635, 0x13, 0, 0},
292 {0x3636, 0x03, 0, 0}, {0x3634, 0x40, 0, 0}, {0x3622, 0x01, 0, 0},
293 {0x3c01, 0xa4, 0, 0}, {0x3c04, 0x28, 0, 0}, {0x3c05, 0x98, 0, 0},
294 {0x3c06, 0x00, 0, 0}, {0x3c07, 0x08, 0, 0}, {0x3c08, 0x00, 0, 0},
295 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
296 {0x3820, 0x41, 0, 0}, {0x3821, 0x07, 0, 0}, {0x3814, 0x31, 0, 0},
297 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
298 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
299 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
300 {0x3810, 0x00, 0, 0},
301 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
302 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
303 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
304 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
305 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
306 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
307 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x3000, 0x00, 0, 0},
308 {0x3002, 0x1c, 0, 0}, {0x3004, 0xff, 0, 0}, {0x3006, 0xc3, 0, 0},
309 {0x302e, 0x08, 0, 0}, {0x4300, 0x3f, 0, 0},
310 {0x501f, 0x00, 0, 0}, {0x4407, 0x04, 0, 0},
311 {0x440e, 0x00, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
312 {0x4837, 0x0a, 0, 0}, {0x3824, 0x02, 0, 0},
313 {0x5000, 0xa7, 0, 0}, {0x5001, 0xa3, 0, 0}, {0x5180, 0xff, 0, 0},
314 {0x5181, 0xf2, 0, 0}, {0x5182, 0x00, 0, 0}, {0x5183, 0x14, 0, 0},
315 {0x5184, 0x25, 0, 0}, {0x5185, 0x24, 0, 0}, {0x5186, 0x09, 0, 0},
316 {0x5187, 0x09, 0, 0}, {0x5188, 0x09, 0, 0}, {0x5189, 0x88, 0, 0},
317 {0x518a, 0x54, 0, 0}, {0x518b, 0xee, 0, 0}, {0x518c, 0xb2, 0, 0},
318 {0x518d, 0x50, 0, 0}, {0x518e, 0x34, 0, 0}, {0x518f, 0x6b, 0, 0},
319 {0x5190, 0x46, 0, 0}, {0x5191, 0xf8, 0, 0}, {0x5192, 0x04, 0, 0},
320 {0x5193, 0x70, 0, 0}, {0x5194, 0xf0, 0, 0}, {0x5195, 0xf0, 0, 0},
321 {0x5196, 0x03, 0, 0}, {0x5197, 0x01, 0, 0}, {0x5198, 0x04, 0, 0},
322 {0x5199, 0x6c, 0, 0}, {0x519a, 0x04, 0, 0}, {0x519b, 0x00, 0, 0},
323 {0x519c, 0x09, 0, 0}, {0x519d, 0x2b, 0, 0}, {0x519e, 0x38, 0, 0},
324 {0x5381, 0x1e, 0, 0}, {0x5382, 0x5b, 0, 0}, {0x5383, 0x08, 0, 0},
325 {0x5384, 0x0a, 0, 0}, {0x5385, 0x7e, 0, 0}, {0x5386, 0x88, 0, 0},
326 {0x5387, 0x7c, 0, 0}, {0x5388, 0x6c, 0, 0}, {0x5389, 0x10, 0, 0},
327 {0x538a, 0x01, 0, 0}, {0x538b, 0x98, 0, 0}, {0x5300, 0x08, 0, 0},
328 {0x5301, 0x30, 0, 0}, {0x5302, 0x10, 0, 0}, {0x5303, 0x00, 0, 0},
329 {0x5304, 0x08, 0, 0}, {0x5305, 0x30, 0, 0}, {0x5306, 0x08, 0, 0},
330 {0x5307, 0x16, 0, 0}, {0x5309, 0x08, 0, 0}, {0x530a, 0x30, 0, 0},
331 {0x530b, 0x04, 0, 0}, {0x530c, 0x06, 0, 0}, {0x5480, 0x01, 0, 0},
332 {0x5481, 0x08, 0, 0}, {0x5482, 0x14, 0, 0}, {0x5483, 0x28, 0, 0},
333 {0x5484, 0x51, 0, 0}, {0x5485, 0x65, 0, 0}, {0x5486, 0x71, 0, 0},
334 {0x5487, 0x7d, 0, 0}, {0x5488, 0x87, 0, 0}, {0x5489, 0x91, 0, 0},
335 {0x548a, 0x9a, 0, 0}, {0x548b, 0xaa, 0, 0}, {0x548c, 0xb8, 0, 0},
336 {0x548d, 0xcd, 0, 0}, {0x548e, 0xdd, 0, 0}, {0x548f, 0xea, 0, 0},
337 {0x5490, 0x1d, 0, 0}, {0x5580, 0x02, 0, 0}, {0x5583, 0x40, 0, 0},
338 {0x5584, 0x10, 0, 0}, {0x5589, 0x10, 0, 0}, {0x558a, 0x00, 0, 0},
339 {0x558b, 0xf8, 0, 0}, {0x5800, 0x23, 0, 0}, {0x5801, 0x14, 0, 0},
340 {0x5802, 0x0f, 0, 0}, {0x5803, 0x0f, 0, 0}, {0x5804, 0x12, 0, 0},
341 {0x5805, 0x26, 0, 0}, {0x5806, 0x0c, 0, 0}, {0x5807, 0x08, 0, 0},
342 {0x5808, 0x05, 0, 0}, {0x5809, 0x05, 0, 0}, {0x580a, 0x08, 0, 0},
343 {0x580b, 0x0d, 0, 0}, {0x580c, 0x08, 0, 0}, {0x580d, 0x03, 0, 0},
344 {0x580e, 0x00, 0, 0}, {0x580f, 0x00, 0, 0}, {0x5810, 0x03, 0, 0},
345 {0x5811, 0x09, 0, 0}, {0x5812, 0x07, 0, 0}, {0x5813, 0x03, 0, 0},
346 {0x5814, 0x00, 0, 0}, {0x5815, 0x01, 0, 0}, {0x5816, 0x03, 0, 0},
347 {0x5817, 0x08, 0, 0}, {0x5818, 0x0d, 0, 0}, {0x5819, 0x08, 0, 0},
348 {0x581a, 0x05, 0, 0}, {0x581b, 0x06, 0, 0}, {0x581c, 0x08, 0, 0},
349 {0x581d, 0x0e, 0, 0}, {0x581e, 0x29, 0, 0}, {0x581f, 0x17, 0, 0},
350 {0x5820, 0x11, 0, 0}, {0x5821, 0x11, 0, 0}, {0x5822, 0x15, 0, 0},
351 {0x5823, 0x28, 0, 0}, {0x5824, 0x46, 0, 0}, {0x5825, 0x26, 0, 0},
352 {0x5826, 0x08, 0, 0}, {0x5827, 0x26, 0, 0}, {0x5828, 0x64, 0, 0},
353 {0x5829, 0x26, 0, 0}, {0x582a, 0x24, 0, 0}, {0x582b, 0x22, 0, 0},
354 {0x582c, 0x24, 0, 0}, {0x582d, 0x24, 0, 0}, {0x582e, 0x06, 0, 0},
355 {0x582f, 0x22, 0, 0}, {0x5830, 0x40, 0, 0}, {0x5831, 0x42, 0, 0},
356 {0x5832, 0x24, 0, 0}, {0x5833, 0x26, 0, 0}, {0x5834, 0x24, 0, 0},
357 {0x5835, 0x22, 0, 0}, {0x5836, 0x22, 0, 0}, {0x5837, 0x26, 0, 0},
358 {0x5838, 0x44, 0, 0}, {0x5839, 0x24, 0, 0}, {0x583a, 0x26, 0, 0},
359 {0x583b, 0x28, 0, 0}, {0x583c, 0x42, 0, 0}, {0x583d, 0xce, 0, 0},
360 {0x5025, 0x00, 0, 0}, {0x3a0f, 0x30, 0, 0}, {0x3a10, 0x28, 0, 0},
361 {0x3a1b, 0x30, 0, 0}, {0x3a1e, 0x26, 0, 0}, {0x3a11, 0x60, 0, 0},
362 {0x3a1f, 0x14, 0, 0}, {0x3008, 0x02, 0, 0}, {0x3c00, 0x04, 0, 300},
366 {0x3c07, 0x08, 0, 0},
367 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
368 {0x3814, 0x31, 0, 0},
369 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
370 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
371 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
372 {0x3810, 0x00, 0, 0},
373 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
374 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
375 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
376 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
377 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
378 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
379 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
380 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
381 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
385 {0x3c07, 0x08, 0, 0},
386 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
387 {0x3814, 0x31, 0, 0},
388 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
389 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
390 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
391 {0x3810, 0x00, 0, 0},
392 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
393 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
394 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
395 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
396 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
397 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
398 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
399 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
400 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
404 {0x3c07, 0x08, 0, 0},
405 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
406 {0x3814, 0x31, 0, 0},
407 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
408 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
409 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
410 {0x3810, 0x00, 0, 0},
411 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
412 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
413 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
414 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
415 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
416 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
417 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
418 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
419 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
423 {0x3c07, 0x08, 0, 0},
424 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
425 {0x3814, 0x31, 0, 0},
426 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
427 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
428 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
429 {0x3810, 0x00, 0, 0},
430 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
431 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
432 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
433 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
434 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
435 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
436 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
437 {0x4407, 0x04, 0, 0}, {0x5001, 0xa3, 0, 0},
441 {0x3c07, 0x08, 0, 0},
442 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
443 {0x3814, 0x31, 0, 0},
444 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
445 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
446 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
447 {0x3810, 0x00, 0, 0},
448 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
449 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
450 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
451 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
452 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
453 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
454 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
455 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
456 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
460 {0x3c07, 0x08, 0, 0},
461 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
462 {0x3814, 0x31, 0, 0},
463 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
464 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
465 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
466 {0x3810, 0x00, 0, 0},
467 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x3c, 0, 0},
468 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
469 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
470 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
471 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
472 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
473 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
474 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
475 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
479 {0x3c07, 0x08, 0, 0},
480 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
481 {0x3814, 0x31, 0, 0},
482 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
483 {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
484 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
485 {0x3810, 0x00, 0, 0},
486 {0x3811, 0x38, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
487 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
488 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
489 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
490 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
491 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
492 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
493 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
494 {0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0},
498 {0x3c07, 0x07, 0, 0},
499 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
500 {0x3814, 0x31, 0, 0},
501 {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
502 {0x3802, 0x00, 0, 0}, {0x3803, 0xfa, 0, 0}, {0x3804, 0x0a, 0, 0},
503 {0x3805, 0x3f, 0, 0}, {0x3806, 0x06, 0, 0}, {0x3807, 0xa9, 0, 0},
504 {0x3810, 0x00, 0, 0},
505 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0},
506 {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
507 {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x02, 0, 0},
508 {0x3a03, 0xe4, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0xbc, 0, 0},
509 {0x3a0a, 0x01, 0, 0}, {0x3a0b, 0x72, 0, 0}, {0x3a0e, 0x01, 0, 0},
510 {0x3a0d, 0x02, 0, 0}, {0x3a14, 0x02, 0, 0}, {0x3a15, 0xe4, 0, 0},
511 {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0},
512 {0x4407, 0x04, 0, 0}, {0x460b, 0x37, 0, 0}, {0x460c, 0x20, 0, 0},
513 {0x3824, 0x04, 0, 0}, {0x5001, 0x83, 0, 0},
517 {0x3c07, 0x08, 0, 0},
518 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
519 {0x3814, 0x11, 0, 0},
520 {0x3815, 0x11, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
521 {0x3802, 0x00, 0, 0}, {0x3803, 0x00, 0, 0}, {0x3804, 0x0a, 0, 0},
522 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9f, 0, 0},
523 {0x3810, 0x00, 0, 0},
524 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0},
525 {0x3618, 0x04, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x21, 0, 0},
526 {0x3709, 0x12, 0, 0}, {0x370c, 0x00, 0, 0}, {0x3a02, 0x03, 0, 0},
527 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
528 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
529 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
530 {0x4001, 0x02, 0, 0}, {0x4004, 0x06, 0, 0},
531 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
532 {0x3824, 0x02, 0, 0}, {0x5001, 0x83, 0, 0},
533 {0x3c07, 0x07, 0, 0}, {0x3c08, 0x00, 0, 0},
534 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
535 {0x3800, 0x01, 0, 0}, {0x3801, 0x50, 0, 0}, {0x3802, 0x01, 0, 0},
536 {0x3803, 0xb2, 0, 0}, {0x3804, 0x08, 0, 0}, {0x3805, 0xef, 0, 0},
537 {0x3806, 0x05, 0, 0}, {0x3807, 0xf1, 0, 0},
538 {0x3612, 0x2b, 0, 0}, {0x3708, 0x64, 0, 0},
539 {0x3a02, 0x04, 0, 0}, {0x3a03, 0x60, 0, 0}, {0x3a08, 0x01, 0, 0},
540 {0x3a09, 0x50, 0, 0}, {0x3a0a, 0x01, 0, 0}, {0x3a0b, 0x18, 0, 0},
541 {0x3a0e, 0x03, 0, 0}, {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x04, 0, 0},
542 {0x3a15, 0x60, 0, 0}, {0x4407, 0x04, 0, 0},
543 {0x460b, 0x37, 0, 0}, {0x460c, 0x20, 0, 0}, {0x3824, 0x04, 0, 0},
544 {0x4005, 0x1a, 0, 0},
548 {0x3c07, 0x08, 0, 0},
549 {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
550 {0x3814, 0x11, 0, 0},
551 {0x3815, 0x11, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
552 {0x3802, 0x00, 0, 0}, {0x3803, 0x00, 0, 0}, {0x3804, 0x0a, 0, 0},
553 {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9f, 0, 0},
554 {0x3810, 0x00, 0, 0},
555 {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0},
556 {0x3618, 0x04, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x21, 0, 0},
557 {0x3709, 0x12, 0, 0}, {0x370c, 0x00, 0, 0}, {0x3a02, 0x03, 0, 0},
558 {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
559 {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
560 {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
561 {0x4001, 0x02, 0, 0}, {0x4004, 0x06, 0, 0},
562 {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
563 {0x3824, 0x02, 0, 0}, {0x5001, 0x83, 0, 70},
568 0, SUBSAMPLING, 640, 1896, 480, 984,
636 return 0; in ov5640_init_slave_id()
638 buf[0] = OV5640_REG_SLAVE_ID >> 8; in ov5640_init_slave_id()
639 buf[1] = OV5640_REG_SLAVE_ID & 0xff; in ov5640_init_slave_id()
643 msg.flags = 0; in ov5640_init_slave_id()
648 if (ret < 0) { in ov5640_init_slave_id()
653 return 0; in ov5640_init_slave_id()
663 buf[0] = reg >> 8; in ov5640_write_reg()
664 buf[1] = reg & 0xff; in ov5640_write_reg()
673 if (ret < 0) { in ov5640_write_reg()
679 return 0; in ov5640_write_reg()
689 buf[0] = reg >> 8; in ov5640_read_reg()
690 buf[1] = reg & 0xff; in ov5640_read_reg()
692 msg[0].addr = client->addr; in ov5640_read_reg()
693 msg[0].flags = client->flags; in ov5640_read_reg()
694 msg[0].buf = buf; in ov5640_read_reg()
695 msg[0].len = sizeof(buf); in ov5640_read_reg()
703 if (ret < 0) { in ov5640_read_reg()
709 *val = buf[0]; in ov5640_read_reg()
710 return 0; in ov5640_read_reg()
726 return 0; in ov5640_read_reg16()
737 return ov5640_write_reg(sensor, reg + 1, val & 0xff); in ov5640_write_reg16()
766 * +->| PLL1 | - reg 0x3036, for the multiplier
767 * +-+--------+ - reg 0x3037, bits 0-3 for the pre-divider
769 * +->| System Clock | - reg 0x3035, bits 4-7
772 * +->| MIPI Divider | - reg 0x3035, bits 0-3
779 * +->| PLL Root Div | - reg 0x3037, bit 4
782 * +->| Bit Div | - reg 0x3034, bits 0-3
785 * +->| SCLK Div | - reg 0x3108, bits 0-1
789 * +->| SCLK 2X Div | - reg 0x3108, bits 2-3
793 * +->| PCLK Div | - reg 0x3108, bits 4-5
796 * +->| P_DIV | - reg 0x3035, bits 0-3
801 * 0x3108, since it's said here that the PCLK would be clocked from
850 #define OV5640_PLL_CTRL0_MIPI_MODE_8BIT 0x08
869 #define OV5640_PLL_SYS_ROOT_DIVIDER_BYPASS 0x00
879 return 0; in ov5640_compute_sys_clk()
889 unsigned long best = ~0; in ov5640_calc_sys_clk()
1008 0x0f, OV5640_PLL_CTRL0_MIPI_MODE_8BIT); in ov5640_set_mipi_pclk()
1011 0xff, sysdiv << 4 | mipi_div); in ov5640_set_mipi_pclk()
1015 ret = ov5640_mod_reg(sensor, OV5640_REG_SC_PLL_CTRL2, 0xff, mult); in ov5640_set_mipi_pclk()
1020 0x1f, OV5640_PLL_CTRL3_PLL_ROOT_DIV_2 | prediv); in ov5640_set_mipi_pclk()
1025 0x30, OV5640_PLL_SYS_ROOT_DIVIDER_BYPASS); in ov5640_set_mipi_pclk()
1057 0x0f, bit_div); in ov5640_set_dvp_pclk()
1066 0xff, sysdiv << 4); in ov5640_set_dvp_pclk()
1071 0xff, mult); in ov5640_set_dvp_pclk()
1076 0x1f, prediv | ((pll_rdiv - 1) << 4)); in ov5640_set_dvp_pclk()
1080 return ov5640_mod_reg(sensor, OV5640_REG_SYS_ROOT_DIVIDER, 0x30, in ov5640_set_dvp_pclk()
1097 ret = ov5640_mod_reg(sensor, OV5640_REG_JPG_MODE_SELECT, 0x7, 0x3); in ov5640_set_jpeg_timings()
1098 if (ret < 0) in ov5640_set_jpeg_timings()
1102 if (ret < 0) in ov5640_set_jpeg_timings()
1116 if (ret < 0) in ov5640_set_timings()
1121 if (ret < 0) in ov5640_set_timings()
1125 if (ret < 0) in ov5640_set_timings()
1129 if (ret < 0) in ov5640_set_timings()
1143 int ret = 0; in ov5640_load_regs()
1145 for (i = 0; i < mode->reg_data_size; ++i, ++regs) { in ov5640_load_regs()
1174 BIT(0), on ? 0 : BIT(0)); in ov5640_set_autoexposure()
1186 exp = ((int)temp & 0x0f) << 16; in ov5640_get_exposure()
1208 exposure & 0xff); in ov5640_set_exposure()
1213 (exposure >> 8) & 0xff); in ov5640_set_exposure()
1218 (exposure >> 16) & 0x0f); in ov5640_set_exposure()
1230 return gain & 0x3ff; in ov5640_get_gain()
1236 (u16)gain & 0x3ff); in ov5640_set_gain()
1242 BIT(1), on ? 0 : BIT(1)); in ov5640_set_autogain()
1259 * 0x300e = on ? 0x45 : 0x40 in ov5640_set_stream_mipi()
1268 * [4] = 0 : Power up MIPI HS Tx in ov5640_set_stream_mipi()
1269 * [3] = 0 : Power up MIPI LS Rx in ov5640_set_stream_mipi()
1270 * [2] = 1/0 : MIPI interface enable/disable in ov5640_set_stream_mipi()
1271 * [1:0] = 01/00: FIXME: 'debug' in ov5640_set_stream_mipi()
1274 on ? 0x45 : 0x40); in ov5640_set_stream_mipi()
1279 on ? 0x00 : 0x0f); in ov5640_set_stream_mipi()
1295 temp2 = temp1 & 0x0f; in ov5640_get_sysclk()
1303 if (sysdiv == 0) in ov5640_get_sysclk()
1314 prediv = temp1 & 0x0f; in ov5640_get_sysclk()
1315 pll_rdiv = ((temp1 >> 4) & 0x01) + 1; in ov5640_get_sysclk()
1320 temp2 = temp1 & 0x03; in ov5640_get_sysclk()
1342 mode &= 0xfb; in ov5640_set_night_mode()
1377 int ret, light_freq = 0; in ov5640_get_light_freq()
1384 if (temp & 0x80) { in ov5640_get_light_freq()
1390 if (temp1 & 0x04) { in ov5640_get_light_freq()
1404 if (temp1 & 0x01) { in ov5640_get_light_freq()
1422 if (ret < 0) in ov5640_set_bandingfilter()
1424 if (ret == 0) in ov5640_set_bandingfilter()
1429 if (ret < 0) in ov5640_set_bandingfilter()
1431 if (ret == 0) in ov5640_set_bandingfilter()
1437 if (ret < 0) in ov5640_set_bandingfilter()
1507 return temp & BIT(0); in ov5640_get_binning()
1516 * - [0]: Horizontal binning enable in ov5640_set_binning()
1519 BIT(0), enable ? BIT(0) : 0); in ov5640_set_binning()
1524 * - [0]: Undocumented, but hardcoded init sequences in ov5640_set_binning()
1525 * are always setting REG21/REG20 bit 0 to same value... in ov5640_set_binning()
1528 BIT(0), enable ? BIT(0) : 0); in ov5640_set_binning()
1539 "%s: wrong virtual_channel parameter, expected (0..3), got %d\n", in ov5640_set_virtual_channel()
1604 if (ret < 0) in ov5640_set_mode_exposure_calc()
1608 if (ret < 0) in ov5640_set_mode_exposure_calc()
1616 if (ret < 0) in ov5640_set_mode_exposure_calc()
1627 if (ret < 0) in ov5640_set_mode_exposure_calc()
1632 if (ret < 0) in ov5640_set_mode_exposure_calc()
1637 if (ret < 0) in ov5640_set_mode_exposure_calc()
1641 if (ret < 0) in ov5640_set_mode_exposure_calc()
1643 if (ret == 0) in ov5640_set_mode_exposure_calc()
1648 if (ret < 0) in ov5640_set_mode_exposure_calc()
1650 if (ret == 0) in ov5640_set_mode_exposure_calc()
1656 if (ret < 0) in ov5640_set_mode_exposure_calc()
1670 if (ret < 0) in ov5640_set_mode_exposure_calc()
1672 if (ret == 0) in ov5640_set_mode_exposure_calc()
1736 if (ret < 0) in ov5640_set_mode_exposure_calc()
1797 if (ret < 0) in ov5640_set_mode()
1798 return 0; in ov5640_set_mode()
1814 if (ret < 0) in ov5640_set_mode()
1824 if (ret < 0) in ov5640_set_mode()
1827 if (ret < 0) in ov5640_set_mode()
1830 if (ret < 0) in ov5640_set_mode()
1833 if (ret < 0) in ov5640_set_mode()
1836 if (ret < 0) in ov5640_set_mode()
1842 return 0; in ov5640_set_mode()
1864 if (ret < 0) in ov5640_restore_mode()
1868 ret = ov5640_mod_reg(sensor, OV5640_REG_SYS_ROOT_DIVIDER, 0x3f, in ov5640_restore_mode()
1876 if (ret < 0) in ov5640_restore_mode()
1884 gpiod_set_value_cansleep(sensor->pwdn_gpio, enable ? 0 : 1); in ov5640_power()
1892 gpiod_set_value_cansleep(sensor->reset_gpio, 0); in ov5640_reset()
1903 gpiod_set_value_cansleep(sensor->reset_gpio, 0); in ov5640_reset()
1934 return 0; in ov5640_set_power_on()
1957 ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x58); in ov5640_set_power_mipi()
1958 ov5640_write_reg(sensor, OV5640_REG_MIPI_CTRL00, 0x04); in ov5640_set_power_mipi()
1959 ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT00, 0x00); in ov5640_set_power_mipi()
1960 return 0; in ov5640_set_power_mipi()
1966 * 0x300e = 0x40 in ov5640_set_power_mipi()
1969 * [4] = 0 : Power up MIPI HS Tx in ov5640_set_power_mipi()
1970 * [3] = 0 : Power up MIPI LS Rx in ov5640_set_power_mipi()
1971 * [2] = 0 : MIPI interface disabled in ov5640_set_power_mipi()
1973 ret = ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x40); in ov5640_set_power_mipi()
1980 * 0x4800 = 0x24 in ov5640_set_power_mipi()
1984 ret = ov5640_write_reg(sensor, OV5640_REG_MIPI_CTRL00, 0x24); in ov5640_set_power_mipi()
1991 * 0x3019 = 0x70 in ov5640_set_power_mipi()
1996 ret = ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT00, 0x70); in ov5640_set_power_mipi()
2003 return 0; in ov5640_set_power_mipi()
2010 u8 polarities = 0; in ov5640_set_power_dvp()
2015 ov5640_write_reg(sensor, OV5640_REG_CCIR656_CTRL00, 0x00); in ov5640_set_power_dvp()
2016 ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x58); in ov5640_set_power_dvp()
2017 ov5640_write_reg(sensor, OV5640_REG_POLARITY_CTRL00, 0x20); in ov5640_set_power_dvp()
2018 ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT_ENABLE01, 0x00); in ov5640_set_power_dvp()
2019 ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT_ENABLE02, 0x00); in ov5640_set_power_dvp()
2020 return 0; in ov5640_set_power_dvp()
2027 * output 10 bits data on DVP data lines [9:0]. in ov5640_set_power_dvp()
2047 * - [7]: SYNC code selection (0: auto generate sync code, in ov5640_set_power_dvp()
2048 * 1: sync code from regs 0x4732-0x4735) in ov5640_set_power_dvp()
2052 * 01: data from regs 0x4736-0x4738, 10: always keep 0) in ov5640_set_power_dvp()
2054 * - [0]: CCIR656 mode enable in ov5640_set_power_dvp()
2057 * SAV=0xff000080 & EAV=0xff00009d is enabled here with settings: in ov5640_set_power_dvp()
2061 * - clip reserved data (0x00 & 0xff changed to 0x01 & 0xfe) in ov5640_set_power_dvp()
2064 bt656 ? 0x01 : 0x00); in ov5640_set_power_dvp()
2072 * - [5]: PCLK polarity (0: active low, 1: active high) in ov5640_set_power_dvp()
2073 * - [1]: HREF polarity (0: active low, 1: active high) in ov5640_set_power_dvp()
2074 * - [0]: VSYNC polarity (mismatch here between in ov5640_set_power_dvp()
2075 * datasheet and hardware, 0 is active high in ov5640_set_power_dvp()
2082 polarities |= BIT(0); in ov5640_set_power_dvp()
2097 * [2] = 0 : DVP enable (MIPI disable) in ov5640_set_power_dvp()
2099 ret = ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x18); in ov5640_set_power_dvp()
2111 * - [3:0]: D[9:6] output enable in ov5640_set_power_dvp()
2114 bt656 ? 0x1f : 0x7f); in ov5640_set_power_dvp()
2119 * enable D[5:0] DVP data lines in ov5640_set_power_dvp()
2122 * - [7:2]: D[5:0] output enable in ov5640_set_power_dvp()
2124 return ov5640_write_reg(sensor, OV5640_REG_PAD_OUTPUT_ENABLE02, 0xfc); in ov5640_set_power_dvp()
2129 int ret = 0; in ov5640_set_power()
2151 return 0; in ov5640_set_power()
2163 int ret = 0; in ov5640_s_power()
2168 * If the power count is modified from 0 to != 0 or from != 0 to 0, in ov5640_s_power()
2179 WARN_ON(sensor->power_count < 0); in ov5640_s_power()
2203 if (fi->numerator == 0) { in ov5640_try_frame_interval()
2214 for (i = 0; i < ARRAY_SIZE(ov5640_framerates); i++) { in ov5640_try_frame_interval()
2238 if (format->pad != 0) in ov5640_get_fmt()
2253 return 0; in ov5640_get_fmt()
2274 for (i = 0; i < ARRAY_SIZE(ov5640_formats); i++) in ov5640_try_fmt_internal()
2278 i = 0; in ov5640_try_fmt_internal()
2286 return 0; in ov5640_try_fmt_internal()
2299 if (format->pad != 0) in ov5640_set_fmt()
2315 fmt = v4l2_subdev_get_try_format(sd, sd_state, 0); in ov5640_set_fmt()
2338 int ret = 0; in ov5640_set_framefmt()
2346 fmt = 0x3f; in ov5640_set_framefmt()
2352 fmt = 0x30; in ov5640_set_framefmt()
2356 /* RGB565 {g[2:0],b[4:0]},{r[4:0],g[5:3]} */ in ov5640_set_framefmt()
2357 fmt = 0x6F; in ov5640_set_framefmt()
2361 /* RGB565 {r[4:0],g[5:3]},{g[2:0],b[4:0]} */ in ov5640_set_framefmt()
2362 fmt = 0x61; in ov5640_set_framefmt()
2367 fmt = 0x30; in ov5640_set_framefmt()
2373 fmt = 0x00; in ov5640_set_framefmt()
2378 fmt = 0x01; in ov5640_set_framefmt()
2383 fmt = 0x02; in ov5640_set_framefmt()
2388 fmt = 0x03; in ov5640_set_framefmt()
2410 BIT(5), is_jpeg ? BIT(5) : 0); in ov5640_set_framefmt()
2422 is_jpeg ? 0 : (BIT(4) | BIT(3) | BIT(2))); in ov5640_set_framefmt()
2433 is_jpeg ? (BIT(5) | BIT(3)) : 0); in ov5640_set_framefmt()
2446 BIT(0), BIT(0)); in ov5640_set_ctrl_hue()
2451 ret = ov5640_mod_reg(sensor, OV5640_REG_SDE_CTRL0, BIT(0), 0); in ov5640_set_ctrl_hue()
2467 value & 0xff); in ov5640_set_ctrl_contrast()
2469 ret = ov5640_mod_reg(sensor, OV5640_REG_SDE_CTRL0, BIT(2), 0); in ov5640_set_ctrl_contrast()
2485 value & 0xff); in ov5640_set_ctrl_saturation()
2489 value & 0xff); in ov5640_set_ctrl_saturation()
2491 ret = ov5640_mod_reg(sensor, OV5640_REG_SDE_CTRL0, BIT(1), 0); in ov5640_set_ctrl_saturation()
2502 BIT(0), awb ? 0 : 1); in ov5640_set_ctrl_white_balance()
2524 int ret = 0; in ov5640_set_ctrl_exposure()
2540 if (ret < 0) in ov5640_set_ctrl_exposure()
2543 ret = 0; in ov5640_set_ctrl_exposure()
2555 int ret = 0; in ov5640_set_ctrl_gain()
2581 #define OV5640_TEST_BAR_STANDARD (0 << 2)
2585 #define OV5640_TEST_BAR (0 << 0)
2586 #define OV5640_TEST_RANDOM (1 << 0)
2587 #define OV5640_TEST_SQUARE (2 << 0)
2588 #define OV5640_TEST_BLACK (3 << 0)
2591 0,
2612 0 : BIT(7)); in ov5640_set_ctrl_light_freq()
2618 BIT(2) : 0); in ov5640_set_ctrl_light_freq()
2640 (BIT(2) | BIT(1)) : 0); in ov5640_set_ctrl_hflip()
2655 (BIT(2) | BIT(1)) : 0); in ov5640_set_ctrl_vflip()
2669 if (val < 0) in ov5640_g_volatile_ctrl()
2675 if (val < 0) in ov5640_g_volatile_ctrl()
2681 return 0; in ov5640_g_volatile_ctrl()
2697 if (sensor->power_count == 0) in ov5640_s_ctrl()
2698 return 0; in ov5640_s_ctrl()
2758 0, INT_MAX, 1, in ov5640_init_controls()
2764 0, 1, 1, 1); in ov5640_init_controls()
2766 0, 4095, 1, 0); in ov5640_init_controls()
2768 0, 4095, 1, 0); in ov5640_init_controls()
2772 V4L2_EXPOSURE_MANUAL, 0, in ov5640_init_controls()
2775 0, 65535, 1, 0); in ov5640_init_controls()
2778 0, 1, 1, 1); in ov5640_init_controls()
2780 0, 1023, 1, 0); in ov5640_init_controls()
2783 0, 255, 1, 64); in ov5640_init_controls()
2785 0, 359, 1, 0); in ov5640_init_controls()
2787 0, 255, 1, 0); in ov5640_init_controls()
2791 0, 0, test_pattern_menu); in ov5640_init_controls()
2793 0, 1, 1, 0); in ov5640_init_controls()
2795 0, 1, 1, 0); in ov5640_init_controls()
2800 V4L2_CID_POWER_LINE_FREQUENCY_AUTO, 0, in ov5640_init_controls()
2812 v4l2_ctrl_auto_cluster(3, &ctrls->auto_wb, 0, false); in ov5640_init_controls()
2813 v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true); in ov5640_init_controls()
2817 return 0; in ov5640_init_controls()
2828 if (fse->pad != 0) in ov5640_enum_frame_size()
2840 return 0; in ov5640_enum_frame_size()
2852 if (fie->pad != 0) in ov5640_enum_frame_interval()
2862 if (ret < 0) in ov5640_enum_frame_interval()
2866 return 0; in ov5640_enum_frame_interval()
2878 return 0; in ov5640_g_frame_interval()
2886 int frame_rate, ret = 0; in ov5640_s_frame_interval()
2888 if (fi->pad != 0) in ov5640_s_frame_interval()
2902 if (frame_rate < 0) { in ov5640_s_frame_interval()
2934 if (code->pad != 0) in ov5640_enum_mbus_code()
2940 return 0; in ov5640_enum_mbus_code()
2946 int ret = 0; in ov5640_s_stream()
3008 for (i = 0; i < OV5640_NUM_SUPPLIES; i++) in ov5640_get_regulators()
3019 int ret = 0; in ov5640_check_chip_id()
3033 if (chip_id != 0x5640) { in ov5640_check_chip_id()
3034 dev_err(&client->dev, "%s: wrong chip identifier, expected 0x5640, got 0x%x\n", in ov5640_check_chip_id()
3089 case 0: in ov5640_probe()
3173 return 0; in ov5640_probe()
3193 return 0; in ov5640_remove()
3197 {"ov5640", 0},