aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp/isp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/omap3isp/isp.h')
-rw-r--r--drivers/media/video/omap3isp/isp.h85
1 files changed, 1 insertions, 84 deletions
diff --git a/drivers/media/video/omap3isp/isp.h b/drivers/media/video/omap3isp/isp.h
index 529e582ef948..521db0ce367d 100644
--- a/drivers/media/video/omap3isp/isp.h
+++ b/drivers/media/video/omap3isp/isp.h
@@ -27,6 +27,7 @@
27#ifndef OMAP3_ISP_CORE_H 27#ifndef OMAP3_ISP_CORE_H
28#define OMAP3_ISP_CORE_H 28#define OMAP3_ISP_CORE_H
29 29
30#include <media/omap3isp.h>
30#include <media/v4l2-device.h> 31#include <media/v4l2-device.h>
31#include <linux/device.h> 32#include <linux/device.h>
32#include <linux/io.h> 33#include <linux/io.h>
@@ -94,14 +95,6 @@ enum isp_subclk_resource {
94 OMAP3_ISP_SUBCLK_RESIZER = (1 << 4), 95 OMAP3_ISP_SUBCLK_RESIZER = (1 << 4),
95}; 96};
96 97
97enum isp_interface_type {
98 ISP_INTERFACE_PARALLEL,
99 ISP_INTERFACE_CSI2A_PHY2,
100 ISP_INTERFACE_CCP2B_PHY1,
101 ISP_INTERFACE_CCP2B_PHY2,
102 ISP_INTERFACE_CSI2C_PHY1,
103};
104
105/* ISP: OMAP 34xx ES 1.0 */ 98/* ISP: OMAP 34xx ES 1.0 */
106#define ISP_REVISION_1_0 0x10 99#define ISP_REVISION_1_0 0x10
107/* ISP2: OMAP 34xx ES 2.0, 2.1 and 3.0 */ 100/* ISP2: OMAP 34xx ES 2.0, 2.1 and 3.0 */
@@ -130,82 +123,6 @@ struct isp_reg {
130 u32 val; 123 u32 val;
131}; 124};
132 125
133/**
134 * struct isp_parallel_platform_data - Parallel interface platform data
135 * @data_lane_shift: Data lane shifter
136 * 0 - CAMEXT[13:0] -> CAM[13:0]
137 * 1 - CAMEXT[13:2] -> CAM[11:0]
138 * 2 - CAMEXT[13:4] -> CAM[9:0]
139 * 3 - CAMEXT[13:6] -> CAM[7:0]
140 * @clk_pol: Pixel clock polarity
141 * 0 - Non Inverted, 1 - Inverted
142 * @hs_pol: Horizontal synchronization polarity
143 * 0 - Active high, 1 - Active low
144 * @vs_pol: Vertical synchronization polarity
145 * 0 - Active high, 1 - Active low
146 * @bridge: CCDC Bridge input control
147 * ISPCTRL_PAR_BRIDGE_DISABLE - Disable
148 * ISPCTRL_PAR_BRIDGE_LENDIAN - Little endian
149 * ISPCTRL_PAR_BRIDGE_BENDIAN - Big endian
150 */
151struct isp_parallel_platform_data {
152 unsigned int data_lane_shift:2;
153 unsigned int clk_pol:1;
154 unsigned int hs_pol:1;
155 unsigned int vs_pol:1;
156 unsigned int bridge:4;
157};
158
159/**
160 * struct isp_ccp2_platform_data - CCP2 interface platform data
161 * @strobe_clk_pol: Strobe/clock polarity
162 * 0 - Non Inverted, 1 - Inverted
163 * @crc: Enable the cyclic redundancy check
164 * @ccp2_mode: Enable CCP2 compatibility mode
165 * 0 - MIPI-CSI1 mode, 1 - CCP2 mode
166 * @phy_layer: Physical layer selection
167 * ISPCCP2_CTRL_PHY_SEL_CLOCK - Data/clock physical layer
168 * ISPCCP2_CTRL_PHY_SEL_STROBE - Data/strobe physical layer
169 * @vpclk_div: Video port output clock control
170 */
171struct isp_ccp2_platform_data {
172 unsigned int strobe_clk_pol:1;
173 unsigned int crc:1;
174 unsigned int ccp2_mode:1;
175 unsigned int phy_layer:1;
176 unsigned int vpclk_div:2;
177};
178
179/**
180 * struct isp_csi2_platform_data - CSI2 interface platform data
181 * @crc: Enable the cyclic redundancy check
182 * @vpclk_div: Video port output clock control
183 */
184struct isp_csi2_platform_data {
185 unsigned crc:1;
186 unsigned vpclk_div:2;
187};
188
189struct isp_subdev_i2c_board_info {
190 struct i2c_board_info *board_info;
191 int i2c_adapter_id;
192};
193
194struct isp_v4l2_subdevs_group {
195 struct isp_subdev_i2c_board_info *subdevs;
196 enum isp_interface_type interface;
197 union {
198 struct isp_parallel_platform_data parallel;
199 struct isp_ccp2_platform_data ccp2;
200 struct isp_csi2_platform_data csi2;
201 } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */
202};
203
204struct isp_platform_data {
205 struct isp_v4l2_subdevs_group *subdevs;
206 void (*set_constraints)(struct isp_device *isp, bool enable);
207};
208
209struct isp_platform_callback { 126struct isp_platform_callback {
210 u32 (*set_xclk)(struct isp_device *isp, u32 xclk, u8 xclksel); 127 u32 (*set_xclk)(struct isp_device *isp, u32 xclk, u8 xclksel);
211 int (*csiphy_config)(struct isp_csiphy *phy, 128 int (*csiphy_config)(struct isp_csiphy *phy,