Lines Matching +full:0 +full:x5400
7 * V0.0X01.0X01 add poweron function.
8 * V0.0X01.0X02 fix mclk issue when probe multiple camera.
9 * V0.0X01.0X03 add enum_frame_interval function.
10 * V0.0X01.0X04 add quick stream on/off
11 * V0.0X01.0X05 add function g_mbus_config
32 #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x05)
43 #define CHIP_ID 0x00d850
44 #define OV13850_REG_CHIP_ID 0x300a
46 #define OV13850_REG_CTRL_MODE 0x0100
47 #define OV13850_MODE_SW_STANDBY 0x0
48 #define OV13850_MODE_STREAMING BIT(0)
50 #define OV13850_REG_EXPOSURE 0x3500
53 #define OV13850_VTS_MAX 0x7fff
55 #define OV13850_REG_GAIN_H 0x350a
56 #define OV13850_REG_GAIN_L 0x350b
57 #define OV13850_GAIN_H_MASK 0x07
59 #define OV13850_GAIN_L_MASK 0xff
60 #define OV13850_GAIN_MIN 0x10
61 #define OV13850_GAIN_MAX 0xf8
63 #define OV13850_GAIN_DEFAULT 0x10
65 #define OV13850_REG_TEST_PATTERN 0x5e00
66 #define OV13850_TEST_PATTERN_ENABLE 0x80
67 #define OV13850_TEST_PATTERN_DISABLE 0x0
69 #define OV13850_REG_VTS 0x380e
71 #define REG_NULL 0xFFFF
80 #define OV13850_CHIP_REVISION_REG 0x302A
81 #define OV13850_R1A 0xb1
82 #define OV13850_R2A 0xb2
151 {0x0103, 0x01},
152 {0x0300, 0x00},
153 {0x0301, 0x00},
154 {0x0302, 0x32},
155 {0x0303, 0x01},
156 {0x030a, 0x00},
157 {0x300f, 0x11},
158 {0x3010, 0x01},
159 {0x3011, 0x76},
160 {0x3012, 0x21},
161 {0x3013, 0x12},
162 {0x3014, 0x11},
163 {0x3015, 0xc0},
164 {0x301f, 0x03},
165 {0x3106, 0x00},
166 {0x3210, 0x47},
167 {0x3500, 0x00},
168 {0x3501, 0x60},
169 {0x3502, 0x00},
170 {0x3506, 0x00},
171 {0x3507, 0x02},
172 {0x3508, 0x00},
173 {0x350a, 0x00},
174 {0x350b, 0x80},
175 {0x350e, 0x00},
176 {0x350f, 0x10},
177 {0x3600, 0x40},
178 {0x3601, 0xfc},
179 {0x3602, 0x02},
180 {0x3603, 0x48},
181 {0x3604, 0xa5},
182 {0x3605, 0x9f},
183 {0x3607, 0x00},
184 {0x360a, 0x40},
185 {0x360b, 0x91},
186 {0x360c, 0x49},
187 {0x360f, 0x8a},
188 {0x3611, 0x10},
189 {0x3612, 0x27},
190 {0x3613, 0x33},
191 {0x3615, 0x08},
192 {0x3641, 0x02},
193 {0x3660, 0x82},
194 {0x3668, 0x54},
195 {0x3669, 0x40},
196 {0x3667, 0xa0},
197 {0x3702, 0x40},
198 {0x3703, 0x44},
199 {0x3704, 0x2c},
200 {0x3705, 0x24},
201 {0x3706, 0x50},
202 {0x3707, 0x44},
203 {0x3708, 0x3c},
204 {0x3709, 0x1f},
205 {0x370a, 0x26},
206 {0x370b, 0x3c},
207 {0x3720, 0x66},
208 {0x3722, 0x84},
209 {0x3728, 0x40},
210 {0x372a, 0x00},
211 {0x372f, 0x90},
212 {0x3710, 0x28},
213 {0x3716, 0x03},
214 {0x3718, 0x10},
215 {0x3719, 0x08},
216 {0x371c, 0xfc},
217 {0x3760, 0x13},
218 {0x3761, 0x34},
219 {0x3767, 0x24},
220 {0x3768, 0x06},
221 {0x3769, 0x45},
222 {0x376c, 0x23},
223 {0x3d84, 0x00},
224 {0x3d85, 0x17},
225 {0x3d8c, 0x73},
226 {0x3d8d, 0xbf},
227 {0x3800, 0x00},
228 {0x3801, 0x08},
229 {0x3802, 0x00},
230 {0x3803, 0x04},
231 {0x3804, 0x10},
232 {0x3805, 0x97},
233 {0x3806, 0x0c},
234 {0x3807, 0x4b},
235 {0x3808, 0x08},
236 {0x3809, 0x40},
237 {0x380a, 0x06},
238 {0x380b, 0x20},
239 {0x380c, 0x12},
240 {0x380d, 0xc0},
241 {0x380e, 0x06},
242 {0x380f, 0x80},
243 {0x3810, 0x00},
244 {0x3811, 0x04},
245 {0x3812, 0x00},
246 {0x3813, 0x02},
247 {0x3814, 0x31},
248 {0x3815, 0x31},
249 {0x3820, 0x02},
250 {0x3821, 0x05},
251 {0x3834, 0x00},
252 {0x3835, 0x1c},
253 {0x3836, 0x08},
254 {0x3837, 0x02},
255 {0x4000, 0xf1},
256 {0x4001, 0x00},
257 {0x400b, 0x0c},
258 {0x4011, 0x00},
259 {0x401a, 0x00},
260 {0x401b, 0x00},
261 {0x401c, 0x00},
262 {0x401d, 0x00},
263 {0x4020, 0x00},
264 {0x4021, 0xE4},
265 {0x4022, 0x07},
266 {0x4023, 0x5F},
267 {0x4024, 0x08},
268 {0x4025, 0x44},
269 {0x4026, 0x08},
270 {0x4027, 0x47},
271 {0x4028, 0x00},
272 {0x4029, 0x02},
273 {0x402a, 0x04},
274 {0x402b, 0x08},
275 {0x402c, 0x02},
276 {0x402d, 0x02},
277 {0x402e, 0x0c},
278 {0x402f, 0x08},
279 {0x403d, 0x2c},
280 {0x403f, 0x7f},
281 {0x4500, 0x82},
282 {0x4501, 0x38},
283 {0x4601, 0x04},
284 {0x4602, 0x22},
285 {0x4603, 0x01},
286 {0x4800, 0x24}, //MIPI CLK control
287 {0x4837, 0x1b},
288 {0x4d00, 0x04},
289 {0x4d01, 0x42},
290 {0x4d02, 0xd1},
291 {0x4d03, 0x90},
292 {0x4d04, 0x66},
293 {0x4d05, 0x65},
294 {0x5000, 0x0e},
295 {0x5001, 0x01},
296 {0x5002, 0x07},
297 {0x5013, 0x40},
298 {0x501c, 0x00},
299 {0x501d, 0x10},
300 {0x5242, 0x00},
301 {0x5243, 0xb8},
302 {0x5244, 0x00},
303 {0x5245, 0xf9},
304 {0x5246, 0x00},
305 {0x5247, 0xf6},
306 {0x5248, 0x00},
307 {0x5249, 0xa6},
308 {0x5300, 0xfc},
309 {0x5301, 0xdf},
310 {0x5302, 0x3f},
311 {0x5303, 0x08},
312 {0x5304, 0x0c},
313 {0x5305, 0x10},
314 {0x5306, 0x20},
315 {0x5307, 0x40},
316 {0x5308, 0x08},
317 {0x5309, 0x08},
318 {0x530a, 0x02},
319 {0x530b, 0x01},
320 {0x530c, 0x01},
321 {0x530d, 0x0c},
322 {0x530e, 0x02},
323 {0x530f, 0x01},
324 {0x5310, 0x01},
325 {0x5400, 0x00},
326 {0x5401, 0x61},
327 {0x5402, 0x00},
328 {0x5403, 0x00},
329 {0x5404, 0x00},
330 {0x5405, 0x40},
331 {0x540c, 0x05},
332 {0x5b00, 0x00},
333 {0x5b01, 0x00},
334 {0x5b02, 0x01},
335 {0x5b03, 0xff},
336 {0x5b04, 0x02},
337 {0x5b05, 0x6c},
338 {0x5b09, 0x02},
339 {0x5e00, 0x00},
340 {0x5e10, 0x1c},
341 {0x0102, 0x01}, //Fast standby enable
342 {REG_NULL, 0x00},
349 {0x0300, 0x01},
350 {0x0301, 0x00},
351 {0x0302, 0x28},
352 {0x0303, 0x00},
353 {0x030a, 0x00},
354 {0x300f, 0x11},
355 {0x3010, 0x01},
356 {0x3011, 0x76},
357 {0x3012, 0x21},
358 {0x3013, 0x12},
359 {0x3014, 0x11},
360 {0x301f, 0x03},
361 {0x3106, 0x00},
362 {0x3210, 0x47},
363 {0x3500, 0x00},
364 {0x3501, 0x60},
365 {0x3502, 0x00},
366 {0x3506, 0x00},
367 {0x3507, 0x02},
368 {0x3508, 0x00},
369 {0x350a, 0x00},
370 {0x350b, 0x80},
371 {0x350e, 0x00},
372 {0x350f, 0x10},
373 {0x351a, 0x00},
374 {0x351b, 0x10},
375 {0x351c, 0x00},
376 {0x351d, 0x20},
377 {0x351e, 0x00},
378 {0x351f, 0x40},
379 {0x3520, 0x00},
380 {0x3521, 0x80},
381 {0x3600, 0xc0},
382 {0x3601, 0xfc},
383 {0x3602, 0x02},
384 {0x3603, 0x78},
385 {0x3604, 0xb1},
386 {0x3605, 0xb5},
387 {0x3606, 0x73},
388 {0x3607, 0x07},
389 {0x3609, 0x40},
390 {0x360a, 0x30},
391 {0x360b, 0x91},
392 {0x360c, 0x09},
393 {0x360f, 0x02},
394 {0x3611, 0x10},
395 {0x3612, 0x27},
396 {0x3613, 0x33},
397 {0x3615, 0x0c},
398 {0x3616, 0x0e},
399 {0x3641, 0x02},
400 {0x3660, 0x82},
401 {0x3668, 0x54},
402 {0x3669, 0x00},
403 {0x366a, 0x3f},
404 {0x3667, 0xa0},
405 {0x3702, 0x40},
406 {0x3703, 0x44},
407 {0x3704, 0x2c},
408 {0x3705, 0x01},
409 {0x3706, 0x15},
410 {0x3707, 0x44},
411 {0x3708, 0x3c},
412 {0x3709, 0x1f},
413 {0x370a, 0x27},
414 {0x370b, 0x3c},
415 {0x3720, 0x55},
416 {0x3722, 0x84},
417 {0x3728, 0x40},
418 {0x372a, 0x00},
419 {0x372b, 0x02},
420 {0x372e, 0x22},
421 {0x372f, 0x90},
422 {0x3730, 0x00},
423 {0x3731, 0x00},
424 {0x3732, 0x00},
425 {0x3733, 0x00},
426 {0x3710, 0x28},
427 {0x3716, 0x03},
428 {0x3718, 0x10},
429 {0x3719, 0x0c},
430 {0x371a, 0x08},
431 {0x371c, 0xfc},
432 {0x3748, 0x00},
433 {0x3760, 0x13},
434 {0x3761, 0x33},
435 {0x3762, 0x86},
436 {0x3763, 0x16},
437 {0x3767, 0x24},
438 {0x3768, 0x06},
439 {0x3769, 0x45},
440 {0x376c, 0x23},
441 {0x376f, 0x80},
442 {0x3773, 0x06},
443 {0x3d84, 0x00},
444 {0x3d85, 0x17},
445 {0x3d8c, 0x73},
446 {0x3d8d, 0xbf},
447 {0x3800, 0x00},
448 {0x3801, 0x08},
449 {0x3802, 0x00},
450 {0x3803, 0x04},
451 {0x3804, 0x10},
452 {0x3805, 0x97},
453 {0x3806, 0x0c},
454 {0x3807, 0x4b},
455 {0x3808, 0x08},
456 {0x3809, 0x40},
457 {0x380a, 0x06},
458 {0x380b, 0x20},
459 {0x380c, 0x12},
460 {0x380d, 0xc0},
461 {0x380e, 0x06},
462 {0x380f, 0x80},
463 {0x3810, 0x00},
464 {0x3811, 0x04},
465 {0x3812, 0x00},
466 {0x3813, 0x02},
467 {0x3814, 0x31},
468 {0x3815, 0x31},
469 {0x3820, 0x02},
470 {0x3821, 0x06},
471 {0x3823, 0x00},
472 {0x3826, 0x00},
473 {0x3827, 0x02},
474 {0x3834, 0x00},
475 {0x3835, 0x1c},
476 {0x3836, 0x08},
477 {0x3837, 0x02},
478 {0x4000, 0xf1},
479 {0x4001, 0x00},
480 {0x4006, 0x04},
481 {0x4007, 0x04},
482 {0x400b, 0x0c},
483 {0x4011, 0x00},
484 {0x401a, 0x00},
485 {0x401b, 0x00},
486 {0x401c, 0x00},
487 {0x401d, 0x00},
488 {0x4020, 0x00},
489 {0x4021, 0xe4},
490 {0x4022, 0x04},
491 {0x4023, 0xd7},
492 {0x4024, 0x05},
493 {0x4025, 0xbc},
494 {0x4026, 0x05},
495 {0x4027, 0xbf},
496 {0x4028, 0x00},
497 {0x4029, 0x02},
498 {0x402a, 0x04},
499 {0x402b, 0x08},
500 {0x402c, 0x02},
501 {0x402d, 0x02},
502 {0x402e, 0x0c},
503 {0x402f, 0x08},
504 {0x403d, 0x2c},
505 {0x403f, 0x7f},
506 {0x4041, 0x07},
507 {0x4500, 0x82},
508 {0x4501, 0x3c},
509 {0x458b, 0x00},
510 {0x459c, 0x00},
511 {0x459d, 0x00},
512 {0x459e, 0x00},
513 {0x4601, 0x83},
514 {0x4602, 0x22},
515 {0x4603, 0x01},
516 {0x4800, 0x24}, //MIPI CLK control
517 {0x4837, 0x19},
518 {0x4d00, 0x04},
519 {0x4d01, 0x42},
520 {0x4d02, 0xd1},
521 {0x4d03, 0x90},
522 {0x4d04, 0x66},
523 {0x4d05, 0x65},
524 {0x4d0b, 0x00},
525 {0x5000, 0x0e},
526 {0x5001, 0x01},
527 {0x5002, 0x07},
528 {0x5013, 0x40},
529 {0x501c, 0x00},
530 {0x501d, 0x10},
531 {0x510f, 0xfc},
532 {0x5110, 0xf0},
533 {0x5111, 0x10},
534 {0x536d, 0x02},
535 {0x536e, 0x67},
536 {0x536f, 0x01},
537 {0x5370, 0x4c},
538 {0x5400, 0x00},
539 {0x5400, 0x00},
540 {0x5401, 0x61},
541 {0x5402, 0x00},
542 {0x5403, 0x00},
543 {0x5404, 0x00},
544 {0x5405, 0x40},
545 {0x540c, 0x05},
546 {0x5501, 0x00},
547 {0x5b00, 0x00},
548 {0x5b01, 0x00},
549 {0x5b02, 0x01},
550 {0x5b03, 0xff},
551 {0x5b04, 0x02},
552 {0x5b05, 0x6c},
553 {0x5b09, 0x02},
554 {0x5e00, 0x00},
555 {0x5e10, 0x1c},
556 {0x0102, 0x01}, //Fast standby enable
557 {REG_NULL, 0x00},
566 {0x3612, 0x27},
567 {0x370a, 0x26},
568 {0x372a, 0x00},
569 {0x372f, 0x90},
570 {0x3801, 0x08},
571 {0x3805, 0x97},
572 {0x3807, 0x4b},
573 {0x3808, 0x08},
574 {0x3809, 0x40},
575 {0x380a, 0x06},
576 {0x380b, 0x20},
577 {0x380c, 0x12},
578 {0x380d, 0xc0},
579 {0x380e, 0x06},
580 {0x380f, 0x80},
581 {0x3813, 0x02},
582 {0x3814, 0x31},
583 {0x3815, 0x31},
584 {0x3820, 0x06},
585 {0x3821, 0x01},
586 {0x3836, 0x08},
587 {0x3837, 0x02},
588 {0x4601, 0x04},
589 {0x4603, 0x00},
590 {0x4020, 0x00},
591 {0x4021, 0xE4},
592 {0x4022, 0x07},
593 {0x4023, 0x5F},
594 {0x4024, 0x08},
595 {0x4025, 0x44},
596 {0x4026, 0x08},
597 {0x4027, 0x47},
598 {0x4603, 0x01},
599 {0x5401, 0x61},
600 {0x5405, 0x40},
601 {REG_NULL, 0x00},
610 {0x3612, 0x2f},
611 {0x370a, 0x24},
612 {0x372a, 0x04},
613 {0x372f, 0xa0},
614 {0x3801, 0x0C},
615 {0x3805, 0x93},
616 {0x3807, 0x4B},
617 {0x3808, 0x10},
618 {0x3809, 0x80},
619 {0x380a, 0x0c},
620 {0x380b, 0x40},
621 {0x380e, 0x0d},
622 {0x380f, 0x00},
623 {0x3813, 0x04},
624 {0x3814, 0x11},
625 {0x3815, 0x11},
626 {0x3820, 0x00},
627 {0x3821, 0x04},
628 {0x3836, 0x04},
629 {0x3837, 0x01},
630 {0x4601, 0x87},
631 {0x4603, 0x01},
632 {0x4020, 0x02},
633 {0x4021, 0x4C},
634 {0x4022, 0x0E},
635 {0x4023, 0x37},
636 {0x4024, 0x0F},
637 {0x4025, 0x1C},
638 {0x4026, 0x0F},
639 {0x4027, 0x1F},
640 {0x4603, 0x00},
641 {0x5401, 0x71},
642 {0x5405, 0x80},
643 {REG_NULL, 0x00},
654 .exp_def = 0x0600,
655 .hts_def = 0x12c0,
656 .vts_def = 0x0680,
665 .exp_def = 0x0600,
666 .hts_def = 0x12c0,
667 .vts_def = 0x0d00,
693 dev_dbg(&client->dev, "write reg(0x%x val:0x%x)!\n", reg, val); in ov13850_write_reg()
698 buf[0] = reg >> 8; in ov13850_write_reg()
699 buf[1] = reg & 0xff; in ov13850_write_reg()
712 return 0; in ov13850_write_reg()
719 int ret = 0; in ov13850_write_array()
721 for (i = 0; ret == 0 && regs[i].addr != REG_NULL; i++) in ov13850_write_array()
735 __be32 data_be = 0; in ov13850_read_reg()
744 msgs[0].addr = client->addr; in ov13850_read_reg()
745 msgs[0].flags = 0; in ov13850_read_reg()
746 msgs[0].len = 2; in ov13850_read_reg()
747 msgs[0].buf = (u8 *)®_addr_be; in ov13850_read_reg()
761 return 0; in ov13850_read_reg()
776 int cur_best_fit = 0; in ov13850_find_best_fit()
780 for (i = 0; i < ARRAY_SIZE(supported_modes); i++) { in ov13850_find_best_fit()
826 return 0; in ov13850_set_fmt()
852 return 0; in ov13850_get_fmt()
859 if (code->index != 0) in ov13850_enum_mbus_code()
863 return 0; in ov13850_enum_mbus_code()
881 return 0; in ov13850_enum_frame_sizes()
907 return 0; in ov13850_g_frame_interval()
913 memset(inf, 0, sizeof(*inf)); in ov13850_get_module_inf()
923 long ret = 0; in ov13850_ioctl()
924 u32 stream = 0; in ov13850_ioctl()
961 u32 stream = 0; in ov13850_compat_ioctl32()
1035 int ret = 0; in ov13850_s_stream()
1044 if (ret < 0) { in ov13850_s_stream()
1072 int ret = 0; in ov13850_s_power()
1082 if (ret < 0) { in ov13850_s_power()
1126 if (ret < 0) in __ov13850_power_on()
1130 if (ret < 0) in __ov13850_power_on()
1135 if (ret < 0) { in __ov13850_power_on()
1140 gpiod_set_value_cansleep(ov13850->reset_gpio, 0); in __ov13850_power_on()
1143 if (ret < 0) { in __ov13850_power_on()
1159 return 0; in __ov13850_power_on()
1173 gpiod_set_value_cansleep(ov13850->pwdn_gpio, 0); in __ov13850_power_off()
1176 gpiod_set_value_cansleep(ov13850->reset_gpio, 0); in __ov13850_power_off()
1181 if (ret < 0) in __ov13850_power_off()
1185 gpiod_set_value_cansleep(ov13850->power_gpio, 0); in __ov13850_power_off()
1207 return 0; in ov13850_runtime_suspend()
1215 v4l2_subdev_get_try_format(sd, fh->pad, 0); in ov13850_open()
1216 const struct ov13850_mode *def_mode = &supported_modes[0]; in ov13850_open()
1228 return 0; in ov13850_open()
1243 return 0; in ov13850_enum_frame_interval()
1249 u32 val = 0; in ov13850_g_mbus_config()
1257 return 0; in ov13850_g_mbus_config()
1305 int ret = 0; in ov13850_set_ctrl()
1320 return 0; in ov13850_set_ctrl()
1351 dev_warn(&client->dev, "%s Unhandled id:0x%x, val:0x%x\n", in ov13850_set_ctrl()
1382 0, 0, link_freq_menu_items); in ov13850_initialize_controls()
1387 0, OV13850_PIXEL_RATE, 1, OV13850_PIXEL_RATE); in ov13850_initialize_controls()
1415 0, 0, ov13850_test_pattern_menu); in ov13850_initialize_controls()
1426 return 0; in ov13850_initialize_controls()
1438 u32 id = 0; in ov13850_check_sensor_id()
1459 dev_info(dev, "Detected OV%06x sensor, REVISION 0x%x\n", CHIP_ID, id); in ov13850_check_sensor_id()
1461 return 0; in ov13850_check_sensor_id()
1468 for (i = 0; i < OV13850_NUM_SUPPLIES; i++) in ov13850_configure_regulators()
1488 (DRIVER_VERSION & 0xff00) >> 8, in ov13850_probe()
1489 DRIVER_VERSION & 0x00ff); in ov13850_probe()
1509 ov13850->cur_mode = &supported_modes[0]; in ov13850_probe()
1574 if (ret < 0) in ov13850_probe()
1578 memset(facing, 0, sizeof(facing)); in ov13850_probe()
1579 if (strcmp(ov13850->module_facing, "back") == 0) in ov13850_probe()
1580 facing[0] = 'b'; in ov13850_probe()
1582 facing[0] = 'f'; in ov13850_probe()
1597 return 0; in ov13850_probe()
1630 return 0; in ov13850_remove()
1642 { "ovti,ov13850", 0 },