rt2800: initialize BBP_R104 on proper subroutines
[linux/fpc-iii.git] / drivers / media / platform / omap3isp / ispreg.h
blobb7d90e6fb01dc043c240a20bd27ae444dd96fc79
1 /*
2 * ispreg.h
4 * TI OMAP3 ISP - Registers definitions
6 * Copyright (C) 2010 Nokia Corporation
7 * Copyright (C) 2009 Texas Instruments, Inc
9 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 * Sakari Ailus <sakari.ailus@iki.fi>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 * 02110-1301 USA
27 #ifndef OMAP3_ISP_REG_H
28 #define OMAP3_ISP_REG_H
30 #define CM_CAM_MCLK_HZ 172800000 /* Hz */
32 /* ISP module register offset */
34 #define ISP_REVISION (0x000)
35 #define ISP_SYSCONFIG (0x004)
36 #define ISP_SYSSTATUS (0x008)
37 #define ISP_IRQ0ENABLE (0x00C)
38 #define ISP_IRQ0STATUS (0x010)
39 #define ISP_IRQ1ENABLE (0x014)
40 #define ISP_IRQ1STATUS (0x018)
41 #define ISP_TCTRL_GRESET_LENGTH (0x030)
42 #define ISP_TCTRL_PSTRB_REPLAY (0x034)
43 #define ISP_CTRL (0x040)
44 #define ISP_SECURE (0x044)
45 #define ISP_TCTRL_CTRL (0x050)
46 #define ISP_TCTRL_FRAME (0x054)
47 #define ISP_TCTRL_PSTRB_DELAY (0x058)
48 #define ISP_TCTRL_STRB_DELAY (0x05C)
49 #define ISP_TCTRL_SHUT_DELAY (0x060)
50 #define ISP_TCTRL_PSTRB_LENGTH (0x064)
51 #define ISP_TCTRL_STRB_LENGTH (0x068)
52 #define ISP_TCTRL_SHUT_LENGTH (0x06C)
53 #define ISP_PING_PONG_ADDR (0x070)
54 #define ISP_PING_PONG_MEM_RANGE (0x074)
55 #define ISP_PING_PONG_BUF_SIZE (0x078)
57 /* CCP2 receiver registers */
59 #define ISPCCP2_REVISION (0x000)
60 #define ISPCCP2_SYSCONFIG (0x004)
61 #define ISPCCP2_SYSCONFIG_SOFT_RESET (1 << 1)
62 #define ISPCCP2_SYSCONFIG_AUTO_IDLE 0x1
63 #define ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SHIFT 12
64 #define ISPCCP2_SYSCONFIG_MSTANDBY_MODE_FORCE \
65 (0x0 << ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
66 #define ISPCCP2_SYSCONFIG_MSTANDBY_MODE_NO \
67 (0x1 << ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
68 #define ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SMART \
69 (0x2 << ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
70 #define ISPCCP2_SYSSTATUS (0x008)
71 #define ISPCCP2_SYSSTATUS_RESET_DONE (1 << 0)
72 #define ISPCCP2_LC01_IRQENABLE (0x00C)
73 #define ISPCCP2_LC01_IRQSTATUS (0x010)
74 #define ISPCCP2_LC01_IRQSTATUS_LC0_FS_IRQ (1 << 11)
75 #define ISPCCP2_LC01_IRQSTATUS_LC0_LE_IRQ (1 << 10)
76 #define ISPCCP2_LC01_IRQSTATUS_LC0_LS_IRQ (1 << 9)
77 #define ISPCCP2_LC01_IRQSTATUS_LC0_FE_IRQ (1 << 8)
78 #define ISPCCP2_LC01_IRQSTATUS_LC0_COUNT_IRQ (1 << 7)
79 #define ISPCCP2_LC01_IRQSTATUS_LC0_FIFO_OVF_IRQ (1 << 5)
80 #define ISPCCP2_LC01_IRQSTATUS_LC0_CRC_IRQ (1 << 4)
81 #define ISPCCP2_LC01_IRQSTATUS_LC0_FSP_IRQ (1 << 3)
82 #define ISPCCP2_LC01_IRQSTATUS_LC0_FW_IRQ (1 << 2)
83 #define ISPCCP2_LC01_IRQSTATUS_LC0_FSC_IRQ (1 << 1)
84 #define ISPCCP2_LC01_IRQSTATUS_LC0_SSC_IRQ (1 << 0)
86 #define ISPCCP2_LC23_IRQENABLE (0x014)
87 #define ISPCCP2_LC23_IRQSTATUS (0x018)
88 #define ISPCCP2_LCM_IRQENABLE (0x02C)
89 #define ISPCCP2_LCM_IRQSTATUS_EOF_IRQ (1 << 0)
90 #define ISPCCP2_LCM_IRQSTATUS_OCPERROR_IRQ (1 << 1)
91 #define ISPCCP2_LCM_IRQSTATUS (0x030)
92 #define ISPCCP2_CTRL (0x040)
93 #define ISPCCP2_CTRL_IF_EN (1 << 0)
94 #define ISPCCP2_CTRL_PHY_SEL (1 << 1)
95 #define ISPCCP2_CTRL_PHY_SEL_CLOCK (0 << 1)
96 #define ISPCCP2_CTRL_PHY_SEL_STROBE (1 << 1)
97 #define ISPCCP2_CTRL_PHY_SEL_MASK 0x1
98 #define ISPCCP2_CTRL_PHY_SEL_SHIFT 1
99 #define ISPCCP2_CTRL_IO_OUT_SEL (1 << 2)
100 #define ISPCCP2_CTRL_MODE (1 << 4)
101 #define ISPCCP2_CTRL_VP_CLK_FORCE_ON (1 << 9)
102 #define ISPCCP2_CTRL_INV (1 << 10)
103 #define ISPCCP2_CTRL_INV_MASK 0x1
104 #define ISPCCP2_CTRL_INV_SHIFT 10
105 #define ISPCCP2_CTRL_VP_ONLY_EN (1 << 11)
106 #define ISPCCP2_CTRL_VP_CLK_POL (1 << 12)
107 #define ISPCCP2_CTRL_VPCLK_DIV_SHIFT 15
108 #define ISPCCP2_CTRL_VPCLK_DIV_MASK 0x1ffff /* [31:15] */
109 #define ISPCCP2_CTRL_VP_OUT_CTRL_SHIFT 8 /* 3430 bits */
110 #define ISPCCP2_CTRL_VP_OUT_CTRL_MASK 0x3 /* 3430 bits */
111 #define ISPCCP2_DBG (0x044)
112 #define ISPCCP2_GNQ (0x048)
113 #define ISPCCP2_LCx_CTRL(x) ((0x050)+0x30*(x))
114 #define ISPCCP2_LCx_CTRL_CHAN_EN (1 << 0)
115 #define ISPCCP2_LCx_CTRL_CRC_EN (1 << 19)
116 #define ISPCCP2_LCx_CTRL_CRC_MASK 0x1
117 #define ISPCCP2_LCx_CTRL_CRC_SHIFT 2
118 #define ISPCCP2_LCx_CTRL_CRC_SHIFT_15_0 19
119 #define ISPCCP2_LCx_CTRL_REGION_EN (1 << 1)
120 #define ISPCCP2_LCx_CTRL_REGION_MASK 0x1
121 #define ISPCCP2_LCx_CTRL_REGION_SHIFT 1
122 #define ISPCCP2_LCx_CTRL_FORMAT_MASK_15_0 0x3f
123 #define ISPCCP2_LCx_CTRL_FORMAT_SHIFT_15_0 0x2
124 #define ISPCCP2_LCx_CTRL_FORMAT_MASK 0x1f
125 #define ISPCCP2_LCx_CTRL_FORMAT_SHIFT 0x3
126 #define ISPCCP2_LCx_CODE(x) ((0x054)+0x30*(x))
127 #define ISPCCP2_LCx_STAT_START(x) ((0x058)+0x30*(x))
128 #define ISPCCP2_LCx_STAT_SIZE(x) ((0x05C)+0x30*(x))
129 #define ISPCCP2_LCx_SOF_ADDR(x) ((0x060)+0x30*(x))
130 #define ISPCCP2_LCx_EOF_ADDR(x) ((0x064)+0x30*(x))
131 #define ISPCCP2_LCx_DAT_START(x) ((0x068)+0x30*(x))
132 #define ISPCCP2_LCx_DAT_SIZE(x) ((0x06C)+0x30*(x))
133 #define ISPCCP2_LCx_DAT_MASK 0xFFF
134 #define ISPCCP2_LCx_DAT_SHIFT 16
135 #define ISPCCP2_LCx_DAT_PING_ADDR(x) ((0x070)+0x30*(x))
136 #define ISPCCP2_LCx_DAT_PONG_ADDR(x) ((0x074)+0x30*(x))
137 #define ISPCCP2_LCx_DAT_OFST(x) ((0x078)+0x30*(x))
138 #define ISPCCP2_LCM_CTRL (0x1D0)
139 #define ISPCCP2_LCM_CTRL_CHAN_EN (1 << 0)
140 #define ISPCCP2_LCM_CTRL_DST_PORT (1 << 2)
141 #define ISPCCP2_LCM_CTRL_DST_PORT_SHIFT 2
142 #define ISPCCP2_LCM_CTRL_READ_THROTTLE_SHIFT 3
143 #define ISPCCP2_LCM_CTRL_READ_THROTTLE_MASK 0x11
144 #define ISPCCP2_LCM_CTRL_BURST_SIZE_SHIFT 5
145 #define ISPCCP2_LCM_CTRL_BURST_SIZE_MASK 0x7
146 #define ISPCCP2_LCM_CTRL_SRC_FORMAT_SHIFT 16
147 #define ISPCCP2_LCM_CTRL_SRC_FORMAT_MASK 0x7
148 #define ISPCCP2_LCM_CTRL_SRC_DECOMPR_SHIFT 20
149 #define ISPCCP2_LCM_CTRL_SRC_DECOMPR_MASK 0x3
150 #define ISPCCP2_LCM_CTRL_SRC_DPCM_PRED (1 << 22)
151 #define ISPCCP2_LCM_CTRL_SRC_PACK (1 << 23)
152 #define ISPCCP2_LCM_CTRL_DST_FORMAT_SHIFT 24
153 #define ISPCCP2_LCM_CTRL_DST_FORMAT_MASK 0x7
154 #define ISPCCP2_LCM_VSIZE (0x1D4)
155 #define ISPCCP2_LCM_VSIZE_SHIFT 16
156 #define ISPCCP2_LCM_HSIZE (0x1D8)
157 #define ISPCCP2_LCM_HSIZE_SHIFT 16
158 #define ISPCCP2_LCM_PREFETCH (0x1DC)
159 #define ISPCCP2_LCM_PREFETCH_SHIFT 3
160 #define ISPCCP2_LCM_SRC_ADDR (0x1E0)
161 #define ISPCCP2_LCM_SRC_OFST (0x1E4)
162 #define ISPCCP2_LCM_DST_ADDR (0x1E8)
163 #define ISPCCP2_LCM_DST_OFST (0x1EC)
165 /* CCDC module register offset */
167 #define ISPCCDC_PID (0x000)
168 #define ISPCCDC_PCR (0x004)
169 #define ISPCCDC_SYN_MODE (0x008)
170 #define ISPCCDC_HD_VD_WID (0x00C)
171 #define ISPCCDC_PIX_LINES (0x010)
172 #define ISPCCDC_HORZ_INFO (0x014)
173 #define ISPCCDC_VERT_START (0x018)
174 #define ISPCCDC_VERT_LINES (0x01C)
175 #define ISPCCDC_CULLING (0x020)
176 #define ISPCCDC_HSIZE_OFF (0x024)
177 #define ISPCCDC_SDOFST (0x028)
178 #define ISPCCDC_SDR_ADDR (0x02C)
179 #define ISPCCDC_CLAMP (0x030)
180 #define ISPCCDC_DCSUB (0x034)
181 #define ISPCCDC_COLPTN (0x038)
182 #define ISPCCDC_BLKCMP (0x03C)
183 #define ISPCCDC_FPC (0x040)
184 #define ISPCCDC_FPC_ADDR (0x044)
185 #define ISPCCDC_VDINT (0x048)
186 #define ISPCCDC_ALAW (0x04C)
187 #define ISPCCDC_REC656IF (0x050)
188 #define ISPCCDC_CFG (0x054)
189 #define ISPCCDC_FMTCFG (0x058)
190 #define ISPCCDC_FMT_HORZ (0x05C)
191 #define ISPCCDC_FMT_VERT (0x060)
192 #define ISPCCDC_FMT_ADDR0 (0x064)
193 #define ISPCCDC_FMT_ADDR1 (0x068)
194 #define ISPCCDC_FMT_ADDR2 (0x06C)
195 #define ISPCCDC_FMT_ADDR3 (0x070)
196 #define ISPCCDC_FMT_ADDR4 (0x074)
197 #define ISPCCDC_FMT_ADDR5 (0x078)
198 #define ISPCCDC_FMT_ADDR6 (0x07C)
199 #define ISPCCDC_FMT_ADDR7 (0x080)
200 #define ISPCCDC_PRGEVEN0 (0x084)
201 #define ISPCCDC_PRGEVEN1 (0x088)
202 #define ISPCCDC_PRGODD0 (0x08C)
203 #define ISPCCDC_PRGODD1 (0x090)
204 #define ISPCCDC_VP_OUT (0x094)
206 #define ISPCCDC_LSC_CONFIG (0x098)
207 #define ISPCCDC_LSC_INITIAL (0x09C)
208 #define ISPCCDC_LSC_TABLE_BASE (0x0A0)
209 #define ISPCCDC_LSC_TABLE_OFFSET (0x0A4)
211 /* SBL */
212 #define ISPSBL_PCR 0x4
213 #define ISPSBL_PCR_H3A_AEAWB_WBL_OVF (1 << 16)
214 #define ISPSBL_PCR_H3A_AF_WBL_OVF (1 << 17)
215 #define ISPSBL_PCR_RSZ4_WBL_OVF (1 << 18)
216 #define ISPSBL_PCR_RSZ3_WBL_OVF (1 << 19)
217 #define ISPSBL_PCR_RSZ2_WBL_OVF (1 << 20)
218 #define ISPSBL_PCR_RSZ1_WBL_OVF (1 << 21)
219 #define ISPSBL_PCR_PRV_WBL_OVF (1 << 22)
220 #define ISPSBL_PCR_CCDC_WBL_OVF (1 << 23)
221 #define ISPSBL_PCR_CCDCPRV_2_RSZ_OVF (1 << 24)
222 #define ISPSBL_PCR_CSIA_WBL_OVF (1 << 25)
223 #define ISPSBL_PCR_CSIB_WBL_OVF (1 << 26)
224 #define ISPSBL_CCDC_WR_0 (0x028)
225 #define ISPSBL_CCDC_WR_0_DATA_READY (1 << 21)
226 #define ISPSBL_CCDC_WR_1 (0x02C)
227 #define ISPSBL_CCDC_WR_2 (0x030)
228 #define ISPSBL_CCDC_WR_3 (0x034)
230 #define ISPSBL_SDR_REQ_EXP 0xF8
231 #define ISPSBL_SDR_REQ_HIST_EXP_SHIFT 0
232 #define ISPSBL_SDR_REQ_HIST_EXP_MASK (0x3FF)
233 #define ISPSBL_SDR_REQ_RSZ_EXP_SHIFT 10
234 #define ISPSBL_SDR_REQ_RSZ_EXP_MASK (0x3FF << ISPSBL_SDR_REQ_RSZ_EXP_SHIFT)
235 #define ISPSBL_SDR_REQ_PRV_EXP_SHIFT 20
236 #define ISPSBL_SDR_REQ_PRV_EXP_MASK (0x3FF << ISPSBL_SDR_REQ_PRV_EXP_SHIFT)
238 /* Histogram registers */
239 #define ISPHIST_PID (0x000)
240 #define ISPHIST_PCR (0x004)
241 #define ISPHIST_CNT (0x008)
242 #define ISPHIST_WB_GAIN (0x00C)
243 #define ISPHIST_R0_HORZ (0x010)
244 #define ISPHIST_R0_VERT (0x014)
245 #define ISPHIST_R1_HORZ (0x018)
246 #define ISPHIST_R1_VERT (0x01C)
247 #define ISPHIST_R2_HORZ (0x020)
248 #define ISPHIST_R2_VERT (0x024)
249 #define ISPHIST_R3_HORZ (0x028)
250 #define ISPHIST_R3_VERT (0x02C)
251 #define ISPHIST_ADDR (0x030)
252 #define ISPHIST_DATA (0x034)
253 #define ISPHIST_RADD (0x038)
254 #define ISPHIST_RADD_OFF (0x03C)
255 #define ISPHIST_H_V_INFO (0x040)
257 /* H3A module registers */
258 #define ISPH3A_PID (0x000)
259 #define ISPH3A_PCR (0x004)
260 #define ISPH3A_AEWWIN1 (0x04C)
261 #define ISPH3A_AEWINSTART (0x050)
262 #define ISPH3A_AEWINBLK (0x054)
263 #define ISPH3A_AEWSUBWIN (0x058)
264 #define ISPH3A_AEWBUFST (0x05C)
265 #define ISPH3A_AFPAX1 (0x008)
266 #define ISPH3A_AFPAX2 (0x00C)
267 #define ISPH3A_AFPAXSTART (0x010)
268 #define ISPH3A_AFIIRSH (0x014)
269 #define ISPH3A_AFBUFST (0x018)
270 #define ISPH3A_AFCOEF010 (0x01C)
271 #define ISPH3A_AFCOEF032 (0x020)
272 #define ISPH3A_AFCOEF054 (0x024)
273 #define ISPH3A_AFCOEF076 (0x028)
274 #define ISPH3A_AFCOEF098 (0x02C)
275 #define ISPH3A_AFCOEF0010 (0x030)
276 #define ISPH3A_AFCOEF110 (0x034)
277 #define ISPH3A_AFCOEF132 (0x038)
278 #define ISPH3A_AFCOEF154 (0x03C)
279 #define ISPH3A_AFCOEF176 (0x040)
280 #define ISPH3A_AFCOEF198 (0x044)
281 #define ISPH3A_AFCOEF1010 (0x048)
283 #define ISPPRV_PCR (0x004)
284 #define ISPPRV_HORZ_INFO (0x008)
285 #define ISPPRV_VERT_INFO (0x00C)
286 #define ISPPRV_RSDR_ADDR (0x010)
287 #define ISPPRV_RADR_OFFSET (0x014)
288 #define ISPPRV_DSDR_ADDR (0x018)
289 #define ISPPRV_DRKF_OFFSET (0x01C)
290 #define ISPPRV_WSDR_ADDR (0x020)
291 #define ISPPRV_WADD_OFFSET (0x024)
292 #define ISPPRV_AVE (0x028)
293 #define ISPPRV_HMED (0x02C)
294 #define ISPPRV_NF (0x030)
295 #define ISPPRV_WB_DGAIN (0x034)
296 #define ISPPRV_WBGAIN (0x038)
297 #define ISPPRV_WBSEL (0x03C)
298 #define ISPPRV_CFA (0x040)
299 #define ISPPRV_BLKADJOFF (0x044)
300 #define ISPPRV_RGB_MAT1 (0x048)
301 #define ISPPRV_RGB_MAT2 (0x04C)
302 #define ISPPRV_RGB_MAT3 (0x050)
303 #define ISPPRV_RGB_MAT4 (0x054)
304 #define ISPPRV_RGB_MAT5 (0x058)
305 #define ISPPRV_RGB_OFF1 (0x05C)
306 #define ISPPRV_RGB_OFF2 (0x060)
307 #define ISPPRV_CSC0 (0x064)
308 #define ISPPRV_CSC1 (0x068)
309 #define ISPPRV_CSC2 (0x06C)
310 #define ISPPRV_CSC_OFFSET (0x070)
311 #define ISPPRV_CNT_BRT (0x074)
312 #define ISPPRV_CSUP (0x078)
313 #define ISPPRV_SETUP_YC (0x07C)
314 #define ISPPRV_SET_TBL_ADDR (0x080)
315 #define ISPPRV_SET_TBL_DATA (0x084)
316 #define ISPPRV_CDC_THR0 (0x090)
317 #define ISPPRV_CDC_THR1 (ISPPRV_CDC_THR0 + (0x4))
318 #define ISPPRV_CDC_THR2 (ISPPRV_CDC_THR0 + (0x4) * 2)
319 #define ISPPRV_CDC_THR3 (ISPPRV_CDC_THR0 + (0x4) * 3)
321 #define ISPPRV_REDGAMMA_TABLE_ADDR 0x0000
322 #define ISPPRV_GREENGAMMA_TABLE_ADDR 0x0400
323 #define ISPPRV_BLUEGAMMA_TABLE_ADDR 0x0800
324 #define ISPPRV_NF_TABLE_ADDR 0x0C00
325 #define ISPPRV_YENH_TABLE_ADDR 0x1000
326 #define ISPPRV_CFA_TABLE_ADDR 0x1400
328 #define ISPRSZ_MIN_OUTPUT 64
329 #define ISPRSZ_MAX_OUTPUT 3312
331 /* Resizer module register offset */
332 #define ISPRSZ_PID (0x000)
333 #define ISPRSZ_PCR (0x004)
334 #define ISPRSZ_CNT (0x008)
335 #define ISPRSZ_OUT_SIZE (0x00C)
336 #define ISPRSZ_IN_START (0x010)
337 #define ISPRSZ_IN_SIZE (0x014)
338 #define ISPRSZ_SDR_INADD (0x018)
339 #define ISPRSZ_SDR_INOFF (0x01C)
340 #define ISPRSZ_SDR_OUTADD (0x020)
341 #define ISPRSZ_SDR_OUTOFF (0x024)
342 #define ISPRSZ_HFILT10 (0x028)
343 #define ISPRSZ_HFILT32 (0x02C)
344 #define ISPRSZ_HFILT54 (0x030)
345 #define ISPRSZ_HFILT76 (0x034)
346 #define ISPRSZ_HFILT98 (0x038)
347 #define ISPRSZ_HFILT1110 (0x03C)
348 #define ISPRSZ_HFILT1312 (0x040)
349 #define ISPRSZ_HFILT1514 (0x044)
350 #define ISPRSZ_HFILT1716 (0x048)
351 #define ISPRSZ_HFILT1918 (0x04C)
352 #define ISPRSZ_HFILT2120 (0x050)
353 #define ISPRSZ_HFILT2322 (0x054)
354 #define ISPRSZ_HFILT2524 (0x058)
355 #define ISPRSZ_HFILT2726 (0x05C)
356 #define ISPRSZ_HFILT2928 (0x060)
357 #define ISPRSZ_HFILT3130 (0x064)
358 #define ISPRSZ_VFILT10 (0x068)
359 #define ISPRSZ_VFILT32 (0x06C)
360 #define ISPRSZ_VFILT54 (0x070)
361 #define ISPRSZ_VFILT76 (0x074)
362 #define ISPRSZ_VFILT98 (0x078)
363 #define ISPRSZ_VFILT1110 (0x07C)
364 #define ISPRSZ_VFILT1312 (0x080)
365 #define ISPRSZ_VFILT1514 (0x084)
366 #define ISPRSZ_VFILT1716 (0x088)
367 #define ISPRSZ_VFILT1918 (0x08C)
368 #define ISPRSZ_VFILT2120 (0x090)
369 #define ISPRSZ_VFILT2322 (0x094)
370 #define ISPRSZ_VFILT2524 (0x098)
371 #define ISPRSZ_VFILT2726 (0x09C)
372 #define ISPRSZ_VFILT2928 (0x0A0)
373 #define ISPRSZ_VFILT3130 (0x0A4)
374 #define ISPRSZ_YENH (0x0A8)
376 #define ISP_INT_CLR 0xFF113F11
377 #define ISPPRV_PCR_EN 1
378 #define ISPPRV_PCR_BUSY (1 << 1)
379 #define ISPPRV_PCR_SOURCE (1 << 2)
380 #define ISPPRV_PCR_ONESHOT (1 << 3)
381 #define ISPPRV_PCR_WIDTH (1 << 4)
382 #define ISPPRV_PCR_INVALAW (1 << 5)
383 #define ISPPRV_PCR_DRKFEN (1 << 6)
384 #define ISPPRV_PCR_DRKFCAP (1 << 7)
385 #define ISPPRV_PCR_HMEDEN (1 << 8)
386 #define ISPPRV_PCR_NFEN (1 << 9)
387 #define ISPPRV_PCR_CFAEN (1 << 10)
388 #define ISPPRV_PCR_CFAFMT_SHIFT 11
389 #define ISPPRV_PCR_CFAFMT_MASK 0x7800
390 #define ISPPRV_PCR_CFAFMT_BAYER (0 << 11)
391 #define ISPPRV_PCR_CFAFMT_SONYVGA (1 << 11)
392 #define ISPPRV_PCR_CFAFMT_RGBFOVEON (2 << 11)
393 #define ISPPRV_PCR_CFAFMT_DNSPL (3 << 11)
394 #define ISPPRV_PCR_CFAFMT_HONEYCOMB (4 << 11)
395 #define ISPPRV_PCR_CFAFMT_RRGGBBFOVEON (5 << 11)
396 #define ISPPRV_PCR_YNENHEN (1 << 15)
397 #define ISPPRV_PCR_SUPEN (1 << 16)
398 #define ISPPRV_PCR_YCPOS_SHIFT 17
399 #define ISPPRV_PCR_YCPOS_YCrYCb (0 << 17)
400 #define ISPPRV_PCR_YCPOS_YCbYCr (1 << 17)
401 #define ISPPRV_PCR_YCPOS_CbYCrY (2 << 17)
402 #define ISPPRV_PCR_YCPOS_CrYCbY (3 << 17)
403 #define ISPPRV_PCR_RSZPORT (1 << 19)
404 #define ISPPRV_PCR_SDRPORT (1 << 20)
405 #define ISPPRV_PCR_SCOMP_EN (1 << 21)
406 #define ISPPRV_PCR_SCOMP_SFT_SHIFT (22)
407 #define ISPPRV_PCR_SCOMP_SFT_MASK (7 << 22)
408 #define ISPPRV_PCR_GAMMA_BYPASS (1 << 26)
409 #define ISPPRV_PCR_DCOREN (1 << 27)
410 #define ISPPRV_PCR_DCCOUP (1 << 28)
411 #define ISPPRV_PCR_DRK_FAIL (1 << 31)
413 #define ISPPRV_HORZ_INFO_EPH_SHIFT 0
414 #define ISPPRV_HORZ_INFO_EPH_MASK 0x3fff
415 #define ISPPRV_HORZ_INFO_SPH_SHIFT 16
416 #define ISPPRV_HORZ_INFO_SPH_MASK 0x3fff0
418 #define ISPPRV_VERT_INFO_ELV_SHIFT 0
419 #define ISPPRV_VERT_INFO_ELV_MASK 0x3fff
420 #define ISPPRV_VERT_INFO_SLV_SHIFT 16
421 #define ISPPRV_VERT_INFO_SLV_MASK 0x3fff0
423 #define ISPPRV_AVE_EVENDIST_SHIFT 2
424 #define ISPPRV_AVE_EVENDIST_1 0x0
425 #define ISPPRV_AVE_EVENDIST_2 0x1
426 #define ISPPRV_AVE_EVENDIST_3 0x2
427 #define ISPPRV_AVE_EVENDIST_4 0x3
428 #define ISPPRV_AVE_ODDDIST_SHIFT 4
429 #define ISPPRV_AVE_ODDDIST_1 0x0
430 #define ISPPRV_AVE_ODDDIST_2 0x1
431 #define ISPPRV_AVE_ODDDIST_3 0x2
432 #define ISPPRV_AVE_ODDDIST_4 0x3
434 #define ISPPRV_HMED_THRESHOLD_SHIFT 0
435 #define ISPPRV_HMED_EVENDIST (1 << 8)
436 #define ISPPRV_HMED_ODDDIST (1 << 9)
438 #define ISPPRV_WBGAIN_COEF0_SHIFT 0
439 #define ISPPRV_WBGAIN_COEF1_SHIFT 8
440 #define ISPPRV_WBGAIN_COEF2_SHIFT 16
441 #define ISPPRV_WBGAIN_COEF3_SHIFT 24
443 #define ISPPRV_WBSEL_COEF0 0x0
444 #define ISPPRV_WBSEL_COEF1 0x1
445 #define ISPPRV_WBSEL_COEF2 0x2
446 #define ISPPRV_WBSEL_COEF3 0x3
448 #define ISPPRV_WBSEL_N0_0_SHIFT 0
449 #define ISPPRV_WBSEL_N0_1_SHIFT 2
450 #define ISPPRV_WBSEL_N0_2_SHIFT 4
451 #define ISPPRV_WBSEL_N0_3_SHIFT 6
452 #define ISPPRV_WBSEL_N1_0_SHIFT 8
453 #define ISPPRV_WBSEL_N1_1_SHIFT 10
454 #define ISPPRV_WBSEL_N1_2_SHIFT 12
455 #define ISPPRV_WBSEL_N1_3_SHIFT 14
456 #define ISPPRV_WBSEL_N2_0_SHIFT 16
457 #define ISPPRV_WBSEL_N2_1_SHIFT 18
458 #define ISPPRV_WBSEL_N2_2_SHIFT 20
459 #define ISPPRV_WBSEL_N2_3_SHIFT 22
460 #define ISPPRV_WBSEL_N3_0_SHIFT 24
461 #define ISPPRV_WBSEL_N3_1_SHIFT 26
462 #define ISPPRV_WBSEL_N3_2_SHIFT 28
463 #define ISPPRV_WBSEL_N3_3_SHIFT 30
465 #define ISPPRV_CFA_GRADTH_HOR_SHIFT 0
466 #define ISPPRV_CFA_GRADTH_VER_SHIFT 8
468 #define ISPPRV_BLKADJOFF_B_SHIFT 0
469 #define ISPPRV_BLKADJOFF_G_SHIFT 8
470 #define ISPPRV_BLKADJOFF_R_SHIFT 16
472 #define ISPPRV_RGB_MAT1_MTX_RR_SHIFT 0
473 #define ISPPRV_RGB_MAT1_MTX_GR_SHIFT 16
475 #define ISPPRV_RGB_MAT2_MTX_BR_SHIFT 0
476 #define ISPPRV_RGB_MAT2_MTX_RG_SHIFT 16
478 #define ISPPRV_RGB_MAT3_MTX_GG_SHIFT 0
479 #define ISPPRV_RGB_MAT3_MTX_BG_SHIFT 16
481 #define ISPPRV_RGB_MAT4_MTX_RB_SHIFT 0
482 #define ISPPRV_RGB_MAT4_MTX_GB_SHIFT 16
484 #define ISPPRV_RGB_MAT5_MTX_BB_SHIFT 0
486 #define ISPPRV_RGB_OFF1_MTX_OFFG_SHIFT 0
487 #define ISPPRV_RGB_OFF1_MTX_OFFR_SHIFT 16
489 #define ISPPRV_RGB_OFF2_MTX_OFFB_SHIFT 0
491 #define ISPPRV_CSC0_RY_SHIFT 0
492 #define ISPPRV_CSC0_GY_SHIFT 10
493 #define ISPPRV_CSC0_BY_SHIFT 20
495 #define ISPPRV_CSC1_RCB_SHIFT 0
496 #define ISPPRV_CSC1_GCB_SHIFT 10
497 #define ISPPRV_CSC1_BCB_SHIFT 20
499 #define ISPPRV_CSC2_RCR_SHIFT 0
500 #define ISPPRV_CSC2_GCR_SHIFT 10
501 #define ISPPRV_CSC2_BCR_SHIFT 20
503 #define ISPPRV_CSC_OFFSET_CR_SHIFT 0
504 #define ISPPRV_CSC_OFFSET_CB_SHIFT 8
505 #define ISPPRV_CSC_OFFSET_Y_SHIFT 16
507 #define ISPPRV_CNT_BRT_BRT_SHIFT 0
508 #define ISPPRV_CNT_BRT_CNT_SHIFT 8
510 #define ISPPRV_CONTRAST_MAX 0x10
511 #define ISPPRV_CONTRAST_MIN 0xFF
512 #define ISPPRV_BRIGHT_MIN 0x00
513 #define ISPPRV_BRIGHT_MAX 0xFF
515 #define ISPPRV_CSUP_CSUPG_SHIFT 0
516 #define ISPPRV_CSUP_THRES_SHIFT 8
517 #define ISPPRV_CSUP_HPYF_SHIFT 16
519 #define ISPPRV_SETUP_YC_MINC_SHIFT 0
520 #define ISPPRV_SETUP_YC_MAXC_SHIFT 8
521 #define ISPPRV_SETUP_YC_MINY_SHIFT 16
522 #define ISPPRV_SETUP_YC_MAXY_SHIFT 24
523 #define ISPPRV_YC_MAX 0xFF
524 #define ISPPRV_YC_MIN 0x0
526 /* Define bit fields within selected registers */
527 #define ISP_REVISION_SHIFT 0
529 #define ISP_SYSCONFIG_AUTOIDLE (1 << 0)
530 #define ISP_SYSCONFIG_SOFTRESET (1 << 1)
531 #define ISP_SYSCONFIG_MIDLEMODE_SHIFT 12
532 #define ISP_SYSCONFIG_MIDLEMODE_FORCESTANDBY 0x0
533 #define ISP_SYSCONFIG_MIDLEMODE_NOSTANBY 0x1
534 #define ISP_SYSCONFIG_MIDLEMODE_SMARTSTANDBY 0x2
536 #define ISP_SYSSTATUS_RESETDONE 0
538 #define IRQ0ENABLE_CSIA_IRQ (1 << 0)
539 #define IRQ0ENABLE_CSIC_IRQ (1 << 1)
540 #define IRQ0ENABLE_CCP2_LCM_IRQ (1 << 3)
541 #define IRQ0ENABLE_CCP2_LC0_IRQ (1 << 4)
542 #define IRQ0ENABLE_CCP2_LC1_IRQ (1 << 5)
543 #define IRQ0ENABLE_CCP2_LC2_IRQ (1 << 6)
544 #define IRQ0ENABLE_CCP2_LC3_IRQ (1 << 7)
545 #define IRQ0ENABLE_CSIB_IRQ (IRQ0ENABLE_CCP2_LCM_IRQ | \
546 IRQ0ENABLE_CCP2_LC0_IRQ | \
547 IRQ0ENABLE_CCP2_LC1_IRQ | \
548 IRQ0ENABLE_CCP2_LC2_IRQ | \
549 IRQ0ENABLE_CCP2_LC3_IRQ)
551 #define IRQ0ENABLE_CCDC_VD0_IRQ (1 << 8)
552 #define IRQ0ENABLE_CCDC_VD1_IRQ (1 << 9)
553 #define IRQ0ENABLE_CCDC_VD2_IRQ (1 << 10)
554 #define IRQ0ENABLE_CCDC_ERR_IRQ (1 << 11)
555 #define IRQ0ENABLE_H3A_AF_DONE_IRQ (1 << 12)
556 #define IRQ0ENABLE_H3A_AWB_DONE_IRQ (1 << 13)
557 #define IRQ0ENABLE_HIST_DONE_IRQ (1 << 16)
558 #define IRQ0ENABLE_CCDC_LSC_DONE_IRQ (1 << 17)
559 #define IRQ0ENABLE_CCDC_LSC_PREF_COMP_IRQ (1 << 18)
560 #define IRQ0ENABLE_CCDC_LSC_PREF_ERR_IRQ (1 << 19)
561 #define IRQ0ENABLE_PRV_DONE_IRQ (1 << 20)
562 #define IRQ0ENABLE_RSZ_DONE_IRQ (1 << 24)
563 #define IRQ0ENABLE_OVF_IRQ (1 << 25)
564 #define IRQ0ENABLE_PING_IRQ (1 << 26)
565 #define IRQ0ENABLE_PONG_IRQ (1 << 27)
566 #define IRQ0ENABLE_MMU_ERR_IRQ (1 << 28)
567 #define IRQ0ENABLE_OCP_ERR_IRQ (1 << 29)
568 #define IRQ0ENABLE_SEC_ERR_IRQ (1 << 30)
569 #define IRQ0ENABLE_HS_VS_IRQ (1 << 31)
571 #define IRQ0STATUS_CSIA_IRQ (1 << 0)
572 #define IRQ0STATUS_CSI2C_IRQ (1 << 1)
573 #define IRQ0STATUS_CCP2_LCM_IRQ (1 << 3)
574 #define IRQ0STATUS_CCP2_LC0_IRQ (1 << 4)
575 #define IRQ0STATUS_CSIB_IRQ (IRQ0STATUS_CCP2_LCM_IRQ | \
576 IRQ0STATUS_CCP2_LC0_IRQ)
578 #define IRQ0STATUS_CSIB_LC1_IRQ (1 << 5)
579 #define IRQ0STATUS_CSIB_LC2_IRQ (1 << 6)
580 #define IRQ0STATUS_CSIB_LC3_IRQ (1 << 7)
581 #define IRQ0STATUS_CCDC_VD0_IRQ (1 << 8)
582 #define IRQ0STATUS_CCDC_VD1_IRQ (1 << 9)
583 #define IRQ0STATUS_CCDC_VD2_IRQ (1 << 10)
584 #define IRQ0STATUS_CCDC_ERR_IRQ (1 << 11)
585 #define IRQ0STATUS_H3A_AF_DONE_IRQ (1 << 12)
586 #define IRQ0STATUS_H3A_AWB_DONE_IRQ (1 << 13)
587 #define IRQ0STATUS_HIST_DONE_IRQ (1 << 16)
588 #define IRQ0STATUS_CCDC_LSC_DONE_IRQ (1 << 17)
589 #define IRQ0STATUS_CCDC_LSC_PREF_COMP_IRQ (1 << 18)
590 #define IRQ0STATUS_CCDC_LSC_PREF_ERR_IRQ (1 << 19)
591 #define IRQ0STATUS_PRV_DONE_IRQ (1 << 20)
592 #define IRQ0STATUS_RSZ_DONE_IRQ (1 << 24)
593 #define IRQ0STATUS_OVF_IRQ (1 << 25)
594 #define IRQ0STATUS_PING_IRQ (1 << 26)
595 #define IRQ0STATUS_PONG_IRQ (1 << 27)
596 #define IRQ0STATUS_MMU_ERR_IRQ (1 << 28)
597 #define IRQ0STATUS_OCP_ERR_IRQ (1 << 29)
598 #define IRQ0STATUS_SEC_ERR_IRQ (1 << 30)
599 #define IRQ0STATUS_HS_VS_IRQ (1 << 31)
601 #define TCTRL_GRESET_LEN 0
603 #define TCTRL_PSTRB_REPLAY_DELAY 0
604 #define TCTRL_PSTRB_REPLAY_COUNTER_SHIFT 25
606 #define ISPCTRL_PAR_SER_CLK_SEL_PARALLEL 0x0
607 #define ISPCTRL_PAR_SER_CLK_SEL_CSIA 0x1
608 #define ISPCTRL_PAR_SER_CLK_SEL_CSIB 0x2
609 #define ISPCTRL_PAR_SER_CLK_SEL_CSIC 0x3
610 #define ISPCTRL_PAR_SER_CLK_SEL_MASK 0x3
612 #define ISPCTRL_PAR_BRIDGE_SHIFT 2
613 #define ISPCTRL_PAR_BRIDGE_DISABLE (0x0 << 2)
614 #define ISPCTRL_PAR_BRIDGE_LENDIAN (0x2 << 2)
615 #define ISPCTRL_PAR_BRIDGE_BENDIAN (0x3 << 2)
616 #define ISPCTRL_PAR_BRIDGE_MASK (0x3 << 2)
618 #define ISPCTRL_PAR_CLK_POL_SHIFT 4
619 #define ISPCTRL_PAR_CLK_POL_INV (1 << 4)
620 #define ISPCTRL_PING_PONG_EN (1 << 5)
621 #define ISPCTRL_SHIFT_SHIFT 6
622 #define ISPCTRL_SHIFT_0 (0x0 << 6)
623 #define ISPCTRL_SHIFT_2 (0x1 << 6)
624 #define ISPCTRL_SHIFT_4 (0x2 << 6)
625 #define ISPCTRL_SHIFT_MASK (0x3 << 6)
627 #define ISPCTRL_CCDC_CLK_EN (1 << 8)
628 #define ISPCTRL_SCMP_CLK_EN (1 << 9)
629 #define ISPCTRL_H3A_CLK_EN (1 << 10)
630 #define ISPCTRL_HIST_CLK_EN (1 << 11)
631 #define ISPCTRL_PREV_CLK_EN (1 << 12)
632 #define ISPCTRL_RSZ_CLK_EN (1 << 13)
633 #define ISPCTRL_SYNC_DETECT_SHIFT 14
634 #define ISPCTRL_SYNC_DETECT_HSFALL (0x0 << ISPCTRL_SYNC_DETECT_SHIFT)
635 #define ISPCTRL_SYNC_DETECT_HSRISE (0x1 << ISPCTRL_SYNC_DETECT_SHIFT)
636 #define ISPCTRL_SYNC_DETECT_VSFALL (0x2 << ISPCTRL_SYNC_DETECT_SHIFT)
637 #define ISPCTRL_SYNC_DETECT_VSRISE (0x3 << ISPCTRL_SYNC_DETECT_SHIFT)
638 #define ISPCTRL_SYNC_DETECT_MASK (0x3 << ISPCTRL_SYNC_DETECT_SHIFT)
640 #define ISPCTRL_CCDC_RAM_EN (1 << 16)
641 #define ISPCTRL_PREV_RAM_EN (1 << 17)
642 #define ISPCTRL_SBL_RD_RAM_EN (1 << 18)
643 #define ISPCTRL_SBL_WR1_RAM_EN (1 << 19)
644 #define ISPCTRL_SBL_WR0_RAM_EN (1 << 20)
645 #define ISPCTRL_SBL_AUTOIDLE (1 << 21)
646 #define ISPCTRL_SBL_SHARED_WPORTC (1 << 26)
647 #define ISPCTRL_SBL_SHARED_RPORTA (1 << 27)
648 #define ISPCTRL_SBL_SHARED_RPORTB (1 << 28)
649 #define ISPCTRL_JPEG_FLUSH (1 << 30)
650 #define ISPCTRL_CCDC_FLUSH (1 << 31)
652 #define ISPSECURE_SECUREMODE 0
654 #define ISPTCTRL_CTRL_DIV_LOW 0x0
655 #define ISPTCTRL_CTRL_DIV_HIGH 0x1
656 #define ISPTCTRL_CTRL_DIV_BYPASS 0x1F
658 #define ISPTCTRL_CTRL_DIVA_SHIFT 0
659 #define ISPTCTRL_CTRL_DIVA_MASK (0x1F << ISPTCTRL_CTRL_DIVA_SHIFT)
661 #define ISPTCTRL_CTRL_DIVB_SHIFT 5
662 #define ISPTCTRL_CTRL_DIVB_MASK (0x1F << ISPTCTRL_CTRL_DIVB_SHIFT)
664 #define ISPTCTRL_CTRL_DIVC_SHIFT 10
665 #define ISPTCTRL_CTRL_DIVC_NOCLOCK (0x0 << 10)
667 #define ISPTCTRL_CTRL_SHUTEN (1 << 21)
668 #define ISPTCTRL_CTRL_PSTRBEN (1 << 22)
669 #define ISPTCTRL_CTRL_STRBEN (1 << 23)
670 #define ISPTCTRL_CTRL_SHUTPOL (1 << 24)
671 #define ISPTCTRL_CTRL_STRBPSTRBPOL (1 << 26)
673 #define ISPTCTRL_CTRL_INSEL_SHIFT 27
674 #define ISPTCTRL_CTRL_INSEL_PARALLEL (0x0 << 27)
675 #define ISPTCTRL_CTRL_INSEL_CSIA (0x1 << 27)
676 #define ISPTCTRL_CTRL_INSEL_CSIB (0x2 << 27)
678 #define ISPTCTRL_CTRL_GRESETEn (1 << 29)
679 #define ISPTCTRL_CTRL_GRESETPOL (1 << 30)
680 #define ISPTCTRL_CTRL_GRESETDIR (1 << 31)
682 #define ISPTCTRL_FRAME_SHUT_SHIFT 0
683 #define ISPTCTRL_FRAME_PSTRB_SHIFT 6
684 #define ISPTCTRL_FRAME_STRB_SHIFT 12
686 #define ISPCCDC_PID_PREV_SHIFT 0
687 #define ISPCCDC_PID_CID_SHIFT 8
688 #define ISPCCDC_PID_TID_SHIFT 16
690 #define ISPCCDC_PCR_EN 1
691 #define ISPCCDC_PCR_BUSY (1 << 1)
693 #define ISPCCDC_SYN_MODE_VDHDOUT 0x1
694 #define ISPCCDC_SYN_MODE_FLDOUT (1 << 1)
695 #define ISPCCDC_SYN_MODE_VDPOL (1 << 2)
696 #define ISPCCDC_SYN_MODE_HDPOL (1 << 3)
697 #define ISPCCDC_SYN_MODE_FLDPOL (1 << 4)
698 #define ISPCCDC_SYN_MODE_EXWEN (1 << 5)
699 #define ISPCCDC_SYN_MODE_DATAPOL (1 << 6)
700 #define ISPCCDC_SYN_MODE_FLDMODE (1 << 7)
701 #define ISPCCDC_SYN_MODE_DATSIZ_MASK (0x7 << 8)
702 #define ISPCCDC_SYN_MODE_DATSIZ_8_16 (0x0 << 8)
703 #define ISPCCDC_SYN_MODE_DATSIZ_12 (0x4 << 8)
704 #define ISPCCDC_SYN_MODE_DATSIZ_11 (0x5 << 8)
705 #define ISPCCDC_SYN_MODE_DATSIZ_10 (0x6 << 8)
706 #define ISPCCDC_SYN_MODE_DATSIZ_8 (0x7 << 8)
707 #define ISPCCDC_SYN_MODE_PACK8 (1 << 11)
708 #define ISPCCDC_SYN_MODE_INPMOD_MASK (3 << 12)
709 #define ISPCCDC_SYN_MODE_INPMOD_RAW (0 << 12)
710 #define ISPCCDC_SYN_MODE_INPMOD_YCBCR16 (1 << 12)
711 #define ISPCCDC_SYN_MODE_INPMOD_YCBCR8 (2 << 12)
712 #define ISPCCDC_SYN_MODE_LPF (1 << 14)
713 #define ISPCCDC_SYN_MODE_FLDSTAT (1 << 15)
714 #define ISPCCDC_SYN_MODE_VDHDEN (1 << 16)
715 #define ISPCCDC_SYN_MODE_WEN (1 << 17)
716 #define ISPCCDC_SYN_MODE_VP2SDR (1 << 18)
717 #define ISPCCDC_SYN_MODE_SDR2RSZ (1 << 19)
719 #define ISPCCDC_HD_VD_WID_VDW_SHIFT 0
720 #define ISPCCDC_HD_VD_WID_HDW_SHIFT 16
722 #define ISPCCDC_PIX_LINES_HLPRF_SHIFT 0
723 #define ISPCCDC_PIX_LINES_PPLN_SHIFT 16
725 #define ISPCCDC_HORZ_INFO_NPH_SHIFT 0
726 #define ISPCCDC_HORZ_INFO_NPH_MASK 0x00007fff
727 #define ISPCCDC_HORZ_INFO_SPH_SHIFT 16
728 #define ISPCCDC_HORZ_INFO_SPH_MASK 0x7fff0000
730 #define ISPCCDC_VERT_START_SLV1_SHIFT 0
731 #define ISPCCDC_VERT_START_SLV0_SHIFT 16
732 #define ISPCCDC_VERT_START_SLV0_MASK 0x7fff0000
734 #define ISPCCDC_VERT_LINES_NLV_SHIFT 0
735 #define ISPCCDC_VERT_LINES_NLV_MASK 0x00007fff
737 #define ISPCCDC_CULLING_CULV_SHIFT 0
738 #define ISPCCDC_CULLING_CULHODD_SHIFT 16
739 #define ISPCCDC_CULLING_CULHEVN_SHIFT 24
741 #define ISPCCDC_HSIZE_OFF_SHIFT 0
743 #define ISPCCDC_SDOFST_FINV (1 << 14)
744 #define ISPCCDC_SDOFST_FOFST_1L 0
745 #define ISPCCDC_SDOFST_FOFST_4L (3 << 12)
746 #define ISPCCDC_SDOFST_LOFST3_SHIFT 0
747 #define ISPCCDC_SDOFST_LOFST2_SHIFT 3
748 #define ISPCCDC_SDOFST_LOFST1_SHIFT 6
749 #define ISPCCDC_SDOFST_LOFST0_SHIFT 9
750 #define EVENEVEN 1
751 #define ODDEVEN 2
752 #define EVENODD 3
753 #define ODDODD 4
755 #define ISPCCDC_CLAMP_OBGAIN_SHIFT 0
756 #define ISPCCDC_CLAMP_OBST_SHIFT 10
757 #define ISPCCDC_CLAMP_OBSLN_SHIFT 25
758 #define ISPCCDC_CLAMP_OBSLEN_SHIFT 28
759 #define ISPCCDC_CLAMP_CLAMPEN (1 << 31)
761 #define ISPCCDC_COLPTN_R_Ye 0x0
762 #define ISPCCDC_COLPTN_Gr_Cy 0x1
763 #define ISPCCDC_COLPTN_Gb_G 0x2
764 #define ISPCCDC_COLPTN_B_Mg 0x3
765 #define ISPCCDC_COLPTN_CP0PLC0_SHIFT 0
766 #define ISPCCDC_COLPTN_CP0PLC1_SHIFT 2
767 #define ISPCCDC_COLPTN_CP0PLC2_SHIFT 4
768 #define ISPCCDC_COLPTN_CP0PLC3_SHIFT 6
769 #define ISPCCDC_COLPTN_CP1PLC0_SHIFT 8
770 #define ISPCCDC_COLPTN_CP1PLC1_SHIFT 10
771 #define ISPCCDC_COLPTN_CP1PLC2_SHIFT 12
772 #define ISPCCDC_COLPTN_CP1PLC3_SHIFT 14
773 #define ISPCCDC_COLPTN_CP2PLC0_SHIFT 16
774 #define ISPCCDC_COLPTN_CP2PLC1_SHIFT 18
775 #define ISPCCDC_COLPTN_CP2PLC2_SHIFT 20
776 #define ISPCCDC_COLPTN_CP2PLC3_SHIFT 22
777 #define ISPCCDC_COLPTN_CP3PLC0_SHIFT 24
778 #define ISPCCDC_COLPTN_CP3PLC1_SHIFT 26
779 #define ISPCCDC_COLPTN_CP3PLC2_SHIFT 28
780 #define ISPCCDC_COLPTN_CP3PLC3_SHIFT 30
782 #define ISPCCDC_BLKCMP_B_MG_SHIFT 0
783 #define ISPCCDC_BLKCMP_GB_G_SHIFT 8
784 #define ISPCCDC_BLKCMP_GR_CY_SHIFT 16
785 #define ISPCCDC_BLKCMP_R_YE_SHIFT 24
787 #define ISPCCDC_FPC_FPNUM_SHIFT 0
788 #define ISPCCDC_FPC_FPCEN (1 << 15)
789 #define ISPCCDC_FPC_FPERR (1 << 16)
791 #define ISPCCDC_VDINT_1_SHIFT 0
792 #define ISPCCDC_VDINT_1_MASK 0x00007fff
793 #define ISPCCDC_VDINT_0_SHIFT 16
794 #define ISPCCDC_VDINT_0_MASK 0x7fff0000
796 #define ISPCCDC_ALAW_GWDI_12_3 (0x3 << 0)
797 #define ISPCCDC_ALAW_GWDI_11_2 (0x4 << 0)
798 #define ISPCCDC_ALAW_GWDI_10_1 (0x5 << 0)
799 #define ISPCCDC_ALAW_GWDI_9_0 (0x6 << 0)
800 #define ISPCCDC_ALAW_CCDTBL (1 << 3)
802 #define ISPCCDC_REC656IF_R656ON 1
803 #define ISPCCDC_REC656IF_ECCFVH (1 << 1)
805 #define ISPCCDC_CFG_BW656 (1 << 5)
806 #define ISPCCDC_CFG_FIDMD_SHIFT 6
807 #define ISPCCDC_CFG_WENLOG (1 << 8)
808 #define ISPCCDC_CFG_WENLOG_AND (0 << 8)
809 #define ISPCCDC_CFG_WENLOG_OR (1 << 8)
810 #define ISPCCDC_CFG_Y8POS (1 << 11)
811 #define ISPCCDC_CFG_BSWD (1 << 12)
812 #define ISPCCDC_CFG_MSBINVI (1 << 13)
813 #define ISPCCDC_CFG_VDLC (1 << 15)
815 #define ISPCCDC_FMTCFG_FMTEN 0x1
816 #define ISPCCDC_FMTCFG_LNALT (1 << 1)
817 #define ISPCCDC_FMTCFG_LNUM_SHIFT 2
818 #define ISPCCDC_FMTCFG_PLEN_ODD_SHIFT 4
819 #define ISPCCDC_FMTCFG_PLEN_EVEN_SHIFT 8
820 #define ISPCCDC_FMTCFG_VPIN_MASK 0x00007000
821 #define ISPCCDC_FMTCFG_VPIN_12_3 (0x3 << 12)
822 #define ISPCCDC_FMTCFG_VPIN_11_2 (0x4 << 12)
823 #define ISPCCDC_FMTCFG_VPIN_10_1 (0x5 << 12)
824 #define ISPCCDC_FMTCFG_VPIN_9_0 (0x6 << 12)
825 #define ISPCCDC_FMTCFG_VPEN (1 << 15)
827 #define ISPCCDC_FMTCFG_VPIF_FRQ_MASK 0x003f0000
828 #define ISPCCDC_FMTCFG_VPIF_FRQ_SHIFT 16
829 #define ISPCCDC_FMTCFG_VPIF_FRQ_BY2 (0x0 << 16)
830 #define ISPCCDC_FMTCFG_VPIF_FRQ_BY3 (0x1 << 16)
831 #define ISPCCDC_FMTCFG_VPIF_FRQ_BY4 (0x2 << 16)
832 #define ISPCCDC_FMTCFG_VPIF_FRQ_BY5 (0x3 << 16)
833 #define ISPCCDC_FMTCFG_VPIF_FRQ_BY6 (0x4 << 16)
835 #define ISPCCDC_FMT_HORZ_FMTLNH_SHIFT 0
836 #define ISPCCDC_FMT_HORZ_FMTSPH_SHIFT 16
838 #define ISPCCDC_FMT_VERT_FMTLNV_SHIFT 0
839 #define ISPCCDC_FMT_VERT_FMTSLV_SHIFT 16
841 #define ISPCCDC_FMT_HORZ_FMTSPH_MASK 0x1fff0000
842 #define ISPCCDC_FMT_HORZ_FMTLNH_MASK 0x00001fff
844 #define ISPCCDC_FMT_VERT_FMTSLV_MASK 0x1fff0000
845 #define ISPCCDC_FMT_VERT_FMTLNV_MASK 0x00001fff
847 #define ISPCCDC_VP_OUT_HORZ_ST_SHIFT 0
848 #define ISPCCDC_VP_OUT_HORZ_NUM_SHIFT 4
849 #define ISPCCDC_VP_OUT_VERT_NUM_SHIFT 17
851 #define ISPRSZ_PID_PREV_SHIFT 0
852 #define ISPRSZ_PID_CID_SHIFT 8
853 #define ISPRSZ_PID_TID_SHIFT 16
855 #define ISPRSZ_PCR_ENABLE (1 << 0)
856 #define ISPRSZ_PCR_BUSY (1 << 1)
857 #define ISPRSZ_PCR_ONESHOT (1 << 2)
859 #define ISPRSZ_CNT_HRSZ_SHIFT 0
860 #define ISPRSZ_CNT_HRSZ_MASK \
861 (0x3FF << ISPRSZ_CNT_HRSZ_SHIFT)
862 #define ISPRSZ_CNT_VRSZ_SHIFT 10
863 #define ISPRSZ_CNT_VRSZ_MASK \
864 (0x3FF << ISPRSZ_CNT_VRSZ_SHIFT)
865 #define ISPRSZ_CNT_HSTPH_SHIFT 20
866 #define ISPRSZ_CNT_HSTPH_MASK (0x7 << ISPRSZ_CNT_HSTPH_SHIFT)
867 #define ISPRSZ_CNT_VSTPH_SHIFT 23
868 #define ISPRSZ_CNT_VSTPH_MASK (0x7 << ISPRSZ_CNT_VSTPH_SHIFT)
869 #define ISPRSZ_CNT_YCPOS (1 << 26)
870 #define ISPRSZ_CNT_INPTYP (1 << 27)
871 #define ISPRSZ_CNT_INPSRC (1 << 28)
872 #define ISPRSZ_CNT_CBILIN (1 << 29)
874 #define ISPRSZ_OUT_SIZE_HORZ_SHIFT 0
875 #define ISPRSZ_OUT_SIZE_HORZ_MASK \
876 (0xFFF << ISPRSZ_OUT_SIZE_HORZ_SHIFT)
877 #define ISPRSZ_OUT_SIZE_VERT_SHIFT 16
878 #define ISPRSZ_OUT_SIZE_VERT_MASK \
879 (0xFFF << ISPRSZ_OUT_SIZE_VERT_SHIFT)
881 #define ISPRSZ_IN_START_HORZ_ST_SHIFT 0
882 #define ISPRSZ_IN_START_HORZ_ST_MASK \
883 (0x1FFF << ISPRSZ_IN_START_HORZ_ST_SHIFT)
884 #define ISPRSZ_IN_START_VERT_ST_SHIFT 16
885 #define ISPRSZ_IN_START_VERT_ST_MASK \
886 (0x1FFF << ISPRSZ_IN_START_VERT_ST_SHIFT)
888 #define ISPRSZ_IN_SIZE_HORZ_SHIFT 0
889 #define ISPRSZ_IN_SIZE_HORZ_MASK \
890 (0x1FFF << ISPRSZ_IN_SIZE_HORZ_SHIFT)
891 #define ISPRSZ_IN_SIZE_VERT_SHIFT 16
892 #define ISPRSZ_IN_SIZE_VERT_MASK \
893 (0x1FFF << ISPRSZ_IN_SIZE_VERT_SHIFT)
895 #define ISPRSZ_SDR_INADD_ADDR_SHIFT 0
896 #define ISPRSZ_SDR_INADD_ADDR_MASK 0xFFFFFFFF
898 #define ISPRSZ_SDR_INOFF_OFFSET_SHIFT 0
899 #define ISPRSZ_SDR_INOFF_OFFSET_MASK \
900 (0xFFFF << ISPRSZ_SDR_INOFF_OFFSET_SHIFT)
902 #define ISPRSZ_SDR_OUTADD_ADDR_SHIFT 0
903 #define ISPRSZ_SDR_OUTADD_ADDR_MASK 0xFFFFFFFF
906 #define ISPRSZ_SDR_OUTOFF_OFFSET_SHIFT 0
907 #define ISPRSZ_SDR_OUTOFF_OFFSET_MASK \
908 (0xFFFF << ISPRSZ_SDR_OUTOFF_OFFSET_SHIFT)
910 #define ISPRSZ_HFILT_COEF0_SHIFT 0
911 #define ISPRSZ_HFILT_COEF0_MASK \
912 (0x3FF << ISPRSZ_HFILT_COEF0_SHIFT)
913 #define ISPRSZ_HFILT_COEF1_SHIFT 16
914 #define ISPRSZ_HFILT_COEF1_MASK \
915 (0x3FF << ISPRSZ_HFILT_COEF1_SHIFT)
917 #define ISPRSZ_HFILT32_COEF2_SHIFT 0
918 #define ISPRSZ_HFILT32_COEF2_MASK 0x3FF
919 #define ISPRSZ_HFILT32_COEF3_SHIFT 16
920 #define ISPRSZ_HFILT32_COEF3_MASK 0x3FF0000
922 #define ISPRSZ_HFILT54_COEF4_SHIFT 0
923 #define ISPRSZ_HFILT54_COEF4_MASK 0x3FF
924 #define ISPRSZ_HFILT54_COEF5_SHIFT 16
925 #define ISPRSZ_HFILT54_COEF5_MASK 0x3FF0000
927 #define ISPRSZ_HFILT76_COEFF6_SHIFT 0
928 #define ISPRSZ_HFILT76_COEFF6_MASK 0x3FF
929 #define ISPRSZ_HFILT76_COEFF7_SHIFT 16
930 #define ISPRSZ_HFILT76_COEFF7_MASK 0x3FF0000
932 #define ISPRSZ_HFILT98_COEFF8_SHIFT 0
933 #define ISPRSZ_HFILT98_COEFF8_MASK 0x3FF
934 #define ISPRSZ_HFILT98_COEFF9_SHIFT 16
935 #define ISPRSZ_HFILT98_COEFF9_MASK 0x3FF0000
937 #define ISPRSZ_HFILT1110_COEF10_SHIFT 0
938 #define ISPRSZ_HFILT1110_COEF10_MASK 0x3FF
939 #define ISPRSZ_HFILT1110_COEF11_SHIFT 16
940 #define ISPRSZ_HFILT1110_COEF11_MASK 0x3FF0000
942 #define ISPRSZ_HFILT1312_COEFF12_SHIFT 0
943 #define ISPRSZ_HFILT1312_COEFF12_MASK 0x3FF
944 #define ISPRSZ_HFILT1312_COEFF13_SHIFT 16
945 #define ISPRSZ_HFILT1312_COEFF13_MASK 0x3FF0000
947 #define ISPRSZ_HFILT1514_COEFF14_SHIFT 0
948 #define ISPRSZ_HFILT1514_COEFF14_MASK 0x3FF
949 #define ISPRSZ_HFILT1514_COEFF15_SHIFT 16
950 #define ISPRSZ_HFILT1514_COEFF15_MASK 0x3FF0000
952 #define ISPRSZ_HFILT1716_COEF16_SHIFT 0
953 #define ISPRSZ_HFILT1716_COEF16_MASK 0x3FF
954 #define ISPRSZ_HFILT1716_COEF17_SHIFT 16
955 #define ISPRSZ_HFILT1716_COEF17_MASK 0x3FF0000
957 #define ISPRSZ_HFILT1918_COEF18_SHIFT 0
958 #define ISPRSZ_HFILT1918_COEF18_MASK 0x3FF
959 #define ISPRSZ_HFILT1918_COEF19_SHIFT 16
960 #define ISPRSZ_HFILT1918_COEF19_MASK 0x3FF0000
962 #define ISPRSZ_HFILT2120_COEF20_SHIFT 0
963 #define ISPRSZ_HFILT2120_COEF20_MASK 0x3FF
964 #define ISPRSZ_HFILT2120_COEF21_SHIFT 16
965 #define ISPRSZ_HFILT2120_COEF21_MASK 0x3FF0000
967 #define ISPRSZ_HFILT2322_COEF22_SHIFT 0
968 #define ISPRSZ_HFILT2322_COEF22_MASK 0x3FF
969 #define ISPRSZ_HFILT2322_COEF23_SHIFT 16
970 #define ISPRSZ_HFILT2322_COEF23_MASK 0x3FF0000
972 #define ISPRSZ_HFILT2524_COEF24_SHIFT 0
973 #define ISPRSZ_HFILT2524_COEF24_MASK 0x3FF
974 #define ISPRSZ_HFILT2524_COEF25_SHIFT 16
975 #define ISPRSZ_HFILT2524_COEF25_MASK 0x3FF0000
977 #define ISPRSZ_HFILT2726_COEF26_SHIFT 0
978 #define ISPRSZ_HFILT2726_COEF26_MASK 0x3FF
979 #define ISPRSZ_HFILT2726_COEF27_SHIFT 16
980 #define ISPRSZ_HFILT2726_COEF27_MASK 0x3FF0000
982 #define ISPRSZ_HFILT2928_COEF28_SHIFT 0
983 #define ISPRSZ_HFILT2928_COEF28_MASK 0x3FF
984 #define ISPRSZ_HFILT2928_COEF29_SHIFT 16
985 #define ISPRSZ_HFILT2928_COEF29_MASK 0x3FF0000
987 #define ISPRSZ_HFILT3130_COEF30_SHIFT 0
988 #define ISPRSZ_HFILT3130_COEF30_MASK 0x3FF
989 #define ISPRSZ_HFILT3130_COEF31_SHIFT 16
990 #define ISPRSZ_HFILT3130_COEF31_MASK 0x3FF0000
992 #define ISPRSZ_VFILT_COEF0_SHIFT 0
993 #define ISPRSZ_VFILT_COEF0_MASK \
994 (0x3FF << ISPRSZ_VFILT_COEF0_SHIFT)
995 #define ISPRSZ_VFILT_COEF1_SHIFT 16
996 #define ISPRSZ_VFILT_COEF1_MASK \
997 (0x3FF << ISPRSZ_VFILT_COEF1_SHIFT)
999 #define ISPRSZ_VFILT10_COEF0_SHIFT 0
1000 #define ISPRSZ_VFILT10_COEF0_MASK 0x3FF
1001 #define ISPRSZ_VFILT10_COEF1_SHIFT 16
1002 #define ISPRSZ_VFILT10_COEF1_MASK 0x3FF0000
1004 #define ISPRSZ_VFILT32_COEF2_SHIFT 0
1005 #define ISPRSZ_VFILT32_COEF2_MASK 0x3FF
1006 #define ISPRSZ_VFILT32_COEF3_SHIFT 16
1007 #define ISPRSZ_VFILT32_COEF3_MASK 0x3FF0000
1009 #define ISPRSZ_VFILT54_COEF4_SHIFT 0
1010 #define ISPRSZ_VFILT54_COEF4_MASK 0x3FF
1011 #define ISPRSZ_VFILT54_COEF5_SHIFT 16
1012 #define ISPRSZ_VFILT54_COEF5_MASK 0x3FF0000
1014 #define ISPRSZ_VFILT76_COEFF6_SHIFT 0
1015 #define ISPRSZ_VFILT76_COEFF6_MASK 0x3FF
1016 #define ISPRSZ_VFILT76_COEFF7_SHIFT 16
1017 #define ISPRSZ_VFILT76_COEFF7_MASK 0x3FF0000
1019 #define ISPRSZ_VFILT98_COEFF8_SHIFT 0
1020 #define ISPRSZ_VFILT98_COEFF8_MASK 0x3FF
1021 #define ISPRSZ_VFILT98_COEFF9_SHIFT 16
1022 #define ISPRSZ_VFILT98_COEFF9_MASK 0x3FF0000
1024 #define ISPRSZ_VFILT1110_COEF10_SHIFT 0
1025 #define ISPRSZ_VFILT1110_COEF10_MASK 0x3FF
1026 #define ISPRSZ_VFILT1110_COEF11_SHIFT 16
1027 #define ISPRSZ_VFILT1110_COEF11_MASK 0x3FF0000
1029 #define ISPRSZ_VFILT1312_COEFF12_SHIFT 0
1030 #define ISPRSZ_VFILT1312_COEFF12_MASK 0x3FF
1031 #define ISPRSZ_VFILT1312_COEFF13_SHIFT 16
1032 #define ISPRSZ_VFILT1312_COEFF13_MASK 0x3FF0000
1034 #define ISPRSZ_VFILT1514_COEFF14_SHIFT 0
1035 #define ISPRSZ_VFILT1514_COEFF14_MASK 0x3FF
1036 #define ISPRSZ_VFILT1514_COEFF15_SHIFT 16
1037 #define ISPRSZ_VFILT1514_COEFF15_MASK 0x3FF0000
1039 #define ISPRSZ_VFILT1716_COEF16_SHIFT 0
1040 #define ISPRSZ_VFILT1716_COEF16_MASK 0x3FF
1041 #define ISPRSZ_VFILT1716_COEF17_SHIFT 16
1042 #define ISPRSZ_VFILT1716_COEF17_MASK 0x3FF0000
1044 #define ISPRSZ_VFILT1918_COEF18_SHIFT 0
1045 #define ISPRSZ_VFILT1918_COEF18_MASK 0x3FF
1046 #define ISPRSZ_VFILT1918_COEF19_SHIFT 16
1047 #define ISPRSZ_VFILT1918_COEF19_MASK 0x3FF0000
1049 #define ISPRSZ_VFILT2120_COEF20_SHIFT 0
1050 #define ISPRSZ_VFILT2120_COEF20_MASK 0x3FF
1051 #define ISPRSZ_VFILT2120_COEF21_SHIFT 16
1052 #define ISPRSZ_VFILT2120_COEF21_MASK 0x3FF0000
1054 #define ISPRSZ_VFILT2322_COEF22_SHIFT 0
1055 #define ISPRSZ_VFILT2322_COEF22_MASK 0x3FF
1056 #define ISPRSZ_VFILT2322_COEF23_SHIFT 16
1057 #define ISPRSZ_VFILT2322_COEF23_MASK 0x3FF0000
1059 #define ISPRSZ_VFILT2524_COEF24_SHIFT 0
1060 #define ISPRSZ_VFILT2524_COEF24_MASK 0x3FF
1061 #define ISPRSZ_VFILT2524_COEF25_SHIFT 16
1062 #define ISPRSZ_VFILT2524_COEF25_MASK 0x3FF0000
1064 #define ISPRSZ_VFILT2726_COEF26_SHIFT 0
1065 #define ISPRSZ_VFILT2726_COEF26_MASK 0x3FF
1066 #define ISPRSZ_VFILT2726_COEF27_SHIFT 16
1067 #define ISPRSZ_VFILT2726_COEF27_MASK 0x3FF0000
1069 #define ISPRSZ_VFILT2928_COEF28_SHIFT 0
1070 #define ISPRSZ_VFILT2928_COEF28_MASK 0x3FF
1071 #define ISPRSZ_VFILT2928_COEF29_SHIFT 16
1072 #define ISPRSZ_VFILT2928_COEF29_MASK 0x3FF0000
1074 #define ISPRSZ_VFILT3130_COEF30_SHIFT 0
1075 #define ISPRSZ_VFILT3130_COEF30_MASK 0x3FF
1076 #define ISPRSZ_VFILT3130_COEF31_SHIFT 16
1077 #define ISPRSZ_VFILT3130_COEF31_MASK 0x3FF0000
1079 #define ISPRSZ_YENH_CORE_SHIFT 0
1080 #define ISPRSZ_YENH_CORE_MASK \
1081 (0xFF << ISPRSZ_YENH_CORE_SHIFT)
1082 #define ISPRSZ_YENH_SLOP_SHIFT 8
1083 #define ISPRSZ_YENH_SLOP_MASK \
1084 (0xF << ISPRSZ_YENH_SLOP_SHIFT)
1085 #define ISPRSZ_YENH_GAIN_SHIFT 12
1086 #define ISPRSZ_YENH_GAIN_MASK \
1087 (0xF << ISPRSZ_YENH_GAIN_SHIFT)
1088 #define ISPRSZ_YENH_ALGO_SHIFT 16
1089 #define ISPRSZ_YENH_ALGO_MASK \
1090 (0x3 << ISPRSZ_YENH_ALGO_SHIFT)
1092 #define ISPH3A_PCR_AEW_ALAW_EN_SHIFT 1
1093 #define ISPH3A_PCR_AF_MED_TH_SHIFT 3
1094 #define ISPH3A_PCR_AF_RGBPOS_SHIFT 11
1095 #define ISPH3A_PCR_AEW_AVE2LMT_SHIFT 22
1096 #define ISPH3A_PCR_AEW_AVE2LMT_MASK 0xFFC00000
1097 #define ISPH3A_PCR_BUSYAF (1 << 15)
1098 #define ISPH3A_PCR_BUSYAEAWB (1 << 18)
1100 #define ISPH3A_AEWWIN1_WINHC_SHIFT 0
1101 #define ISPH3A_AEWWIN1_WINHC_MASK 0x3F
1102 #define ISPH3A_AEWWIN1_WINVC_SHIFT 6
1103 #define ISPH3A_AEWWIN1_WINVC_MASK 0x1FC0
1104 #define ISPH3A_AEWWIN1_WINW_SHIFT 13
1105 #define ISPH3A_AEWWIN1_WINW_MASK 0xFE000
1106 #define ISPH3A_AEWWIN1_WINH_SHIFT 24
1107 #define ISPH3A_AEWWIN1_WINH_MASK 0x7F000000
1109 #define ISPH3A_AEWINSTART_WINSH_SHIFT 0
1110 #define ISPH3A_AEWINSTART_WINSH_MASK 0x0FFF
1111 #define ISPH3A_AEWINSTART_WINSV_SHIFT 16
1112 #define ISPH3A_AEWINSTART_WINSV_MASK 0x0FFF0000
1114 #define ISPH3A_AEWINBLK_WINH_SHIFT 0
1115 #define ISPH3A_AEWINBLK_WINH_MASK 0x7F
1116 #define ISPH3A_AEWINBLK_WINSV_SHIFT 16
1117 #define ISPH3A_AEWINBLK_WINSV_MASK 0x0FFF0000
1119 #define ISPH3A_AEWSUBWIN_AEWINCH_SHIFT 0
1120 #define ISPH3A_AEWSUBWIN_AEWINCH_MASK 0x0F
1121 #define ISPH3A_AEWSUBWIN_AEWINCV_SHIFT 8
1122 #define ISPH3A_AEWSUBWIN_AEWINCV_MASK 0x0F00
1124 #define ISPHIST_PCR_ENABLE_SHIFT 0
1125 #define ISPHIST_PCR_ENABLE_MASK 0x01
1126 #define ISPHIST_PCR_ENABLE (1 << ISPHIST_PCR_ENABLE_SHIFT)
1127 #define ISPHIST_PCR_BUSY 0x02
1129 #define ISPHIST_CNT_DATASIZE_SHIFT 8
1130 #define ISPHIST_CNT_DATASIZE_MASK 0x0100
1131 #define ISPHIST_CNT_CLEAR_SHIFT 7
1132 #define ISPHIST_CNT_CLEAR_MASK 0x080
1133 #define ISPHIST_CNT_CLEAR (1 << ISPHIST_CNT_CLEAR_SHIFT)
1134 #define ISPHIST_CNT_CFA_SHIFT 6
1135 #define ISPHIST_CNT_CFA_MASK 0x040
1136 #define ISPHIST_CNT_BINS_SHIFT 4
1137 #define ISPHIST_CNT_BINS_MASK 0x030
1138 #define ISPHIST_CNT_SOURCE_SHIFT 3
1139 #define ISPHIST_CNT_SOURCE_MASK 0x08
1140 #define ISPHIST_CNT_SHIFT_SHIFT 0
1141 #define ISPHIST_CNT_SHIFT_MASK 0x07
1143 #define ISPHIST_WB_GAIN_WG00_SHIFT 24
1144 #define ISPHIST_WB_GAIN_WG00_MASK 0xFF000000
1145 #define ISPHIST_WB_GAIN_WG01_SHIFT 16
1146 #define ISPHIST_WB_GAIN_WG01_MASK 0xFF0000
1147 #define ISPHIST_WB_GAIN_WG02_SHIFT 8
1148 #define ISPHIST_WB_GAIN_WG02_MASK 0xFF00
1149 #define ISPHIST_WB_GAIN_WG03_SHIFT 0
1150 #define ISPHIST_WB_GAIN_WG03_MASK 0xFF
1152 #define ISPHIST_REG_START_END_MASK 0x3FFF
1153 #define ISPHIST_REG_START_SHIFT 16
1154 #define ISPHIST_REG_END_SHIFT 0
1155 #define ISPHIST_REG_START_MASK (ISPHIST_REG_START_END_MASK << \
1156 ISPHIST_REG_START_SHIFT)
1157 #define ISPHIST_REG_END_MASK (ISPHIST_REG_START_END_MASK << \
1158 ISPHIST_REG_END_SHIFT)
1160 #define ISPHIST_REG_MASK (ISPHIST_REG_START_MASK | \
1161 ISPHIST_REG_END_MASK)
1163 #define ISPHIST_ADDR_SHIFT 0
1164 #define ISPHIST_ADDR_MASK 0x3FF
1166 #define ISPHIST_DATA_SHIFT 0
1167 #define ISPHIST_DATA_MASK 0xFFFFF
1169 #define ISPHIST_RADD_SHIFT 0
1170 #define ISPHIST_RADD_MASK 0xFFFFFFFF
1172 #define ISPHIST_RADD_OFF_SHIFT 0
1173 #define ISPHIST_RADD_OFF_MASK 0xFFFF
1175 #define ISPHIST_HV_INFO_HSIZE_SHIFT 16
1176 #define ISPHIST_HV_INFO_HSIZE_MASK 0x3FFF0000
1177 #define ISPHIST_HV_INFO_VSIZE_SHIFT 0
1178 #define ISPHIST_HV_INFO_VSIZE_MASK 0x3FFF
1180 #define ISPHIST_HV_INFO_MASK 0x3FFF3FFF
1182 #define ISPCCDC_LSC_ENABLE 1
1183 #define ISPCCDC_LSC_BUSY (1 << 7)
1184 #define ISPCCDC_LSC_GAIN_MODE_N_MASK 0x700
1185 #define ISPCCDC_LSC_GAIN_MODE_N_SHIFT 8
1186 #define ISPCCDC_LSC_GAIN_MODE_M_MASK 0x3800
1187 #define ISPCCDC_LSC_GAIN_MODE_M_SHIFT 12
1188 #define ISPCCDC_LSC_GAIN_FORMAT_MASK 0xE
1189 #define ISPCCDC_LSC_GAIN_FORMAT_SHIFT 1
1190 #define ISPCCDC_LSC_AFTER_REFORMATTER_MASK (1<<6)
1192 #define ISPCCDC_LSC_INITIAL_X_MASK 0x3F
1193 #define ISPCCDC_LSC_INITIAL_X_SHIFT 0
1194 #define ISPCCDC_LSC_INITIAL_Y_MASK 0x3F0000
1195 #define ISPCCDC_LSC_INITIAL_Y_SHIFT 16
1197 /* -----------------------------------------------------------------------------
1198 * CSI2 receiver registers (ES2.0)
1201 #define ISPCSI2_REVISION (0x000)
1202 #define ISPCSI2_SYSCONFIG (0x010)
1203 #define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT 12
1204 #define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_MASK \
1205 (0x3 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
1206 #define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_FORCE \
1207 (0x0 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
1208 #define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_NO \
1209 (0x1 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
1210 #define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SMART \
1211 (0x2 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
1212 #define ISPCSI2_SYSCONFIG_SOFT_RESET (1 << 1)
1213 #define ISPCSI2_SYSCONFIG_AUTO_IDLE (1 << 0)
1215 #define ISPCSI2_SYSSTATUS (0x014)
1216 #define ISPCSI2_SYSSTATUS_RESET_DONE (1 << 0)
1218 #define ISPCSI2_IRQSTATUS (0x018)
1219 #define ISPCSI2_IRQSTATUS_OCP_ERR_IRQ (1 << 14)
1220 #define ISPCSI2_IRQSTATUS_SHORT_PACKET_IRQ (1 << 13)
1221 #define ISPCSI2_IRQSTATUS_ECC_CORRECTION_IRQ (1 << 12)
1222 #define ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ (1 << 11)
1223 #define ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ (1 << 10)
1224 #define ISPCSI2_IRQSTATUS_COMPLEXIO1_ERR_IRQ (1 << 9)
1225 #define ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ (1 << 8)
1226 #define ISPCSI2_IRQSTATUS_CONTEXT(n) (1 << (n))
1228 #define ISPCSI2_IRQENABLE (0x01c)
1229 #define ISPCSI2_CTRL (0x040)
1230 #define ISPCSI2_CTRL_VP_CLK_EN (1 << 15)
1231 #define ISPCSI2_CTRL_VP_ONLY_EN (1 << 11)
1232 #define ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT 8
1233 #define ISPCSI2_CTRL_VP_OUT_CTRL_MASK \
1234 (3 << ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
1235 #define ISPCSI2_CTRL_DBG_EN (1 << 7)
1236 #define ISPCSI2_CTRL_BURST_SIZE_SHIFT 5
1237 #define ISPCSI2_CTRL_BURST_SIZE_MASK \
1238 (3 << ISPCSI2_CTRL_BURST_SIZE_SHIFT)
1239 #define ISPCSI2_CTRL_FRAME (1 << 3)
1240 #define ISPCSI2_CTRL_ECC_EN (1 << 2)
1241 #define ISPCSI2_CTRL_SECURE (1 << 1)
1242 #define ISPCSI2_CTRL_IF_EN (1 << 0)
1244 #define ISPCSI2_DBG_H (0x044)
1245 #define ISPCSI2_GNQ (0x048)
1246 #define ISPCSI2_PHY_CFG (0x050)
1247 #define ISPCSI2_PHY_CFG_RESET_CTRL (1 << 30)
1248 #define ISPCSI2_PHY_CFG_RESET_DONE (1 << 29)
1249 #define ISPCSI2_PHY_CFG_PWR_CMD_SHIFT 27
1250 #define ISPCSI2_PHY_CFG_PWR_CMD_MASK \
1251 (0x3 << ISPCSI2_PHY_CFG_PWR_CMD_SHIFT)
1252 #define ISPCSI2_PHY_CFG_PWR_CMD_OFF \
1253 (0x0 << ISPCSI2_PHY_CFG_PWR_CMD_SHIFT)
1254 #define ISPCSI2_PHY_CFG_PWR_CMD_ON \
1255 (0x1 << ISPCSI2_PHY_CFG_PWR_CMD_SHIFT)
1256 #define ISPCSI2_PHY_CFG_PWR_CMD_ULPW \
1257 (0x2 << ISPCSI2_PHY_CFG_PWR_CMD_SHIFT)
1258 #define ISPCSI2_PHY_CFG_PWR_STATUS_SHIFT 25
1259 #define ISPCSI2_PHY_CFG_PWR_STATUS_MASK \
1260 (0x3 << ISPCSI2_PHY_CFG_PWR_STATUS_SHIFT)
1261 #define ISPCSI2_PHY_CFG_PWR_STATUS_OFF \
1262 (0x0 << ISPCSI2_PHY_CFG_PWR_STATUS_SHIFT)
1263 #define ISPCSI2_PHY_CFG_PWR_STATUS_ON \
1264 (0x1 << ISPCSI2_PHY_CFG_PWR_STATUS_SHIFT)
1265 #define ISPCSI2_PHY_CFG_PWR_STATUS_ULPW \
1266 (0x2 << ISPCSI2_PHY_CFG_PWR_STATUS_SHIFT)
1267 #define ISPCSI2_PHY_CFG_PWR_AUTO (1 << 24)
1269 #define ISPCSI2_PHY_CFG_DATA_POL_SHIFT(n) (3 + ((n) * 4))
1270 #define ISPCSI2_PHY_CFG_DATA_POL_MASK(n) \
1271 (0x1 << ISPCSI2_PHY_CFG_DATA_POL_SHIFT(n))
1272 #define ISPCSI2_PHY_CFG_DATA_POL_PN(n) \
1273 (0x0 << ISPCSI2_PHY_CFG_DATA_POL_SHIFT(n))
1274 #define ISPCSI2_PHY_CFG_DATA_POL_NP(n) \
1275 (0x1 << ISPCSI2_PHY_CFG_DATA_POL_SHIFT(n))
1277 #define ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n) ((n) * 4)
1278 #define ISPCSI2_PHY_CFG_DATA_POSITION_MASK(n) \
1279 (0x7 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1280 #define ISPCSI2_PHY_CFG_DATA_POSITION_NC(n) \
1281 (0x0 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1282 #define ISPCSI2_PHY_CFG_DATA_POSITION_1(n) \
1283 (0x1 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1284 #define ISPCSI2_PHY_CFG_DATA_POSITION_2(n) \
1285 (0x2 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1286 #define ISPCSI2_PHY_CFG_DATA_POSITION_3(n) \
1287 (0x3 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1288 #define ISPCSI2_PHY_CFG_DATA_POSITION_4(n) \
1289 (0x4 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1290 #define ISPCSI2_PHY_CFG_DATA_POSITION_5(n) \
1291 (0x5 << ISPCSI2_PHY_CFG_DATA_POSITION_SHIFT(n))
1293 #define ISPCSI2_PHY_CFG_CLOCK_POL_SHIFT 3
1294 #define ISPCSI2_PHY_CFG_CLOCK_POL_MASK \
1295 (0x1 << ISPCSI2_PHY_CFG_CLOCK_POL_SHIFT)
1296 #define ISPCSI2_PHY_CFG_CLOCK_POL_PN \
1297 (0x0 << ISPCSI2_PHY_CFG_CLOCK_POL_SHIFT)
1298 #define ISPCSI2_PHY_CFG_CLOCK_POL_NP \
1299 (0x1 << ISPCSI2_PHY_CFG_CLOCK_POL_SHIFT)
1301 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT 0
1302 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_MASK \
1303 (0x7 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1304 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_1 \
1305 (0x1 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1306 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_2 \
1307 (0x2 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1308 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_3 \
1309 (0x3 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1310 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_4 \
1311 (0x4 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1312 #define ISPCSI2_PHY_CFG_CLOCK_POSITION_5 \
1313 (0x5 << ISPCSI2_PHY_CFG_CLOCK_POSITION_SHIFT)
1315 #define ISPCSI2_PHY_IRQSTATUS (0x054)
1316 #define ISPCSI2_PHY_IRQSTATUS_STATEALLULPMEXIT (1 << 26)
1317 #define ISPCSI2_PHY_IRQSTATUS_STATEALLULPMENTER (1 << 25)
1318 #define ISPCSI2_PHY_IRQSTATUS_STATEULPM5 (1 << 24)
1319 #define ISPCSI2_PHY_IRQSTATUS_STATEULPM4 (1 << 23)
1320 #define ISPCSI2_PHY_IRQSTATUS_STATEULPM3 (1 << 22)
1321 #define ISPCSI2_PHY_IRQSTATUS_STATEULPM2 (1 << 21)
1322 #define ISPCSI2_PHY_IRQSTATUS_STATEULPM1 (1 << 20)
1323 #define ISPCSI2_PHY_IRQSTATUS_ERRCONTROL5 (1 << 19)
1324 #define ISPCSI2_PHY_IRQSTATUS_ERRCONTROL4 (1 << 18)
1325 #define ISPCSI2_PHY_IRQSTATUS_ERRCONTROL3 (1 << 17)
1326 #define ISPCSI2_PHY_IRQSTATUS_ERRCONTROL2 (1 << 16)
1327 #define ISPCSI2_PHY_IRQSTATUS_ERRCONTROL1 (1 << 15)
1328 #define ISPCSI2_PHY_IRQSTATUS_ERRESC5 (1 << 14)
1329 #define ISPCSI2_PHY_IRQSTATUS_ERRESC4 (1 << 13)
1330 #define ISPCSI2_PHY_IRQSTATUS_ERRESC3 (1 << 12)
1331 #define ISPCSI2_PHY_IRQSTATUS_ERRESC2 (1 << 11)
1332 #define ISPCSI2_PHY_IRQSTATUS_ERRESC1 (1 << 10)
1333 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTSYNCHS5 (1 << 9)
1334 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTSYNCHS4 (1 << 8)
1335 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTSYNCHS3 (1 << 7)
1336 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTSYNCHS2 (1 << 6)
1337 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTSYNCHS1 (1 << 5)
1338 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTHS5 (1 << 4)
1339 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTHS4 (1 << 3)
1340 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTHS3 (1 << 2)
1341 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTHS2 (1 << 1)
1342 #define ISPCSI2_PHY_IRQSTATUS_ERRSOTHS1 1
1344 #define ISPCSI2_SHORT_PACKET (0x05c)
1345 #define ISPCSI2_PHY_IRQENABLE (0x060)
1346 #define ISPCSI2_PHY_IRQENABLE_STATEALLULPMEXIT (1 << 26)
1347 #define ISPCSI2_PHY_IRQENABLE_STATEALLULPMENTER (1 << 25)
1348 #define ISPCSI2_PHY_IRQENABLE_STATEULPM5 (1 << 24)
1349 #define ISPCSI2_PHY_IRQENABLE_STATEULPM4 (1 << 23)
1350 #define ISPCSI2_PHY_IRQENABLE_STATEULPM3 (1 << 22)
1351 #define ISPCSI2_PHY_IRQENABLE_STATEULPM2 (1 << 21)
1352 #define ISPCSI2_PHY_IRQENABLE_STATEULPM1 (1 << 20)
1353 #define ISPCSI2_PHY_IRQENABLE_ERRCONTROL5 (1 << 19)
1354 #define ISPCSI2_PHY_IRQENABLE_ERRCONTROL4 (1 << 18)
1355 #define ISPCSI2_PHY_IRQENABLE_ERRCONTROL3 (1 << 17)
1356 #define ISPCSI2_PHY_IRQENABLE_ERRCONTROL2 (1 << 16)
1357 #define ISPCSI2_PHY_IRQENABLE_ERRCONTROL1 (1 << 15)
1358 #define ISPCSI2_PHY_IRQENABLE_ERRESC5 (1 << 14)
1359 #define ISPCSI2_PHY_IRQENABLE_ERRESC4 (1 << 13)
1360 #define ISPCSI2_PHY_IRQENABLE_ERRESC3 (1 << 12)
1361 #define ISPCSI2_PHY_IRQENABLE_ERRESC2 (1 << 11)
1362 #define ISPCSI2_PHY_IRQENABLE_ERRESC1 (1 << 10)
1363 #define ISPCSI2_PHY_IRQENABLE_ERRSOTSYNCHS5 (1 << 9)
1364 #define ISPCSI2_PHY_IRQENABLE_ERRSOTSYNCHS4 (1 << 8)
1365 #define ISPCSI2_PHY_IRQENABLE_ERRSOTSYNCHS3 (1 << 7)
1366 #define ISPCSI2_PHY_IRQENABLE_ERRSOTSYNCHS2 (1 << 6)
1367 #define ISPCSI2_PHY_IRQENABLE_ERRSOTSYNCHS1 (1 << 5)
1368 #define ISPCSI2_PHY_IRQENABLE_ERRSOTHS5 (1 << 4)
1369 #define ISPCSI2_PHY_IRQENABLE_ERRSOTHS4 (1 << 3)
1370 #define ISPCSI2_PHY_IRQENABLE_ERRSOTHS3 (1 << 2)
1371 #define ISPCSI2_PHY_IRQENABLE_ERRSOTHS2 (1 << 1)
1372 #define ISPCSI2_PHY_IRQENABLE_ERRSOTHS1 (1 << 0)
1374 #define ISPCSI2_DBG_P (0x068)
1375 #define ISPCSI2_TIMING (0x06c)
1376 #define ISPCSI2_TIMING_FORCE_RX_MODE_IO(n) (1 << ((16 * ((n) - 1)) + 15))
1377 #define ISPCSI2_TIMING_STOP_STATE_X16_IO(n) (1 << ((16 * ((n) - 1)) + 14))
1378 #define ISPCSI2_TIMING_STOP_STATE_X4_IO(n) (1 << ((16 * ((n) - 1)) + 13))
1379 #define ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(n) (16 * ((n) - 1))
1380 #define ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_MASK(n) \
1381 (0x1fff << ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(n))
1383 #define ISPCSI2_CTX_CTRL1(n) ((0x070) + 0x20 * (n))
1384 #define ISPCSI2_CTX_CTRL1_COUNT_SHIFT 8
1385 #define ISPCSI2_CTX_CTRL1_COUNT_MASK \
1386 (0xff << ISPCSI2_CTX_CTRL1_COUNT_SHIFT)
1387 #define ISPCSI2_CTX_CTRL1_EOF_EN (1 << 7)
1388 #define ISPCSI2_CTX_CTRL1_EOL_EN (1 << 6)
1389 #define ISPCSI2_CTX_CTRL1_CS_EN (1 << 5)
1390 #define ISPCSI2_CTX_CTRL1_COUNT_UNLOCK (1 << 4)
1391 #define ISPCSI2_CTX_CTRL1_PING_PONG (1 << 3)
1392 #define ISPCSI2_CTX_CTRL1_CTX_EN (1 << 0)
1394 #define ISPCSI2_CTX_CTRL2(n) ((0x074) + 0x20 * (n))
1395 #define ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT 13
1396 #define ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK \
1397 (0x3 << ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT)
1398 #define ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT 11
1399 #define ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK \
1400 (0x3 << ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT)
1401 #define ISPCSI2_CTX_CTRL2_DPCM_PRED (1 << 10)
1402 #define ISPCSI2_CTX_CTRL2_FORMAT_SHIFT 0
1403 #define ISPCSI2_CTX_CTRL2_FORMAT_MASK \
1404 (0x3ff << ISPCSI2_CTX_CTRL2_FORMAT_SHIFT)
1405 #define ISPCSI2_CTX_CTRL2_FRAME_SHIFT 16
1406 #define ISPCSI2_CTX_CTRL2_FRAME_MASK \
1407 (0xffff << ISPCSI2_CTX_CTRL2_FRAME_SHIFT)
1409 #define ISPCSI2_CTX_DAT_OFST(n) ((0x078) + 0x20 * (n))
1410 #define ISPCSI2_CTX_DAT_OFST_OFST_SHIFT 0
1411 #define ISPCSI2_CTX_DAT_OFST_OFST_MASK \
1412 (0x1ffe0 << ISPCSI2_CTX_DAT_OFST_OFST_SHIFT)
1414 #define ISPCSI2_CTX_DAT_PING_ADDR(n) ((0x07c) + 0x20 * (n))
1415 #define ISPCSI2_CTX_DAT_PONG_ADDR(n) ((0x080) + 0x20 * (n))
1416 #define ISPCSI2_CTX_IRQENABLE(n) ((0x084) + 0x20 * (n))
1417 #define ISPCSI2_CTX_IRQENABLE_ECC_CORRECTION_IRQ (1 << 8)
1418 #define ISPCSI2_CTX_IRQENABLE_LINE_NUMBER_IRQ (1 << 7)
1419 #define ISPCSI2_CTX_IRQENABLE_FRAME_NUMBER_IRQ (1 << 6)
1420 #define ISPCSI2_CTX_IRQENABLE_CS_IRQ (1 << 5)
1421 #define ISPCSI2_CTX_IRQENABLE_LE_IRQ (1 << 3)
1422 #define ISPCSI2_CTX_IRQENABLE_LS_IRQ (1 << 2)
1423 #define ISPCSI2_CTX_IRQENABLE_FE_IRQ (1 << 1)
1424 #define ISPCSI2_CTX_IRQENABLE_FS_IRQ (1 << 0)
1426 #define ISPCSI2_CTX_IRQSTATUS(n) ((0x088) + 0x20 * (n))
1427 #define ISPCSI2_CTX_IRQSTATUS_ECC_CORRECTION_IRQ (1 << 8)
1428 #define ISPCSI2_CTX_IRQSTATUS_LINE_NUMBER_IRQ (1 << 7)
1429 #define ISPCSI2_CTX_IRQSTATUS_FRAME_NUMBER_IRQ (1 << 6)
1430 #define ISPCSI2_CTX_IRQSTATUS_CS_IRQ (1 << 5)
1431 #define ISPCSI2_CTX_IRQSTATUS_LE_IRQ (1 << 3)
1432 #define ISPCSI2_CTX_IRQSTATUS_LS_IRQ (1 << 2)
1433 #define ISPCSI2_CTX_IRQSTATUS_FE_IRQ (1 << 1)
1434 #define ISPCSI2_CTX_IRQSTATUS_FS_IRQ (1 << 0)
1436 #define ISPCSI2_CTX_CTRL3(n) ((0x08c) + 0x20 * (n))
1437 #define ISPCSI2_CTX_CTRL3_ALPHA_SHIFT 5
1438 #define ISPCSI2_CTX_CTRL3_ALPHA_MASK \
1439 (0x3fff << ISPCSI2_CTX_CTRL3_ALPHA_SHIFT)
1441 /* This instance is for OMAP3630 only */
1442 #define ISPCSI2_CTX_TRANSCODEH(n) (0x000 + 0x8 * (n))
1443 #define ISPCSI2_CTX_TRANSCODEH_HCOUNT_SHIFT 16
1444 #define ISPCSI2_CTX_TRANSCODEH_HCOUNT_MASK \
1445 (0x1fff << ISPCSI2_CTX_TRANSCODEH_HCOUNT_SHIFT)
1446 #define ISPCSI2_CTX_TRANSCODEH_HSKIP_SHIFT 0
1447 #define ISPCSI2_CTX_TRANSCODEH_HSKIP_MASK \
1448 (0x1fff << ISPCSI2_CTX_TRANSCODEH_HCOUNT_SHIFT)
1449 #define ISPCSI2_CTX_TRANSCODEV(n) (0x004 + 0x8 * (n))
1450 #define ISPCSI2_CTX_TRANSCODEV_VCOUNT_SHIFT 16
1451 #define ISPCSI2_CTX_TRANSCODEV_VCOUNT_MASK \
1452 (0x1fff << ISPCSI2_CTX_TRANSCODEV_VCOUNT_SHIFT)
1453 #define ISPCSI2_CTX_TRANSCODEV_VSKIP_SHIFT 0
1454 #define ISPCSI2_CTX_TRANSCODEV_VSKIP_MASK \
1455 (0x1fff << ISPCSI2_CTX_TRANSCODEV_VCOUNT_SHIFT)
1457 /* -----------------------------------------------------------------------------
1458 * CSI PHY registers
1461 #define ISPCSIPHY_REG0 (0x000)
1462 #define ISPCSIPHY_REG0_THS_TERM_SHIFT 8
1463 #define ISPCSIPHY_REG0_THS_TERM_MASK \
1464 (0xff << ISPCSIPHY_REG0_THS_TERM_SHIFT)
1465 #define ISPCSIPHY_REG0_THS_SETTLE_SHIFT 0
1466 #define ISPCSIPHY_REG0_THS_SETTLE_MASK \
1467 (0xff << ISPCSIPHY_REG0_THS_SETTLE_SHIFT)
1469 #define ISPCSIPHY_REG1 (0x004)
1470 #define ISPCSIPHY_REG1_RESET_DONE_CTRLCLK (1 << 29)
1471 /* This field is for OMAP3630 only */
1472 #define ISPCSIPHY_REG1_CLOCK_MISS_DETECTOR_STATUS (1 << 25)
1473 #define ISPCSIPHY_REG1_TCLK_TERM_SHIFT 18
1474 #define ISPCSIPHY_REG1_TCLK_TERM_MASK \
1475 (0x7f << ISPCSIPHY_REG1_TCLK_TERM_SHIFT)
1476 #define ISPCSIPHY_REG1_DPHY_HS_SYNC_PATTERN_SHIFT 10
1477 #define ISPCSIPHY_REG1_DPHY_HS_SYNC_PATTERN_MASK \
1478 (0xff << ISPCSIPHY_REG1_DPHY_HS_SYNC_PATTERN)
1479 /* This field is for OMAP3430 only */
1480 #define ISPCSIPHY_REG1_TCLK_MISS_SHIFT 8
1481 #define ISPCSIPHY_REG1_TCLK_MISS_MASK \
1482 (0x3 << ISPCSIPHY_REG1_TCLK_MISS_SHIFT)
1483 /* This field is for OMAP3630 only */
1484 #define ISPCSIPHY_REG1_CTRLCLK_DIV_FACTOR_SHIFT 8
1485 #define ISPCSIPHY_REG1_CTRLCLK_DIV_FACTOR_MASK \
1486 (0x3 << ISPCSIPHY_REG1_CTRLCLK_DIV_FACTOR_SHIFT)
1487 #define ISPCSIPHY_REG1_TCLK_SETTLE_SHIFT 0
1488 #define ISPCSIPHY_REG1_TCLK_SETTLE_MASK \
1489 (0xff << ISPCSIPHY_REG1_TCLK_SETTLE_SHIFT)
1491 /* This register is for OMAP3630 only */
1492 #define ISPCSIPHY_REG2 (0x008)
1493 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC0_SHIFT 30
1494 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC0_MASK \
1495 (0x3 << ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC0_SHIFT)
1496 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC1_SHIFT 28
1497 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC1_MASK \
1498 (0x3 << ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC1_SHIFT)
1499 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC2_SHIFT 26
1500 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC2_MASK \
1501 (0x3 << ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC2_SHIFT)
1502 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC3_SHIFT 24
1503 #define ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC3_MASK \
1504 (0x3 << ISPCSIPHY_REG2_TRIGGER_CMD_RXTRIGESC3_SHIFT)
1505 #define ISPCSIPHY_REG2_CCP2_SYNC_PATTERN_SHIFT 0
1506 #define ISPCSIPHY_REG2_CCP2_SYNC_PATTERN_MASK \
1507 (0x7fffff << ISPCSIPHY_REG2_CCP2_SYNC_PATTERN_SHIFT)
1509 /* -----------------------------------------------------------------------------
1510 * CONTROL registers for CSI-2 phy routing
1513 /* OMAP343X_CONTROL_CSIRXFE */
1514 #define OMAP343X_CONTROL_CSIRXFE_CSIB_INV (1 << 7)
1515 #define OMAP343X_CONTROL_CSIRXFE_RESENABLE (1 << 8)
1516 #define OMAP343X_CONTROL_CSIRXFE_SELFORM (1 << 10)
1517 #define OMAP343X_CONTROL_CSIRXFE_PWRDNZ (1 << 12)
1518 #define OMAP343X_CONTROL_CSIRXFE_RESET (1 << 13)
1520 /* OMAP3630_CONTROL_CAMERA_PHY_CTRL */
1521 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_PHY1_SHIFT 2
1522 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_PHY2_SHIFT 0
1523 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_DPHY 0x0
1524 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_CCP2_DATA_STROBE 0x1
1525 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_CCP2_DATA_CLOCK 0x2
1526 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_GPI 0x3
1527 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CAMMODE_MASK 0x3
1528 /* CCP2B: set to receive data from PHY2 instead of PHY1 */
1529 #define OMAP3630_CONTROL_CAMERA_PHY_CTRL_CSI1_RX_SEL_PHY2 (1 << 4)
1531 #endif /* OMAP3_ISP_REG_H */