mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
[linux-3.10.git] / drivers / media / i2c / ov5693_mode_tbls.h
1 /*
2  * ov5693_mode_tbls.h - ov5693 sensor mode tables
3  *
4  * Copyright (c) 2015-2016, NVIDIA CORPORATION, All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __OV5693_TABLES__
20 #define __OV5693_TABLES__
21
22 #include <media/camera_common.h>
23
24 #define OV5693_TABLE_WAIT_MS    0
25 #define OV5693_TABLE_END        1
26 #define OV5693_MAX_RETRIES      3
27
28 #define ov5693_reg struct reg_8
29
30 static const ov5693_reg ov5693_start[] = {
31         {0x0100, 0x01}, /* mode select streaming on */
32         {OV5693_TABLE_END, 0x00}
33 };
34
35 static const ov5693_reg ov5693_stop[] = {
36         {0x0100, 0x00}, /* mode select streaming on */
37         {OV5693_TABLE_END, 0x00}
38 };
39
40 static const ov5693_reg tp_colorbars[] = {
41         {0x0600, 0x00},
42         {0x0601, 0x02},
43
44         {OV5693_TABLE_END, 0x00}
45 };
46
47 static const ov5693_reg mode_2592x1944[] = {
48         {0x0100, 0x00},/* Including sw reset */
49         {0x3001, 0x0a},
50         {0x3002, 0x80},
51         {0x3006, 0x00},
52         {0x3011, 0x21},
53         {0x3012, 0x09},
54         {0x3013, 0x10},
55         {0x3014, 0x00},
56         {0x3015, 0x08},
57         {0x3016, 0xf0},
58         {0x3017, 0xf0},
59         {0x3018, 0xf0},
60         {0x301b, 0xb4},
61         {0x301d, 0x02},
62         {0x3021, 0x00},
63         {0x3022, 0x01},
64         {0x3028, 0x44},
65         {0x3090, 0x02},
66         {0x3091, 0x0e},
67         {0x3092, 0x00},
68         {0x3093, 0x00},
69         {0x3098, 0x03},
70         {0x3099, 0x1e},
71         {0x309a, 0x02},
72         {0x309b, 0x01},
73         {0x309c, 0x00},
74         {0x30a0, 0xd2},
75         {0x30a2, 0x01},
76         {0x30b2, 0x00},
77         {0x30b3, 0x68},
78         {0x30b4, 0x03},
79         {0x30b5, 0x04},
80         {0x30b6, 0x01},
81         {0x3104, 0x21},
82         {0x3106, 0x00},
83         {0x3406, 0x01},
84         {0x3500, 0x00},
85         {0x3501, 0x7b},
86         {0x3502, 0x00},
87         {0x3503, 0x07},
88         {0x3504, 0x00},
89         {0x3505, 0x00},
90         {0x3506, 0x00},
91         {0x3507, 0x02},
92         {0x3508, 0x00},
93         {0x3509, 0x10},
94         {0x350a, 0x00},
95         {0x350b, 0x40},
96         {0x3601, 0x0a},
97         {0x3602, 0x18},
98         {0x3612, 0x80},
99         {0x3620, 0x54},
100         {0x3621, 0xc7},
101         {0x3622, 0x0f},
102         {0x3625, 0x10},
103         {0x3630, 0x55},
104         {0x3631, 0xf4},
105         {0x3632, 0x00},
106         {0x3633, 0x34},
107         {0x3634, 0x02},
108         {0x364d, 0x0d},
109         {0x364f, 0xdd},
110         {0x3660, 0x04},
111         {0x3662, 0x10},
112         {0x3663, 0xf1},
113         {0x3665, 0x00},
114         {0x3666, 0x20},
115         {0x3667, 0x00},
116         {0x366a, 0x80},
117         {0x3680, 0xe0},
118         {0x3681, 0x00},
119         {0x3700, 0x42},
120         {0x3701, 0x14},
121         {0x3702, 0xa0},
122         {0x3703, 0xd8},
123         {0x3704, 0x78},
124         {0x3705, 0x02},
125         {0x3708, 0xe2},
126         {0x3709, 0xc3},
127         {0x370a, 0x00},
128         {0x370b, 0x20},
129         {0x370c, 0x0c},
130         {0x370d, 0x11},
131         {0x370e, 0x00},
132         {0x370f, 0x40},
133         {0x3710, 0x00},
134         {0x371a, 0x1c},
135         {0x371b, 0x05},
136         {0x371c, 0x01},
137         {0x371e, 0xa1},
138         {0x371f, 0x0c},
139         {0x3721, 0x00},
140         {0x3724, 0x10},
141         {0x3726, 0x00},
142         {0x372a, 0x01},
143         {0x3730, 0x10},
144         {0x3738, 0x22},
145         {0x3739, 0xe5},
146         {0x373a, 0x50},
147         {0x373b, 0x02},
148         {0x373c, 0x41},
149         {0x373f, 0x02},
150         {0x3740, 0x42},
151         {0x3741, 0x02},
152         {0x3742, 0x18},
153         {0x3743, 0x01},
154         {0x3744, 0x02},
155         {0x3747, 0x10},
156         {0x374c, 0x04},
157         {0x3751, 0xf0},
158         {0x3752, 0x00},
159         {0x3753, 0x00},
160         {0x3754, 0xc0},
161         {0x3755, 0x00},
162         {0x3756, 0x1a},
163         {0x3758, 0x00},
164         {0x3759, 0x0f},
165         {0x376b, 0x44},
166         {0x375c, 0x04},
167         {0x3776, 0x00},
168         {0x377f, 0x08},
169         {0x3780, 0x22},
170         {0x3781, 0x0c},
171         {0x3784, 0x2c},
172         {0x3785, 0x1e},
173         {0x378f, 0xf5},
174         {0x3791, 0xb0},
175         {0x3795, 0x00},
176         {0x3796, 0x64},
177         {0x3797, 0x11},
178         {0x3798, 0x30},
179         {0x3799, 0x41},
180         {0x379a, 0x07},
181         {0x379b, 0xb0},
182         {0x379c, 0x0c},
183         {0x37c5, 0x00},
184         {0x37c6, 0x00},
185         {0x37c7, 0x00},
186         {0x37c9, 0x00},
187         {0x37ca, 0x00},
188         {0x37cb, 0x00},
189         {0x37de, 0x00},
190         {0x37df, 0x00},
191         {0x3800, 0x00},
192         {0x3801, 0x02},
193         {0x3802, 0x00},
194         {0x3803, 0x02},
195         {0x3804, 0x0a},
196         {0x3805, 0x41},
197         {0x3806, 0x07},
198         {0x3807, 0xa5},
199         {0x3808, 0x0a},
200         {0x3809, 0x20},
201         {0x380a, 0x07},
202         {0x380b, 0x98},
203         {0x380c, 0x0a},
204         {0x380d, 0x80},
205         {0x380e, 0x07},
206         {0x380f, 0xc0},
207         {0x3810, 0x00},
208         {0x3811, 0x02},
209         {0x3812, 0x00},
210         {0x3813, 0x02},
211         {0x3814, 0x11},
212         {0x3815, 0x11},
213         {0x3820, 0x00},
214         {0x3821, 0x1e},
215         {0x3823, 0x00},
216         {0x3824, 0x00},
217         {0x3825, 0x00},
218         {0x3826, 0x00},
219         {0x3827, 0x00},
220         {0x382a, 0x04},
221         {0x3a04, 0x06},
222         {0x3a05, 0x14},
223         {0x3a06, 0x00},
224         {0x3a07, 0xfe},
225         {0x3b00, 0x00},
226         {0x3b02, 0x00},
227         {0x3b03, 0x00},
228         {0x3b04, 0x00},
229         {0x3b05, 0x00},
230         {0x3d00, 0x00},
231         {0x3d01, 0x00},
232         {0x3d02, 0x00},
233         {0x3d03, 0x00},
234         {0x3d04, 0x00},
235         {0x3d05, 0x00},
236         {0x3d06, 0x00},
237         {0x3d07, 0x00},
238         {0x3d08, 0x00},
239         {0x3d09, 0x00},
240         {0x3d0a, 0x00},
241         {0x3d0b, 0x00},
242         {0x3d0c, 0x00},
243         {0x3d0d, 0x00},
244         {0x3d0e, 0x00},
245         {0x3d0f, 0x00},
246         {0x3d80, 0x00},
247         {0x3d81, 0x00},
248         {0x3d84, 0x00},
249         {0x3e07, 0x20},
250         {0x4000, 0x08},
251         {0x4001, 0x04},
252         {0x4002, 0x45},
253         {0x4004, 0x08},
254         {0x4005, 0x18},
255         {0x4006, 0x20},
256         {0x4008, 0x24},
257         {0x4009, 0x10},
258         {0x400c, 0x00},
259         {0x400d, 0x00},
260         {0x4058, 0x00},
261         {0x4101, 0xb2},
262         {0x4303, 0x00},
263         {0x4304, 0x08},
264         {0x4307, 0x30},
265         {0x4311, 0x04},
266         {0x4315, 0x01},
267         {0x4511, 0x05},
268         {0x4512, 0x01},
269         {0x4800, 0x20}, /* dis-continuous */
270         {0x4806, 0x00},
271         {0x4816, 0x52},
272         {0x481f, 0x30},
273         {0x4826, 0x32},
274         {0x4831, 0x6a},
275         {0x4d00, 0x04},
276         {0x4d01, 0x71},
277         {0x4d02, 0xfd},
278         {0x4d03, 0xf5},
279         {0x4d04, 0x0c},
280         {0x4d05, 0xcc},
281         {0x4837, 0x0a},
282         {0x5000, 0x06},
283         {0x5001, 0x01},
284         {0x5002, 0x00},
285         {0x5003, 0x20},
286         {0x5046, 0x0a},
287         {0x5013, 0x00},
288         {0x5046, 0x0a},
289         {0x5780, 0x1c},
290         {0x5786, 0x20},
291         {0x5787, 0x10},
292         {0x5788, 0x18},
293         {0x578a, 0x04},
294         {0x578b, 0x02},
295         {0x578c, 0x02},
296         {0x578e, 0x06},
297         {0x578f, 0x02},
298         {0x5790, 0x02},
299         {0x5791, 0xff},
300         {0x5842, 0x01},
301         {0x5843, 0x2b},
302         {0x5844, 0x01},
303         {0x5845, 0x92},
304         {0x5846, 0x01},
305         {0x5847, 0x8f},
306         {0x5848, 0x01},
307         {0x5849, 0x0c},
308         {0x5e00, 0x00},
309         {0x5e10, 0x0c},
310         {OV5693_TABLE_END, 0x0000}
311 };
312
313 static const ov5693_reg mode_2592x1458[] = {
314         {0x0100, 0x00},/* Including sw reset */
315         {0x3001, 0x0a},
316         {0x3002, 0x80},
317         {0x3006, 0x00},
318         {0x3011, 0x21},
319         {0x3012, 0x09},
320         {0x3013, 0x10},
321         {0x3014, 0x00},
322         {0x3015, 0x08},
323         {0x3016, 0xf0},
324         {0x3017, 0xf0},
325         {0x3018, 0xf0},
326         {0x301b, 0xb4},
327         {0x301d, 0x02},
328         {0x3021, 0x00},
329         {0x3022, 0x01},
330         {0x3028, 0x44},
331         {0x3098, 0x03},
332         {0x3099, 0x1e},
333         {0x309a, 0x02},
334         {0x309b, 0x01},
335         {0x309c, 0x00},
336         {0x30a0, 0xd2},
337         {0x30a2, 0x01},
338         {0x30b2, 0x00},
339         {0x30b3, 0x68},
340         {0x30b4, 0x03},
341         {0x30b5, 0x04},
342         {0x30b6, 0x01},
343         {0x3104, 0x21},
344         {0x3106, 0x00},
345         {0x3400, 0x04},
346         {0x3401, 0x00},
347         {0x3402, 0x04},
348         {0x3403, 0x00},
349         {0x3404, 0x04},
350         {0x3405, 0x00},
351         {0x3406, 0x01},
352         {0x3500, 0x00},
353         {0x3501, 0x7b},
354         {0x3502, 0x00},
355         {0x3503, 0x07},
356         {0x3504, 0x00},
357         {0x3505, 0x00},
358         {0x3506, 0x00},
359         {0x3507, 0x02},
360         {0x3508, 0x00},
361         {0x3509, 0x10},
362         {0x350a, 0x00},
363         {0x350b, 0x40},
364         {0x3600, 0xbc},
365         {0x3601, 0x0a},
366         {0x3602, 0x38},
367         {0x3612, 0x80},
368         {0x3620, 0x44},
369         {0x3621, 0xb5},
370         {0x3622, 0x0c},
371         {0x3625, 0x10},
372         {0x3630, 0x55},
373         {0x3631, 0xf4},
374         {0x3632, 0x00},
375         {0x3633, 0x34},
376         {0x3634, 0x02},
377         {0x364d, 0x0d},
378         {0x364f, 0xdd},
379         {0x3660, 0x04},
380         {0x3662, 0x10},
381         {0x3663, 0xf1},
382         {0x3665, 0x00},
383         {0x3666, 0x20},
384         {0x3667, 0x00},
385         {0x366a, 0x80},
386         {0x3680, 0xe0},
387         {0x3681, 0x00},
388         {0x3700, 0x42},
389         {0x3701, 0x14},
390         {0x3702, 0xa0},
391         {0x3703, 0xd8},
392         {0x3704, 0x78},
393         {0x3705, 0x02},
394         {0x3708, 0xe2},
395         {0x3709, 0xc3},
396         {0x370a, 0x00},
397         {0x370b, 0x20},
398         {0x370c, 0x0c},
399         {0x370d, 0x11},
400         {0x370e, 0x00},
401         {0x370f, 0x40},
402         {0x3710, 0x00},
403         {0x371a, 0x1c},
404         {0x371b, 0x05},
405         {0x371c, 0x01},
406         {0x371e, 0xa1},
407         {0x371f, 0x0c},
408         {0x3721, 0x00},
409         {0x3724, 0x10},
410         {0x3726, 0x00},
411         {0x372a, 0x01},
412         {0x3730, 0x10},
413         {0x3738, 0x22},
414         {0x3739, 0xe5},
415         {0x373a, 0x50},
416         {0x373b, 0x02},
417         {0x373c, 0x41},
418         {0x373f, 0x02},
419         {0x3740, 0x42},
420         {0x3741, 0x02},
421         {0x3742, 0x18},
422         {0x3743, 0x01},
423         {0x3744, 0x02},
424         {0x3747, 0x10},
425         {0x374c, 0x04},
426         {0x3751, 0xf0},
427         {0x3752, 0x00},
428         {0x3753, 0x00},
429         {0x3754, 0xc0},
430         {0x3755, 0x00},
431         {0x3756, 0x1a},
432         {0x3758, 0x00},
433         {0x3759, 0x0f},
434         {0x376b, 0x44},
435         {0x375c, 0x04},
436         {0x3774, 0x10},
437         {0x3776, 0x00},
438         {0x377f, 0x08},
439         {0x3780, 0x22},
440         {0x3781, 0x0c},
441         {0x3784, 0x2c},
442         {0x3785, 0x1e},
443         {0x378f, 0xf5},
444         {0x3791, 0xb0},
445         {0x3795, 0x00},
446         {0x3796, 0x64},
447         {0x3797, 0x11},
448         {0x3798, 0x30},
449         {0x3799, 0x41},
450         {0x379a, 0x07},
451         {0x379b, 0xb0},
452         {0x379c, 0x0c},
453         {0x37c5, 0x00},
454         {0x37c6, 0x00},
455         {0x37c7, 0x00},
456         {0x37c9, 0x00},
457         {0x37ca, 0x00},
458         {0x37cb, 0x00},
459         {0x37de, 0x00},
460         {0x37df, 0x00},
461         {0x3800, 0x00},
462         {0x3801, 0x00},
463         {0x3802, 0x00},
464         {0x3803, 0xf4},
465         {0x3804, 0x0a},
466         {0x3805, 0x3f},
467         {0x3806, 0x06},
468         {0x3807, 0xb1},
469         {0x3808, 0x0a},
470         {0x3809, 0x20},
471         {0x380a, 0x05},
472         {0x380b, 0xb2},
473         {0x380c, 0x0a},
474         {0x380d, 0x80},
475         {0x380e, 0x07},
476         {0x380f, 0xc0},
477         {0x3810, 0x00},
478         {0x3811, 0x10},
479         {0x3812, 0x00},
480         {0x3813, 0x06},
481         {0x3814, 0x11},
482         {0x3815, 0x11},
483         {0x3820, 0x00},
484         {0x3821, 0x1e},
485         {0x3823, 0x00},
486         {0x3824, 0x00},
487         {0x3825, 0x00},
488         {0x3826, 0x00},
489         {0x3827, 0x00},
490         {0x382a, 0x04},
491         {0x3a04, 0x06},
492         {0x3a05, 0x14},
493         {0x3a06, 0x00},
494         {0x3a07, 0xfe},
495         {0x3b00, 0x00},
496         {0x3b02, 0x00},
497         {0x3b03, 0x00},
498         {0x3b04, 0x00},
499         {0x3b05, 0x00},
500         {0x3e07, 0x20},
501         {0x4000, 0x08},
502         {0x4001, 0x04},
503         {0x4002, 0x45},
504         {0x4004, 0x08},
505         {0x4005, 0x18},
506         {0x4006, 0x20},
507         {0x4008, 0x24},
508         {0x4009, 0x10},
509         {0x400c, 0x00},
510         {0x400d, 0x00},
511         {0x4058, 0x00},
512         {0x404e, 0x37},
513         {0x404f, 0x8f},
514         {0x4058, 0x00},
515         {0x4101, 0xb2},
516         {0x4303, 0x00},
517         {0x4304, 0x08},
518         {0x4307, 0x30},
519         {0x4311, 0x04},
520         {0x4315, 0x01},
521         {0x4511, 0x05},
522         {0x4512, 0x01},
523         {0x4800, 0x20}, /* dis-continuous */
524         {0x4806, 0x00},
525         {0x4816, 0x52},
526         {0x481f, 0x30},
527         {0x4826, 0x32},
528         {0x4831, 0x6a},
529         {0x4d00, 0x04},
530         {0x4d01, 0x71},
531         {0x4d02, 0xfd},
532         {0x4d03, 0xf5},
533         {0x4d04, 0x0c},
534         {0x4d05, 0xcc},
535         {0x4837, 0x0a},
536         {0x5000, 0x06},
537         {0x5001, 0x01},
538         {0x5002, 0x00},
539         {0x5003, 0x20},
540         {0x5046, 0x0a},
541         {0x5013, 0x00},
542         {0x5046, 0x0a},
543         {0x5780, 0xfc},
544         {0x5781, 0x13},
545         {0x5782, 0x03},
546         {0x5786, 0x20},
547         {0x5787, 0x40},
548         {0x5788, 0x08},
549         {0x5789, 0x08},
550         {0x578a, 0x02},
551         {0x578b, 0x01},
552         {0x578c, 0x01},
553         {0x578d, 0x0c},
554         {0x578e, 0x02},
555         {0x578f, 0x01},
556         {0x5790, 0x01},
557         {0x5791, 0xff},
558         {0x5842, 0x01},
559         {0x5843, 0x2b},
560         {0x5844, 0x01},
561         {0x5845, 0x92},
562         {0x5846, 0x01},
563         {0x5847, 0x8f},
564         {0x5848, 0x01},
565         {0x5849, 0x0c},
566         {0x5e00, 0x00},
567         {0x5e10, 0x0c},
568         {OV5693_TABLE_END, 0x0000}
569 };
570
571 static const ov5693_reg mode_1920x1080[] = {
572         {0x0100, 0x00},/*, 0xIncluding, 0xsw, 0xreset, 0x*/
573         {0x3001, 0x0a},
574         {0x3002, 0x80},
575         {0x3006, 0x00},
576         {0x3011, 0x21},
577         {0x3012, 0x09},
578         {0x3013, 0x10},
579         {0x3014, 0x00},
580         {0x3015, 0x08},
581         {0x3016, 0xf0},
582         {0x3017, 0xf0},
583         {0x3018, 0xf0},
584         {0x301b, 0xb4},
585         {0x301d, 0x02},
586         {0x3021, 0x00},
587         {0x3022, 0x01},
588         {0x3028, 0x44},
589         {0x3098, 0x03},
590         {0x3099, 0x1e},
591         {0x309a, 0x02},
592         {0x309b, 0x01},
593         {0x309c, 0x00},
594         {0x30a0, 0xd2},
595         {0x30a2, 0x01},
596         {0x30b2, 0x00},
597         {0x30b3, 0x68},
598         {0x30b4, 0x03},
599         {0x30b5, 0x04},
600         {0x30b6, 0x01},
601         {0x3104, 0x21},
602         {0x3106, 0x00},
603         {0x3406, 0x01},
604         {0x3500, 0x00},
605         {0x3501, 0x7b},
606         {0x3502, 0x00},
607         {0x3503, 0x07},
608         {0x3504, 0x00},
609         {0x3505, 0x00},
610         {0x3506, 0x00},
611         {0x3507, 0x02},
612         {0x3508, 0x00},
613         {0x3509, 0x10},
614         {0x350a, 0x00},
615         {0x350b, 0x40},
616         {0x3601, 0x0a},
617         {0x3602, 0x38},
618         {0x3612, 0x80},
619         {0x3620, 0x54},
620         {0x3621, 0xc7},
621         {0x3622, 0x0f},
622         {0x3625, 0x10},
623         {0x3630, 0x55},
624         {0x3631, 0xf4},
625         {0x3632, 0x00},
626         {0x3633, 0x34},
627         {0x3634, 0x02},
628         {0x364d, 0x0d},
629         {0x364f, 0xdd},
630         {0x3660, 0x04},
631         {0x3662, 0x10},
632         {0x3663, 0xf1},
633         {0x3665, 0x00},
634         {0x3666, 0x20},
635         {0x3667, 0x00},
636         {0x366a, 0x80},
637         {0x3680, 0xe0},
638         {0x3681, 0x00},
639         {0x3700, 0x42},
640         {0x3701, 0x14},
641         {0x3702, 0xa0},
642         {0x3703, 0xd8},
643         {0x3704, 0x78},
644         {0x3705, 0x02},
645         {0x3708, 0xe2},
646         {0x3709, 0xc3},
647         {0x370a, 0x00},
648         {0x370b, 0x20},
649         {0x370c, 0x0c},
650         {0x370d, 0x11},
651         {0x370e, 0x00},
652         {0x370f, 0x40},
653         {0x3710, 0x00},
654         {0x371a, 0x1c},
655         {0x371b, 0x05},
656         {0x371c, 0x01},
657         {0x371e, 0xa1},
658         {0x371f, 0x0c},
659         {0x3721, 0x00},
660         {0x3724, 0x10},
661         {0x3726, 0x00},
662         {0x372a, 0x01},
663         {0x3730, 0x10},
664         {0x3738, 0x22},
665         {0x3739, 0xe5},
666         {0x373a, 0x50},
667         {0x373b, 0x02},
668         {0x373c, 0x41},
669         {0x373f, 0x02},
670         {0x3740, 0x42},
671         {0x3741, 0x02},
672         {0x3742, 0x18},
673         {0x3743, 0x01},
674         {0x3744, 0x02},
675         {0x3747, 0x10},
676         {0x374c, 0x04},
677         {0x3751, 0xf0},
678         {0x3752, 0x00},
679         {0x3753, 0x00},
680         {0x3754, 0xc0},
681         {0x3755, 0x00},
682         {0x3756, 0x1a},
683         {0x3758, 0x00},
684         {0x3759, 0x0f},
685         {0x376b, 0x44},
686         {0x375c, 0x04},
687         {0x3774, 0x10},
688         {0x3776, 0x00},
689         {0x377f, 0x08},
690         {0x3780, 0x22},
691         {0x3781, 0x0c},
692         {0x3784, 0x2c},
693         {0x3785, 0x1e},
694         {0x378f, 0xf5},
695         {0x3791, 0xb0},
696         {0x3795, 0x00},
697         {0x3796, 0x64},
698         {0x3797, 0x11},
699         {0x3798, 0x30},
700         {0x3799, 0x41},
701         {0x379a, 0x07},
702         {0x379b, 0xb0},
703         {0x379c, 0x0c},
704         {0x37c5, 0x00},
705         {0x37c6, 0x00},
706         {0x37c7, 0x00},
707         {0x37c9, 0x00},
708         {0x37ca, 0x00},
709         {0x37cb, 0x00},
710         {0x37de, 0x00},
711         {0x37df, 0x00},
712         {0x3800, 0x00},
713         {0x3801, 0x00},
714         {0x3802, 0x00},
715         {0x3803, 0xf8},
716         {0x3804, 0x0a},
717         {0x3805, 0x3f},
718         {0x3806, 0x06},
719         {0x3807, 0xab},
720         {0x3808, 0x07},
721         {0x3809, 0x80},
722         {0x380a, 0x04},
723         {0x380b, 0x38},
724         {0x380c, 0x0a},
725         {0x380d, 0x80},
726         {0x380e, 0x07},
727         {0x380f, 0xc0},
728         {0x3810, 0x00},
729         {0x3811, 0x02},
730         {0x3812, 0x00},
731         {0x3813, 0x02},
732         {0x3814, 0x11},
733         {0x3815, 0x11},
734         {0x3820, 0x00},
735         {0x3821, 0x1e},
736         {0x3823, 0x00},
737         {0x3824, 0x00},
738         {0x3825, 0x00},
739         {0x3826, 0x00},
740         {0x3827, 0x00},
741         {0x382a, 0x04},
742         {0x3a04, 0x06},
743         {0x3a05, 0x14},
744         {0x3a06, 0x00},
745         {0x3a07, 0xfe},
746         {0x3b00, 0x00},
747         {0x3b02, 0x00},
748         {0x3b03, 0x00},
749         {0x3b04, 0x00},
750         {0x3b05, 0x00},
751         {0x3e07, 0x20},
752         {0x4000, 0x08},
753         {0x4001, 0x04},
754         {0x4002, 0x45},
755         {0x4004, 0x08},
756         {0x4005, 0x18},
757         {0x4006, 0x20},
758         {0x4008, 0x24},
759         {0x4009, 0x10},
760         {0x400c, 0x00},
761         {0x400d, 0x00},
762         {0x4058, 0x00},
763         {0x404e, 0x37},
764         {0x404f, 0x8f},
765         {0x4058, 0x00},
766         {0x4101, 0xb2},
767         {0x4303, 0x00},
768         {0x4304, 0x08},
769         {0x4307, 0x30},
770         {0x4311, 0x04},
771         {0x4315, 0x01},
772         {0x4511, 0x05},
773         {0x4512, 0x01},
774         {0x4800, 0x20}, /* dis-continuous */
775         {0x4806, 0x00},
776         {0x4816, 0x52},
777         {0x481f, 0x30},
778         {0x4826, 0x32},
779         {0x4831, 0x6a},
780         {0x4d00, 0x04},
781         {0x4d01, 0x71},
782         {0x4d02, 0xfd},
783         {0x4d03, 0xf5},
784         {0x4d04, 0x0c},
785         {0x4d05, 0xcc},
786         {0x4837, 0x0a},
787         {0x5000, 0x06},
788         {0x5001, 0x01},
789         {0x5002, 0x80},
790         {0x5003, 0x20},
791         {0x5046, 0x0a},
792         {0x5013, 0x00},
793         {0x5046, 0x0a},
794         {0x5780, 0x1c},
795         {0x5786, 0x20},
796         {0x5787, 0x10},
797         {0x5788, 0x18},
798         {0x578a, 0x04},
799         {0x578b, 0x02},
800         {0x578c, 0x02},
801         {0x578e, 0x06},
802         {0x578f, 0x02},
803         {0x5790, 0x02},
804         {0x5791, 0xff},
805         {0x5842, 0x01},
806         {0x5843, 0x2b},
807         {0x5844, 0x01},
808         {0x5845, 0x92},
809         {0x5846, 0x01},
810         {0x5847, 0x8f},
811         {0x5848, 0x01},
812         {0x5849, 0x0c},
813         {0x5e00, 0x00},
814         {0x5e10, 0x0c},
815         {OV5693_TABLE_END, 0x0000}
816 };
817
818 static const ov5693_reg mode_1280x720_120fps[] = {
819         {0x0100, 0x00},/* Including sw reset */
820         {0x3001, 0x0a},
821         {0x3002, 0x80},
822         {0x3006, 0x00},
823         {0x3011, 0x21},
824         {0x3012, 0x09},
825         {0x3013, 0x10},
826         {0x3014, 0x00},
827         {0x3015, 0x08},
828         {0x3016, 0xf0},
829         {0x3017, 0xf0},
830         {0x3018, 0xf0},
831         {0x301b, 0xb4},
832         {0x301d, 0x02},
833         {0x3021, 0x00},
834         {0x3022, 0x01},
835         {0x3028, 0x44},
836         {0x3098, 0x03},
837         {0x3099, 0x1e},
838         {0x309a, 0x02},
839         {0x309b, 0x01},
840         {0x309c, 0x00},
841         {0x30a0, 0xd2},
842         {0x30a2, 0x01},
843         {0x30b2, 0x00},
844         {0x30b3, 0x68},
845         {0x30b4, 0x03},
846         {0x30b5, 0x04},
847         {0x30b6, 0x01},
848         {0x3104, 0x21},
849         {0x3106, 0x00},
850         {0x3406, 0x01},
851         {0x3500, 0x00},
852         {0x3501, 0x2e},
853         {0x3502, 0x80},
854         {0x3503, 0x07},
855         {0x3504, 0x00},
856         {0x3505, 0x00},
857         {0x3506, 0x00},
858         {0x3507, 0x02},
859         {0x3508, 0x00},
860         {0x3509, 0x10},
861         {0x350a, 0x00},
862         {0x350b, 0x40},
863         {0x3601, 0x0a},
864         {0x3602, 0x38},
865         {0x3612, 0x80},
866         {0x3620, 0x54},
867         {0x3621, 0xc7},
868         {0x3622, 0x0f},
869         {0x3625, 0x10},
870         {0x3630, 0x55},
871         {0x3631, 0xf4},
872         {0x3632, 0x00},
873         {0x3633, 0x34},
874         {0x3634, 0x02},
875         {0x364d, 0x0d},
876         {0x364f, 0xdd},
877         {0x3660, 0x04},
878         {0x3662, 0x10},
879         {0x3663, 0xf1},
880         {0x3665, 0x00},
881         {0x3666, 0x20},
882         {0x3667, 0x00},
883         {0x366a, 0x80},
884         {0x3680, 0xe0},
885         {0x3681, 0x00},
886         {0x3700, 0x42},
887         {0x3701, 0x14},
888         {0x3702, 0xa0},
889         {0x3703, 0xd8},
890         {0x3704, 0x78},
891         {0x3705, 0x02},
892         {0x3708, 0xe6},
893         {0x3709, 0xc7},
894         {0x370a, 0x00},
895         {0x370b, 0x20},
896         {0x370c, 0x0c},
897         {0x370d, 0x11},
898         {0x370e, 0x00},
899         {0x370f, 0x40},
900         {0x3710, 0x00},
901         {0x371a, 0x1c},
902         {0x371b, 0x05},
903         {0x371c, 0x01},
904         {0x371e, 0xa1},
905         {0x371f, 0x0c},
906         {0x3721, 0x00},
907         {0x3724, 0x10},
908         {0x3726, 0x00},
909         {0x372a, 0x01},
910         {0x3730, 0x10},
911         {0x3738, 0x22},
912         {0x3739, 0xe5},
913         {0x373a, 0x50},
914         {0x373b, 0x02},
915         {0x373c, 0x41},
916         {0x373f, 0x02},
917         {0x3740, 0x42},
918         {0x3741, 0x02},
919         {0x3742, 0x18},
920         {0x3743, 0x01},
921         {0x3744, 0x02},
922         {0x3747, 0x10},
923         {0x374c, 0x04},
924         {0x3751, 0xf0},
925         {0x3752, 0x00},
926         {0x3753, 0x00},
927         {0x3754, 0xc0},
928         {0x3755, 0x00},
929         {0x3756, 0x1a},
930         {0x3758, 0x00},
931         {0x3759, 0x0f},
932         {0x376b, 0x44},
933         {0x375c, 0x04},
934         {0x3774, 0x10},
935         {0x3776, 0x00},
936         {0x377f, 0x08},
937         {0x3780, 0x22},
938         {0x3781, 0x0c},
939         {0x3784, 0x2c},
940         {0x3785, 0x1e},
941         {0x378f, 0xf5},
942         {0x3791, 0xb0},
943         {0x3795, 0x00},
944         {0x3796, 0x64},
945         {0x3797, 0x11},
946         {0x3798, 0x30},
947         {0x3799, 0x41},
948         {0x379a, 0x07},
949         {0x379b, 0xb0},
950         {0x379c, 0x0c},
951         {0x37c5, 0x00},
952         {0x37c6, 0x00},
953         {0x37c7, 0x00},
954         {0x37c9, 0x00},
955         {0x37ca, 0x00},
956         {0x37cb, 0x00},
957         {0x37de, 0x00},
958         {0x37df, 0x00},
959         {0x3800, 0x00},
960         {0x3801, 0x00},
961         {0x3802, 0x00},
962         {0x3803, 0xf4},
963         {0x3804, 0x0a},
964         {0x3805, 0x3f},
965         {0x3806, 0x06},
966         {0x3807, 0xab},
967         {0x3808, 0x05},
968         {0x3809, 0x00},
969         {0x380a, 0x02},
970         {0x380b, 0xd0},
971         {0x380c, 0x06},
972         {0x380d, 0xd8},
973         {0x380e, 0x02},
974         {0x380f, 0xf8},
975         {0x3810, 0x00},
976         {0x3811, 0x02},
977         {0x3812, 0x00},
978         {0x3813, 0x02},
979         {0x3814, 0x31},
980         {0x3815, 0x31},
981         {0x3820, 0x04},
982         {0x3821, 0x1f},
983         {0x3823, 0x00},
984         {0x3824, 0x00},
985         {0x3825, 0x00},
986         {0x3826, 0x00},
987         {0x3827, 0x00},
988         {0x382a, 0x04},
989         {0x3a04, 0x06},
990         {0x3a05, 0x14},
991         {0x3a06, 0x00},
992         {0x3a07, 0xfe},
993         {0x3b00, 0x00},
994         {0x3b02, 0x00},
995         {0x3b03, 0x00},
996         {0x3b04, 0x00},
997         {0x3b05, 0x00},
998         {0x3e07, 0x20},
999         {0x4000, 0x08},
1000         {0x4001, 0x04},
1001         {0x4002, 0x45},
1002         {0x4004, 0x08},
1003         {0x4005, 0x18},
1004         {0x4006, 0x20},
1005         {0x4008, 0x24},
1006         {0x4009, 0x10},
1007         {0x400c, 0x00},
1008         {0x400d, 0x00},
1009         {0x4058, 0x00},
1010         {0x404e, 0x37},
1011         {0x404f, 0x8f},
1012         {0x4058, 0x00},
1013         {0x4101, 0xb2},
1014         {0x4303, 0x00},
1015         {0x4304, 0x08},
1016         {0x4307, 0x30},
1017         {0x4311, 0x04},
1018         {0x4315, 0x01},
1019         {0x4511, 0x05},
1020         {0x4512, 0x00},
1021         {0x4800, 0x20}, /* dis-continuous */
1022         {0x4806, 0x00},
1023         {0x4816, 0x52},
1024         {0x481f, 0x30},
1025         {0x4826, 0x32},
1026         {0x4831, 0x6a},
1027         {0x4d00, 0x04},
1028         {0x4d01, 0x71},
1029         {0x4d02, 0xfd},
1030         {0x4d03, 0xf5},
1031         {0x4d04, 0x0c},
1032         {0x4d05, 0xcc},
1033         {0x4837, 0x0a},
1034         {0x5000, 0x06},
1035         {0x5001, 0x01},
1036         {0x5002, 0x00},
1037         {0x5003, 0x20},
1038         {0x5046, 0x0a},
1039         {0x5013, 0x00},
1040         {0x5046, 0x0a},
1041         {0x5780, 0x1c},
1042         {0x5786, 0x20},
1043         {0x5787, 0x10},
1044         {0x5788, 0x18},
1045         {0x578a, 0x04},
1046         {0x578b, 0x02},
1047         {0x578c, 0x02},
1048         {0x578e, 0x06},
1049         {0x578f, 0x02},
1050         {0x5790, 0x02},
1051         {0x5791, 0xff},
1052         {0x5842, 0x01},
1053         {0x5843, 0x2b},
1054         {0x5844, 0x01},
1055         {0x5845, 0x92},
1056         {0x5846, 0x01},
1057         {0x5847, 0x8f},
1058         {0x5848, 0x01},
1059         {0x5849, 0x0c},
1060         {0x5e00, 0x00},
1061         {0x5e10, 0x0c},
1062         {OV5693_TABLE_END, 0x0000}
1063 };
1064
1065 static const ov5693_reg mode_2592x1944_HDR_24fps[] = {
1066         {0x0100, 0x00},/* Including sw reset */
1067         {0x0103, 0x01},
1068         {0x3001, 0x0a},
1069         {0x3002, 0x80},
1070         {0x3006, 0x00},
1071         {0x3011, 0x21},
1072         {0x3012, 0x09},
1073         {0x3013, 0x10},
1074         {0x3014, 0x00},
1075         {0x3015, 0x08},
1076         {0x3016, 0xf0},
1077         {0x3017, 0xf0},
1078         {0x3018, 0xf0},
1079         {0x301b, 0xb4},
1080         {0x301d, 0x02},
1081         {0x3021, 0x00},
1082         {0x3022, 0x01},
1083         {0x3028, 0x44},
1084         {0x3098, 0x02},
1085         {0x3099, 0x16},
1086         {0x309a, 0x02},
1087         {0x309b, 0x01},
1088         {0x309c, 0x00},
1089         {0x30b2, 0x00},
1090         {0x30b3, 0x6e},
1091         {0x30b4, 0x03},
1092         {0x30a0, 0xd2},
1093         {0x30a2, 0x01},
1094         {0x30b5, 0x04},
1095         {0x30b6, 0x01},
1096         {0x3104, 0x21},
1097         {0x3106, 0x00},
1098         {0x3406, 0x01},
1099         {0x3500, 0x00},
1100         {0x3501, 0x7b},
1101         {0x3502, 0x80},
1102         {0x3503, 0x07},
1103         {0x3504, 0x00},
1104         {0x3505, 0x00},
1105         {0x3506, 0x00},
1106         {0x3507, 0x01},
1107         {0x3508, 0x80},
1108         {0x3509, 0x10},
1109         {0x350a, 0x00},
1110         {0x350b, 0x40},
1111         {0x3601, 0x0a},
1112         {0x3602, 0x38},
1113         {0x3612, 0x80},
1114         {0x3620, 0x54},
1115         {0x3621, 0xc7},
1116         {0x3622, 0x05},
1117         {0x3625, 0x10},
1118         {0x3630, 0x55},
1119         {0x3631, 0xf4},
1120         {0x3632, 0x00},
1121         {0x3633, 0x34},
1122         {0x3634, 0x02},
1123         {0x364d, 0x0d},
1124         {0x364f, 0xdd},
1125         {0x3660, 0x04},
1126         {0x3662, 0x10},
1127         {0x3663, 0xf1},
1128         {0x3665, 0x00},
1129         {0x3666, 0x20},
1130         {0x3667, 0x00},
1131         {0x366a, 0x80},
1132         {0x3680, 0xe0},
1133         {0x3681, 0x00},
1134         {0x3700, 0x42},
1135         {0x3701, 0x14},
1136         {0x3702, 0xa0},
1137         {0x3703, 0xa8},
1138         {0x3704, 0x78},
1139         {0x3705, 0x02},
1140         {0x3708, 0xe2},
1141         {0x3709, 0xc3},
1142         {0x370a, 0x00},
1143         {0x370b, 0x20},
1144         {0x370c, 0x0c},
1145         {0x370d, 0x11},
1146         {0x370e, 0x00},
1147         {0x370f, 0x40},
1148         {0x3710, 0x00},
1149         {0x371a, 0x0c},
1150         {0x371b, 0x05},
1151         {0x371c, 0x01},
1152         {0x371e, 0xa1},
1153         {0x371f, 0x0c},
1154         {0x3721, 0x00},
1155         {0x3724, 0x10},
1156         {0x3726, 0x00},
1157         {0x372a, 0x01},
1158         {0x3730, 0x10},
1159         {0x3738, 0x22},
1160         {0x3739, 0xe5},
1161         {0x373a, 0x50},
1162         {0x373b, 0x02},
1163         {0x373c, 0x41},
1164         {0x373f, 0x02},
1165         {0x3740, 0x42},
1166         {0x3741, 0x02},
1167         {0x3742, 0x18},
1168         {0x3743, 0x01},
1169         {0x3744, 0x02},
1170         {0x3747, 0x10},
1171         {0x374c, 0x04},
1172         {0x3751, 0xf0},
1173         {0x3752, 0x00},
1174         {0x3753, 0x00},
1175         {0x3754, 0xc0},
1176         {0x3755, 0x00},
1177         {0x3756, 0x1a},
1178         {0x3758, 0x00},
1179         {0x3759, 0x0f},
1180         {0x376b, 0x44},
1181         {0x375c, 0x04},
1182         {0x3774, 0x10},
1183         {0x3776, 0x00},
1184         {0x377f, 0x08},
1185         {0x3780, 0x22},
1186         {0x3781, 0x0c},
1187         {0x3784, 0x2c},
1188         {0x3785, 0x1e},
1189         {0x378f, 0xf5},
1190         {0x3791, 0xb0},
1191         {0x3795, 0x00},
1192         {0x3796, 0x64},
1193         {0x3797, 0x11},
1194         {0x3798, 0x30},
1195         {0x3799, 0x41},
1196         {0x379a, 0x07},
1197         {0x379b, 0xb0},
1198         {0x379c, 0x0c},
1199         {0x37c5, 0x00},
1200         {0x37c6, 0x00},
1201         {0x37c7, 0x00},
1202         {0x37c9, 0x00},
1203         {0x37ca, 0x00},
1204         {0x37cb, 0x00},
1205         {0x37de, 0x00},
1206         {0x37df, 0x00},
1207         {0x3800, 0x00},
1208         {0x3801, 0x02},
1209         {0x3802, 0x00},
1210         {0x3803, 0x06},
1211         {0x3804, 0x0a},
1212         {0x3805, 0x41},
1213         {0x3806, 0x07},
1214         {0x3807, 0xa1},
1215         {0x3808, 0x0a},
1216         {0x3809, 0x20},
1217         {0x380a, 0x07},
1218         {0x380b, 0x98},
1219         {0x380c, 0x0e},
1220         {0x380d, 0x70},
1221         {0x380e, 0x07},
1222         {0x380f, 0xc0},
1223         {0x3810, 0x00},
1224         {0x3811, 0x10},
1225         {0x3812, 0x00},
1226         {0x3813, 0x02},
1227         {0x3814, 0x11},
1228         {0x3815, 0x11},
1229         {0x3820, 0x00},
1230         {0x3821, 0x9e},
1231         {0x3823, 0x00},
1232         {0x3824, 0x00},
1233         {0x3825, 0x00},
1234         {0x3826, 0x00},
1235         {0x3827, 0x00},
1236         {0x382a, 0x04},
1237         {0x3a04, 0x09},
1238         {0x3a05, 0xa9},
1239         {0x3a06, 0x00},
1240         {0x3a07, 0xfe},
1241         {0x3b00, 0x00},
1242         {0x3b02, 0x00},
1243         {0x3b03, 0x00},
1244         {0x3b04, 0x00},
1245         {0x3b05, 0x00},
1246         {0x3e07, 0x20},
1247         {0x4000, 0x08},
1248         {0x4001, 0x04},
1249         {0x4002, 0x45},
1250         {0x4004, 0x08},
1251         {0x4005, 0x18},
1252         {0x4006, 0x20},
1253         {0x4008, 0x24},
1254         {0x4009, 0x10},
1255         {0x400c, 0x00},
1256         {0x400d, 0x00},
1257         {0x4058, 0x00},
1258         {0x404e, 0x37},
1259         {0x404f, 0x8f},
1260         {0x4058, 0x00},
1261         {0x4101, 0xb2},
1262         {0x4303, 0x00},
1263         {0x4304, 0x08},
1264         {0x4307, 0x30},
1265         {0x4311, 0x04},
1266         {0x4315, 0x01},
1267         {0x4511, 0x05},
1268         {0x4512, 0x01},
1269         {0x4800, 0x20}, /* dis-continuous */
1270         {0x4806, 0x00},
1271         {0x4816, 0x52},
1272         {0x481f, 0x30},
1273         {0x4826, 0x32},
1274         {0x4831, 0x6a},
1275         {0x4d00, 0x04},
1276         {0x4d01, 0x71},
1277         {0x4d02, 0xfd},
1278         {0x4d03, 0xf5},
1279         {0x4d04, 0x0c},
1280         {0x4d05, 0xcc},
1281         {0x4837, 0x0a},
1282         {0x5000, 0x06},
1283         {0x5001, 0x01},
1284         {0x5002, 0x00},
1285         {0x5003, 0x20},
1286         {0x5046, 0x0a},
1287         {0x5013, 0x00},
1288         {0x5046, 0x0a},
1289         {0x5780, 0x1c},
1290         {0x5786, 0x20},
1291         {0x5787, 0x10},
1292         {0x5788, 0x18},
1293         {0x578a, 0x04},
1294         {0x578b, 0x02},
1295         {0x578c, 0x02},
1296         {0x578e, 0x06},
1297         {0x578f, 0x02},
1298         {0x5790, 0x02},
1299         {0x5791, 0xff},
1300         {0x5842, 0x01},
1301         {0x5843, 0x2b},
1302         {0x5844, 0x01},
1303         {0x5845, 0x92},
1304         {0x5846, 0x01},
1305         {0x5847, 0x8f},
1306         {0x5848, 0x01},
1307         {0x5849, 0x0c},
1308         {0x5e00, 0x00},
1309         {0x5e10, 0x0c},
1310         {OV5693_TABLE_END, 0x0000}
1311 };
1312
1313 static const ov5693_reg mode_1920x1080_HDR_30fps[] = {
1314         {0x0100, 0x00},/* Including sw reset */
1315         {0x0103, 0x01},
1316         {0x3001, 0x0a},
1317         {0x3002, 0x80},
1318         {0x3006, 0x00},
1319         {0x3011, 0x21},
1320         {0x3012, 0x09},
1321         {0x3013, 0x10},
1322         {0x3014, 0x00},
1323         {0x3015, 0x08},
1324         {0x3016, 0xf0},
1325         {0x3017, 0xf0},
1326         {0x3018, 0xf0},
1327         {0x301b, 0xb4},
1328         {0x301d, 0x02},
1329         {0x3021, 0x00},
1330         {0x3022, 0x01},
1331         {0x3028, 0x44},
1332         {0x3098, 0x03},
1333         {0x3099, 0x1e},
1334         {0x309a, 0x02},
1335         {0x309b, 0x01},
1336         {0x309c, 0x00},
1337         {0x30a0, 0xd2},
1338         {0x30a2, 0x01},
1339         {0x30b2, 0x00},
1340         {0x30b3, 0x68},
1341         {0x30b4, 0x03},
1342         {0x30b5, 0x04},
1343         {0x30b6, 0x01},
1344         {0x3104, 0x21},
1345         {0x3106, 0x00},
1346         {0x3406, 0x01},
1347         {0x3500, 0x00},
1348         {0x3501, 0x72},
1349         {0x3502, 0x00},
1350         {0x3503, 0x07},
1351         {0x3504, 0x00},
1352         {0x3505, 0x00},
1353         {0x3506, 0x00},
1354         {0x3507, 0x01},
1355         {0x3508, 0x80},
1356         {0x3509, 0x10},
1357         {0x350a, 0x00},
1358         {0x350b, 0x40},
1359         {0x3601, 0x0a},
1360         {0x3602, 0x38},
1361         {0x3612, 0x80},
1362         {0x3620, 0x54},
1363         {0x3621, 0xc7},
1364         {0x3622, 0x0f},
1365         {0x3625, 0x10},
1366         {0x3630, 0x55},
1367         {0x3631, 0xf4},
1368         {0x3632, 0x00},
1369         {0x3633, 0x34},
1370         {0x3634, 0x02},
1371         {0x364d, 0x0d},
1372         {0x364f, 0xdd},
1373         {0x3660, 0x04},
1374         {0x3662, 0x10},
1375         {0x3663, 0xf1},
1376         {0x3665, 0x00},
1377         {0x3666, 0x20},
1378         {0x3667, 0x00},
1379         {0x366a, 0x80},
1380         {0x3680, 0xe0},
1381         {0x3681, 0x00},
1382         {0x3700, 0x42},
1383         {0x3701, 0x14},
1384         {0x3702, 0xa0},
1385         {0x3703, 0xd8},
1386         {0x3704, 0x78},
1387         {0x3705, 0x02},
1388         {0x3708, 0xe2},
1389         {0x3709, 0xc3},
1390         {0x370a, 0x00},
1391         {0x370b, 0x20},
1392         {0x370c, 0x0c},
1393         {0x370d, 0x11},
1394         {0x370e, 0x00},
1395         {0x370f, 0x40},
1396         {0x3710, 0x00},
1397         {0x371a, 0x1c},
1398         {0x371b, 0x05},
1399         {0x371c, 0x01},
1400         {0x371e, 0xa1},
1401         {0x371f, 0x0c},
1402         {0x3721, 0x00},
1403         {0x3724, 0x10},
1404         {0x3726, 0x00},
1405         {0x372a, 0x01},
1406         {0x3730, 0x10},
1407         {0x3738, 0x22},
1408         {0x3739, 0xe5},
1409         {0x373a, 0x50},
1410         {0x373b, 0x02},
1411         {0x373c, 0x41},
1412         {0x373f, 0x02},
1413         {0x3740, 0x42},
1414         {0x3741, 0x02},
1415         {0x3742, 0x18},
1416         {0x3743, 0x01},
1417         {0x3744, 0x02},
1418         {0x3747, 0x10},
1419         {0x374c, 0x04},
1420         {0x3751, 0xf0},
1421         {0x3752, 0x00},
1422         {0x3753, 0x00},
1423         {0x3754, 0xc0},
1424         {0x3755, 0x00},
1425         {0x3756, 0x1a},
1426         {0x3758, 0x00},
1427         {0x3759, 0x0f},
1428         {0x376b, 0x44},
1429         {0x375c, 0x04},
1430         {0x3774, 0x10},
1431         {0x3776, 0x00},
1432         {0x377f, 0x08},
1433         {0x3780, 0x22},
1434         {0x3781, 0x0c},
1435         {0x3784, 0x2c},
1436         {0x3785, 0x1e},
1437         {0x378f, 0xf5},
1438         {0x3791, 0xb0},
1439         {0x3795, 0x00},
1440         {0x3796, 0x64},
1441         {0x3797, 0x11},
1442         {0x3798, 0x30},
1443         {0x3799, 0x41},
1444         {0x379a, 0x07},
1445         {0x379b, 0xb0},
1446         {0x379c, 0x0c},
1447         {0x37c5, 0x00},
1448         {0x37c6, 0x00},
1449         {0x37c7, 0x00},
1450         {0x37c9, 0x00},
1451         {0x37ca, 0x00},
1452         {0x37cb, 0x00},
1453         {0x37de, 0x00},
1454         {0x37df, 0x00},
1455         {0x3800, 0x01},
1456         {0x3801, 0x70},
1457         {0x3802, 0x01},
1458         {0x3803, 0xbc},
1459         {0x3804, 0x09},
1460         {0x3805, 0x0f},
1461         {0x3806, 0x05},
1462         {0x3807, 0xff},
1463         {0x3808, 0x07},
1464         {0x3809, 0x80},
1465         {0x380a, 0x04},
1466         {0x380b, 0x38},
1467         {0x380c, 0x0b},
1468         {0x380d, 0x40},
1469         {0x380e, 0x07},
1470         {0x380f, 0x3a},
1471         {0x3810, 0x00},
1472         {0x3811, 0x02},
1473         {0x3812, 0x00},
1474         {0x3813, 0x02},
1475         {0x3814, 0x11},
1476         {0x3815, 0x11},
1477         {0x3820, 0x00},
1478         {0x3821, 0x9e},
1479         {0x3823, 0x00},
1480         {0x3824, 0x00},
1481         {0x3825, 0x00},
1482         {0x3826, 0x00},
1483         {0x3827, 0x00},
1484         {0x382a, 0x04},
1485         {0x3a04, 0x09},
1486         {0x3a05, 0xa9},
1487         {0x3a06, 0x00},
1488         {0x3a07, 0xfe},
1489         {0x3b00, 0x00},
1490         {0x3b02, 0x00},
1491         {0x3b03, 0x00},
1492         {0x3b04, 0x00},
1493         {0x3b05, 0x00},
1494         {0x3e07, 0x20},
1495         {0x4000, 0x08},
1496         {0x4001, 0x04},
1497         {0x4002, 0x45},
1498         {0x4004, 0x08},
1499         {0x4005, 0x18},
1500         {0x4006, 0x20},
1501         {0x4008, 0x24},
1502         {0x4009, 0x10},
1503         {0x400c, 0x00},
1504         {0x400d, 0x00},
1505         {0x4058, 0x00},
1506         {0x404e, 0x37},
1507         {0x404f, 0x8f},
1508         {0x4058, 0x00},
1509         {0x4101, 0xb2},
1510         {0x4303, 0x00},
1511         {0x4304, 0x08},
1512         {0x4307, 0x30},
1513         {0x4311, 0x04},
1514         {0x4315, 0x01},
1515         {0x4511, 0x05},
1516         {0x4512, 0x01},
1517         {0x4800, 0x20}, /* dis-continuous */
1518         {0x4806, 0x00},
1519         {0x4816, 0x52},
1520         {0x481f, 0x30},
1521         {0x4826, 0x32},
1522         {0x4831, 0x6a},
1523         {0x4d00, 0x04},
1524         {0x4d01, 0x71},
1525         {0x4d02, 0xfd},
1526         {0x4d03, 0xf5},
1527         {0x4d04, 0x0c},
1528         {0x4d05, 0xcc},
1529         {0x4837, 0x0a},
1530         {0x5000, 0x06},
1531         {0x5001, 0x01},
1532         {0x5002, 0x00},
1533         {0x5003, 0x20},
1534         {0x5046, 0x0a},
1535         {0x5013, 0x00},
1536         {0x5046, 0x0a},
1537         {0x5780, 0x1c},
1538         {0x5786, 0x20},
1539         {0x5787, 0x10},
1540         {0x5788, 0x18},
1541         {0x578a, 0x04},
1542         {0x578b, 0x02},
1543         {0x578c, 0x02},
1544         {0x578e, 0x06},
1545         {0x578f, 0x02},
1546         {0x5790, 0x02},
1547         {0x5791, 0xff},
1548         {0x5842, 0x01},
1549         {0x5843, 0x2b},
1550         {0x5844, 0x01},
1551         {0x5845, 0x92},
1552         {0x5846, 0x01},
1553         {0x5847, 0x8f},
1554         {0x5848, 0x01},
1555         {0x5849, 0x0c},
1556         {0x5e00, 0x00},
1557         {0x5e10, 0x0c},
1558         {OV5693_TABLE_END, 0x0000}
1559 };
1560
1561 static const ov5693_reg mode_1280x720_HDR_60fps[] = {
1562         {0x0100, 0x00},/* Including sw reset */
1563         {0x0103, 0x01},
1564         {0x3001, 0x0a},
1565         {0x3002, 0x80},
1566         {0x3006, 0x00},
1567         {0x3011, 0x21},
1568         {0x3012, 0x09},
1569         {0x3013, 0x10},
1570         {0x3014, 0x00},
1571         {0x3015, 0x08},
1572         {0x3016, 0xf0},
1573         {0x3017, 0xf0},
1574         {0x3018, 0xf0},
1575         {0x301b, 0xb4},
1576         {0x301d, 0x02},
1577         {0x3021, 0x00},
1578         {0x3022, 0x01},
1579         {0x3028, 0x44},
1580         {0x3098, 0x03},
1581         {0x3099, 0x1e},
1582         {0x309a, 0x02},
1583         {0x309b, 0x01},
1584         {0x309c, 0x00},
1585         {0x30a0, 0xd2},
1586         {0x30a2, 0x01},
1587         {0x30b2, 0x00},
1588         {0x30b3, 0x68},
1589         {0x30b4, 0x03},
1590         {0x30b5, 0x04},
1591         {0x30b6, 0x01},
1592         {0x3104, 0x21},
1593         {0x3106, 0x00},
1594         {0x3406, 0x01},
1595         {0x3500, 0x00},
1596         {0x3501, 0x39},
1597         {0x3502, 0x00},
1598         {0x3503, 0x07},
1599         {0x3504, 0x00},
1600         {0x3505, 0x00},
1601         {0x3506, 0x00},
1602         {0x3507, 0x01},
1603         {0x3508, 0x80},
1604         {0x3509, 0x10},
1605         {0x350a, 0x00},
1606         {0x350b, 0x40},
1607         {0x3601, 0x0a},
1608         {0x3602, 0x38},
1609         {0x3612, 0x80},
1610         {0x3620, 0x54},
1611         {0x3621, 0xc7},
1612         {0x3622, 0x0f},
1613         {0x3625, 0x10},
1614         {0x3630, 0x55},
1615         {0x3631, 0xf4},
1616         {0x3632, 0x00},
1617         {0x3633, 0x34},
1618         {0x3634, 0x02},
1619         {0x364d, 0x0d},
1620         {0x364f, 0xdd},
1621         {0x3660, 0x04},
1622         {0x3662, 0x10},
1623         {0x3663, 0xf1},
1624         {0x3665, 0x00},
1625         {0x3666, 0x20},
1626         {0x3667, 0x00},
1627         {0x366a, 0x80},
1628         {0x3680, 0xe0},
1629         {0x3681, 0x00},
1630         {0x3700, 0x42},
1631         {0x3701, 0x14},
1632         {0x3702, 0xa0},
1633         {0x3703, 0xd8},
1634         {0x3704, 0x78},
1635         {0x3705, 0x02},
1636         {0x3708, 0xe2},
1637         {0x3709, 0xc3},
1638         {0x370a, 0x00},
1639         {0x370b, 0x20},
1640         {0x370c, 0x0c},
1641         {0x370d, 0x11},
1642         {0x370e, 0x00},
1643         {0x370f, 0x40},
1644         {0x3710, 0x00},
1645         {0x371a, 0x1c},
1646         {0x371b, 0x05},
1647         {0x371c, 0x01},
1648         {0x371e, 0xa1},
1649         {0x371f, 0x0c},
1650         {0x3721, 0x00},
1651         {0x3724, 0x10},
1652         {0x3726, 0x00},
1653         {0x372a, 0x01},
1654         {0x3730, 0x10},
1655         {0x3738, 0x22},
1656         {0x3739, 0xe5},
1657         {0x373a, 0x50},
1658         {0x373b, 0x02},
1659         {0x373c, 0x41},
1660         {0x373f, 0x02},
1661         {0x3740, 0x42},
1662         {0x3741, 0x02},
1663         {0x3742, 0x18},
1664         {0x3743, 0x01},
1665         {0x3744, 0x02},
1666         {0x3747, 0x10},
1667         {0x374c, 0x04},
1668         {0x3751, 0xf0},
1669         {0x3752, 0x00},
1670         {0x3753, 0x00},
1671         {0x3754, 0xc0},
1672         {0x3755, 0x00},
1673         {0x3756, 0x1a},
1674         {0x3758, 0x00},
1675         {0x3759, 0x0f},
1676         {0x376b, 0x44},
1677         {0x375c, 0x04},
1678         {0x3774, 0x10},
1679         {0x3776, 0x00},
1680         {0x377f, 0x08},
1681         {0x3780, 0x22},
1682         {0x3781, 0x0c},
1683         {0x3784, 0x2c},
1684         {0x3785, 0x1e},
1685         {0x378f, 0xf5},
1686         {0x3791, 0xb0},
1687         {0x3795, 0x00},
1688         {0x3796, 0x64},
1689         {0x3797, 0x11},
1690         {0x3798, 0x30},
1691         {0x3799, 0x41},
1692         {0x379a, 0x07},
1693         {0x379b, 0xb0},
1694         {0x379c, 0x0c},
1695         {0x37c5, 0x00},
1696         {0x37c6, 0x00},
1697         {0x37c7, 0x00},
1698         {0x37c9, 0x00},
1699         {0x37ca, 0x00},
1700         {0x37cb, 0x00},
1701         {0x37de, 0x00},
1702         {0x37df, 0x00},
1703         {0x3800, 0x02},
1704         {0x3801, 0xa8},
1705         {0x3802, 0x02},
1706         {0x3803, 0x68},
1707         {0x3804, 0x07},
1708         {0x3805, 0xb7},
1709         {0x3806, 0x05},
1710         {0x3807, 0x3b},
1711         {0x3808, 0x05},
1712         {0x3809, 0x00},
1713         {0x380a, 0x02},
1714         {0x380b, 0xd0},
1715         {0x380c, 0x0b},
1716         {0x380d, 0x40},
1717         {0x380e, 0x03},
1718         {0x380f, 0x9e},
1719         {0x3810, 0x00},
1720         {0x3811, 0x02},
1721         {0x3812, 0x00},
1722         {0x3813, 0x02},
1723         {0x3814, 0x11},
1724         {0x3815, 0x11},
1725         {0x3820, 0x00},
1726         {0x3821, 0x9e},
1727         {0x3823, 0x00},
1728         {0x3824, 0x00},
1729         {0x3825, 0x00},
1730         {0x3826, 0x00},
1731         {0x3827, 0x00},
1732         {0x382a, 0x04},
1733         {0x3a04, 0x09},
1734         {0x3a05, 0xa9},
1735         {0x3a06, 0x00},
1736         {0x3a07, 0xfe},
1737         {0x3b00, 0x00},
1738         {0x3b02, 0x00},
1739         {0x3b03, 0x00},
1740         {0x3b04, 0x00},
1741         {0x3b05, 0x00},
1742         {0x3e07, 0x20},
1743         {0x4000, 0x08},
1744         {0x4001, 0x04},
1745         {0x4002, 0x45},
1746         {0x4004, 0x08},
1747         {0x4005, 0x18},
1748         {0x4006, 0x20},
1749         {0x4008, 0x24},
1750         {0x4009, 0x10},
1751         {0x400c, 0x00},
1752         {0x400d, 0x00},
1753         {0x4058, 0x00},
1754         {0x404e, 0x37},
1755         {0x404f, 0x8f},
1756         {0x4058, 0x00},
1757         {0x4101, 0xb2},
1758         {0x4303, 0x00},
1759         {0x4304, 0x08},
1760         {0x4307, 0x30},
1761         {0x4311, 0x04},
1762         {0x4315, 0x01},
1763         {0x4511, 0x05},
1764         {0x4512, 0x01},
1765         {0x4800, 0x20}, /* dis-continuous */
1766         {0x4806, 0x00},
1767         {0x4816, 0x52},
1768         {0x481f, 0x30},
1769         {0x4826, 0x32},
1770         {0x4831, 0x6a},
1771         {0x4d00, 0x04},
1772         {0x4d01, 0x71},
1773         {0x4d02, 0xfd},
1774         {0x4d03, 0xf5},
1775         {0x4d04, 0x0c},
1776         {0x4d05, 0xcc},
1777         {0x4837, 0x0a},
1778         {0x5000, 0x06},
1779         {0x5001, 0x01},
1780         {0x5002, 0x00},
1781         {0x5003, 0x20},
1782         {0x5046, 0x0a},
1783         {0x5013, 0x00},
1784         {0x5046, 0x0a},
1785         {0x5780, 0x1c},
1786         {0x5786, 0x20},
1787         {0x5787, 0x10},
1788         {0x5788, 0x18},
1789         {0x578a, 0x04},
1790         {0x578b, 0x02},
1791         {0x578c, 0x02},
1792         {0x578e, 0x06},
1793         {0x578f, 0x02},
1794         {0x5790, 0x02},
1795         {0x5791, 0xff},
1796         {0x5842, 0x01},
1797         {0x5843, 0x2b},
1798         {0x5844, 0x01},
1799         {0x5845, 0x92},
1800         {0x5846, 0x01},
1801         {0x5847, 0x8f},
1802         {0x5848, 0x01},
1803         {0x5849, 0x0c},
1804         {0x5e00, 0x00},
1805         {0x5e10, 0x0c},
1806         {OV5693_TABLE_END, 0x0000}
1807 };
1808
1809 enum {
1810         OV5693_MODE_2592X1944,
1811         OV5693_MODE_2592X1458,
1812         OV5693_MODE_1920X1080,
1813         OV5693_MODE_1280X720_120FPS,
1814         OV5693_MODE_2592X1944_HDR,
1815         OV5693_MODE_1920X1080_HDR,
1816
1817         OV5693_MODE_START_STREAM,
1818         OV5693_MODE_STOP_STREAM,
1819         OV5693_MODE_TEST_PATTERN
1820 };
1821
1822 static const ov5693_reg *mode_table[] = {
1823         [OV5693_MODE_2592X1944]                 = mode_2592x1944,
1824         [OV5693_MODE_2592X1458]                 = mode_2592x1458,
1825         [OV5693_MODE_1920X1080]                 = mode_1920x1080,
1826         [OV5693_MODE_1280X720_120FPS]           = mode_1280x720_120fps,
1827         [OV5693_MODE_2592X1944_HDR]             = mode_2592x1944_HDR_24fps,
1828         [OV5693_MODE_1920X1080_HDR]             = mode_1920x1080_HDR_30fps,
1829
1830         [OV5693_MODE_START_STREAM]              = ov5693_start,
1831         [OV5693_MODE_STOP_STREAM]               = ov5693_stop,
1832         [OV5693_MODE_TEST_PATTERN]              = tp_colorbars,
1833 };
1834
1835 static const int ov5693_24fps[] = {
1836         24,
1837 };
1838
1839 static const int ov5693_30fps[] = {
1840         30,
1841 };
1842
1843 static const int ov5693_120fps[] = {
1844         120,
1845 };
1846
1847 static const struct camera_common_frmfmt ov5693_frmfmt[] = {
1848         {{2592, 1944},  ov5693_30fps,   1, 0,   OV5693_MODE_2592X1944},
1849         {{2592, 1458},  ov5693_30fps,   1, 0,   OV5693_MODE_2592X1458},
1850         {{1920, 1080},  ov5693_30fps,   1, 0,   OV5693_MODE_1920X1080},
1851         {{1280, 720},   ov5693_120fps,  1, 0,   OV5693_MODE_1280X720_120FPS},
1852         {{2592, 1944},  ov5693_24fps,   1, 1,   OV5693_MODE_2592X1944_HDR},
1853         {{1920, 1080},  ov5693_30fps,   1, 1,   OV5693_MODE_1920X1080_HDR},
1854 };
1855 #endif  /* __OV5693_TABLES__ */
1856