2 * ov5693_mode_tbls.h - ov5693 sensor mode tables
4 * Copyright (c) 2015-2016, NVIDIA CORPORATION, All Rights Reserved.
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.
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
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/>.
19 #ifndef __OV5693_TABLES__
20 #define __OV5693_TABLES__
22 #include <media/camera_common.h>
24 #define OV5693_TABLE_WAIT_MS 0
25 #define OV5693_TABLE_END 1
26 #define OV5693_MAX_RETRIES 3
28 #define ov5693_reg struct reg_8
30 static const ov5693_reg ov5693_start[] = {
31 {0x0100, 0x01}, /* mode select streaming on */
32 {OV5693_TABLE_END, 0x00}
35 static const ov5693_reg ov5693_stop[] = {
36 {0x0100, 0x00}, /* mode select streaming on */
37 {OV5693_TABLE_END, 0x00}
40 static const ov5693_reg tp_colorbars[] = {
44 {OV5693_TABLE_END, 0x00}
47 static const ov5693_reg mode_2592x1944[] = {
48 {0x0100, 0x00},/* Including sw reset */
269 {0x4800, 0x20}, /* dis-continuous */
310 {OV5693_TABLE_END, 0x0000}
313 static const ov5693_reg mode_2592x1458[] = {
314 {0x0100, 0x00},/* Including sw reset */
523 {0x4800, 0x20}, /* dis-continuous */
568 {OV5693_TABLE_END, 0x0000}
571 static const ov5693_reg mode_1296x972[] = {
572 {0x0100, 0x00},/* Including sw reset */
774 {0x4800, 0x20}, /* dis-continuous */
815 {OV5693_TABLE_END, 0x0000}
818 static const ov5693_reg mode_1920x1080[] = {
819 {0x0100, 0x00},/*, 0xIncluding, 0xsw, 0xreset, 0x*/
1021 {0x4800, 0x20}, /* dis-continuous */
1062 {OV5693_TABLE_END, 0x0000}
1065 static const ov5693_reg mode_1280x720_120fps[] = {
1066 {0x0100, 0x00},/* Including sw reset */
1268 {0x4800, 0x20}, /* dis-continuous */
1309 {OV5693_TABLE_END, 0x0000}
1312 static const ov5693_reg mode_2592x1944_HDR_24fps[] = {
1313 {0x0100, 0x00},/* Including sw reset */
1516 {0x4800, 0x20}, /* dis-continuous */
1557 {OV5693_TABLE_END, 0x0000}
1560 static const ov5693_reg mode_1920x1080_HDR_30fps[] = {
1561 {0x0100, 0x00},/* Including sw reset */
1764 {0x4800, 0x20}, /* dis-continuous */
1805 {OV5693_TABLE_END, 0x0000}
1808 static const ov5693_reg mode_1296x972_HDR_30fps[] = {
1809 {0x0100, 0x00},/* Including sw reset */
2012 {0x4800, 0x20}, /* dis-continuous */
2053 {OV5693_TABLE_END, 0x0000}
2056 static const ov5693_reg mode_1280x720_HDR_60fps[] = {
2057 {0x0100, 0x00},/* Including sw reset */
2260 {0x4800, 0x20}, /* dis-continuous */
2301 {OV5693_TABLE_END, 0x0000}
2305 OV5693_MODE_2592X1944,
2306 OV5693_MODE_2592X1458,
2307 OV5693_MODE_1920X1080,
2308 OV5693_MODE_1296X972,
2309 OV5693_MODE_1280X720_120FPS,
2310 OV5693_MODE_2592X1944_HDR,
2311 OV5693_MODE_1920X1080_HDR,
2312 OV5693_MODE_1296X972_HDR,
2314 OV5693_MODE_START_STREAM,
2315 OV5693_MODE_STOP_STREAM,
2316 OV5693_MODE_TEST_PATTERN
2319 static const ov5693_reg *mode_table[] = {
2320 [OV5693_MODE_2592X1944] = mode_2592x1944,
2321 [OV5693_MODE_2592X1458] = mode_2592x1458,
2322 [OV5693_MODE_1920X1080] = mode_1920x1080,
2323 [OV5693_MODE_1296X972] = mode_1296x972,
2324 [OV5693_MODE_1280X720_120FPS] = mode_1280x720_120fps,
2325 [OV5693_MODE_2592X1944_HDR] = mode_2592x1944_HDR_24fps,
2326 [OV5693_MODE_1920X1080_HDR] = mode_1920x1080_HDR_30fps,
2327 [OV5693_MODE_1296X972_HDR] = mode_1296x972_HDR_30fps,
2329 [OV5693_MODE_START_STREAM] = ov5693_start,
2330 [OV5693_MODE_STOP_STREAM] = ov5693_stop,
2331 [OV5693_MODE_TEST_PATTERN] = tp_colorbars,
2334 static const struct camera_common_frmfmt ov5693_frmfmt[] = {
2335 {{2592, 1944}, 0, OV5693_MODE_2592X1944},
2336 {{2592, 1458}, 0, OV5693_MODE_2592X1458},
2337 {{1920, 1080}, 0, OV5693_MODE_1920X1080},
2338 {{1296, 972}, 0, OV5693_MODE_1296X972},
2339 {{1280, 720}, 0, OV5693_MODE_1280X720_120FPS},
2340 {{2592, 1944}, 1, OV5693_MODE_2592X1944_HDR},
2341 {{1920, 1080}, 1, OV5693_MODE_1920X1080_HDR},
2342 {{1296, 972}, 1, OV5693_MODE_1296X972_HDR},
2344 #endif /* __OV5693_TABLES__ */