summaryrefslogtreecommitdiff
path: root/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7303.h
blob: 06370f36f2af89260e1c60aad64a354bbe701701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
#ifndef GC0308_H
#define GC0308_H


// Scene Mode
uint8_t gc0308_scene_mode_auto[] = {
	0xfe, 0x00,  // set page0
	0xec, 0x20,
};

uint8_t gc0308_scene_mode_night[] = {
	0xfe, 0x00,  // set page0
	0xec, 0x30,
};


// White Balance
uint8_t gc0308_wb_auto [] = {
	0xfe, 0x00,  // set page0
	0x5a, 0x56,
	0x5b, 0x40,
	0x5c, 0x4a,
	0x22, 0x57,
};

uint8_t gc0308_wb_incandescent [] = {
	0xfe, 0x00,  // set page0
	0x22, 0x55,
	0x5a, 0x48,
	0x5b, 0x40,
	0x5c, 0x5c,
};

uint8_t gc0308_wb_fluorescent [] = {
	0xfe, 0x00,  // set page0
	0x22, 0x55,
	0x5a, 0x40,
	0x5b, 0x42,
	0x5c, 0x50,
};

uint8_t gc0308_wb_daylight [] = {
	0xfe, 0x00,  // set page0
	0x22, 0x55,
	0x5a, 0x74,
	0x5b, 0x52,
	0x5c, 0x40,
};

uint8_t gc0308_wb_cloudy [] = {
	0xfe, 0x00,  // set page0
	0x22, 0x55,
	0x5a, 0x8c,
	0x5b, 0x50,
	0x5c, 0x40,
};


// Exposure
uint8_t gc0308_exposure_neg6[] = {
	0xfe, 0x00,  // set page0
	0xb5, 0xe0,
	0xd3, 0x38,
};

uint8_t gc0308_exposure_neg3[] = {
	0xfe, 0x00,  // set page0
	0xb5, 0xf0,
	0xd3, 0x40,
};

uint8_t gc0308_exposure_zero[] = {
	0xfe, 0x00,  // set page0
	0xb5, 0x00,
	0xd3, 0x48,
};

uint8_t gc0308_exposure_pos3[] = {
	0xfe, 0x00,  // set page0
	0xb5, 0x10,
	0xd3, 0x50,
};

uint8_t gc0308_exposure_pos6[] = {
	0xfe, 0x00,  // set page0
	0xb5, 0x20,
	0xd3, 0x58,
};


// Resolution
uint8_t gc0308_320x240[]= {
	0xfe, 0x01,
	0x54, 0x22,
	0x55, 0x03,
	0x56, 0x00,
	0x57, 0x00,
	0x58, 0x00,
	0x59, 0x00,
	0xfe, 0x00,
};

uint8_t gc0308_640x480[] = {
	0xfe,0x01,
	0x54,0x11,
	0x55,0x03,
	0x56,0x00,
	0x57,0x00,
	0x58,0x00,
	0x59,0x00,
	0xfe,0x00,
	0x46,0x00,
	0xfe,0x00,
};

uint8_t gc0308_default_regs_init[] = {
	0xfe,0x80,

	0xfe,0x00,  // set page0

	0xd2,0x10,  // close AEC
	0x22,0x55,  // close AWB

	0x03,0x01,
	0x04,0x2c,
	0x5a,0x56,
	0x5b,0x40,
	0x5c,0x4a,

	0x22,0x57,  // Open AWB

	0x01,0xfa,
	0x02,0x70,
	0x0f,0x01,

	0xe2,0x00,  //anti-flicker step [11:8]
	0xe3,0x64,  //anti-flicker step [7:0]

	0xe4,0x03,  //02//exp level 1  16.67fps
	0xe5,0x20,  //58
	0xe6,0x03,  //exp level 2  12.5fps
	0xe7,0x20,
	0xe8,0x04,  //exp level 3  8.33fps
	0xe9,0xb0,
	0xea,0x09,  //exp level 4  4.00fps
	0xeb,0xc4,

	0xec,0x20,

	0x05,0x00,
	0x06,0x00,
	0x07,0x00,
	0x08,0x00,
	0x09,0x01,
	0x0a,0xe8,
	0x0b,0x02,
	0x0c,0x88,
	0x0d,0x02,
	0x0e,0x02,
	0x10,0x22,
	0x11,0xfd,
	0x12,0x2a,
	0x13,0x00,
	0x14,0x10, //0x10

	0x15,0x0a,
	0x16,0x05,
	0x17,0x01,
	0x18,0x44,
	0x19,0x44,
	0x1a,0x1e,
	0x1b,0x00,
	0x1c,0xc1,
	0x1d,0x08,
	0x1e,0x60,
	0x1f,0x16,



	0x20,0xff,
	0x21,0xf8,
	0x22,0x57,
	0x24,0xa2,
	0x25,0x0f,

	//output sync_mode


	0x26,0x02,  //0x03  20101016 zhj

	0x2f,0x01,
	0x30,0xf7,
	0x31,0x50,
	0x32,0x00,
	0x39,0x04,
	0x3a,0x18,
	0x3b,0x20,
	0x3c,0x00,
	0x3d,0x00,
	0x3e,0x00,
	0x3f,0x00,
	0x50,0x10,
	0x53,0x82,
	0x54,0x80,
	0x55,0x80,
	0x56,0x82,
	0x8b,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cc,0xFF,
	0xf0,0x02,
	0xf1,0x01,
	0xf2,0x01,
	0xf3,0x30,
	0xf9,0x9f,
	0xfa,0x78,
	//----------------------------
	0xfe,0x01,// set page1
	0x00,0xf5,
	0x02,0x1a,
	0x0a,0xa0,
	0x0b,0x60,
	0x0c,0x08,
	0x0e,0x4c,
	0x0f,0x39,
	0x11,0x3f,
	0x12,0x72,
	0x13,0x13,
	0x14,0x42,
	0x15,0x43,
	0x16,0xc2,
	0x17,0xa8,
	0x18,0x18,
	0x19,0x40,
	0x1a,0xd0,
	0x1b,0xf5,
	0x70,0x40,
	0x71,0x58,
	0x72,0x30,
	0x73,0x48,
	0x74,0x20,
	0x75,0x60,
	0x77,0x20,
	0x78,0x32,
	0x30,0x03,
	0x31,0x40,
	0x32,0xe0,
	0x33,0xe0,
	0x34,0xe0,
	0x35,0xb0,
	0x36,0xc0,
	0x37,0xc0,
	0x38,0x04,
	0x39,0x09,
	0x3a,0x12,
	0x3b,0x1C,
	0x3c,0x28,
	0x3d,0x31,
	0x3e,0x44,
	0x3f,0x57,
	0x40,0x6C,
	0x41,0x81,
	0x42,0x94,
	0x43,0xA7,
	0x44,0xB8,
	0x45,0xD6,
	0x46,0xEE,
	0x47,0x0d,
	0xfe,0x00,// set page0

	//-----------Update the registers 2010/07/06-----------
	//Registers of Page0
	0xfe,0x00,// set page0
	0x10,0x26,
	0x11,0x0d, // fd

	0x1a,0x2a, // 1e


	0x1c,0x49,// c1
	0x1d,0x9a,// 08


	0x1e,0x61,// 60

	0x3a,0x20,

	0x50,0x14, // 10


	0x53,0x80,
	0x56,0x80,

	0x8b,0x20,//LSC
	0x8c,0x20,
	0x8d,0x20,
	0x8e,0x14,
	0x8f,0x10,
	0x90,0x14,

	0x94,0x02,
	0x95,0x07,
	0x96,0xe0,

	0xb1,0x40,// YCPT
	0xb2,0x40,
	0xb3,0x40,
	0xb6,0xe0,

	0xd0,0xcb,// AECT  c9


	0xd3,0x48,// 80

	0xf2,0x02,
	0xf7,0x12,
	0xf8,0x0a,

	//Registers of Page1
	0xfe,0x01,// set page1
	0x02,0x20,
	0x04,0x10,
	0x05,0x08,
	0x06,0x20,
	0x08,0x0a,

	0x0e,0x44,
	0x0f,0x32,
	0x10,0x41,
	0x11,0x37,
	0x12,0x22,
	0x13,0x19,
	0x14,0x44,
	0x15,0x44,

	0x19,0x50,
	0x1a,0xd8,

	0x32,0x10,

	0x35,0x00,
	0x36,0x80,
	0x37,0x00,
	//-----------Update the registers end---------//
	0xfe,0x00,// set page0
	0xd2,0x90,

       0x57,0x7d,
       0x58,0x80,
	0x59,0x80,
};

uint8_t gc0308_default_regs_exit[]={
};
#endif