diff options
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/media/imx219.h | 62 | ||||
| -rw-r--r-- | include/uapi/media/imx274.h | 60 | ||||
| -rw-r--r-- | include/uapi/media/imx318.h | 90 |
3 files changed, 212 insertions, 0 deletions
diff --git a/include/uapi/media/imx219.h b/include/uapi/media/imx219.h new file mode 100644 index 000000000..73f4abb7e --- /dev/null +++ b/include/uapi/media/imx219.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (c) 2014-2019, NVIDIA Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * NVIDIA Corporation and its licensors retain all intellectual property | ||
| 5 | * and proprietary rights in and to this software and related documentation | ||
| 6 | * and any modifications thereto. Any use, reproduction, disclosure or | ||
| 7 | * distribution of this software and related documentation without an express | ||
| 8 | * license agreement from NVIDIA Corporation is strictly prohibited. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __UAPI_IMX219_H__ | ||
| 12 | #define __UAPI_IMX219_H__ | ||
| 13 | |||
| 14 | #include <linux/ioctl.h> | ||
| 15 | #include <uapi/media/nvc.h> | ||
| 16 | |||
| 17 | #define IMX219_IOCTL_SET_MODE _IOW('o', 1, struct imx219_mode) | ||
| 18 | #define IMX219_IOCTL_GET_STATUS _IOR('o', 2, __u8) | ||
| 19 | #define IMX219_IOCTL_SET_FRAME_LENGTH _IOW('o', 3, __u32) | ||
| 20 | #define IMX219_IOCTL_SET_COARSE_TIME _IOW('o', 4, __u32) | ||
| 21 | #define IMX219_IOCTL_SET_GAIN _IOW('o', 5, struct imx219_gain) | ||
| 22 | #define IMX219_IOCTL_GET_FUSEID _IOR('o', 6, struct nvc_fuseid) | ||
| 23 | #define IMX219_IOCTL_SET_GROUP_HOLD _IOW('o', 7, struct imx219_ae) | ||
| 24 | #define IMX219_IOCTL_GET_AFDAT _IOR('o', 8, __u32) | ||
| 25 | #define IMX219_IOCTL_SET_POWER _IOW('o', 20, __u32) | ||
| 26 | #define IMX219_IOCTL_GET_FLASH_CAP _IOR('o', 30, __u32) | ||
| 27 | #define IMX219_IOCTL_SET_FLASH_MODE _IOW('o', 31, \ | ||
| 28 | struct imx219_flash_control) | ||
| 29 | |||
| 30 | /* TODO: revisit these values for IMX219 */ | ||
| 31 | #define IMX219_FRAME_LENGTH_ADDR_MSB 0x0160 | ||
| 32 | #define IMX219_FRAME_LENGTH_ADDR_LSB 0x0161 | ||
| 33 | #define IMX219_COARSE_TIME_ADDR_MSB 0x015a | ||
| 34 | #define IMX219_COARSE_TIME_ADDR_LSB 0x015b | ||
| 35 | #define IMX219_GAIN_ADDR 0x0157 | ||
| 36 | |||
| 37 | struct imx219_flash_control { | ||
| 38 | u8 enable; | ||
| 39 | u8 edge_trig_en; | ||
| 40 | u8 start_edge; | ||
| 41 | u8 repeat; | ||
| 42 | u16 delay_frm; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct imx219_mode { | ||
| 46 | int xres; | ||
| 47 | int yres; | ||
| 48 | __u32 frame_length; | ||
| 49 | __u32 coarse_time; | ||
| 50 | __u32 gain; | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct imx219_ae { | ||
| 54 | __u32 frame_length; | ||
| 55 | __u8 frame_length_enable; | ||
| 56 | __u32 coarse_time; | ||
| 57 | __u8 coarse_time_enable; | ||
| 58 | __u32 gain; | ||
| 59 | __u8 gain_enable; | ||
| 60 | }; | ||
| 61 | |||
| 62 | #endif /* __UAPI_IMX219_H__ */ | ||
diff --git a/include/uapi/media/imx274.h b/include/uapi/media/imx274.h new file mode 100644 index 000000000..3bacb07b7 --- /dev/null +++ b/include/uapi/media/imx274.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (c) 2016-2019, NVIDIA Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __UAPI_IMX274_H__ | ||
| 18 | #define __UAPI_IMX274_H__ | ||
| 19 | |||
| 20 | #include <linux/ioctl.h> | ||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 23 | #define IMX274_IOCTL_SET_MODE _IOW('o', 1, struct imx274_mode) | ||
| 24 | #define IMX274_IOCTL_GET_STATUS _IOR('o', 2, __u8) | ||
| 25 | #define IMX274_IOCTL_SET_FRAME_LENGTH _IOW('o', 3, __u32) | ||
| 26 | #define IMX274_IOCTL_SET_COARSE_TIME _IOW('o', 4, __u32) | ||
| 27 | #define IMX274_IOCTL_SET_GAIN _IOW('o', 5, __u16) | ||
| 28 | #define IMX274_IOCTL_GET_SENSORDATA _IOR('o', 6, \ | ||
| 29 | struct imx274_sensordata) | ||
| 30 | #define IMX274_IOCTL_SET_GROUP_HOLD _IOW('o', 7, struct imx274_ae) | ||
| 31 | #define IMX274_IOCTL_SET_HDR_COARSE_TIME _IOW('o', 8, \ | ||
| 32 | struct imx274_hdr) | ||
| 33 | #define IMX274_IOCTL_SET_POWER _IOW('o', 20, __u32) | ||
| 34 | |||
| 35 | struct imx274_mode { | ||
| 36 | __u32 xres; | ||
| 37 | __u32 yres; | ||
| 38 | __u32 frame_length; | ||
| 39 | __u32 coarse_time; | ||
| 40 | __u32 coarse_time_short; | ||
| 41 | __u16 gain; | ||
| 42 | __u8 hdr_en; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct imx274_hdr { | ||
| 46 | __u32 coarse_time_long; | ||
| 47 | __u32 coarse_time_short; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct imx274_ae { | ||
| 51 | __u32 frame_length; | ||
| 52 | __u8 frame_length_enable; | ||
| 53 | __u32 coarse_time; | ||
| 54 | __u32 coarse_time_short; | ||
| 55 | __u8 coarse_time_enable; | ||
| 56 | __s32 gain; | ||
| 57 | __u8 gain_enable; | ||
| 58 | }; | ||
| 59 | |||
| 60 | #endif /* __UAPI_IMX274_H__ */ | ||
diff --git a/include/uapi/media/imx318.h b/include/uapi/media/imx318.h new file mode 100644 index 000000000..cf55b0568 --- /dev/null +++ b/include/uapi/media/imx318.h | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* TODO set all define values correctly, copied from ov5693*/ | ||
| 18 | #ifndef __UAPI_IMX318_H__ | ||
| 19 | #define __UAPI_IMX318_H__ | ||
| 20 | |||
| 21 | #include <uapi/media/nvc.h> | ||
| 22 | #include <uapi/media/nvc_image.h> | ||
| 23 | |||
| 24 | #define IMX318_IOCTL_SET_MODE _IOW('o', 1, struct imx318_mode) | ||
| 25 | #define IMX318_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32) | ||
| 26 | #define IMX318_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32) | ||
| 27 | #define IMX318_IOCTL_SET_GAIN _IOW('o', 4, __u16) | ||
| 28 | #define IMX318_IOCTL_GET_STATUS _IOR('o', 5, __u8) | ||
| 29 | #define IMX318_IOCTL_SET_BINNING _IOW('o', 6, __u8) | ||
| 30 | #define IMX318_IOCTL_TEST_PATTERN _IOW('o', 7, \ | ||
| 31 | enum imx318_test_pattern) | ||
| 32 | #define IMX318_IOCTL_SET_GROUP_HOLD _IOW('o', 8, struct imx318_ae) | ||
| 33 | /* operating mode can be either stereo , leftOnly or rightOnly */ | ||
| 34 | #define IMX318_IOCTL_SET_CAMERA_MODE _IOW('o', 10, __u32) | ||
| 35 | #define IMX318_IOCTL_SYNC_SENSORS _IOW('o', 11, __u32) | ||
| 36 | #define IMX318_IOCTL_GET_FUSEID _IOR('o', 12, struct nvc_fuseid) | ||
| 37 | #define IMX318_IOCTL_SET_CAL_DATA _IOW('o', 15, \ | ||
| 38 | struct imx318_cal_data) | ||
| 39 | #define IMX318_IOCTL_GET_EEPROM_DATA _IOR('o', 20, __u8 *) | ||
| 40 | #define IMX318_IOCTL_SET_EEPROM_DATA _IOW('o', 21, __u8 *) | ||
| 41 | #define IMX318_IOCTL_GET_CAPS _IOR('o', 22, \ | ||
| 42 | struct nvc_imager_cap) | ||
| 43 | #define IMX318_IOCTL_SET_POWER _IOW('o', 23, __u32) | ||
| 44 | |||
| 45 | struct imx318_mode { | ||
| 46 | int res_x; | ||
| 47 | int res_y; | ||
| 48 | int fps; | ||
| 49 | __u32 frame_length; | ||
| 50 | __u32 coarse_time; | ||
| 51 | __u32 coarse_time_short; | ||
| 52 | __u16 gain; | ||
| 53 | __u8 hdr_en; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct imx318_ae { | ||
| 57 | __u32 frame_length; | ||
| 58 | __u8 frame_length_enable; | ||
| 59 | __u32 coarse_time; | ||
| 60 | __u32 coarse_time_short; | ||
| 61 | __u8 coarse_time_enable; | ||
| 62 | __s32 gain; | ||
| 63 | __u8 gain_enable; | ||
| 64 | }; | ||
| 65 | |||
| 66 | struct imx318_fuseid { | ||
| 67 | __u32 size; | ||
| 68 | __u8 id[16]; | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct imx318_hdr { | ||
| 72 | __u32 coarse_time_long; | ||
| 73 | __u32 coarse_time_short; | ||
| 74 | }; | ||
| 75 | |||
| 76 | struct imx318_otp_bank { | ||
| 77 | __u32 id; | ||
| 78 | __u8 buf[16]; | ||
| 79 | }; | ||
| 80 | |||
| 81 | struct imx318_cal_data { | ||
| 82 | int loaded; | ||
| 83 | int rg_ratio; | ||
| 84 | int bg_ratio; | ||
| 85 | int rg_ratio_typical; | ||
| 86 | int bg_ratio_typical; | ||
| 87 | __u8 lenc[62]; | ||
| 88 | }; | ||
| 89 | |||
| 90 | #endif /* __UAPI_IMX318_H__ */ | ||
