Lines Matching +full:0 +full:x4800

42 #define MIPI_CTRL00_CLOCK_LANE_DISABLE		BIT(0)
44 #define OV5647_SW_STANDBY 0x0100
45 #define OV5647_SW_RESET 0x0103
46 #define OV5647_REG_CHIPID_H 0x300a
47 #define OV5647_REG_CHIPID_L 0x300b
48 #define OV5640_REG_PAD_OUT 0x300d
49 #define OV5647_REG_EXP_HI 0x3500
50 #define OV5647_REG_EXP_MID 0x3501
51 #define OV5647_REG_EXP_LO 0x3502
52 #define OV5647_REG_AEC_AGC 0x3503
53 #define OV5647_REG_GAIN_HI 0x350a
54 #define OV5647_REG_GAIN_LO 0x350b
55 #define OV5647_REG_VTS_HI 0x380e
56 #define OV5647_REG_VTS_LO 0x380f
57 #define OV5647_REG_FRAME_OFF_NUMBER 0x4202
58 #define OV5647_REG_MIPI_CTRL00 0x4800
59 #define OV5647_REG_MIPI_CTRL14 0x4814
60 #define OV5647_REG_AWB 0x5001
61 #define OV5647_REG_ISPCTRL3D 0x503d
63 #define REG_TERM 0xfffe
64 #define VAL_TERM 0xfe
65 #define REG_DLY 0xffff
127 0x00, /* Disabled */
128 0x80, /* Color Bars */
129 0x82, /* Color Squares */
130 0x81, /* Random Data */
134 {0x3000, 0x00},
135 {0x3001, 0x00},
136 {0x3002, 0x00},
140 {0x3000, 0x0f},
141 {0x3001, 0xff},
142 {0x3002, 0xe4},
146 {0x0100, 0x00},
147 {0x0103, 0x01},
148 {0x3034, 0x1a},
149 {0x3035, 0x21},
150 {0x3036, 0x69},
151 {0x303c, 0x11},
152 {0x3106, 0xf5},
153 {0x3821, 0x06},
154 {0x3820, 0x00},
155 {0x3827, 0xec},
156 {0x370c, 0x03},
157 {0x3612, 0x5b},
158 {0x3618, 0x04},
159 {0x5000, 0x06},
160 {0x5002, 0x41},
161 {0x5003, 0x08},
162 {0x5a00, 0x08},
163 {0x3000, 0x00},
164 {0x3001, 0x00},
165 {0x3002, 0x00},
166 {0x3016, 0x08},
167 {0x3017, 0xe0},
168 {0x3018, 0x44},
169 {0x301c, 0xf8},
170 {0x301d, 0xf0},
171 {0x3a18, 0x00},
172 {0x3a19, 0xf8},
173 {0x3c01, 0x80},
174 {0x3b07, 0x0c},
175 {0x380c, 0x0b},
176 {0x380d, 0x1c},
177 {0x3814, 0x11},
178 {0x3815, 0x11},
179 {0x3708, 0x64},
180 {0x3709, 0x12},
181 {0x3808, 0x0a},
182 {0x3809, 0x20},
183 {0x380a, 0x07},
184 {0x380b, 0x98},
185 {0x3800, 0x00},
186 {0x3801, 0x00},
187 {0x3802, 0x00},
188 {0x3803, 0x00},
189 {0x3804, 0x0a},
190 {0x3805, 0x3f},
191 {0x3806, 0x07},
192 {0x3807, 0xa3},
193 {0x3811, 0x10},
194 {0x3813, 0x06},
195 {0x3630, 0x2e},
196 {0x3632, 0xe2},
197 {0x3633, 0x23},
198 {0x3634, 0x44},
199 {0x3636, 0x06},
200 {0x3620, 0x64},
201 {0x3621, 0xe0},
202 {0x3600, 0x37},
203 {0x3704, 0xa0},
204 {0x3703, 0x5a},
205 {0x3715, 0x78},
206 {0x3717, 0x01},
207 {0x3731, 0x02},
208 {0x370b, 0x60},
209 {0x3705, 0x1a},
210 {0x3f05, 0x02},
211 {0x3f06, 0x10},
212 {0x3f01, 0x0a},
213 {0x3a08, 0x01},
214 {0x3a09, 0x28},
215 {0x3a0a, 0x00},
216 {0x3a0b, 0xf6},
217 {0x3a0d, 0x08},
218 {0x3a0e, 0x06},
219 {0x3a0f, 0x58},
220 {0x3a10, 0x50},
221 {0x3a1b, 0x58},
222 {0x3a1e, 0x50},
223 {0x3a11, 0x60},
224 {0x3a1f, 0x28},
225 {0x4001, 0x02},
226 {0x4004, 0x04},
227 {0x4000, 0x09},
228 {0x4837, 0x19},
229 {0x4800, 0x24},
230 {0x3503, 0x03},
231 {0x0100, 0x01},
235 {0x0100, 0x00},
236 {0x0103, 0x01},
237 {0x3034, 0x1a},
238 {0x3035, 0x21},
239 {0x3036, 0x62},
240 {0x303c, 0x11},
241 {0x3106, 0xf5},
242 {0x3821, 0x06},
243 {0x3820, 0x00},
244 {0x3827, 0xec},
245 {0x370c, 0x03},
246 {0x3612, 0x5b},
247 {0x3618, 0x04},
248 {0x5000, 0x06},
249 {0x5002, 0x41},
250 {0x5003, 0x08},
251 {0x5a00, 0x08},
252 {0x3000, 0x00},
253 {0x3001, 0x00},
254 {0x3002, 0x00},
255 {0x3016, 0x08},
256 {0x3017, 0xe0},
257 {0x3018, 0x44},
258 {0x301c, 0xf8},
259 {0x301d, 0xf0},
260 {0x3a18, 0x00},
261 {0x3a19, 0xf8},
262 {0x3c01, 0x80},
263 {0x3b07, 0x0c},
264 {0x380c, 0x09},
265 {0x380d, 0x70},
266 {0x3814, 0x11},
267 {0x3815, 0x11},
268 {0x3708, 0x64},
269 {0x3709, 0x12},
270 {0x3808, 0x07},
271 {0x3809, 0x80},
272 {0x380a, 0x04},
273 {0x380b, 0x38},
274 {0x3800, 0x01},
275 {0x3801, 0x5c},
276 {0x3802, 0x01},
277 {0x3803, 0xb2},
278 {0x3804, 0x08},
279 {0x3805, 0xe3},
280 {0x3806, 0x05},
281 {0x3807, 0xf1},
282 {0x3811, 0x04},
283 {0x3813, 0x02},
284 {0x3630, 0x2e},
285 {0x3632, 0xe2},
286 {0x3633, 0x23},
287 {0x3634, 0x44},
288 {0x3636, 0x06},
289 {0x3620, 0x64},
290 {0x3621, 0xe0},
291 {0x3600, 0x37},
292 {0x3704, 0xa0},
293 {0x3703, 0x5a},
294 {0x3715, 0x78},
295 {0x3717, 0x01},
296 {0x3731, 0x02},
297 {0x370b, 0x60},
298 {0x3705, 0x1a},
299 {0x3f05, 0x02},
300 {0x3f06, 0x10},
301 {0x3f01, 0x0a},
302 {0x3a08, 0x01},
303 {0x3a09, 0x4b},
304 {0x3a0a, 0x01},
305 {0x3a0b, 0x13},
306 {0x3a0d, 0x04},
307 {0x3a0e, 0x03},
308 {0x3a0f, 0x58},
309 {0x3a10, 0x50},
310 {0x3a1b, 0x58},
311 {0x3a1e, 0x50},
312 {0x3a11, 0x60},
313 {0x3a1f, 0x28},
314 {0x4001, 0x02},
315 {0x4004, 0x04},
316 {0x4000, 0x09},
317 {0x4837, 0x19},
318 {0x4800, 0x34},
319 {0x3503, 0x03},
320 {0x0100, 0x01},
324 {0x0100, 0x00},
325 {0x0103, 0x01},
326 {0x3034, 0x1a},
327 {0x3035, 0x21},
328 {0x3036, 0x62},
329 {0x303c, 0x11},
330 {0x3106, 0xf5},
331 {0x3827, 0xec},
332 {0x370c, 0x03},
333 {0x3612, 0x59},
334 {0x3618, 0x00},
335 {0x5000, 0x06},
336 {0x5002, 0x41},
337 {0x5003, 0x08},
338 {0x5a00, 0x08},
339 {0x3000, 0x00},
340 {0x3001, 0x00},
341 {0x3002, 0x00},
342 {0x3016, 0x08},
343 {0x3017, 0xe0},
344 {0x3018, 0x44},
345 {0x301c, 0xf8},
346 {0x301d, 0xf0},
347 {0x3a18, 0x00},
348 {0x3a19, 0xf8},
349 {0x3c01, 0x80},
350 {0x3b07, 0x0c},
351 {0x3800, 0x00},
352 {0x3801, 0x00},
353 {0x3802, 0x00},
354 {0x3803, 0x00},
355 {0x3804, 0x0a},
356 {0x3805, 0x3f},
357 {0x3806, 0x07},
358 {0x3807, 0xa3},
359 {0x3808, 0x05},
360 {0x3809, 0x10},
361 {0x380a, 0x03},
362 {0x380b, 0xcc},
363 {0x380c, 0x07},
364 {0x380d, 0x68},
365 {0x3811, 0x0c},
366 {0x3813, 0x06},
367 {0x3814, 0x31},
368 {0x3815, 0x31},
369 {0x3630, 0x2e},
370 {0x3632, 0xe2},
371 {0x3633, 0x23},
372 {0x3634, 0x44},
373 {0x3636, 0x06},
374 {0x3620, 0x64},
375 {0x3621, 0xe0},
376 {0x3600, 0x37},
377 {0x3704, 0xa0},
378 {0x3703, 0x5a},
379 {0x3715, 0x78},
380 {0x3717, 0x01},
381 {0x3731, 0x02},
382 {0x370b, 0x60},
383 {0x3705, 0x1a},
384 {0x3f05, 0x02},
385 {0x3f06, 0x10},
386 {0x3f01, 0x0a},
387 {0x3a08, 0x01},
388 {0x3a09, 0x28},
389 {0x3a0a, 0x00},
390 {0x3a0b, 0xf6},
391 {0x3a0d, 0x08},
392 {0x3a0e, 0x06},
393 {0x3a0f, 0x58},
394 {0x3a10, 0x50},
395 {0x3a1b, 0x58},
396 {0x3a1e, 0x50},
397 {0x3a11, 0x60},
398 {0x3a1f, 0x28},
399 {0x4001, 0x02},
400 {0x4004, 0x04},
401 {0x4000, 0x09},
402 {0x4837, 0x16},
403 {0x4800, 0x24},
404 {0x3503, 0x03},
405 {0x3820, 0x41},
406 {0x3821, 0x07},
407 {0x350a, 0x00},
408 {0x350b, 0x10},
409 {0x3500, 0x00},
410 {0x3501, 0x1a},
411 {0x3502, 0xf0},
412 {0x3212, 0xa0},
413 {0x0100, 0x01},
417 {0x0100, 0x00},
418 {0x0103, 0x01},
419 {0x3035, 0x11},
420 {0x3036, 0x46},
421 {0x303c, 0x11},
422 {0x3821, 0x07},
423 {0x3820, 0x41},
424 {0x370c, 0x03},
425 {0x3612, 0x59},
426 {0x3618, 0x00},
427 {0x5000, 0x06},
428 {0x5003, 0x08},
429 {0x5a00, 0x08},
430 {0x3000, 0xff},
431 {0x3001, 0xff},
432 {0x3002, 0xff},
433 {0x301d, 0xf0},
434 {0x3a18, 0x00},
435 {0x3a19, 0xf8},
436 {0x3c01, 0x80},
437 {0x3b07, 0x0c},
438 {0x380c, 0x07},
439 {0x380d, 0x3c},
440 {0x3814, 0x35},
441 {0x3815, 0x35},
442 {0x3708, 0x64},
443 {0x3709, 0x52},
444 {0x3808, 0x02},
445 {0x3809, 0x80},
446 {0x380a, 0x01},
447 {0x380b, 0xe0},
448 {0x3800, 0x00},
449 {0x3801, 0x10},
450 {0x3802, 0x00},
451 {0x3803, 0x00},
452 {0x3804, 0x0a},
453 {0x3805, 0x2f},
454 {0x3806, 0x07},
455 {0x3807, 0x9f},
456 {0x3630, 0x2e},
457 {0x3632, 0xe2},
458 {0x3633, 0x23},
459 {0x3634, 0x44},
460 {0x3620, 0x64},
461 {0x3621, 0xe0},
462 {0x3600, 0x37},
463 {0x3704, 0xa0},
464 {0x3703, 0x5a},
465 {0x3715, 0x78},
466 {0x3717, 0x01},
467 {0x3731, 0x02},
468 {0x370b, 0x60},
469 {0x3705, 0x1a},
470 {0x3f05, 0x02},
471 {0x3f06, 0x10},
472 {0x3f01, 0x0a},
473 {0x3a08, 0x01},
474 {0x3a09, 0x2e},
475 {0x3a0a, 0x00},
476 {0x3a0b, 0xfb},
477 {0x3a0d, 0x02},
478 {0x3a0e, 0x01},
479 {0x3a0f, 0x58},
480 {0x3a10, 0x50},
481 {0x3a1b, 0x58},
482 {0x3a1e, 0x50},
483 {0x3a11, 0x60},
484 {0x3a1f, 0x28},
485 {0x4001, 0x02},
486 {0x4004, 0x02},
487 {0x4000, 0x09},
488 {0x3000, 0x00},
489 {0x3001, 0x00},
490 {0x3002, 0x00},
491 {0x3017, 0xe0},
492 {0x301c, 0xfc},
493 {0x3636, 0x06},
494 {0x3016, 0x08},
495 {0x3827, 0xec},
496 {0x3018, 0x44},
497 {0x3035, 0x21},
498 {0x3106, 0xf5},
499 {0x3034, 0x1a},
500 {0x301c, 0xf8},
501 {0x4800, 0x34},
502 {0x3503, 0x03},
503 {0x0100, 0x01},
524 .vts = 0x7b0,
545 .vts = 0x450,
566 .vts = 0x59b,
587 .vts = 0x1f8,
599 unsigned char data[4] = { reg >> 8, reg & 0xff, val >> 8, val & 0xff}; in ov5647_write16()
604 if (ret < 0) { in ov5647_write16()
610 return 0; in ov5647_write16()
615 unsigned char data[3] = { reg >> 8, reg & 0xff, val}; in ov5647_write()
620 if (ret < 0) { in ov5647_write()
626 return 0; in ov5647_write()
632 u8 buf[2] = { reg >> 8, reg & 0xff }; in ov5647_read()
636 msg[0].addr = client->addr; in ov5647_read()
637 msg[0].flags = client->flags; in ov5647_read()
638 msg[0].buf = buf; in ov5647_read()
639 msg[0].len = sizeof(buf); in ov5647_read()
650 return ret >= 0 ? -EINVAL : ret; in ov5647_read()
653 *val = buf[0]; in ov5647_read()
655 return 0; in ov5647_read()
663 for (i = 0; i < array_size; i++) { in ov5647_write_array()
665 if (ret < 0) in ov5647_write_array()
669 return 0; in ov5647_write_array()
678 if (ret < 0) in ov5647_set_virtual_channel()
695 if (ret < 0) in ov5647_set_mode()
700 if (ret < 0) { in ov5647_set_mode()
705 ret = ov5647_set_virtual_channel(sd, 0); in ov5647_set_mode()
706 if (ret < 0) in ov5647_set_mode()
710 if (ret < 0) in ov5647_set_mode()
713 if (!(resetval & 0x01)) { in ov5647_set_mode()
715 ret = ov5647_write(sd, OV5647_SW_STANDBY, 0x01); in ov5647_set_mode()
716 if (ret < 0) in ov5647_set_mode()
720 return 0; in ov5647_set_mode()
746 if (ret < 0) in ov5647_stream_on()
749 ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x00); in ov5647_stream_on()
750 if (ret < 0) in ov5647_stream_on()
753 return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x00); in ov5647_stream_on()
763 if (ret < 0) in ov5647_stream_off()
766 ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x0f); in ov5647_stream_off()
767 if (ret < 0) in ov5647_stream_off()
770 return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x01); in ov5647_stream_off()
781 gpiod_set_value_cansleep(sensor->pwdn, 0); in ov5647_power_on()
786 if (ret < 0) { in ov5647_power_on()
793 if (ret < 0) { in ov5647_power_on()
800 if (ret < 0) { in ov5647_power_on()
805 return 0; in ov5647_power_on()
825 if (ret < 0) in ov5647_power_off()
830 if (ret < 0) in ov5647_power_off()
833 rdval &= ~0x01; in ov5647_power_off()
835 if (ret < 0) in ov5647_power_off()
841 return 0; in ov5647_power_off()
851 ret = ov5647_read(sd, reg->reg & 0xff, &val); in ov5647_sensor_get_register()
852 if (ret < 0) in ov5647_sensor_get_register()
858 return 0; in ov5647_sensor_get_register()
864 return ov5647_write(sd, reg->reg & 0xff, reg->val & 0xff); in ov5647_sensor_set_register()
903 if (ret < 0) in ov5647_s_stream()
907 if (ret < 0) { in ov5647_s_stream()
913 if (ret < 0) { in ov5647_s_stream()
922 return 0; in ov5647_s_stream()
940 if (code->index > 0) in ov5647_enum_mbus_code()
945 return 0; in ov5647_enum_mbus_code()
964 return 0; in ov5647_enum_frame_size()
989 return 0; in ov5647_get_pad_fmt()
1036 return 0; in ov5647_set_pad_fmt()
1052 return 0; in ov5647_get_selection()
1056 sel->r.top = 0; in ov5647_get_selection()
1057 sel->r.left = 0; in ov5647_get_selection()
1061 return 0; in ov5647_get_selection()
1070 return 0; in ov5647_get_selection()
1096 ret = ov5647_write(sd, OV5647_SW_RESET, 0x01); in ov5647_detect()
1097 if (ret < 0) in ov5647_detect()
1101 if (ret < 0) in ov5647_detect()
1104 if (read != 0x56) { in ov5647_detect()
1105 dev_err(&client->dev, "ID High expected 0x56 got %x", read); in ov5647_detect()
1110 if (ret < 0) in ov5647_detect()
1113 if (read != 0x47) { in ov5647_detect()
1114 dev_err(&client->dev, "ID Low expected 0x47 got %x", read); in ov5647_detect()
1118 return ov5647_write(sd, OV5647_SW_RESET, 0x00); in ov5647_detect()
1124 v4l2_subdev_state_get_format(fh->state, 0); in ov5647_open()
1125 struct v4l2_rect *crop = v4l2_subdev_state_get_crop(fh->state, 0); in ov5647_open()
1134 return 0; in ov5647_open()
1143 return ov5647_write(sd, OV5647_REG_AWB, val ? 1 : 0); in ov5647_s_auto_white_balance()
1167 * clearing bit 0. in ov5647_s_exposure_auto()
1174 val == V4L2_EXPOSURE_MANUAL ? reg | BIT(0) in ov5647_s_exposure_auto()
1175 : reg & ~BIT(0)); in ov5647_s_exposure_auto()
1187 return ov5647_write(sd, OV5647_REG_GAIN_LO, val & 0xff); in ov5647_s_analogue_gain()
1198 ret = ov5647_write(sd, OV5647_REG_EXP_HI, (val >> 12) & 0xf); in ov5647_s_exposure()
1202 ret = ov5647_write(sd, OV5647_REG_EXP_MID, (val >> 4) & 0xff); in ov5647_s_exposure()
1206 return ov5647_write(sd, OV5647_REG_EXP_LO, (val & 0xf) << 4); in ov5647_s_exposure()
1215 int ret = 0; in ov5647_s_ctrl()
1237 if (pm_runtime_get_if_in_use(&client->dev) == 0) in ov5647_s_ctrl()
1238 return 0; in ov5647_s_ctrl()
1273 "Control (id:0x%x, val:0x%x) not supported\n", in ov5647_s_ctrl()
1295 V4L2_CID_AUTOGAIN, 0, 1, 1, 0); in ov5647_init_controls()
1298 V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 0); in ov5647_init_controls()
1302 0, V4L2_EXPOSURE_MANUAL); in ov5647_init_controls()
1339 0, 0, ov5647_test_pattern_menu); in ov5647_init_controls()
1348 return 0; in ov5647_init_controls()
1364 of_graph_get_endpoint_by_regs(np, 0, -1); in ov5647_parse_dt()
1377 return 0; in ov5647_parse_dt()
1436 if (ret < 0) in ov5647_probe()
1444 if (ret < 0) in ov5647_probe()
1448 if (ret < 0) in ov5647_probe()
1458 return 0; in ov5647_probe()