isp10: rockchip: v0.1.6
[firefly-linux-kernel-4.4.55.git] / drivers / media / platform / rk-isp10 / cif_isp10_regs.h
1 /*
2  *************************************************************************
3  * Rockchip driver for CIF ISP 1.0
4  * (Based on Intel driver for sofiaxxx)
5  *
6  * Copyright (C) 2015 Intel Mobile Communications GmbH
7  * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd.
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *************************************************************************
15  */
16
17 #ifndef _RK_CIF_ISP10_REGS_H
18 #define _RK_CIF_ISP10_REGS_H
19
20 /* ISP_CTRL */
21 #define CIF_ISP_CTRL_ISP_ENABLE                BIT(0)
22 #define CIF_ISP_CTRL_ISP_MODE_RAW_PICT         (0 << 1)
23 #define CIF_ISP_CTRL_ISP_MODE_ITU656           BIT(1)
24 #define CIF_ISP_CTRL_ISP_MODE_ITU601           (2 << 1)
25 #define CIF_ISP_CTRL_ISP_MODE_BAYER_ITU601     (3 << 1)
26 #define CIF_ISP_CTRL_ISP_MODE_DATA_MODE        (4 << 1)
27 #define CIF_ISP_CTRL_ISP_MODE_BAYER_ITU656     (5 << 1)
28 #define CIF_ISP_CTRL_ISP_MODE_RAW_PICT_ITU656  (6 << 1)
29 #define CIF_ISP_CTRL_ISP_INFORM_ENABLE         BIT(4)
30 #define CIF_ISP_CTRL_ISP_GAMMA_IN_ENA          BIT(6)
31 #define CIF_ISP_CTRL_ISP_GAMMA_IN_DIS          (0 << 6)
32 #define CIF_ISP_CTRL_ISP_AWB_ENA               BIT(7)
33 #define CIF_ISP_CTRL_ISP_AWB_DIS               (0 << 7)
34 #define CIF_ISP_CTRL_ISP_CFG_UPD_PERMANENT     BIT(8)
35 #define CIF_ISP_CTRL_ISP_CFG_UPD               BIT(9)
36 #define CIF_ISP_CTRL_ISP_GEN_CFG_UPD           BIT(10)
37 #define CIF_ISP_CTRL_ISP_GAMMA_OUT_ENA         BIT(11)
38 #define CIF_ISP_CTRL_ISP_GAMMA_OUT_DIS         (0 << 11)
39 #define CIF_ISP_CTRL_ISP_FLASH_MODE_ENA        BIT(12)
40 #define CIF_ISP_CTRL_ISP_FLASH_MODE_DIS        (0 << 12)
41 #define CIF_ISP_CTRL_ISP_CSM_Y_FULL_ENA        BIT(13)
42 #define CIF_ISP_CTRL_ISP_CSM_C_FULL_ENA        BIT(14)
43
44 /* ISP_ACQ_PROP */
45 #define CIF_ISP_ACQ_PROP_NEG_EDGE              (0 << 0)
46 #define CIF_ISP_ACQ_PROP_POS_EDGE              BIT(0)
47 #define CIF_ISP_ACQ_PROP_HSYNC_HIGH            (0 << 1)
48 #define CIF_ISP_ACQ_PROP_HSYNC_LOW             BIT(1)
49 #define CIF_ISP_ACQ_PROP_VSYNC_HIGH            (0 << 2)
50 #define CIF_ISP_ACQ_PROP_VSYNC_LOW             BIT(2)
51 #define CIF_ISP_ACQ_PROP_BAYER_PAT_RGGB        (0 << 3)
52 #define CIF_ISP_ACQ_PROP_BAYER_PAT_GRBG        BIT(3)
53 #define CIF_ISP_ACQ_PROP_BAYER_PAT_GBRG        (2 << 3)
54 #define CIF_ISP_ACQ_PROP_BAYER_PAT_BGGR        (3 << 3)
55 #define CIF_ISP_ACQ_PROP_YCBYCR                (0 << 7)
56 #define CIF_ISP_ACQ_PROP_YCRYCB                BIT(7)
57 #define CIF_ISP_ACQ_PROP_CBYCRY                (2 << 7)
58 #define CIF_ISP_ACQ_PROP_CRYCBY                (3 << 7)
59 #define CIF_ISP_ACQ_PROP_FIELD_SEL_ALL         (0 << 9)
60 #define CIF_ISP_ACQ_PROP_FIELD_SEL_EVEN        BIT(9)
61 #define CIF_ISP_ACQ_PROP_FIELD_SEL_ODD         (2 << 9)
62 #define CIF_ISP_ACQ_PROP_IN_SEL_12B            (0 << 12)
63 #define CIF_ISP_ACQ_PROP_IN_SEL_10B_ZERO       BIT(12)
64 #define CIF_ISP_ACQ_PROP_IN_SEL_10B_MSB        (2 << 12)
65 #define CIF_ISP_ACQ_PROP_IN_SEL_8B_ZERO        (3 << 12)
66 #define CIF_ISP_ACQ_PROP_IN_SEL_8B_MSB         (4 << 12)
67
68 /* VI_DPCL */
69 #define CIF_VI_DPCL_DMA_JPEG               (0 << 0)
70 #define CIF_VI_DPCL_MP_MUX_MRSZ_MI         BIT(0)
71 #define CIF_VI_DPCL_MP_MUX_MRSZ_JPEG       (2 << 0)
72 #define CIF_VI_DPCL_CHAN_MODE_MP           BIT(2)
73 #define CIF_VI_DPCL_CHAN_MODE_SP           (2 << 2)
74 #define CIF_VI_DPCL_CHAN_MODE_MPSP         (3 << 2)
75 #define CIF_VI_DPCL_DMA_SW_SPMUX           (0 << 4)
76 #define CIF_VI_DPCL_DMA_SW_SI              BIT(4)
77 #define CIF_VI_DPCL_DMA_SW_IE              (2 << 4)
78 #define CIF_VI_DPCL_DMA_SW_JPEG            (3 << 4)
79 #define CIF_VI_DPCL_DMA_SW_ISP             (4 << 4)
80 #define CIF_VI_DPCL_IF_SEL_PARALLEL        (0 << 8)
81 #define CIF_VI_DPCL_IF_SEL_SMIA            BIT(8)
82 #define CIF_VI_DPCL_IF_SEL_MIPI            (2 << 8)
83 #define CIF_VI_DPCL_DMA_IE_MUX_CIF         (0 << 10)
84 #define CIF_VI_DPCL_DMA_IE_MUX_DMA         BIT(10)
85 #define CIF_VI_DPCL_DMA_SP_MUX_CIF         (0 << 11)
86 #define CIF_VI_DPCL_DMA_SP_MUX_DMA         BIT(11)
87
88 /* ISP_IMSC - ISP_MIS - ISP_RIS - ISP_ICR - ISP_ISR */
89 #define CIF_ISP_OFF                        BIT(0)
90 #define CIF_ISP_FRAME                      BIT(1)
91 #define CIF_ISP_DATA_LOSS                  BIT(2)
92 #define CIF_ISP_PIC_SIZE_ERROR             BIT(3)
93 #define CIF_ISP_AWB_DONE                   BIT(4)
94 #define CIF_ISP_FRAME_IN                   BIT(5)
95 #define CIF_ISP_V_START                    BIT(6)
96 #define CIF_ISP_H_START                    BIT(7)
97 #define CIF_ISP_FLASH_ON                   BIT(8)
98 #define CIF_ISP_FLASH_OFF                  BIT(9)
99 #define CIF_ISP_SHUTTER_ON                 BIT(10)
100 #define CIF_ISP_SHUTTER_OFF                BIT(11)
101 #define CIF_ISP_AFM_SUM_OF                 BIT(12)
102 #define CIF_ISP_AFM_LUM_OF                 BIT(13)
103 #define CIF_ISP_AFM_FIN                    BIT(14)
104 #define CIF_ISP_HIST_MEASURE_RDY           BIT(15)
105 #define CIF_ISP_FLASH_CAP                  BIT(17)
106 #define CIF_ISP_EXP_END                    BIT(18)
107 #define CIF_ISP_VSM_END                    BIT(19)
108
109 /* ISP_ERR */
110 #define CIF_ISP_ERR_INFORM_SIZE            BIT(0)
111 #define CIF_ISP_ERR_IS_SIZE                BIT(1)
112 #define CIF_ISP_ERR_OUTFORM_SIZE           BIT(2)
113
114 /* MI_CTRL */
115 #define CIF_MI_CTRL_MP_ENABLE_IN           BIT(0)
116 #define CIF_MI_CTRL_MP_ENABLE_OUT          BIT(16)
117 #define CIF_MI_CTRL_MP_DISABLE             (0 << 0)
118 #define CIF_MI_CTRL_SP_ENABLE              BIT(1)
119 #define CIF_MI_CTRL_SP_DISABLE             (0 << 1)
120 #define CIF_MI_CTRL_JPEG_ENABLE            BIT(2)
121 #define CIF_MI_CTRL_JPEG_DISABLE           (0 << 2)
122 #define CIF_MI_CTRL_RAW_ENABLE             BIT(3)
123 #define CIF_MI_CTRL_RAW_DISABLE            (0 << 3)
124 #define CIF_MI_CTRL_HFLIP                  BIT(4)
125 #define CIF_MI_CTRL_VFLIP                  BIT(5)
126 #define CIF_MI_CTRL_ROT                    BIT(6)
127 #define CIF_MI_BYTE_SWAP                   BIT(7)
128 #define CIF_MI_NO_BYTE_SWAP               (0 << 7)
129 #define CIF_MI_SP_Y_FULL_YUV2RGB           BIT(8)
130 #define CIF_MI_SP_Y_REDUCED_YUV2RGB        (0 << 8)
131 #define CIF_MI_SP_CBCR_FULL_YUV2RGB        BIT(9)
132 #define CIF_MI_SP_CBCR_REDUCED_YUV2RGB     (0 << 9)
133 #define CIF_MI_SP_422NONCOSITEED           BIT(10)
134 #define CIF_MI_MP_PINGPONG_ENABEL          BIT(11)
135 #define CIF_MI_MP_PINGPONG_DISABEL         (0 << 11)
136 #define CIF_MI_SP_PINGPONG_ENABEL          BIT(12)
137 #define CIF_MI_SP_PINGPONG_DISABEL         (0 << 12)
138 #define CIF_MI_MP_AUTOUPDATE_ENABLE        BIT(13)
139 #define CIF_MI_MP_AUTOUPDATE_DISABLE       (0 << 13)
140 #define CIF_MI_SP_AUTOUPDATE_ENABLE        BIT(14)
141 #define CIF_MI_SP_AUTOUPDATE_DISABLE       (0 << 14)
142 #define CIF_MI_LAST_PIXEL_SIG_ENABLE       BIT(15)
143 #define CIF_MI_LAST_PIXEL_SIG_DISABLE      (0 << 15)
144 #define CIF_MI_CTRL_BURST_LEN_LUM_16       (0 << 16)
145 #define CIF_MI_CTRL_BURST_LEN_LUM_32       BIT(16)
146 #define CIF_MI_CTRL_BURST_LEN_LUM_64       (2 << 16)
147 #define CIF_MI_CTRL_BURST_LEN_CHROM_16     (0 << 18)
148 #define CIF_MI_CTRL_BURST_LEN_CHROM_32     BIT(18)
149 #define CIF_MI_CTRL_BURST_LEN_CHROM_64     (2 << 18)
150 #define CIF_MI_CTRL_INIT_BASE_EN           BIT(20)
151 #define CIF_MI_CTRL_INIT_BASE_DIS          (0 << 20)
152 #define CIF_MI_CTRL_INIT_OFFSET_EN         BIT(21)
153 #define CIF_MI_CTRL_INIT_OFFSET_DIS        (0 << 21)
154 #define CIF_MI_CTRL_MP_WRITE_FMT(a)        ((a) << 22)
155 #define CIF_MI_CTRL_MP_WRITE_FMT_PLA       (0 << 22)
156 #define CIF_MI_CTRL_MP_WRITE_FMT_SPLA      BIT(22)
157 #define CIF_MI_CTRL_MP_WRITE_FMT_INT       (2 << 22)
158 #define CIF_MI_CTRL_SP_WRITE_FMT(a)        ((a) << 24)
159 #define CIF_MI_CTRL_SP_WRITE_FMT_PLA       (0 << 24)
160 #define CIF_MI_CTRL_SP_WRITE_FMT_SPLA      BIT(24)
161 #define CIF_MI_CTRL_SP_WRITE_FMT_INT       (2 << 24)
162 #define CIF_MI_CTRL_SP_INPUT_FMT_YUV400    (0 << 26)
163 #define CIF_MI_CTRL_SP_INPUT_FMT_YUV420    BIT(26)
164 #define CIF_MI_CTRL_SP_INPUT_FMT_YUV422    (2 << 26)
165 #define CIF_MI_CTRL_SP_INPUT_FMT_YUV444    (3 << 26)
166 #define CIF_MI_CTRL_SP_OUTPUT_FMT_YUV400   (0 << 28)
167 #define CIF_MI_CTRL_SP_OUTPUT_FMT_YUV420   BIT(28)
168 #define CIF_MI_CTRL_SP_OUTPUT_FMT_YUV422   (2 << 28)
169 #define CIF_MI_CTRL_SP_OUTPUT_FMT_YUV444   (3 << 28)
170 #define CIF_MI_CTRL_SP_OUTPUT_FMT_RGB565   (4 << 28)
171 #define CIF_MI_CTRL_SP_OUTPUT_FMT_RGB666   (5 << 28)
172 #define CIF_MI_CTRL_SP_OUTPUT_FMT_RGB888   (6 << 28)
173
174 #define CIF_MI_CTRL_HFLIP_SHIFT  4
175 #define CIF_MI_CTRL_VFLIP_SHIFT  5
176
177 /* MI_INIT */
178 #define CIF_MI_INIT_SKIP                  BIT(2)
179 #define CIF_MI_INIT_SOFT_UPD              BIT(4)
180
181 /* RSZ_CTRL */
182 #define CIF_RSZ_CTRL_SCALE_HY_ENABLE      BIT(0)
183 #define CIF_RSZ_CTRL_SCALE_HC_ENABLE      BIT(1)
184 #define CIF_RSZ_CTRL_SCALE_VY_ENABLE      BIT(2)
185 #define CIF_RSZ_CTRL_SCALE_VC_ENABLE      BIT(3)
186 #define CIF_RSZ_CTRL_SCALE_HY_UP          BIT(4)
187 #define CIF_RSZ_CTRL_SCALE_HC_UP          BIT(5)
188 #define CIF_RSZ_CTRL_SCALE_VY_UP          BIT(6)
189 #define CIF_RSZ_CTRL_SCALE_VC_UP          BIT(7)
190 #define CIF_RSZ_CTRL_CFG_UPD              BIT(8)
191 #define CIF_RSZ_CTRL_CFG_UPD_AUTO         BIT(9)
192 #define CIF_RSZ_SCALER_BYPASS             BIT(16)
193
194 /* MI_IMSC - MI_MIS - MI_RIS - MI_ICR - MI_ISR */
195 #define CIF_MI_NOTHING                     (0 << 0)
196 #define CIF_MI_MP_FRAME                    BIT(0)
197 #define CIF_MI_SP_FRAME                    BIT(1)
198 #define CIF_MI_MBLK_LINE                   BIT(2)
199 #define CIF_MI_FILL_MP_Y                   BIT(3)
200 #define CIF_MI_WRAP_MP_Y                   BIT(4)
201 #define CIF_MI_WRAP_MP_CB                  BIT(5)
202 #define CIF_MI_WRAP_MP_CR                  BIT(6)
203 #define CIF_MI_WRAP_SP_Y                   BIT(7)
204 #define CIF_MI_WRAP_SP_CB                  BIT(8)
205 #define CIF_MI_WRAP_SP_CR                  BIT(9)
206 #define CIF_MI_DMA_READY                   BIT(11)
207
208 /* MI_STATUS */
209 #define CIF_MI_STATUS_MP_Y_FIFO_FULL       BIT(0)
210 #define CIF_MI_STATUS_SP_Y_FIFO_FULL       BIT(4)
211
212 /* MI_DMA_CTRL */
213 #define CIF_MI_DMA_CTRL_BURST_LEN_LUM_16   (0 << 0)
214 #define CIF_MI_DMA_CTRL_BURST_LEN_LUM_32   BIT(0)
215 #define CIF_MI_DMA_CTRL_BURST_LEN_LUM_64   (2 << 0)
216 #define CIF_MI_DMA_CTRL_BURST_LEN_CHROM_16 (0 << 2)
217 #define CIF_MI_DMA_CTRL_BURST_LEN_CHROM_32 BIT(2)
218 #define CIF_MI_DMA_CTRL_BURST_LEN_CHROM_64 (2 << 2)
219 #define CIF_MI_DMA_CTRL_READ_FMT(a)        ((a) << 4)
220 #define CIF_MI_DMA_CTRL_READ_FMT_PLANAR    (0 << 4)
221 #define CIF_MI_DMA_CTRL_READ_FMT_SPLANAR   BIT(4)
222 #define CIF_MI_DMA_CTRL_READ_FMT_PACKED    (2 << 4)
223 #define CIF_MI_DMA_CTRL_FMT_YUV444         (3 << 6)
224 #define CIF_MI_DMA_CTRL_FMT_YUV422         (2 << 6)
225 #define CIF_MI_DMA_CTRL_FMT_YUV420         BIT(6)
226 #define CIF_MI_DMA_CTRL_FMT_YUV400         (0 << 6)
227 #define CIF_MI_DMA_CTRL_BYTE_SWAP          BIT(8)
228 #define CIF_MI_DMA_CTRL_NO_BYTE_SWAP       (0 << 8)
229 #define CIF_MI_DMA_CTRL_CONTINUOUS_ENA      BIT(9)
230 #define CIF_MI_DMA_CTRL_CONTINUOUS_DIS     (0 << 9)
231 #define CIF_MI_DMA_CTRL_RGB_BAYER_NO       (0 << 12)
232 #define CIF_MI_DMA_CTRL_RGB_BAYER_8BIT      BIT(12)
233 #define CIF_MI_DMA_CTRL_RGB_BAYER_16BIT    (2 << 12)
234 /* MI_DMA_START */
235 #define CIF_MI_DMA_START_ENABLE             BIT(0)
236 /* MI_XTD_FORMAT_CTRL  */
237 #define CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP   BIT(0)
238 #define CIF_MI_XTD_FMT_CTRL_SP_CB_CR_SWAP   BIT(1)
239 #define CIF_MI_XTD_FMT_CTRL_DMA_CB_CR_SWAP  BIT(2)
240
241 #define CIF_MI_ADDR_SIZE_ALIGN_MASK        0xfffffff8
242
243 /* CCL */
244 #define CIF_CCL_CIF_CLK_ENA                (0 << 2)
245 #define CIF_CCL_CIF_CLK_DIS                BIT(2)
246 /* ICCL */
247 #define CIF_ICCL_ISP_CLK                   BIT(0)
248 #define CIF_ICCL_CP_CLK                    BIT(1)
249 #define CIF_ICCL_RES_2                     BIT(2)
250 #define CIF_ICCL_MRSZ_CLK                  BIT(3)
251 #define CIF_ICCL_SRSZ_CLK                  BIT(4)
252 #define CIF_ICCL_JPEG_CLK                  BIT(5)
253 #define CIF_ICCL_MI_CLK                    BIT(6)
254 #define CIF_ICCL_RES_7                     BIT(7)
255 #define CIF_ICCL_IE_CLK                    BIT(8)
256 #define CIF_ICCL_SIMP_CLK                  BIT(9)
257 #define CIF_ICCL_SMIA_CLK                  BIT(10)
258 #define CIF_ICCL_MIPI_CLK                  BIT(11)
259 #define CIF_ICCL_ALL_CLK                   (-1)
260 #define CIF_ICCL_NO_CLK                    (0)
261 /* IRCL */
262 #define CIF_IRCL_ISP_SW_RST                BIT(0)
263 #define CIF_IRCL_CP_SW_RST                 BIT(1)
264 #define CIF_IRCL_YCS_SW_RST                BIT(2)
265 #define CIF_IRCL_MRSZ_SW_RST               BIT(3)
266 #define CIF_IRCL_SRSZ_SW_RST               BIT(4)
267 #define CIF_IRCL_JPEG_SW_RST               BIT(5)
268 #define CIF_IRCL_MI_SW_RST                 BIT(6)
269 #define CIF_IRCL_CIF_SW_RST                BIT(7)
270 #define CIF_IRCL_IE_SW_RST                 BIT(8)
271 #define CIF_IRCL_SI_SW_RST                 BIT(9)
272 #define CIF_IRCL_MIPI_SW_RST               BIT(11)
273
274 /* C_PROC_CTR */
275 #define CIF_C_PROC_CTR_ENABLE              BIT(0)
276 #define CIF_C_PROC_CTR_DIS                 (0 << 0)
277 #define CIF_C_PROC_YOUT_FULL               BIT(1)
278 #define CIF_C_PROC_YOUT_LIM                (0 << 1)
279 #define CIF_C_PROC_YIN_FULL                BIT(2)
280 #define CIF_C_PROC_YIN_LIM                 (0 << 2)
281 #define CIF_C_PROC_COUT_FULL               BIT(3)
282 #define CIF_C_PROC_COUT_LIM                (0 << 3)
283
284 /* DUAL_CROP_CTRL */
285 #define CIF_DUAL_CROP_MP_MODE_BYPASS      (0 << 0)
286 #define CIF_DUAL_CROP_MP_MODE_YUV         BIT(0)
287 #define CIF_DUAL_CROP_MP_MODE_RAW         (2 << 0)
288 #define CIF_DUAL_CROP_SP_MODE_BYPASS      (0 << 2)
289 #define CIF_DUAL_CROP_SP_MODE_YUV         BIT(2)
290 #define CIF_DUAL_CROP_SP_MODE_RAW         (2 << 2)
291 #define CIF_DUAL_CROP_CFG_UPD_PERMANENT   BIT(4)
292 #define CIF_DUAL_CROP_CFG_UPD             BIT(5)
293 #define CIF_DUAL_CROP_GEN_CFG_UPD         BIT(6)
294
295 /* IMG_EFF_CTRL */
296 #define CIF_IMG_EFF_CTRL_ENABLE           BIT(0)
297 #define CIF_IMG_EFF_CTRL_MODE_BLACKWHITE  (0 << 1)
298 #define CIF_IMG_EFF_CTRL_MODE_NEGATIVE    BIT(1)
299 #define CIF_IMG_EFF_CTRL_MODE_SEPIA      (2 << 1)
300 #define CIF_IMG_EFF_CTRL_MODE_COLOR_SEL  (3 << 1)
301 #define CIF_IMG_EFF_CTRL_MODE_EMBOSS     (4 << 1)
302 #define CIF_IMG_EFF_CTRL_MODE_SKETCH     (5 << 1)
303 #define CIF_IMG_EFF_CTRL_MODE_SHARPEN    (6 << 1)
304 #define CIF_IMG_EFF_CTRL_CFG_UPD         BIT(4)
305 #define CIF_IMG_EFF_CTRL_YCBCR_FULL      BIT(5)
306
307 #define CIF_IMG_EFF_CTRL_MODE_BLACKWHITE_SHIFT   (0)
308 #define CIF_IMG_EFF_CTRL_MODE_NEGATIVE_SHIFT     (1)
309 #define CIF_IMG_EFF_CTRL_MODE_SEPIA_SHIFT        (2)
310 #define CIF_IMG_EFF_CTRL_MODE_COLOR_SEL_SHIFT    (3)
311 #define CIF_IMG_EFF_CTRL_MODE_EMBOSS_SHIFT       (4)
312 #define CIF_IMG_EFF_CTRL_MODE_SKETCH_SHIFT       (5)
313 #define CIF_IMG_EFF_CTRL_MODE_SHARPEN_SHIFT      (6)
314
315 /* IMG_EFF_COLOR_SEL */
316 #define CIF_IMG_EFF_COLOR_RGB              (0 << 0)
317 #define CIF_IMG_EFF_COLOR_B                BIT(0)
318 #define CIF_IMG_EFF_COLOR_G                (2 << 0)
319 #define CIF_IMG_EFF_COLOR_GB               (3 << 0)
320 #define CIF_IMG_EFF_COLOR_R                (4 << 0)
321 #define CIF_IMG_EFF_COLOR_RB               (5 << 0)
322 #define CIF_IMG_EFF_COLOR_RG               (6 << 0)
323 #define CIF_IMG_EFF_COLOR_RGB2             (7 << 0)
324
325 /* JPE */
326 #define CIF_JPE_GEN_HEADER_ENABLE          BIT(0)
327 #define CIF_JPE_ENCODE_ENABLE              BIT(0)
328 #define CIF_JPE_INIT_ENABLE                BIT(0)
329 #define CIF_JPE_LUM_SCALE_ENABLE           BIT(0)
330 #define CIF_JPE_CHROM_SCALE_ENABLE         BIT(0)
331 #define CIF_JPE_PIC_FORMAT_YUV422          BIT(0)
332 #define CIF_JPE_PIC_FORMAT_YUV400          (4 << 0)
333
334 #define CIF_JPE_TQ_TAB3                    (3 << 0)
335 #define CIF_JPE_TQ_TAB2                    (2 << 0)
336 #define CIF_JPE_TQ_TAB1                    BIT(0)
337 #define CIF_JPE_TQ_TAB0                    (0 << 0)
338
339 #define CIF_TQ_Y_SELECT                    (3 << 0)
340 #define CIF_TQ_U_SELECT                    (3 << 0)
341 #define CIF_TQ_V_SELECT                    (3 << 0)
342 #define CIF_DC_V_TABLE                     (4 << 0)
343 #define CIF_DC_U_TABLE                     (2 << 0)
344 #define CIF_DC_Y_TABLE                     BIT(0)
345 #define CIF_AC_V_TABLE                     (4 << 0)
346 #define CIF_AC_U_TABLE                     (2 << 0)
347 #define CIF_AC_Y_TABLE                     BIT(0)
348
349 /* JPE_TAB_ID */
350 #define CIF_JPE_TAB_ID_HUFFAC1             (7 << 0)
351 #define CIF_JPE_TAB_ID_HUFFDC1             (6 << 0)
352 #define CIF_JPE_TAB_ID_HUFFAC0             (5 << 0)
353 #define CIF_JPE_TAB_ID_HUFFDC0             (4 << 0)
354 #define CIF_JPE_TAB_ID_QUANT3              (3 << 0)
355 #define CIF_JPE_TAB_ID_QUANT2              (2 << 0)
356 #define CIF_JPE_TAB_ID_QUANT1              BIT(0)
357 #define CIF_JPE_TAB_ID_QUANT0              (0 << 0)
358 /* JPE_ENCODER_BUSY */
359 #define CIF_ENCODER_BUSY                   BIT(0)
360 /* JPE_HEADER_MODE */
361 #define CIF_JPE_HEADER_MODE_NOAPPN         (0 << 0)
362 #define CIF_JPE_HEADER_MODE_NOAPPN1        BIT(0)
363 #define CIF_JPE_HEADER_MODE_JFIF           (2 << 0)
364 #define CIF_JPE_HEADER_MODE_JFIF1          (3 << 0)
365 /* JPE_ERROR_RIS */
366 #define CIF_JPE_VLC_SYMB_ERROR             BIT(4)
367 #define CIF_JPE_DCT_ERROR                  BIT(7)
368 #define CIF_JPE_R2B_IMG_SIZE_ERROR         BIT(9)
369 #define CIF_JPE_VLC_TAB_ERROR              BIT(10)
370 #define CIF_JPE_ERROR_MASK   (CIF_JPE_VLC_SYMB_ERROR |\
371                                         CIF_JPE_DCT_ERROR |\
372                                         CIF_JPE_R2B_IMG_SIZE_ERROR |\
373                                         CIF_JPE_VLC_TAB_ERROR)
374 /* JPE_STATUS_RIS */
375 #define CIF_JPE_STATUS_ENCODE_DONE         BIT(4)
376 #define CIF_JPE_STATUS_GENHEADER_DONE      BIT(5)
377
378 /* MIPI */
379
380 /* MIPI_DPHY1 */
381
382 /* MIPI_DPHY2 */
383
384 /* MIPI_CTRL */
385 #define CIF_MIPI_CTRL_OUTPUT_ENA             BIT(0)
386 #define CIF_MIPI_CTRL_SHUTDOWNLANES(a)       ((a) << 8)
387 #define CIF_CSI_LANE_2                       BIT(1)
388 #define CIF_CSI_LANE_3                       BIT(2)
389 #define CIF_CSI_LANE_4                       BIT(3)
390 #define CIF_MIPI_CTRL_NUM_LANES(a)           ((a) << 12)
391 #define CIF_MIPI_CTRL_ERR_SOT_HS_ENA         (0 << 16)
392 #define CIF_MIPI_CTRL_ERR_SOT_HS_SKIP        BIT(16)
393 #define CIF_MIPI_CTRL_ERR_SOT_SYNC_HS_ENA    (0 << 17)
394 #define CIF_MIPI_CTRL_ERR_SOT_SYNC_HS_SKIP   BIT(17)
395 #define CIF_MIPI_CTRL_CLOCKLANE_ENA          BIT(18)
396
397 /* MIPI_DATA_SEL */
398 #define CIF_MIPI_DATA_SEL_VC(a)              ((a) << 6)
399 #define CIF_MIPI_DATA_SEL_DT(a)              ((a) << 0)
400
401 #define CIF_MIPI_INTERRUPT_ALL               (-1)
402
403 /* MIPI_IMSC, MIPI_RIS, MIPI_MIS, MIPI_ICR, MIPI_ISR */
404 #define CIF_MIPI_SYNC_FIFO_OVFLW(a)    ((a) << 0)
405 #define CIF_MIPI_ERR_SOT(a)            ((a) << 4)
406 #define CIF_MIPI_ERR_SOT_SYNC(a)       ((a) << 8)
407 #define CIF_MIPI_ERR_EOT_SYNC(a)       ((a) << 12)
408 #define CIF_MIPI_ERR_CTRL(a)           ((a) << 16)
409 #define CIF_MIPI_ERR_PROTOCOL          BIT(20)
410 #define CIF_MIPI_ERR_ECC1              BIT(21)
411 #define CIF_MIPI_ERR_ECC2              BIT(22)
412 #define CIF_MIPI_ERR_CS                BIT(23)
413 #define CIF_MIPI_FRAME_END             BIT(24)
414 #define CIF_MIPI_ADD_DATA_OVFLW        BIT(25)
415 #define CIF_MIPI_ADD_DATA_WATER_MARK   BIT(26)
416
417 #define CIF_MIPI_ERR_CSI  (CIF_MIPI_ERR_PROTOCOL | \
418         CIF_MIPI_ERR_ECC1 | \
419         CIF_MIPI_ERR_ECC2 | \
420         CIF_MIPI_ERR_CS)
421
422 #define CIF_MIPI_ERR_DPHY  (CIF_MIPI_ERR_SOT(3) | \
423         CIF_MIPI_ERR_SOT_SYNC(3) | \
424         CIF_MIPI_ERR_EOT_SYNC(3) | \
425         CIF_MIPI_ERR_CTRL(3))
426
427 /* SUPER_IMPOSE */
428 #define CIF_SUPER_IMP_CTRL_NORMAL_MODE BIT(0)
429 #define CIF_SUPER_IMP_CTRL_BYPASS_MODE (0 << 0)
430 #define CIF_SUPER_IMP_CTRL_REF_IMG_MEM BIT(1)
431 #define CIF_SUPER_IMP_CTRL_REF_IMG_IE  (0 << 1)
432 #define CIF_SUPER_IMP_CTRL_TRANSP_DIS  BIT(2)
433 #define CIF_SUPER_IMP_CTRL_TRANSP_ENA  (0 << 2)
434
435 /* ISP HISTOGRAM CALCULATION : ISP_HIST_PROP */
436 #define CIF_ISP_HIST_PROP_PDIV(a)    ((a) << 3)
437 #define CIF_ISP_HIST_PROP_MODE_DIS   (0 << 0)
438 #define CIF_ISP_HIST_PROP_MODE_RGB   BIT(0)
439 #define CIF_ISP_HIST_PROP_MODE_RED   (2 << 0)
440 #define CIF_ISP_HIST_PROP_MODE_GREEN (3 << 0)
441 #define CIF_ISP_HIST_PROP_MODE_BLUE  (4 << 0)
442 #define CIF_ISP_HIST_PROP_MODE_LUM   (5 << 0)
443
444 /* AUTO FOCUS MEASUREMENT:  ISP_AFM_CTRL */
445 #define ISP_AFM_CTRL_ENABLE   BIT(0)
446 #define ISP_AFM_CTRL_DISABLE  (0 << 0)
447
448 /* SHUTTER CONTROL */
449 #define CIF_ISP_SH_CTRL_SH_ENA      BIT(0)
450 #define CIF_ISP_SH_CTRL_SH_DIS      (0 << 0)
451 #define CIF_ISP_SH_CTRL_REP_EN      BIT(1)
452 #define CIF_ISP_SH_CTRL_REP_DIS     (0 << 1)
453 #define CIF_ISP_SH_CTRL_SRC_SH_TRIG BIT(2)
454 #define CIF_ISP_SH_CTRL_SRC_VSYNC  (0 << 2)
455 #define CIF_ISP_SH_CTRL_EDGE_POS    BIT(3)
456 #define CIF_ISP_SH_CTRL_EDGE_NEG   (0 << 3)
457 #define CIF_ISP_SH_CTRL_POL_LOW     BIT(4)
458 #define CIF_ISP_SH_CTRL_POL_HIGH   (0 << 4)
459
460 /* FLASH MODULE */
461 /* ISP_FLASH_CMD */
462 #define CIF_FLASH_CMD_PRELIGHT_ON   BIT(0)
463 #define CIF_FLASH_CMD_PRELIGHT_OFF  (0 << 0)
464 #define CIF_FLASH_CMD_FLASH_ON      BIT(1)
465 #define CIF_FLASH_CMD_FLASH_OFF     (0 << 1)
466 #define CIF_FLASH_CMD_PRE_FLASH_ON  BIT(2)
467 #define CIF_FLASH_CMD_PRE_FLASH_OFF (0 << 2)
468 /* ISP_FLASH_CONFIG */
469 #define CIF_FLASH_CONFIG_PRELIGHT_BEG   (0 << 1)
470 #define CIF_FLASH_CONFIG_PRELIGHT_END   BIT(0)
471 #define CIF_FLASH_CONFIG_VSYNC_NEG      (0 << 1)
472 #define CIF_FLASH_CONFIG_VSYNC_POS      BIT(1)
473 #define CIF_FLASH_CONFIG_PRELIGHT_HIGH  (0 << 2)
474 #define CIF_FLASH_CONFIG_PRELIGHT_LOW   BIT(2)
475 #define CIF_FLASH_CONFIG_SRC_VSYNC      (0 << 3)
476 #define CIF_FLASH_CONFIG_SRC_FL_TRIG    BIT(3)
477 #define CIF_FLASH_CONFIG_DELAY(a)      ((a) << 4)
478
479 /* BAD PIXEL DETECTION */
480
481 /* =================================================================== */
482 /*                            CIF Registers                            */
483 /* =================================================================== */
484 #define CIF_CTRL_BASE               (0x00000000)
485 #define CIF_CCL                     ((CIF_CTRL_BASE + 0x00000000))
486 #define CIF_VI_ID                   ((CIF_CTRL_BASE + 0x00000008))
487 #define CIF_ICCL                    ((CIF_CTRL_BASE + 0x00000010))
488 #define CIF_IRCL                    ((CIF_CTRL_BASE + 0x00000014))
489 #define CIF_VI_DPCL                 ((CIF_CTRL_BASE + 0x00000018))
490
491 #define CIF_IMG_EFF_BASE            (0x00000200)
492 #define CIF_IMG_EFF_CTRL            ((CIF_IMG_EFF_BASE + 0x00000000))
493 #define CIF_IMG_EFF_COLOR_SEL       ((CIF_IMG_EFF_BASE + 0x00000004))
494 #define CIF_IMG_EFF_MAT_1           ((CIF_IMG_EFF_BASE + 0x00000008))
495 #define CIF_IMG_EFF_MAT_2           ((CIF_IMG_EFF_BASE + 0x0000000C))
496 #define CIF_IMG_EFF_MAT_3           ((CIF_IMG_EFF_BASE + 0x00000010))
497 #define CIF_IMG_EFF_MAT_4           ((CIF_IMG_EFF_BASE + 0x00000014))
498 #define CIF_IMG_EFF_MAT_5           ((CIF_IMG_EFF_BASE + 0x00000018))
499 #define CIF_IMG_EFF_TINT            ((CIF_IMG_EFF_BASE + 0x0000001C))
500 #define CIF_IMG_EFF_CTRL_SHD        ((CIF_IMG_EFF_BASE + 0x00000020))
501 #define CIF_IMG_EFF_SHARPEN         ((CIF_IMG_EFF_BASE + 0x00000024))
502
503 #define CIF_SUPER_IMP_BASE          (0x00000300)
504 #define CIF_SUPER_IMP_CTRL          ((CIF_SUPER_IMP_BASE + 0x00000000))
505 #define CIF_SUPER_IMP_OFFSET_X      ((CIF_SUPER_IMP_BASE + 0x00000004))
506 #define CIF_SUPER_IMP_OFFSET_Y      ((CIF_SUPER_IMP_BASE + 0x00000008))
507 #define CIF_SUPER_IMP_COLOR_Y       ((CIF_SUPER_IMP_BASE + 0x0000000C))
508 #define CIF_SUPER_IMP_COLOR_CB      ((CIF_SUPER_IMP_BASE + 0x00000010))
509 #define CIF_SUPER_IMP_COLOR_CR      ((CIF_SUPER_IMP_BASE + 0x00000014))
510
511 #define CIF_ISP_BASE                (0x00000400)
512 #define CIF_ISP_CTRL                ((CIF_ISP_BASE + 0x00000000))
513 #define CIF_ISP_ACQ_PROP            ((CIF_ISP_BASE + 0x00000004))
514 #define CIF_ISP_ACQ_H_OFFS          ((CIF_ISP_BASE + 0x00000008))
515 #define CIF_ISP_ACQ_V_OFFS          ((CIF_ISP_BASE + 0x0000000C))
516 #define CIF_ISP_ACQ_H_SIZE          ((CIF_ISP_BASE + 0x00000010))
517 #define CIF_ISP_ACQ_V_SIZE          ((CIF_ISP_BASE + 0x00000014))
518 #define CIF_ISP_ACQ_NR_FRAMES       ((CIF_ISP_BASE + 0x00000018))
519 #define CIF_ISP_GAMMA_DX_LO         ((CIF_ISP_BASE + 0x0000001C))
520 #define CIF_ISP_GAMMA_DX_HI         ((CIF_ISP_BASE + 0x00000020))
521 #define CIF_ISP_GAMMA_R_Y0          ((CIF_ISP_BASE + 0x00000024))
522 #define CIF_ISP_GAMMA_R_Y1          ((CIF_ISP_BASE + 0x00000028))
523 #define CIF_ISP_GAMMA_R_Y2          ((CIF_ISP_BASE + 0x0000002C))
524 #define CIF_ISP_GAMMA_R_Y3          ((CIF_ISP_BASE + 0x00000030))
525 #define CIF_ISP_GAMMA_R_Y4          ((CIF_ISP_BASE + 0x00000034))
526 #define CIF_ISP_GAMMA_R_Y5          ((CIF_ISP_BASE + 0x00000038))
527 #define CIF_ISP_GAMMA_R_Y6          ((CIF_ISP_BASE + 0x0000003C))
528 #define CIF_ISP_GAMMA_R_Y7          ((CIF_ISP_BASE + 0x00000040))
529 #define CIF_ISP_GAMMA_R_Y8          ((CIF_ISP_BASE + 0x00000044))
530 #define CIF_ISP_GAMMA_R_Y9          ((CIF_ISP_BASE + 0x00000048))
531 #define CIF_ISP_GAMMA_R_Y10         ((CIF_ISP_BASE + 0x0000004C))
532 #define CIF_ISP_GAMMA_R_Y11         ((CIF_ISP_BASE + 0x00000050))
533 #define CIF_ISP_GAMMA_R_Y12         ((CIF_ISP_BASE + 0x00000054))
534 #define CIF_ISP_GAMMA_R_Y13         ((CIF_ISP_BASE + 0x00000058))
535 #define CIF_ISP_GAMMA_R_Y14         ((CIF_ISP_BASE + 0x0000005C))
536 #define CIF_ISP_GAMMA_R_Y15         ((CIF_ISP_BASE + 0x00000060))
537 #define CIF_ISP_GAMMA_R_Y16         ((CIF_ISP_BASE + 0x00000064))
538 #define CIF_ISP_GAMMA_G_Y0          ((CIF_ISP_BASE + 0x00000068))
539 #define CIF_ISP_GAMMA_G_Y1          ((CIF_ISP_BASE + 0x0000006C))
540 #define CIF_ISP_GAMMA_G_Y2          ((CIF_ISP_BASE + 0x00000070))
541 #define CIF_ISP_GAMMA_G_Y3          ((CIF_ISP_BASE + 0x00000074))
542 #define CIF_ISP_GAMMA_G_Y4          ((CIF_ISP_BASE + 0x00000078))
543 #define CIF_ISP_GAMMA_G_Y5          ((CIF_ISP_BASE + 0x0000007C))
544 #define CIF_ISP_GAMMA_G_Y6          ((CIF_ISP_BASE + 0x00000080))
545 #define CIF_ISP_GAMMA_G_Y7          ((CIF_ISP_BASE + 0x00000084))
546 #define CIF_ISP_GAMMA_G_Y8          ((CIF_ISP_BASE + 0x00000088))
547 #define CIF_ISP_GAMMA_G_Y9          ((CIF_ISP_BASE + 0x0000008C))
548 #define CIF_ISP_GAMMA_G_Y10         ((CIF_ISP_BASE + 0x00000090))
549 #define CIF_ISP_GAMMA_G_Y11         ((CIF_ISP_BASE + 0x00000094))
550 #define CIF_ISP_GAMMA_G_Y12         ((CIF_ISP_BASE + 0x00000098))
551 #define CIF_ISP_GAMMA_G_Y13         ((CIF_ISP_BASE + 0x0000009C))
552 #define CIF_ISP_GAMMA_G_Y14         ((CIF_ISP_BASE + 0x000000A0))
553 #define CIF_ISP_GAMMA_G_Y15         ((CIF_ISP_BASE + 0x000000A4))
554 #define CIF_ISP_GAMMA_G_Y16         ((CIF_ISP_BASE + 0x000000A8))
555 #define CIF_ISP_GAMMA_B_Y0          ((CIF_ISP_BASE + 0x000000AC))
556 #define CIF_ISP_GAMMA_B_Y1          ((CIF_ISP_BASE + 0x000000B0))
557 #define CIF_ISP_GAMMA_B_Y2          ((CIF_ISP_BASE + 0x000000B4))
558 #define CIF_ISP_GAMMA_B_Y3          ((CIF_ISP_BASE + 0x000000B8))
559 #define CIF_ISP_GAMMA_B_Y4          ((CIF_ISP_BASE + 0x000000BC))
560 #define CIF_ISP_GAMMA_B_Y5          ((CIF_ISP_BASE + 0x000000C0))
561 #define CIF_ISP_GAMMA_B_Y6          ((CIF_ISP_BASE + 0x000000C4))
562 #define CIF_ISP_GAMMA_B_Y7          ((CIF_ISP_BASE + 0x000000C8))
563 #define CIF_ISP_GAMMA_B_Y8          ((CIF_ISP_BASE + 0x000000CC))
564 #define CIF_ISP_GAMMA_B_Y9          ((CIF_ISP_BASE + 0x000000D0))
565 #define CIF_ISP_GAMMA_B_Y10         ((CIF_ISP_BASE + 0x000000D4))
566 #define CIF_ISP_GAMMA_B_Y11         ((CIF_ISP_BASE + 0x000000D8))
567 #define CIF_ISP_GAMMA_B_Y12         ((CIF_ISP_BASE + 0x000000DC))
568 #define CIF_ISP_GAMMA_B_Y13         ((CIF_ISP_BASE + 0x000000E0))
569 #define CIF_ISP_GAMMA_B_Y14         ((CIF_ISP_BASE + 0x000000E4))
570 #define CIF_ISP_GAMMA_B_Y15         ((CIF_ISP_BASE + 0x000000E8))
571 #define CIF_ISP_GAMMA_B_Y16         ((CIF_ISP_BASE + 0x000000EC))
572 #define CIF_ISP_AWB_PROP            ((CIF_ISP_BASE + 0x00000110))
573 #define CIF_ISP_AWB_WND_H_OFFS      ((CIF_ISP_BASE + 0x00000114))
574 #define CIF_ISP_AWB_WND_V_OFFS      ((CIF_ISP_BASE + 0x00000118))
575 #define CIF_ISP_AWB_WND_H_SIZE      ((CIF_ISP_BASE + 0x0000011C))
576 #define CIF_ISP_AWB_WND_V_SIZE      ((CIF_ISP_BASE + 0x00000120))
577 #define CIF_ISP_AWB_FRAMES          ((CIF_ISP_BASE + 0x00000124))
578 #define CIF_ISP_AWB_REF             ((CIF_ISP_BASE + 0x00000128))
579 #define CIF_ISP_AWB_THRESH          ((CIF_ISP_BASE + 0x0000012C))
580 #define CIF_ISP_AWB_GAIN_G          ((CIF_ISP_BASE + 0x00000138))
581 #define CIF_ISP_AWB_GAIN_RB         ((CIF_ISP_BASE + 0x0000013C))
582 #define CIF_ISP_AWB_WHITE_CNT       ((CIF_ISP_BASE + 0x00000140))
583 #define CIF_ISP_AWB_MEAN            ((CIF_ISP_BASE + 0x00000144))
584 #define CIF_ISP_CC_COEFF_0          ((CIF_ISP_BASE + 0x00000170))
585 #define CIF_ISP_CC_COEFF_1          ((CIF_ISP_BASE + 0x00000174))
586 #define CIF_ISP_CC_COEFF_2          ((CIF_ISP_BASE + 0x00000178))
587 #define CIF_ISP_CC_COEFF_3          ((CIF_ISP_BASE + 0x0000017C))
588 #define CIF_ISP_CC_COEFF_4          ((CIF_ISP_BASE + 0x00000180))
589 #define CIF_ISP_CC_COEFF_5          ((CIF_ISP_BASE + 0x00000184))
590 #define CIF_ISP_CC_COEFF_6          ((CIF_ISP_BASE + 0x00000188))
591 #define CIF_ISP_CC_COEFF_7          ((CIF_ISP_BASE + 0x0000018C))
592 #define CIF_ISP_CC_COEFF_8          ((CIF_ISP_BASE + 0x00000190))
593 #define CIF_ISP_OUT_H_OFFS          ((CIF_ISP_BASE + 0x00000194))
594 #define CIF_ISP_OUT_V_OFFS          ((CIF_ISP_BASE + 0x00000198))
595 #define CIF_ISP_OUT_H_SIZE          ((CIF_ISP_BASE + 0x0000019C))
596 #define CIF_ISP_OUT_V_SIZE          ((CIF_ISP_BASE + 0x000001A0))
597 #define CIF_ISP_DEMOSAIC            ((CIF_ISP_BASE + 0x000001A4))
598 #define CIF_ISP_FLAGS_SHD           ((CIF_ISP_BASE + 0x000001A8))
599 #define CIF_ISP_OUT_H_OFFS_SHD      ((CIF_ISP_BASE + 0x000001AC))
600 #define CIF_ISP_OUT_V_OFFS_SHD      ((CIF_ISP_BASE + 0x000001B0))
601 #define CIF_ISP_OUT_H_SIZE_SHD      ((CIF_ISP_BASE + 0x000001B4))
602 #define CIF_ISP_OUT_V_SIZE_SHD      ((CIF_ISP_BASE + 0x000001B8))
603 #define CIF_ISP_IMSC                ((CIF_ISP_BASE + 0x000001BC))
604 #define CIF_ISP_RIS                 ((CIF_ISP_BASE + 0x000001C0))
605 #define CIF_ISP_MIS                 ((CIF_ISP_BASE + 0x000001C4))
606 #define CIF_ISP_ICR                 ((CIF_ISP_BASE + 0x000001C8))
607 #define CIF_ISP_ISR                 ((CIF_ISP_BASE + 0x000001CC))
608 #define CIF_ISP_CT_COEFF_0          ((CIF_ISP_BASE + 0x000001D0))
609 #define CIF_ISP_CT_COEFF_1          ((CIF_ISP_BASE + 0x000001D4))
610 #define CIF_ISP_CT_COEFF_2          ((CIF_ISP_BASE + 0x000001D8))
611 #define CIF_ISP_CT_COEFF_3          ((CIF_ISP_BASE + 0x000001DC))
612 #define CIF_ISP_CT_COEFF_4          ((CIF_ISP_BASE + 0x000001E0))
613 #define CIF_ISP_CT_COEFF_5          ((CIF_ISP_BASE + 0x000001E4))
614 #define CIF_ISP_CT_COEFF_6          ((CIF_ISP_BASE + 0x000001E8))
615 #define CIF_ISP_CT_COEFF_7          ((CIF_ISP_BASE + 0x000001EC))
616 #define CIF_ISP_CT_COEFF_8          ((CIF_ISP_BASE + 0x000001F0))
617 #define CIF_ISP_GAMMA_OUT_MODE      ((CIF_ISP_BASE + 0x000001F4))
618 #define CIF_ISP_GAMMA_OUT_Y_0       ((CIF_ISP_BASE + 0x000001F8))
619 #define CIF_ISP_GAMMA_OUT_Y_1       ((CIF_ISP_BASE + 0x000001FC))
620 #define CIF_ISP_GAMMA_OUT_Y_2       ((CIF_ISP_BASE + 0x00000200))
621 #define CIF_ISP_GAMMA_OUT_Y_3       ((CIF_ISP_BASE + 0x00000204))
622 #define CIF_ISP_GAMMA_OUT_Y_4       ((CIF_ISP_BASE + 0x00000208))
623 #define CIF_ISP_GAMMA_OUT_Y_5       ((CIF_ISP_BASE + 0x0000020C))
624 #define CIF_ISP_GAMMA_OUT_Y_6       ((CIF_ISP_BASE + 0x00000210))
625 #define CIF_ISP_GAMMA_OUT_Y_7       ((CIF_ISP_BASE + 0x00000214))
626 #define CIF_ISP_GAMMA_OUT_Y_8       ((CIF_ISP_BASE + 0x00000218))
627 #define CIF_ISP_GAMMA_OUT_Y_9       ((CIF_ISP_BASE + 0x0000021C))
628 #define CIF_ISP_GAMMA_OUT_Y_10      ((CIF_ISP_BASE + 0x00000220))
629 #define CIF_ISP_GAMMA_OUT_Y_11      ((CIF_ISP_BASE + 0x00000224))
630 #define CIF_ISP_GAMMA_OUT_Y_12      ((CIF_ISP_BASE + 0x00000228))
631 #define CIF_ISP_GAMMA_OUT_Y_13      ((CIF_ISP_BASE + 0x0000022C))
632 #define CIF_ISP_GAMMA_OUT_Y_14      ((CIF_ISP_BASE + 0x00000230))
633 #define CIF_ISP_GAMMA_OUT_Y_15      ((CIF_ISP_BASE + 0x00000234))
634 #define CIF_ISP_GAMMA_OUT_Y_16      ((CIF_ISP_BASE + 0x00000238))
635 #define CIF_ISP_ERR                 ((CIF_ISP_BASE + 0x0000023C))
636 #define CIF_ISP_ERR_CLR             ((CIF_ISP_BASE + 0x00000240))
637 #define CIF_ISP_FRAME_COUNT         ((CIF_ISP_BASE + 0x00000244))
638 #define CIF_ISP_CT_OFFSET_R         ((CIF_ISP_BASE + 0x00000248))
639 #define CIF_ISP_CT_OFFSET_G         ((CIF_ISP_BASE + 0x0000024C))
640 #define CIF_ISP_CT_OFFSET_B         ((CIF_ISP_BASE + 0x00000250))
641
642 #define CIF_ISP_FLASH_BASE          (0x00000660)
643 #define CIF_ISP_FLASH_CMD           ((CIF_ISP_FLASH_BASE + 0x00000000))
644 #define CIF_ISP_FLASH_CONFIG        ((CIF_ISP_FLASH_BASE + 0x00000004))
645 #define CIF_ISP_FLASH_PREDIV        ((CIF_ISP_FLASH_BASE + 0x00000008))
646 #define CIF_ISP_FLASH_DELAY         ((CIF_ISP_FLASH_BASE + 0x0000000C))
647 #define CIF_ISP_FLASH_TIME          ((CIF_ISP_FLASH_BASE + 0x00000010))
648 #define CIF_ISP_FLASH_MAXP          ((CIF_ISP_FLASH_BASE + 0x00000014))
649
650 #define CIF_ISP_SH_BASE             (0x00000680)
651 #define CIF_ISP_SH_CTRL             ((CIF_ISP_SH_BASE + 0x00000000))
652 #define CIF_ISP_SH_PREDIV           ((CIF_ISP_SH_BASE + 0x00000004))
653 #define CIF_ISP_SH_DELAY            ((CIF_ISP_SH_BASE + 0x00000008))
654 #define CIF_ISP_SH_TIME             ((CIF_ISP_SH_BASE + 0x0000000C))
655
656 #define CIF_C_PROC_BASE             (0x00000800)
657 #define CIF_C_PROC_CTRL             ((CIF_C_PROC_BASE + 0x00000000))
658 #define CIF_C_PROC_CONTRAST         ((CIF_C_PROC_BASE + 0x00000004))
659 #define CIF_C_PROC_BRIGHTNESS       ((CIF_C_PROC_BASE + 0x00000008))
660 #define CIF_C_PROC_SATURATION       ((CIF_C_PROC_BASE + 0x0000000C))
661 #define CIF_C_PROC_HUE              ((CIF_C_PROC_BASE + 0x00000010))
662
663 #define CIF_DUAL_CROP_BASE          (0x00000880)
664 #define CIF_DUAL_CROP_CTRL          (CIF_DUAL_CROP_BASE + 0x00000000)
665 #define CIF_DUAL_CROP_M_H_OFFS      (CIF_DUAL_CROP_BASE + 0x00000004)
666 #define CIF_DUAL_CROP_M_V_OFFS      (CIF_DUAL_CROP_BASE + 0x00000008)
667 #define CIF_DUAL_CROP_M_H_SIZE      (CIF_DUAL_CROP_BASE + 0x0000000C)
668 #define CIF_DUAL_CROP_M_V_SIZE      (CIF_DUAL_CROP_BASE + 0x00000010)
669 #define CIF_DUAL_CROP_S_H_OFFS      (CIF_DUAL_CROP_BASE + 0x00000014)
670 #define CIF_DUAL_CROP_S_V_OFFS      (CIF_DUAL_CROP_BASE + 0x00000018)
671 #define CIF_DUAL_CROP_S_H_SIZE      (CIF_DUAL_CROP_BASE + 0x0000001C)
672 #define CIF_DUAL_CROP_S_V_SIZE      (CIF_DUAL_CROP_BASE + 0x00000020)
673 #define CIF_DUAL_CROP_M_H_OFFS_SHD  (CIF_DUAL_CROP_BASE + 0x00000024)
674 #define CIF_DUAL_CROP_M_V_OFFS_SHD  (CIF_DUAL_CROP_BASE + 0x00000028)
675 #define CIF_DUAL_CROP_M_H_SIZE_SHD  (CIF_DUAL_CROP_BASE + 0x0000002C)
676 #define CIF_DUAL_CROP_M_V_SIZE_SHD  (CIF_DUAL_CROP_BASE + 0x00000030)
677 #define CIF_DUAL_CROP_S_H_OFFS_SHD  (CIF_DUAL_CROP_BASE + 0x00000034)
678 #define CIF_DUAL_CROP_S_V_OFFS_SHD  (CIF_DUAL_CROP_BASE + 0x00000038)
679 #define CIF_DUAL_CROP_S_H_SIZE_SHD  (CIF_DUAL_CROP_BASE + 0x0000003C)
680 #define CIF_DUAL_CROP_S_V_SIZE_SHD      \
681         (CIF_DUAL_CROP_BASE + 0x00000040)
682
683 #define CIF_MRSZ_BASE               (0x00000C00)
684 #define CIF_MRSZ_CTRL               ((CIF_MRSZ_BASE + 0x00000000))
685 #define CIF_MRSZ_SCALE_HY           ((CIF_MRSZ_BASE + 0x00000004))
686 #define CIF_MRSZ_SCALE_HCB          ((CIF_MRSZ_BASE + 0x00000008))
687 #define CIF_MRSZ_SCALE_HCR          ((CIF_MRSZ_BASE + 0x0000000C))
688 #define CIF_MRSZ_SCALE_VY           ((CIF_MRSZ_BASE + 0x00000010))
689 #define CIF_MRSZ_SCALE_VC           ((CIF_MRSZ_BASE + 0x00000014))
690 #define CIF_MRSZ_PHASE_HY           ((CIF_MRSZ_BASE + 0x00000018))
691 #define CIF_MRSZ_PHASE_HC           ((CIF_MRSZ_BASE + 0x0000001C))
692 #define CIF_MRSZ_PHASE_VY           ((CIF_MRSZ_BASE + 0x00000020))
693 #define CIF_MRSZ_PHASE_VC           ((CIF_MRSZ_BASE + 0x00000024))
694 #define CIF_MRSZ_SCALE_LUT_ADDR     ((CIF_MRSZ_BASE + 0x00000028))
695 #define CIF_MRSZ_SCALE_LUT          ((CIF_MRSZ_BASE + 0x0000002C))
696 #define CIF_MRSZ_CTRL_SHD           ((CIF_MRSZ_BASE + 0x00000030))
697 #define CIF_MRSZ_SCALE_HY_SHD       ((CIF_MRSZ_BASE + 0x00000034))
698 #define CIF_MRSZ_SCALE_HCB_SHD      ((CIF_MRSZ_BASE + 0x00000038))
699 #define CIF_MRSZ_SCALE_HCR_SHD      ((CIF_MRSZ_BASE + 0x0000003C))
700 #define CIF_MRSZ_SCALE_VY_SHD       ((CIF_MRSZ_BASE + 0x00000040))
701 #define CIF_MRSZ_SCALE_VC_SHD       ((CIF_MRSZ_BASE + 0x00000044))
702 #define CIF_MRSZ_PHASE_HY_SHD       ((CIF_MRSZ_BASE + 0x00000048))
703 #define CIF_MRSZ_PHASE_HC_SHD       ((CIF_MRSZ_BASE + 0x0000004C))
704 #define CIF_MRSZ_PHASE_VY_SHD       ((CIF_MRSZ_BASE + 0x00000050))
705 #define CIF_MRSZ_PHASE_VC_SHD       ((CIF_MRSZ_BASE + 0x00000054))
706
707 #define CIF_SRSZ_BASE               (0x00001000)
708 #define CIF_SRSZ_CTRL               ((CIF_SRSZ_BASE + 0x00000000))
709 #define CIF_SRSZ_SCALE_HY           ((CIF_SRSZ_BASE + 0x00000004))
710 #define CIF_SRSZ_SCALE_HCB          ((CIF_SRSZ_BASE + 0x00000008))
711 #define CIF_SRSZ_SCALE_HCR          ((CIF_SRSZ_BASE + 0x0000000C))
712 #define CIF_SRSZ_SCALE_VY           ((CIF_SRSZ_BASE + 0x00000010))
713 #define CIF_SRSZ_SCALE_VC           ((CIF_SRSZ_BASE + 0x00000014))
714 #define CIF_SRSZ_PHASE_HY           ((CIF_SRSZ_BASE + 0x00000018))
715 #define CIF_SRSZ_PHASE_HC           ((CIF_SRSZ_BASE + 0x0000001C))
716 #define CIF_SRSZ_PHASE_VY           ((CIF_SRSZ_BASE + 0x00000020))
717 #define CIF_SRSZ_PHASE_VC           ((CIF_SRSZ_BASE + 0x00000024))
718 #define CIF_SRSZ_SCALE_LUT_ADDR     ((CIF_SRSZ_BASE + 0x00000028))
719 #define CIF_SRSZ_SCALE_LUT          ((CIF_SRSZ_BASE + 0x0000002C))
720 #define CIF_SRSZ_CTRL_SHD           ((CIF_SRSZ_BASE + 0x00000030))
721 #define CIF_SRSZ_SCALE_HY_SHD       ((CIF_SRSZ_BASE + 0x00000034))
722 #define CIF_SRSZ_SCALE_HCB_SHD      ((CIF_SRSZ_BASE + 0x00000038))
723 #define CIF_SRSZ_SCALE_HCR_SHD      ((CIF_SRSZ_BASE + 0x0000003C))
724 #define CIF_SRSZ_SCALE_VY_SHD       ((CIF_SRSZ_BASE + 0x00000040))
725 #define CIF_SRSZ_SCALE_VC_SHD       ((CIF_SRSZ_BASE + 0x00000044))
726 #define CIF_SRSZ_PHASE_HY_SHD       ((CIF_SRSZ_BASE + 0x00000048))
727 #define CIF_SRSZ_PHASE_HC_SHD       ((CIF_SRSZ_BASE + 0x0000004C))
728 #define CIF_SRSZ_PHASE_VY_SHD       ((CIF_SRSZ_BASE + 0x00000050))
729 #define CIF_SRSZ_PHASE_VC_SHD       ((CIF_SRSZ_BASE + 0x00000054))
730
731 #define CIF_MI_BASE                 (0x00001400)
732 #define CIF_MI_CTRL                 ((CIF_MI_BASE + 0x00000000))
733 #define CIF_MI_INIT                 ((CIF_MI_BASE + 0x00000004))
734 #define CIF_MI_MP_Y_BASE_AD_INIT    ((CIF_MI_BASE + 0x00000008))
735 #define CIF_MI_MP_Y_SIZE_INIT       ((CIF_MI_BASE + 0x0000000C))
736 #define CIF_MI_MP_Y_OFFS_CNT_INIT   ((CIF_MI_BASE + 0x00000010))
737 #define CIF_MI_MP_Y_OFFS_CNT_START  ((CIF_MI_BASE + 0x00000014))
738 #define CIF_MI_MP_Y_IRQ_OFFS_INIT   ((CIF_MI_BASE + 0x00000018))
739 #define CIF_MI_MP_CB_BASE_AD_INIT   ((CIF_MI_BASE + 0x0000001C))
740 #define CIF_MI_MP_CB_SIZE_INIT      ((CIF_MI_BASE + 0x00000020))
741 #define CIF_MI_MP_CB_OFFS_CNT_INIT  ((CIF_MI_BASE + 0x00000024))
742 #define CIF_MI_MP_CB_OFFS_CNT_START ((CIF_MI_BASE + 0x00000028))
743 #define CIF_MI_MP_CR_BASE_AD_INIT   ((CIF_MI_BASE + 0x0000002C))
744 #define CIF_MI_MP_CR_SIZE_INIT      ((CIF_MI_BASE + 0x00000030))
745 #define CIF_MI_MP_CR_OFFS_CNT_INIT  ((CIF_MI_BASE + 0x00000034))
746 #define CIF_MI_MP_CR_OFFS_CNT_START ((CIF_MI_BASE + 0x00000038))
747 #define CIF_MI_SP_Y_BASE_AD_INIT    ((CIF_MI_BASE + 0x0000003C))
748 #define CIF_MI_SP_Y_SIZE_INIT       ((CIF_MI_BASE + 0x00000040))
749 #define CIF_MI_SP_Y_OFFS_CNT_INIT   ((CIF_MI_BASE + 0x00000044))
750 #define CIF_MI_SP_Y_OFFS_CNT_START  ((CIF_MI_BASE + 0x00000048))
751 #define CIF_MI_SP_Y_LLENGTH         ((CIF_MI_BASE + 0x0000004C))
752 #define CIF_MI_SP_CB_BASE_AD_INIT   ((CIF_MI_BASE + 0x00000050))
753 #define CIF_MI_SP_CB_SIZE_INIT      ((CIF_MI_BASE + 0x00000054))
754 #define CIF_MI_SP_CB_OFFS_CNT_INIT  ((CIF_MI_BASE + 0x00000058))
755 #define CIF_MI_SP_CB_OFFS_CNT_START ((CIF_MI_BASE + 0x0000005C))
756 #define CIF_MI_SP_CR_BASE_AD_INIT   ((CIF_MI_BASE + 0x00000060))
757 #define CIF_MI_SP_CR_SIZE_INIT      ((CIF_MI_BASE + 0x00000064))
758 #define CIF_MI_SP_CR_OFFS_CNT_INIT  ((CIF_MI_BASE + 0x00000068))
759 #define CIF_MI_SP_CR_OFFS_CNT_START ((CIF_MI_BASE + 0x0000006C))
760 #define CIF_MI_BYTE_CNT             ((CIF_MI_BASE + 0x00000070))
761 #define CIF_MI_CTRL_SHD             ((CIF_MI_BASE + 0x00000074))
762 #define CIF_MI_MP_Y_BASE_AD_SHD     ((CIF_MI_BASE + 0x00000078))
763 #define CIF_MI_MP_Y_SIZE_SHD        ((CIF_MI_BASE + 0x0000007C))
764 #define CIF_MI_MP_Y_OFFS_CNT_SHD    ((CIF_MI_BASE + 0x00000080))
765 #define CIF_MI_MP_Y_IRQ_OFFS_SHD    ((CIF_MI_BASE + 0x00000084))
766 #define CIF_MI_MP_CB_BASE_AD_SHD    ((CIF_MI_BASE + 0x00000088))
767 #define CIF_MI_MP_CB_SIZE_SHD       ((CIF_MI_BASE + 0x0000008C))
768 #define CIF_MI_MP_CB_OFFS_CNT_SHD   ((CIF_MI_BASE + 0x00000090))
769 #define CIF_MI_MP_CR_BASE_AD_SHD    ((CIF_MI_BASE + 0x00000094))
770 #define CIF_MI_MP_CR_SIZE_SHD       ((CIF_MI_BASE + 0x00000098))
771 #define CIF_MI_MP_CR_OFFS_CNT_SHD   ((CIF_MI_BASE + 0x0000009C))
772 #define CIF_MI_SP_Y_BASE_AD_SHD     ((CIF_MI_BASE + 0x000000A0))
773 #define CIF_MI_SP_Y_SIZE_SHD        ((CIF_MI_BASE + 0x000000A4))
774 #define CIF_MI_SP_Y_OFFS_CNT_SHD    ((CIF_MI_BASE + 0x000000A8))
775 #define CIF_MI_SP_CB_BASE_AD_SHD    ((CIF_MI_BASE + 0x000000B0))
776 #define CIF_MI_SP_CB_SIZE_SHD       ((CIF_MI_BASE + 0x000000B4))
777 #define CIF_MI_SP_CB_OFFS_CNT_SHD   ((CIF_MI_BASE + 0x000000B8))
778 #define CIF_MI_SP_CR_BASE_AD_SHD    ((CIF_MI_BASE + 0x000000BC))
779 #define CIF_MI_SP_CR_SIZE_SHD       ((CIF_MI_BASE + 0x000000C0))
780 #define CIF_MI_SP_CR_OFFS_CNT_SHD   ((CIF_MI_BASE + 0x000000C4))
781 #define CIF_MI_DMA_Y_PIC_START_AD   ((CIF_MI_BASE + 0x000000C8))
782 #define CIF_MI_DMA_Y_PIC_WIDTH      ((CIF_MI_BASE + 0x000000CC))
783 #define CIF_MI_DMA_Y_LLENGTH        ((CIF_MI_BASE + 0x000000D0))
784 #define CIF_MI_DMA_Y_PIC_SIZE       ((CIF_MI_BASE + 0x000000D4))
785 #define CIF_MI_DMA_CB_PIC_START_AD  ((CIF_MI_BASE + 0x000000D8))
786 #define CIF_MI_DMA_CR_PIC_START_AD  ((CIF_MI_BASE + 0x000000E8))
787 #define CIF_MI_IMSC                 ((CIF_MI_BASE + 0x000000F8))
788 #define CIF_MI_RIS                  ((CIF_MI_BASE + 0x000000FC))
789 #define CIF_MI_MIS                  ((CIF_MI_BASE + 0x00000100))
790 #define CIF_MI_ICR                  ((CIF_MI_BASE + 0x00000104))
791 #define CIF_MI_ISR                  ((CIF_MI_BASE + 0x00000108))
792 #define CIF_MI_STATUS               ((CIF_MI_BASE + 0x0000010C))
793 #define CIF_MI_STATUS_CLR           ((CIF_MI_BASE + 0x00000110))
794 #define CIF_MI_SP_Y_PIC_WIDTH       ((CIF_MI_BASE + 0x00000114))
795 #define CIF_MI_SP_Y_PIC_HEIGHT      ((CIF_MI_BASE + 0x00000118))
796 #define CIF_MI_SP_Y_PIC_SIZE        ((CIF_MI_BASE + 0x0000011C))
797 #define CIF_MI_DMA_CTRL             ((CIF_MI_BASE + 0x00000120))
798 #define CIF_MI_DMA_START            ((CIF_MI_BASE + 0x00000124))
799 #define CIF_MI_DMA_STATUS           ((CIF_MI_BASE + 0x00000128))
800 #define CIF_MI_PIXEL_COUNT          ((CIF_MI_BASE + 0x0000012C))
801 #define CIF_MI_MP_Y_BASE_AD_INIT2   ((CIF_MI_BASE + 0x00000130))
802 #define CIF_MI_MP_CB_BASE_AD_INIT2  ((CIF_MI_BASE + 0x00000134))
803 #define CIF_MI_MP_CR_BASE_AD_INIT2  ((CIF_MI_BASE + 0x00000138))
804 #define CIF_MI_SP_Y_BASE_AD_INIT2   ((CIF_MI_BASE + 0x0000013C))
805 #define CIF_MI_SP_CB_BASE_AD_INIT2  ((CIF_MI_BASE + 0x00000140))
806 #define CIF_MI_SP_CR_BASE_AD_INIT2  ((CIF_MI_BASE + 0x00000144))
807 #define CIF_MI_XTD_FORMAT_CTRL      ((CIF_MI_BASE + 0x00000148))
808
809 #define CIF_JPE_BASE                (0x00001800)
810 #define CIF_JPE_GEN_HEADER          ((CIF_JPE_BASE + 0x00000000))
811 #define CIF_JPE_ENCODE              ((CIF_JPE_BASE + 0x00000004))
812 #define CIF_JPE_INIT                ((CIF_JPE_BASE + 0x00000008))
813 #define CIF_JPE_Y_SCALE_EN          ((CIF_JPE_BASE + 0x0000000C))
814 #define CIF_JPE_CBCR_SCALE_EN       ((CIF_JPE_BASE + 0x00000010))
815 #define CIF_JPE_TABLE_FLUSH         ((CIF_JPE_BASE + 0x00000014))
816 #define CIF_JPE_ENC_HSIZE           ((CIF_JPE_BASE + 0x00000018))
817 #define CIF_JPE_ENC_VSIZE           ((CIF_JPE_BASE + 0x0000001C))
818 #define CIF_JPE_PIC_FORMAT          ((CIF_JPE_BASE + 0x00000020))
819 #define CIF_JPE_RESTART_INTERVAL    ((CIF_JPE_BASE + 0x00000024))
820 #define CIF_JPE_TQ_Y_SELECT         ((CIF_JPE_BASE + 0x00000028))
821 #define CIF_JPE_TQ_U_SELECT         ((CIF_JPE_BASE + 0x0000002C))
822 #define CIF_JPE_TQ_V_SELECT         ((CIF_JPE_BASE + 0x00000030))
823 #define CIF_JPE_DC_TABLE_SELECT     ((CIF_JPE_BASE + 0x00000034))
824 #define CIF_JPE_AC_TABLE_SELECT     ((CIF_JPE_BASE + 0x00000038))
825 #define CIF_JPE_TABLE_DATA          ((CIF_JPE_BASE + 0x0000003C))
826 #define CIF_JPE_TABLE_ID            ((CIF_JPE_BASE + 0x00000040))
827 #define CIF_JPE_TAC0_LEN            ((CIF_JPE_BASE + 0x00000044))
828 #define CIF_JPE_TDC0_LEN            ((CIF_JPE_BASE + 0x00000048))
829 #define CIF_JPE_TAC1_LEN            ((CIF_JPE_BASE + 0x0000004C))
830 #define CIF_JPE_TDC1_LEN            ((CIF_JPE_BASE + 0x00000050))
831 #define CIF_JPE_ENCODER_BUSY        ((CIF_JPE_BASE + 0x00000058))
832 #define CIF_JPE_HEADER_MODE         ((CIF_JPE_BASE + 0x0000005C))
833 #define CIF_JPE_ENCODE_MODE         ((CIF_JPE_BASE + 0x00000060))
834 #define CIF_JPE_DEBUG               ((CIF_JPE_BASE + 0x00000064))
835 #define CIF_JPE_ERROR_IMSC          ((CIF_JPE_BASE + 0x00000068))
836 #define CIF_JPE_ERROR_RIS           ((CIF_JPE_BASE + 0x0000006C))
837 #define CIF_JPE_ERROR_MIS           ((CIF_JPE_BASE + 0x00000070))
838 #define CIF_JPE_ERROR_ICR           ((CIF_JPE_BASE + 0x00000074))
839 #define CIF_JPE_ERROR_ISR           ((CIF_JPE_BASE + 0x00000078))
840 #define CIF_JPE_STATUS_IMSC         ((CIF_JPE_BASE + 0x0000007C))
841 #define CIF_JPE_STATUS_RIS          ((CIF_JPE_BASE + 0x00000080))
842 #define CIF_JPE_STATUS_MIS          ((CIF_JPE_BASE + 0x00000084))
843 #define CIF_JPE_STATUS_ICR          ((CIF_JPE_BASE + 0x00000088))
844 #define CIF_JPE_STATUS_ISR          ((CIF_JPE_BASE + 0x0000008C))
845 #define CIF_JPE_CONFIG              ((CIF_JPE_BASE + 0x00000090))
846
847 #define CIF_SMIA_BASE               (0x00001A00)
848 #define CIF_SMIA_CTRL               ((CIF_SMIA_BASE + 0x00000000))
849 #define CIF_SMIA_STATUS             ((CIF_SMIA_BASE + 0x00000004))
850 #define CIF_SMIA_IMSC               ((CIF_SMIA_BASE + 0x00000008))
851 #define CIF_SMIA_RIS                ((CIF_SMIA_BASE + 0x0000000C))
852 #define CIF_SMIA_MIS                ((CIF_SMIA_BASE + 0x00000010))
853 #define CIF_SMIA_ICR                ((CIF_SMIA_BASE + 0x00000014))
854 #define CIF_SMIA_ISR                ((CIF_SMIA_BASE + 0x00000018))
855 #define CIF_SMIA_DATA_FORMAT_SEL    ((CIF_SMIA_BASE + 0x0000001C))
856 #define CIF_SMIA_SOF_EMB_DATA_LINES ((CIF_SMIA_BASE + 0x00000020))
857 #define CIF_SMIA_EMB_HSTART         ((CIF_SMIA_BASE + 0x00000024))
858 #define CIF_SMIA_EMB_HSIZE          ((CIF_SMIA_BASE + 0x00000028))
859 #define CIF_SMIA_EMB_VSTART         ((CIF_SMIA_BASE + 0x0000002c))
860 #define CIF_SMIA_NUM_LINES          ((CIF_SMIA_BASE + 0x00000030))
861 #define CIF_SMIA_EMB_DATA_FIFO      ((CIF_SMIA_BASE + 0x00000034))
862 #define CIF_SMIA_EMB_DATA_WATERMARK ((CIF_SMIA_BASE + 0x00000038))
863
864 #define CIF_MIPI_BASE               (0x00001C00)
865 #define CIF_MIPI_CTRL               ((CIF_MIPI_BASE + 0x00000000))
866 #define CIF_MIPI_STATUS             ((CIF_MIPI_BASE + 0x00000004))
867 #define CIF_MIPI_IMSC               ((CIF_MIPI_BASE + 0x00000008))
868 #define CIF_MIPI_RIS                ((CIF_MIPI_BASE + 0x0000000C))
869 #define CIF_MIPI_MIS                ((CIF_MIPI_BASE + 0x00000010))
870 #define CIF_MIPI_ICR                ((CIF_MIPI_BASE + 0x00000014))
871 #define CIF_MIPI_ISR                ((CIF_MIPI_BASE + 0x00000018))
872 #define CIF_MIPI_CUR_DATA_ID        ((CIF_MIPI_BASE + 0x0000001C))
873 #define CIF_MIPI_IMG_DATA_SEL       ((CIF_MIPI_BASE + 0x00000020))
874 #define CIF_MIPI_ADD_DATA_SEL_1     ((CIF_MIPI_BASE + 0x00000024))
875 #define CIF_MIPI_ADD_DATA_SEL_2     ((CIF_MIPI_BASE + 0x00000028))
876 #define CIF_MIPI_ADD_DATA_SEL_3     ((CIF_MIPI_BASE + 0x0000002C))
877 #define CIF_MIPI_ADD_DATA_SEL_4     ((CIF_MIPI_BASE + 0x00000030))
878 #define CIF_MIPI_ADD_DATA_FIFO      ((CIF_MIPI_BASE + 0x00000034))
879 #define CIF_MIPI_FIFO_FILL_LEVEL    ((CIF_MIPI_BASE + 0x00000038))
880 #define CIF_MIPI_COMPRESSED_MODE    ((CIF_MIPI_BASE + 0x0000003C))
881 #define CIF_MIPI_FRAME              ((CIF_MIPI_BASE + 0x00000040))
882 #define CIF_MIPI_GEN_SHORT_DT       ((CIF_MIPI_BASE + 0x00000044))
883 #define CIF_MIPI_GEN_SHORT_8_9      ((CIF_MIPI_BASE + 0x00000048))
884 #define CIF_MIPI_GEN_SHORT_A_B      ((CIF_MIPI_BASE + 0x0000004C))
885 #define CIF_MIPI_GEN_SHORT_C_D      ((CIF_MIPI_BASE + 0x00000050))
886 #define CIF_MIPI_GEN_SHORT_E_F      ((CIF_MIPI_BASE + 0x00000054))
887
888 #define CIF_ISP_AFM_BASE            (0x00002000)
889 #define CIF_ISP_AFM_CTRL            ((CIF_ISP_AFM_BASE + 0x00000000))
890 #define CIF_ISP_AFM_LT_A            ((CIF_ISP_AFM_BASE + 0x00000004))
891 #define CIF_ISP_AFM_RB_A            ((CIF_ISP_AFM_BASE + 0x00000008))
892 #define CIF_ISP_AFM_LT_B            ((CIF_ISP_AFM_BASE + 0x0000000C))
893 #define CIF_ISP_AFM_RB_B            ((CIF_ISP_AFM_BASE + 0x00000010))
894 #define CIF_ISP_AFM_LT_C            ((CIF_ISP_AFM_BASE + 0x00000014))
895 #define CIF_ISP_AFM_RB_C            ((CIF_ISP_AFM_BASE + 0x00000018))
896 #define CIF_ISP_AFM_THRES           ((CIF_ISP_AFM_BASE + 0x0000001C))
897 #define CIF_ISP_AFM_VAR_SHIFT       ((CIF_ISP_AFM_BASE + 0x00000020))
898 #define CIF_ISP_AFM_SUM_A           ((CIF_ISP_AFM_BASE + 0x00000024))
899 #define CIF_ISP_AFM_SUM_B           ((CIF_ISP_AFM_BASE + 0x00000028))
900 #define CIF_ISP_AFM_SUM_C           ((CIF_ISP_AFM_BASE + 0x0000002C))
901 #define CIF_ISP_AFM_LUM_A           ((CIF_ISP_AFM_BASE + 0x00000030))
902 #define CIF_ISP_AFM_LUM_B           ((CIF_ISP_AFM_BASE + 0x00000034))
903 #define CIF_ISP_AFM_LUM_C           ((CIF_ISP_AFM_BASE + 0x00000038))
904
905 #define CIF_ISP_LSC_BASE            (0x00002200)
906 #define CIF_ISP_LSC_CTRL            ((CIF_ISP_LSC_BASE + 0x00000000))
907 #define CIF_ISP_LSC_R_TABLE_ADDR    ((CIF_ISP_LSC_BASE + 0x00000004))
908 #define CIF_ISP_LSC_GR_TABLE_ADDR   ((CIF_ISP_LSC_BASE + 0x00000008))
909 #define CIF_ISP_LSC_B_TABLE_ADDR    ((CIF_ISP_LSC_BASE + 0x0000000C))
910 #define CIF_ISP_LSC_GB_TABLE_ADDR   ((CIF_ISP_LSC_BASE + 0x00000010))
911 #define CIF_ISP_LSC_R_TABLE_DATA    ((CIF_ISP_LSC_BASE + 0x00000014))
912 #define CIF_ISP_LSC_GR_TABLE_DATA   ((CIF_ISP_LSC_BASE + 0x00000018))
913 #define CIF_ISP_LSC_B_TABLE_DATA    ((CIF_ISP_LSC_BASE + 0x0000001C))
914 #define CIF_ISP_LSC_GB_TABLE_DATA   ((CIF_ISP_LSC_BASE + 0x00000020))
915 #define CIF_ISP_LSC_XGRAD_01        ((CIF_ISP_LSC_BASE + 0x00000024))
916 #define CIF_ISP_LSC_XGRAD_23        ((CIF_ISP_LSC_BASE + 0x00000028))
917 #define CIF_ISP_LSC_XGRAD_45        ((CIF_ISP_LSC_BASE + 0x0000002C))
918 #define CIF_ISP_LSC_XGRAD_67        ((CIF_ISP_LSC_BASE + 0x00000030))
919 #define CIF_ISP_LSC_YGRAD_01        ((CIF_ISP_LSC_BASE + 0x00000034))
920 #define CIF_ISP_LSC_YGRAD_23        ((CIF_ISP_LSC_BASE + 0x00000038))
921 #define CIF_ISP_LSC_YGRAD_45        ((CIF_ISP_LSC_BASE + 0x0000003C))
922 #define CIF_ISP_LSC_YGRAD_67        ((CIF_ISP_LSC_BASE + 0x00000040))
923 #define CIF_ISP_LSC_XSIZE_01        ((CIF_ISP_LSC_BASE + 0x00000044))
924 #define CIF_ISP_LSC_XSIZE_23        ((CIF_ISP_LSC_BASE + 0x00000048))
925 #define CIF_ISP_LSC_XSIZE_45        ((CIF_ISP_LSC_BASE + 0x0000004C))
926 #define CIF_ISP_LSC_XSIZE_67        ((CIF_ISP_LSC_BASE + 0x00000050))
927 #define CIF_ISP_LSC_YSIZE_01        ((CIF_ISP_LSC_BASE + 0x00000054))
928 #define CIF_ISP_LSC_YSIZE_23        ((CIF_ISP_LSC_BASE + 0x00000058))
929 #define CIF_ISP_LSC_YSIZE_45        ((CIF_ISP_LSC_BASE + 0x0000005C))
930 #define CIF_ISP_LSC_YSIZE_67        ((CIF_ISP_LSC_BASE + 0x00000060))
931 #define CIF_ISP_LSC_TABLE_SEL       ((CIF_ISP_LSC_BASE + 0x00000064))
932 #define CIF_ISP_LSC_STATUS          ((CIF_ISP_LSC_BASE + 0x00000068))
933
934 #define CIF_ISP_IS_BASE             (0x00002300)
935 #define CIF_ISP_IS_CTRL             ((CIF_ISP_IS_BASE + 0x00000000))
936 #define CIF_ISP_IS_RECENTER         ((CIF_ISP_IS_BASE + 0x00000004))
937 #define CIF_ISP_IS_H_OFFS           ((CIF_ISP_IS_BASE + 0x00000008))
938 #define CIF_ISP_IS_V_OFFS           ((CIF_ISP_IS_BASE + 0x0000000C))
939 #define CIF_ISP_IS_H_SIZE           ((CIF_ISP_IS_BASE + 0x00000010))
940 #define CIF_ISP_IS_V_SIZE           ((CIF_ISP_IS_BASE + 0x00000014))
941 #define CIF_ISP_IS_MAX_DX           ((CIF_ISP_IS_BASE + 0x00000018))
942 #define CIF_ISP_IS_MAX_DY           ((CIF_ISP_IS_BASE + 0x0000001C))
943 #define CIF_ISP_IS_DISPLACE         ((CIF_ISP_IS_BASE + 0x00000020))
944 #define CIF_ISP_IS_H_OFFS_SHD       ((CIF_ISP_IS_BASE + 0x00000024))
945 #define CIF_ISP_IS_V_OFFS_SHD       ((CIF_ISP_IS_BASE + 0x00000028))
946 #define CIF_ISP_IS_H_SIZE_SHD       ((CIF_ISP_IS_BASE + 0x0000002C))
947 #define CIF_ISP_IS_V_SIZE_SHD       ((CIF_ISP_IS_BASE + 0x00000030))
948
949 #define CIF_ISP_HIST_BASE           (0x00002400)
950
951 #define CIF_ISP_HIST_PROP           ((CIF_ISP_HIST_BASE + 0x00000000))
952 #define CIF_ISP_HIST_H_OFFS         ((CIF_ISP_HIST_BASE + 0x00000004))
953 #define CIF_ISP_HIST_V_OFFS         ((CIF_ISP_HIST_BASE + 0x00000008))
954 #define CIF_ISP_HIST_H_SIZE         ((CIF_ISP_HIST_BASE + 0x0000000C))
955 #define CIF_ISP_HIST_V_SIZE         ((CIF_ISP_HIST_BASE + 0x00000010))
956 #define CIF_ISP_HIST_BIN_0          ((CIF_ISP_HIST_BASE + 0x00000014))
957 #define CIF_ISP_HIST_BIN_1          ((CIF_ISP_HIST_BASE + 0x00000018))
958 #define CIF_ISP_HIST_BIN_2          ((CIF_ISP_HIST_BASE + 0x0000001C))
959 #define CIF_ISP_HIST_BIN_3          ((CIF_ISP_HIST_BASE + 0x00000020))
960 #define CIF_ISP_HIST_BIN_4          ((CIF_ISP_HIST_BASE + 0x00000024))
961 #define CIF_ISP_HIST_BIN_5          ((CIF_ISP_HIST_BASE + 0x00000028))
962 #define CIF_ISP_HIST_BIN_6          ((CIF_ISP_HIST_BASE + 0x0000002C))
963 #define CIF_ISP_HIST_BIN_7          ((CIF_ISP_HIST_BASE + 0x00000030))
964 #define CIF_ISP_HIST_BIN_8          ((CIF_ISP_HIST_BASE + 0x00000034))
965 #define CIF_ISP_HIST_BIN_9          ((CIF_ISP_HIST_BASE + 0x00000038))
966 #define CIF_ISP_HIST_BIN_10         ((CIF_ISP_HIST_BASE + 0x0000003C))
967 #define CIF_ISP_HIST_BIN_11         ((CIF_ISP_HIST_BASE + 0x00000040))
968 #define CIF_ISP_HIST_BIN_12         ((CIF_ISP_HIST_BASE + 0x00000044))
969 #define CIF_ISP_HIST_BIN_13         ((CIF_ISP_HIST_BASE + 0x00000048))
970 #define CIF_ISP_HIST_BIN_14         ((CIF_ISP_HIST_BASE + 0x0000004C))
971 #define CIF_ISP_HIST_BIN_15         ((CIF_ISP_HIST_BASE + 0x00000050))
972 #define CIF_ISP_HIST_WEIGHT_00TO30  ((CIF_ISP_HIST_BASE + 0x00000054))
973 #define CIF_ISP_HIST_WEIGHT_40TO21  ((CIF_ISP_HIST_BASE + 0x00000058))
974 #define CIF_ISP_HIST_WEIGHT_31TO12  ((CIF_ISP_HIST_BASE + 0x0000005C))
975 #define CIF_ISP_HIST_WEIGHT_22TO03  ((CIF_ISP_HIST_BASE + 0x00000060))
976 #define CIF_ISP_HIST_WEIGHT_13TO43  ((CIF_ISP_HIST_BASE + 0x00000064))
977 #define CIF_ISP_HIST_WEIGHT_04TO34  ((CIF_ISP_HIST_BASE + 0x00000068))
978 #define CIF_ISP_HIST_WEIGHT_44      ((CIF_ISP_HIST_BASE + 0x0000006C))
979
980 #define CIF_ISP_FILT_BASE           (0x00002500)
981 #define CIF_ISP_FILT_MODE           ((CIF_ISP_FILT_BASE + 0x00000000))
982 #define CIF_ISP_FILT_THRESH_BL0     ((CIF_ISP_FILT_BASE + 0x00000028))
983 #define CIF_ISP_FILT_THRESH_BL1     ((CIF_ISP_FILT_BASE + 0x0000002c))
984 #define CIF_ISP_FILT_THRESH_SH0     ((CIF_ISP_FILT_BASE + 0x00000030))
985 #define CIF_ISP_FILT_THRESH_SH1     ((CIF_ISP_FILT_BASE + 0x00000034))
986 #define CIF_ISP_FILT_LUM_WEIGHT     ((CIF_ISP_FILT_BASE + 0x00000038))
987 #define CIF_ISP_FILT_FAC_SH1        ((CIF_ISP_FILT_BASE + 0x0000003c))
988 #define CIF_ISP_FILT_FAC_SH0        ((CIF_ISP_FILT_BASE + 0x00000040))
989 #define CIF_ISP_FILT_FAC_MID        ((CIF_ISP_FILT_BASE + 0x00000044))
990 #define CIF_ISP_FILT_FAC_BL0        ((CIF_ISP_FILT_BASE + 0x00000048))
991 #define CIF_ISP_FILT_FAC_BL1        ((CIF_ISP_FILT_BASE + 0x0000004C))
992
993 #define CIF_ISP_CAC_BASE            (0x00002580)
994 #define CIF_ISP_CAC_CTRL            (CIF_ISP_CAC_BASE + 0x00000000)
995 #define CIF_ISP_CAC_COUNT_START     (CIF_ISP_CAC_BASE + 0x00000004)
996 #define CIF_ISP_CAC_A               (CIF_ISP_CAC_BASE + 0x00000008)
997 #define CIF_ISP_CAC_B               (CIF_ISP_CAC_BASE + 0x0000000C)
998 #define CIF_ISP_CAC_C               (CIF_ISP_CAC_BASE + 0x00000010)
999 #define CIF_ISP_X_NORM              (CIF_ISP_CAC_BASE + 0x00000014)
1000 #define CIF_ISP_Y_NORM              (CIF_ISP_CAC_BASE + 0x00000018)
1001
1002 #define CIF_ISP_EXP_BASE            (0x00002600)
1003 #define CIF_ISP_EXP_CTRL            ((CIF_ISP_EXP_BASE + 0x00000000))
1004 #define CIF_ISP_EXP_H_OFFSET        ((CIF_ISP_EXP_BASE + 0x00000004))
1005 #define CIF_ISP_EXP_V_OFFSET        ((CIF_ISP_EXP_BASE + 0x00000008))
1006 #define CIF_ISP_EXP_H_SIZE          ((CIF_ISP_EXP_BASE + 0x0000000C))
1007 #define CIF_ISP_EXP_V_SIZE          ((CIF_ISP_EXP_BASE + 0x00000010))
1008 #define CIF_ISP_EXP_MEAN_00         ((CIF_ISP_EXP_BASE + 0x00000014))
1009 #define CIF_ISP_EXP_MEAN_10         ((CIF_ISP_EXP_BASE + 0x00000018))
1010 #define CIF_ISP_EXP_MEAN_20         ((CIF_ISP_EXP_BASE + 0x0000001c))
1011 #define CIF_ISP_EXP_MEAN_30         ((CIF_ISP_EXP_BASE + 0x00000020))
1012 #define CIF_ISP_EXP_MEAN_40         ((CIF_ISP_EXP_BASE + 0x00000024))
1013 #define CIF_ISP_EXP_MEAN_01         ((CIF_ISP_EXP_BASE + 0x00000028))
1014 #define CIF_ISP_EXP_MEAN_11         ((CIF_ISP_EXP_BASE + 0x0000002c))
1015 #define CIF_ISP_EXP_MEAN_21         ((CIF_ISP_EXP_BASE + 0x00000030))
1016 #define CIF_ISP_EXP_MEAN_31         ((CIF_ISP_EXP_BASE + 0x00000034))
1017 #define CIF_ISP_EXP_MEAN_41         ((CIF_ISP_EXP_BASE + 0x00000038))
1018 #define CIF_ISP_EXP_MEAN_02         ((CIF_ISP_EXP_BASE + 0x0000003c))
1019 #define CIF_ISP_EXP_MEAN_12         ((CIF_ISP_EXP_BASE + 0x00000040))
1020 #define CIF_ISP_EXP_MEAN_22         ((CIF_ISP_EXP_BASE + 0x00000044))
1021 #define CIF_ISP_EXP_MEAN_32         ((CIF_ISP_EXP_BASE + 0x00000048))
1022 #define CIF_ISP_EXP_MEAN_42         ((CIF_ISP_EXP_BASE + 0x0000004c))
1023 #define CIF_ISP_EXP_MEAN_03         ((CIF_ISP_EXP_BASE + 0x00000050))
1024 #define CIF_ISP_EXP_MEAN_13         ((CIF_ISP_EXP_BASE + 0x00000054))
1025 #define CIF_ISP_EXP_MEAN_23         ((CIF_ISP_EXP_BASE + 0x00000058))
1026 #define CIF_ISP_EXP_MEAN_33         ((CIF_ISP_EXP_BASE + 0x0000005c))
1027 #define CIF_ISP_EXP_MEAN_43         ((CIF_ISP_EXP_BASE + 0x00000060))
1028 #define CIF_ISP_EXP_MEAN_04         ((CIF_ISP_EXP_BASE + 0x00000064))
1029 #define CIF_ISP_EXP_MEAN_14         ((CIF_ISP_EXP_BASE + 0x00000068))
1030 #define CIF_ISP_EXP_MEAN_24         ((CIF_ISP_EXP_BASE + 0x0000006c))
1031 #define CIF_ISP_EXP_MEAN_34         ((CIF_ISP_EXP_BASE + 0x00000070))
1032 #define CIF_ISP_EXP_MEAN_44         ((CIF_ISP_EXP_BASE + 0x00000074))
1033
1034 #define CIF_ISP_BLS_BASE            (0x00002700)
1035 #define CIF_ISP_BLS_CTRL            ((CIF_ISP_BLS_BASE + 0x00000000))
1036 #define CIF_ISP_BLS_SAMPLES         ((CIF_ISP_BLS_BASE + 0x00000004))
1037 #define CIF_ISP_BLS_H1_START        ((CIF_ISP_BLS_BASE + 0x00000008))
1038 #define CIF_ISP_BLS_H1_STOP         ((CIF_ISP_BLS_BASE + 0x0000000c))
1039 #define CIF_ISP_BLS_V1_START        ((CIF_ISP_BLS_BASE + 0x00000010))
1040 #define CIF_ISP_BLS_V1_STOP         ((CIF_ISP_BLS_BASE + 0x00000014))
1041 #define CIF_ISP_BLS_H2_START        ((CIF_ISP_BLS_BASE + 0x00000018))
1042 #define CIF_ISP_BLS_H2_STOP         ((CIF_ISP_BLS_BASE + 0x0000001c))
1043 #define CIF_ISP_BLS_V2_START        ((CIF_ISP_BLS_BASE + 0x00000020))
1044 #define CIF_ISP_BLS_V2_STOP         ((CIF_ISP_BLS_BASE + 0x00000024))
1045 #define CIF_ISP_BLS_A_FIXED         ((CIF_ISP_BLS_BASE + 0x00000028))
1046 #define CIF_ISP_BLS_B_FIXED         ((CIF_ISP_BLS_BASE + 0x0000002c))
1047 #define CIF_ISP_BLS_C_FIXED         ((CIF_ISP_BLS_BASE + 0x00000030))
1048 #define CIF_ISP_BLS_D_FIXED         ((CIF_ISP_BLS_BASE + 0x00000034))
1049 #define CIF_ISP_BLS_A_MEASURED      ((CIF_ISP_BLS_BASE + 0x00000038))
1050 #define CIF_ISP_BLS_B_MEASURED      ((CIF_ISP_BLS_BASE + 0x0000003c))
1051 #define CIF_ISP_BLS_C_MEASURED      ((CIF_ISP_BLS_BASE + 0x00000040))
1052 #define CIF_ISP_BLS_D_MEASURED      ((CIF_ISP_BLS_BASE + 0x00000044))
1053
1054 #define CIF_ISP_DPF_BASE            (0x00002800)
1055 #define CIF_ISP_DPF_MODE            (CIF_ISP_DPF_BASE + 0x00000000)
1056 #define CIF_ISP_DPF_STRENGTH_R      (CIF_ISP_DPF_BASE + 0x00000004)
1057 #define CIF_ISP_DPF_STRENGTH_G      (CIF_ISP_DPF_BASE + 0x00000008)
1058 #define CIF_ISP_DPF_STRENGTH_B      (CIF_ISP_DPF_BASE + 0x0000000C)
1059 #define CIF_ISP_DPF_S_WEIGHT_G_1_4  (CIF_ISP_DPF_BASE + 0x00000010)
1060 #define CIF_ISP_DPF_S_WEIGHT_G_5_6  (CIF_ISP_DPF_BASE + 0x00000014)
1061 #define CIF_ISP_DPF_S_WEIGHT_RB_1_4 (CIF_ISP_DPF_BASE + 0x00000018)
1062 #define CIF_ISP_DPF_S_WEIGHT_RB_5_6 (CIF_ISP_DPF_BASE + 0x0000001C)
1063 #define CIF_ISP_DPF_NULL_COEFF_0    (CIF_ISP_DPF_BASE + 0x00000020)
1064 #define CIF_ISP_DPF_NULL_COEFF_1    (CIF_ISP_DPF_BASE + 0x00000024)
1065 #define CIF_ISP_DPF_NULL_COEFF_2    (CIF_ISP_DPF_BASE + 0x00000028)
1066 #define CIF_ISP_DPF_NULL_COEFF_3    (CIF_ISP_DPF_BASE + 0x0000002C)
1067 #define CIF_ISP_DPF_NULL_COEFF_4    (CIF_ISP_DPF_BASE + 0x00000030)
1068 #define CIF_ISP_DPF_NULL_COEFF_5    (CIF_ISP_DPF_BASE + 0x00000034)
1069 #define CIF_ISP_DPF_NULL_COEFF_6    (CIF_ISP_DPF_BASE + 0x00000038)
1070 #define CIF_ISP_DPF_NULL_COEFF_7    (CIF_ISP_DPF_BASE + 0x0000003C)
1071 #define CIF_ISP_DPF_NULL_COEFF_8    (CIF_ISP_DPF_BASE + 0x00000040)
1072 #define CIF_ISP_DPF_NULL_COEFF_9    (CIF_ISP_DPF_BASE + 0x00000044)
1073 #define CIF_ISP_DPF_NULL_COEFF_10   (CIF_ISP_DPF_BASE + 0x00000048)
1074 #define CIF_ISP_DPF_NULL_COEFF_11   (CIF_ISP_DPF_BASE + 0x0000004C)
1075 #define CIF_ISP_DPF_NULL_COEFF_12   (CIF_ISP_DPF_BASE + 0x00000050)
1076 #define CIF_ISP_DPF_NULL_COEFF_13   (CIF_ISP_DPF_BASE + 0x00000054)
1077 #define CIF_ISP_DPF_NULL_COEFF_14   (CIF_ISP_DPF_BASE + 0x00000058)
1078 #define CIF_ISP_DPF_NULL_COEFF_15   (CIF_ISP_DPF_BASE + 0x0000005C)
1079 #define CIF_ISP_DPF_NULL_COEFF_16   (CIF_ISP_DPF_BASE + 0x00000060)
1080 #define CIF_ISP_DPF_NF_GAIN_R       (CIF_ISP_DPF_BASE + 0x00000064)
1081 #define CIF_ISP_DPF_NF_GAIN_GR      (CIF_ISP_DPF_BASE + 0x00000068)
1082 #define CIF_ISP_DPF_NF_GAIN_GB      (CIF_ISP_DPF_BASE + 0x0000006C)
1083 #define CIF_ISP_DPF_NF_GAIN_B       (CIF_ISP_DPF_BASE + 0x00000070)
1084
1085 #define CIF_ISP_DPCC_BASE           (0x00002900)
1086 #define CIF_ISP_DPCC_MODE           (CIF_ISP_DPCC_BASE + 0x00000000)
1087 #define CIF_ISP_DPCC_OUTPUT_MODE    (CIF_ISP_DPCC_BASE + 0x00000004)
1088 #define CIF_ISP_DPCC_SET_USE        (CIF_ISP_DPCC_BASE + 0x00000008)
1089 #define CIF_ISP_DPCC_METHODS_SET_1  (CIF_ISP_DPCC_BASE + 0x0000000C)
1090 #define CIF_ISP_DPCC_METHODS_SET_2  (CIF_ISP_DPCC_BASE + 0x00000010)
1091 #define CIF_ISP_DPCC_METHODS_SET_3  (CIF_ISP_DPCC_BASE + 0x00000014)
1092 #define CIF_ISP_DPCC_LINE_THRESH_1  (CIF_ISP_DPCC_BASE + 0x00000018)
1093 #define CIF_ISP_DPCC_LINE_MAD_FAC_1 (CIF_ISP_DPCC_BASE + 0x0000001C)
1094 #define CIF_ISP_DPCC_PG_FAC_1       (CIF_ISP_DPCC_BASE + 0x00000020)
1095 #define CIF_ISP_DPCC_RND_THRESH_1   (CIF_ISP_DPCC_BASE + 0x00000024)
1096 #define CIF_ISP_DPCC_RG_FAC_1       (CIF_ISP_DPCC_BASE + 0x00000028)
1097 #define CIF_ISP_DPCC_LINE_THRESH_2  (CIF_ISP_DPCC_BASE + 0x0000002C)
1098 #define CIF_ISP_DPCC_LINE_MAD_FAC_2 (CIF_ISP_DPCC_BASE + 0x00000030)
1099 #define CIF_ISP_DPCC_PG_FAC_2       (CIF_ISP_DPCC_BASE + 0x00000034)
1100 #define CIF_ISP_DPCC_RND_THRESH_2   (CIF_ISP_DPCC_BASE + 0x00000038)
1101 #define CIF_ISP_DPCC_RG_FAC_2       (CIF_ISP_DPCC_BASE + 0x0000003C)
1102 #define CIF_ISP_DPCC_LINE_THRESH_3  (CIF_ISP_DPCC_BASE + 0x00000040)
1103 #define CIF_ISP_DPCC_LINE_MAD_FAC_3 (CIF_ISP_DPCC_BASE + 0x00000044)
1104 #define CIF_ISP_DPCC_PG_FAC_3       (CIF_ISP_DPCC_BASE + 0x00000048)
1105 #define CIF_ISP_DPCC_RND_THRESH_3   (CIF_ISP_DPCC_BASE + 0x0000004C)
1106 #define CIF_ISP_DPCC_RG_FAC_3       (CIF_ISP_DPCC_BASE + 0x00000050)
1107 #define CIF_ISP_DPCC_RO_LIMITS      (CIF_ISP_DPCC_BASE + 0x00000054)
1108 #define CIF_ISP_DPCC_RND_OFFS       (CIF_ISP_DPCC_BASE + 0x00000058)
1109 #define CIF_ISP_DPCC_BPT_CTRL       (CIF_ISP_DPCC_BASE + 0x0000005C)
1110 #define CIF_ISP_DPCC_BPT_NUMBER     (CIF_ISP_DPCC_BASE + 0x00000060)
1111 #define CIF_ISP_DPCC_BPT_ADDR       (CIF_ISP_DPCC_BASE + 0x00000064)
1112 #define CIF_ISP_DPCC_BPT_DATA       (CIF_ISP_DPCC_BASE + 0x00000068)
1113
1114 #define CIF_ISP_WDR_BASE           (0x00002A00)
1115 #define CIF_ISP_WDR_CTRL           (CIF_ISP_WDR_BASE + 0x00000000)
1116 #define CIF_ISP_WDR_TONECURVE_1    (CIF_ISP_WDR_BASE + 0x00000004)
1117 #define CIF_ISP_WDR_TONECURVE_2    (CIF_ISP_WDR_BASE + 0x00000008)
1118 #define CIF_ISP_WDR_TONECURVE_3    (CIF_ISP_WDR_BASE + 0x0000000C)
1119 #define CIF_ISP_WDR_TONECURVE_4    (CIF_ISP_WDR_BASE + 0x00000010)
1120 #define CIF_ISP_WDR_TONECURVE_YM_0 (CIF_ISP_WDR_BASE + 0x00000014)
1121 #define CIF_ISP_WDR_TONECURVE_YM_1 (CIF_ISP_WDR_BASE + 0x00000018)
1122 #define CIF_ISP_WDR_TONECURVE_YM_2 (CIF_ISP_WDR_BASE + 0x0000001C)
1123 #define CIF_ISP_WDR_TONECURVE_YM_3 (CIF_ISP_WDR_BASE + 0x00000020)
1124 #define CIF_ISP_WDR_TONECURVE_YM_4 (CIF_ISP_WDR_BASE + 0x00000024)
1125 #define CIF_ISP_WDR_TONECURVE_YM_5 (CIF_ISP_WDR_BASE + 0x00000028)
1126 #define CIF_ISP_WDR_TONECURVE_YM_6 (CIF_ISP_WDR_BASE + 0x0000002C)
1127 #define CIF_ISP_WDR_TONECURVE_YM_7 (CIF_ISP_WDR_BASE + 0x00000030)
1128 #define CIF_ISP_WDR_TONECURVE_YM_8 (CIF_ISP_WDR_BASE + 0x00000034)
1129 #define CIF_ISP_WDR_TONECURVE_YM_9 (CIF_ISP_WDR_BASE + 0x00000038)
1130 #define CIF_ISP_WDR_TONECURVE_YM_10 (CIF_ISP_WDR_BASE + 0x0000003C)
1131 #define CIF_ISP_WDR_TONECURVE_YM_11 (CIF_ISP_WDR_BASE + 0x00000040)
1132 #define CIF_ISP_WDR_TONECURVE_YM_12 (CIF_ISP_WDR_BASE + 0x00000044)
1133 #define CIF_ISP_WDR_TONECURVE_YM_13 (CIF_ISP_WDR_BASE + 0x00000048)
1134 #define CIF_ISP_WDR_TONECURVE_YM_14 (CIF_ISP_WDR_BASE + 0x0000004C)
1135 #define CIF_ISP_WDR_TONECURVE_YM_15 (CIF_ISP_WDR_BASE + 0x00000050)
1136 #define CIF_ISP_WDR_TONECURVE_YM_16 (CIF_ISP_WDR_BASE + 0x00000054)
1137 #define CIF_ISP_WDR_TONECURVE_YM_17 (CIF_ISP_WDR_BASE + 0x00000058)
1138 #define CIF_ISP_WDR_TONECURVE_YM_18 (CIF_ISP_WDR_BASE + 0x0000005C)
1139 #define CIF_ISP_WDR_TONECURVE_YM_19 (CIF_ISP_WDR_BASE + 0x00000060)
1140 #define CIF_ISP_WDR_TONECURVE_YM_20 (CIF_ISP_WDR_BASE + 0x00000064)
1141 #define CIF_ISP_WDR_TONECURVE_YM_21 (CIF_ISP_WDR_BASE + 0x00000068)
1142 #define CIF_ISP_WDR_TONECURVE_YM_22 (CIF_ISP_WDR_BASE + 0x0000006C)
1143 #define CIF_ISP_WDR_TONECURVE_YM_23 (CIF_ISP_WDR_BASE + 0x00000070)
1144 #define CIF_ISP_WDR_TONECURVE_YM_24 (CIF_ISP_WDR_BASE + 0x00000074)
1145 #define CIF_ISP_WDR_TONECURVE_YM_25 (CIF_ISP_WDR_BASE + 0x00000078)
1146 #define CIF_ISP_WDR_TONECURVE_YM_26 (CIF_ISP_WDR_BASE + 0x0000007C)
1147 #define CIF_ISP_WDR_TONECURVE_YM_27 (CIF_ISP_WDR_BASE + 0x00000080)
1148 #define CIF_ISP_WDR_TONECURVE_YM_28 (CIF_ISP_WDR_BASE + 0x00000084)
1149 #define CIF_ISP_WDR_TONECURVE_YM_29 (CIF_ISP_WDR_BASE + 0x00000088)
1150 #define CIF_ISP_WDR_TONECURVE_YM_30 (CIF_ISP_WDR_BASE + 0x0000008C)
1151 #define CIF_ISP_WDR_TONECURVE_YM_31 (CIF_ISP_WDR_BASE + 0x00000090)
1152 #define CIF_ISP_WDR_TONECURVE_YM_32 (CIF_ISP_WDR_BASE + 0x00000094)
1153 #define CIF_ISP_WDR_OFFSET          (CIF_ISP_WDR_BASE + 0x00000098)
1154 #define CIF_ISP_WDR_DELTAMIN        (CIF_ISP_WDR_BASE + 0x0000009C)
1155 #define CIF_ISP_WDR_TONECURVE_1_SHD (CIF_ISP_WDR_BASE + 0x000000A0)
1156 #define CIF_ISP_WDR_TONECURVE_2_SHD (CIF_ISP_WDR_BASE + 0x000000A4)
1157 #define CIF_ISP_WDR_TONECURVE_3_SHD (CIF_ISP_WDR_BASE + 0x000000A8)
1158 #define CIF_ISP_WDR_TONECURVE_4_SHD (CIF_ISP_WDR_BASE + 0x000000AC)
1159 #define CIF_ISP_WDR_TONECURVE_YM_0_SHD (CIF_ISP_WDR_BASE + 0x000000B0)
1160 #define CIF_ISP_WDR_TONECURVE_YM_1_SHD (CIF_ISP_WDR_BASE + 0x000000B4)
1161 #define CIF_ISP_WDR_TONECURVE_YM_2_SHD (CIF_ISP_WDR_BASE + 0x000000B8)
1162 #define CIF_ISP_WDR_TONECURVE_YM_3_SHD (CIF_ISP_WDR_BASE + 0x000000BC)
1163 #define CIF_ISP_WDR_TONECURVE_YM_4_SHD (CIF_ISP_WDR_BASE + 0x000000C0)
1164 #define CIF_ISP_WDR_TONECURVE_YM_5_SHD (CIF_ISP_WDR_BASE + 0x000000C4)
1165 #define CIF_ISP_WDR_TONECURVE_YM_6_SHD (CIF_ISP_WDR_BASE + 0x000000C8)
1166 #define CIF_ISP_WDR_TONECURVE_YM_7_SHD (CIF_ISP_WDR_BASE + 0x000000CC)
1167 #define CIF_ISP_WDR_TONECURVE_YM_8_SHD (CIF_ISP_WDR_BASE + 0x000000D0)
1168 #define CIF_ISP_WDR_TONECURVE_YM_9_SHD (CIF_ISP_WDR_BASE + 0x000000D4)
1169 #define CIF_ISP_WDR_TONECURVE_YM_10_SHD (CIF_ISP_WDR_BASE + 0x000000D8)
1170 #define CIF_ISP_WDR_TONECURVE_YM_11_SHD (CIF_ISP_WDR_BASE + 0x000000DC)
1171 #define CIF_ISP_WDR_TONECURVE_YM_12_SHD (CIF_ISP_WDR_BASE + 0x000000E0)
1172 #define CIF_ISP_WDR_TONECURVE_YM_13_SHD (CIF_ISP_WDR_BASE + 0x000000E4)
1173 #define CIF_ISP_WDR_TONECURVE_YM_14_SHD (CIF_ISP_WDR_BASE + 0x000000E8)
1174 #define CIF_ISP_WDR_TONECURVE_YM_15_SHD (CIF_ISP_WDR_BASE + 0x000000EC)
1175 #define CIF_ISP_WDR_TONECURVE_YM_16_SHD (CIF_ISP_WDR_BASE + 0x000000F0)
1176 #define CIF_ISP_WDR_TONECURVE_YM_17_SHD (CIF_ISP_WDR_BASE + 0x000000F4)
1177 #define CIF_ISP_WDR_TONECURVE_YM_18_SHD (CIF_ISP_WDR_BASE + 0x000000F8)
1178 #define CIF_ISP_WDR_TONECURVE_YM_19_SHD (CIF_ISP_WDR_BASE + 0x000000FC)
1179 #define CIF_ISP_WDR_TONECURVE_YM_20_SHD (CIF_ISP_WDR_BASE + 0x00000100)
1180 #define CIF_ISP_WDR_TONECURVE_YM_21_SHD (CIF_ISP_WDR_BASE + 0x00000104)
1181 #define CIF_ISP_WDR_TONECURVE_YM_22_SHD (CIF_ISP_WDR_BASE + 0x00000108)
1182 #define CIF_ISP_WDR_TONECURVE_YM_23_SHD (CIF_ISP_WDR_BASE + 0x0000010C)
1183 #define CIF_ISP_WDR_TONECURVE_YM_24_SHD (CIF_ISP_WDR_BASE + 0x00000110)
1184 #define CIF_ISP_WDR_TONECURVE_YM_25_SHD (CIF_ISP_WDR_BASE + 0x00000114)
1185 #define CIF_ISP_WDR_TONECURVE_YM_26_SHD (CIF_ISP_WDR_BASE + 0x00000118)
1186 #define CIF_ISP_WDR_TONECURVE_YM_27_SHD (CIF_ISP_WDR_BASE + 0x0000011C)
1187 #define CIF_ISP_WDR_TONECURVE_YM_28_SHD (CIF_ISP_WDR_BASE + 0x00000120)
1188 #define CIF_ISP_WDR_TONECURVE_YM_29_SHD (CIF_ISP_WDR_BASE + 0x00000124)
1189 #define CIF_ISP_WDR_TONECURVE_YM_30_SHD (CIF_ISP_WDR_BASE + 0x00000128)
1190 #define CIF_ISP_WDR_TONECURVE_YM_31_SHD (CIF_ISP_WDR_BASE + 0x0000012C)
1191 #define CIF_ISP_WDR_TONECURVE_YM_32_SHD (CIF_ISP_WDR_BASE + 0x00000130)
1192
1193 #define CIF_ISP_VSM_BASE       (0x00002F00)
1194 #define CIF_ISP_VSM_MODE       (CIF_ISP_VSM_BASE + 0x00000000)
1195 #define CIF_ISP_VSM_H_OFFS     (CIF_ISP_VSM_BASE + 0x00000004)
1196 #define CIF_ISP_VSM_V_OFFS     (CIF_ISP_VSM_BASE + 0x00000008)
1197 #define CIF_ISP_VSM_H_SIZE     (CIF_ISP_VSM_BASE + 0x0000000C)
1198 #define CIF_ISP_VSM_V_SIZE     (CIF_ISP_VSM_BASE + 0x00000010)
1199 #define CIF_ISP_VSM_H_SEGMENTS (CIF_ISP_VSM_BASE + 0x00000014)
1200 #define CIF_ISP_VSM_V_SEGMENTS (CIF_ISP_VSM_BASE + 0x00000018)
1201 #define CIF_ISP_VSM_DELTA_H    (CIF_ISP_VSM_BASE + 0x0000001C)
1202 #define CIF_ISP_VSM_DELTA_V    (CIF_ISP_VSM_BASE + 0x00000020)
1203 #endif