1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * include/media/i2c/smiapp.h
5 * Generic driver for SMIA/SMIA++ compliant camera modules
7 * Copyright (C) 2011--2012 Nokia Corporation
8 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
14 #include <media/v4l2-subdev.h>
16 #define SMIAPP_NAME "smiapp"
18 #define SMIAPP_DFL_I2C_ADDR (0x20 >> 1) /* Default I2C Address */
19 #define SMIAPP_ALT_I2C_ADDR (0x6e >> 1) /* Alternate I2C Address */
21 #define SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_CLOCK 0
22 #define SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_STROBE 1
23 #define SMIAPP_CSI_SIGNALLING_MODE_CSI2 2
26 * Sometimes due to board layout considerations the camera module can be
27 * mounted rotated. The typical rotation used is 180 degrees which can be
28 * corrected by giving a default H-FLIP and V-FLIP in the sensor readout.
29 * FIXME: rotation also changes the bayer pattern.
31 enum smiapp_module_board_orient
{
32 SMIAPP_MODULE_BOARD_ORIENT_0
= 0,
33 SMIAPP_MODULE_BOARD_ORIENT_180
,
36 struct smiapp_flash_strobe_parms
{
38 u32 strobe_width_high_us
;
40 u16 stobe_start_point
;
44 struct smiapp_hwconfig
{
46 * Change the cci address if i2c_addr_alt is set.
47 * Both default and alternate cci addr need to be present
49 unsigned short i2c_addr_dfl
; /* Default i2c addr */
50 unsigned short i2c_addr_alt
; /* Alternate i2c addr */
52 uint32_t ext_clk
; /* sensor external clk */
54 unsigned int lanes
; /* Number of CSI-2 lanes */
55 uint32_t csi_signalling_mode
; /* SMIAPP_CSI_SIGNALLING_MODE_* */
56 uint64_t *op_sys_clock
;
58 enum smiapp_module_board_orient module_board_orient
;
60 struct smiapp_flash_strobe_parms
*strobe_setup
;
63 #endif /* __SMIAPP_H_ */