summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorarai <arai@nvidia.com>2020-09-07 04:50:45 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2020-10-13 06:09:11 -0400
commitafd1b05bf774a0ed3b8d71cf3bd8ab0bc05e4651 (patch)
treec9299a07620098eddbab536541c170919905f901 /include
parenta75b504082c1af865926ee6b92e8b4bcfaaafc53 (diff)
media:i2c: add sensor driver for imx477
add sensor driver for R.Pi v3 High Quality camera, to be supported by the batuu BSP out of the box. bug 200631181 Change-Id: Ib665e59e7757fff5ad229cd68b491cf5d2593857 Signed-off-by: arai <arai@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2409671 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Prayas Mohanty <pmohanty@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Sudhir Vyas <svyas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include')
-rw-r--r--include/media/imx477.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/media/imx477.h b/include/media/imx477.h
new file mode 100644
index 000000000..79c7e588e
--- /dev/null
+++ b/include/media/imx477.h
@@ -0,0 +1,51 @@
1/*
2 * imx477_.h - imx477 sensor header
3 *
4 * Copyright (c) 2020, RidgeRun. All rights reserved.
5 *
6 * Contact us: support@ridgerun.com
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __IMX477_H__
22#define __IMX477_H__
23
24/* imx477 - sensor parameters */
25#define IMX477_MIN_GAIN (0)
26#define IMX477_MAX_GAIN (978)
27#define IMX477_ANALOG_GAIN_C0 (1024)
28#define IMX477_SHIFT_8_BITS (8)
29#define IMX477_MIN_FRAME_LENGTH (256)
30#define IMX477_MAX_FRAME_LENGTH (65535)
31#define IMX477_MIN_COARSE_EXPOSURE (1)
32#define IMX477_MAX_COARSE_DIFF (10)
33#define IMX477_MASK_LSB_2_BITS 0x0003
34#define IMX477_MASK_LSB_8_BITS 0x00ff
35
36/* imx477 sensor register address */
37#define IMX477_MODEL_ID_ADDR_MSB 0x0000
38#define IMX477_MODEL_ID_ADDR_LSB 0x0001
39#define IMX477_ANALOG_GAIN_ADDR_MSB 0x0204
40#define IMX477_ANALOG_GAIN_ADDR_LSB 0x0205
41#define IMX477_DIGITAL_GAIN_ADDR_MSB 0x020e
42#define IMX477_DIGITAL_GAIN_ADDR_LSB 0x020f
43#define IMX477_FRAME_LENGTH_ADDR_MSB 0x0340
44#define IMX477_FRAME_LENGTH_ADDR_LSB 0x0341
45#define IMX477_COARSE_INTEG_TIME_ADDR_MSB 0x0202
46#define IMX477_COARSE_INTEG_TIME_ADDR_LSB 0x0203
47#define IMX477_FINE_INTEG_TIME_ADDR_MSB 0x0200
48#define IMX477_FINE_INTEG_TIME_ADDR_LSB 0x0201
49#define IMX477_GROUP_HOLD_ADDR 0x0104
50
51#endif /* __IMX477_H__ */