xref: /linux/drivers/media/platform/rockchip/rkisp1/rkisp1-regs.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2 /*
3  * Rockchip ISP1 Driver - Registers header
4  *
5  * Copyright (C) 2017 Rockchip Electronics Co., Ltd.
6  */
7 
8 #ifndef _RKISP1_REGS_H
9 #define _RKISP1_REGS_H
10 
11 /* ISP_CTRL */
12 #define RKISP1_CIF_ISP_CTRL_ISP_ENABLE			BIT(0)
13 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_RAW_PICT		(0 << 1)
14 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU656		(1 << 1)
15 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU601		(2 << 1)
16 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_BAYER_ITU601	(3 << 1)
17 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_DATA_MODE		(4 << 1)
18 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_BAYER_ITU656	(5 << 1)
19 #define RKISP1_CIF_ISP_CTRL_ISP_MODE_RAW_PICT_ITU656	(6 << 1)
20 #define RKISP1_CIF_ISP_CTRL_ISP_INFORM_ENABLE		BIT(4)
21 #define RKISP1_CIF_ISP_CTRL_ISP_GAMMA_IN_ENA		BIT(6)
22 #define RKISP1_CIF_ISP_CTRL_ISP_AWB_ENA			BIT(7)
23 #define RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD_PERMANENT	BIT(8)
24 #define RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD			BIT(9)
25 #define RKISP1_CIF_ISP_CTRL_ISP_GEN_CFG_UPD		BIT(10)
26 #define RKISP1_CIF_ISP_CTRL_ISP_GAMMA_OUT_ENA		BIT(11)
27 #define RKISP1_CIF_ISP_CTRL_ISP_FLASH_MODE_ENA		BIT(12)
28 #define RKISP1_CIF_ISP_CTRL_ISP_CSM_Y_FULL_ENA		BIT(13)
29 #define RKISP1_CIF_ISP_CTRL_ISP_CSM_C_FULL_ENA		BIT(14)
30 
31 /* ISP_ACQ_PROP */
32 #define RKISP1_CIF_ISP_ACQ_PROP_POS_EDGE		BIT(0)
33 #define RKISP1_CIF_ISP_ACQ_PROP_HSYNC_LOW		BIT(1)
34 #define RKISP1_CIF_ISP_ACQ_PROP_VSYNC_LOW		BIT(2)
35 #define RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT_RGGB		(0 << 3)
36 #define RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT_GRBG		(1 << 3)
37 #define RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT_GBRG		(2 << 3)
38 #define RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT_BGGR		(3 << 3)
39 #define RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT(pat)		((pat) << 3)
40 #define RKISP1_CIF_ISP_ACQ_PROP_YCBYCR			(0 << 7)
41 #define RKISP1_CIF_ISP_ACQ_PROP_YCRYCB			(1 << 7)
42 #define RKISP1_CIF_ISP_ACQ_PROP_CBYCRY			(2 << 7)
43 #define RKISP1_CIF_ISP_ACQ_PROP_CRYCBY			(3 << 7)
44 #define RKISP1_CIF_ISP_ACQ_PROP_FIELD_SEL_ALL		(0 << 9)
45 #define RKISP1_CIF_ISP_ACQ_PROP_FIELD_SEL_EVEN		(1 << 9)
46 #define RKISP1_CIF_ISP_ACQ_PROP_FIELD_SEL_ODD		(2 << 9)
47 #define RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_12B		(0 << 12)
48 #define RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_10B_ZERO		(1 << 12)
49 #define RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_10B_MSB		(2 << 12)
50 #define RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_8B_ZERO		(3 << 12)
51 #define RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_8B_MSB		(4 << 12)
52 
53 /* VI_DPCL */
54 #define RKISP1_CIF_VI_DPCL_DMA_JPEG			(0 << 0)
55 #define RKISP1_CIF_VI_DPCL_MP_MUX_MRSZ_MI		(1 << 0)
56 #define RKISP1_CIF_VI_DPCL_MP_MUX_MRSZ_JPEG		(2 << 0)
57 #define RKISP1_CIF_VI_DPCL_CHAN_MODE_MP			(1 << 2)
58 #define RKISP1_CIF_VI_DPCL_CHAN_MODE_SP			(2 << 2)
59 #define RKISP1_CIF_VI_DPCL_CHAN_MODE_MPSP		(3 << 2)
60 #define RKISP1_CIF_VI_DPCL_DMA_SW_SPMUX			(0 << 4)
61 #define RKISP1_CIF_VI_DPCL_DMA_SW_SI			(1 << 4)
62 #define RKISP1_CIF_VI_DPCL_DMA_SW_IE			(2 << 4)
63 #define RKISP1_CIF_VI_DPCL_DMA_SW_JPEG			(3 << 4)
64 #define RKISP1_CIF_VI_DPCL_DMA_SW_ISP			(4 << 4)
65 #define RKISP1_CIF_VI_DPCL_IF_SEL_PARALLEL		(0 << 8)
66 #define RKISP1_CIF_VI_DPCL_IF_SEL_SMIA			(1 << 8)
67 #define RKISP1_CIF_VI_DPCL_IF_SEL_MIPI			(2 << 8)
68 #define RKISP1_CIF_VI_DPCL_DMA_IE_MUX_DMA		BIT(10)
69 #define RKISP1_CIF_VI_DPCL_DMA_SP_MUX_DMA		BIT(11)
70 
71 /* ISP_IMSC - ISP_MIS - ISP_RIS - ISP_ICR - ISP_ISR */
72 #define RKISP1_CIF_ISP_OFF				BIT(0)
73 #define RKISP1_CIF_ISP_FRAME				BIT(1)
74 #define RKISP1_CIF_ISP_DATA_LOSS			BIT(2)
75 #define RKISP1_CIF_ISP_PIC_SIZE_ERROR			BIT(3)
76 #define RKISP1_CIF_ISP_AWB_DONE				BIT(4)
77 #define RKISP1_CIF_ISP_FRAME_IN				BIT(5)
78 #define RKISP1_CIF_ISP_V_START				BIT(6)
79 #define RKISP1_CIF_ISP_H_START				BIT(7)
80 #define RKISP1_CIF_ISP_FLASH_ON				BIT(8)
81 #define RKISP1_CIF_ISP_FLASH_OFF			BIT(9)
82 #define RKISP1_CIF_ISP_SHUTTER_ON			BIT(10)
83 #define RKISP1_CIF_ISP_SHUTTER_OFF			BIT(11)
84 #define RKISP1_CIF_ISP_AFM_SUM_OF			BIT(12)
85 #define RKISP1_CIF_ISP_AFM_LUM_OF			BIT(13)
86 #define RKISP1_CIF_ISP_AFM_FIN				BIT(14)
87 #define RKISP1_CIF_ISP_HIST_MEASURE_RDY			BIT(15)
88 #define RKISP1_CIF_ISP_FLASH_CAP			BIT(17)
89 #define RKISP1_CIF_ISP_EXP_END				BIT(18)
90 #define RKISP1_CIF_ISP_VSM_END				BIT(19)
91 
92 /* ISP_ERR */
93 #define RKISP1_CIF_ISP_ERR_INFORM_SIZE			BIT(0)
94 #define RKISP1_CIF_ISP_ERR_IS_SIZE			BIT(1)
95 #define RKISP1_CIF_ISP_ERR_OUTFORM_SIZE			BIT(2)
96 
97 /* MI_CTRL */
98 #define RKISP1_CIF_MI_CTRL_MP_ENABLE			BIT(0)
99 #define RKISP1_CIF_MI_CTRL_SP_ENABLE			(2 << 0)
100 #define RKISP1_CIF_MI_CTRL_JPEG_ENABLE			(4 << 0)
101 #define RKISP1_CIF_MI_CTRL_RAW_ENABLE			(8 << 0)
102 #define RKISP1_CIF_MI_CTRL_HFLIP			BIT(4)
103 #define RKISP1_CIF_MI_CTRL_VFLIP			BIT(5)
104 #define RKISP1_CIF_MI_CTRL_ROT				BIT(6)
105 #define RKISP1_CIF_MI_BYTE_SWAP				BIT(7)
106 #define RKISP1_CIF_MI_SP_Y_FULL_YUV2RGB			BIT(8)
107 #define RKISP1_CIF_MI_SP_CBCR_FULL_YUV2RGB		BIT(9)
108 #define RKISP1_CIF_MI_SP_422NONCOSITEED			BIT(10)
109 #define RKISP1_CIF_MI_MP_PINGPONG_ENABLE		BIT(11)
110 #define RKISP1_CIF_MI_SP_PINGPONG_ENABLE		BIT(12)
111 #define RKISP1_CIF_MI_MP_AUTOUPDATE_ENABLE		BIT(13)
112 #define RKISP1_CIF_MI_SP_AUTOUPDATE_ENABLE		BIT(14)
113 #define RKISP1_CIF_MI_LAST_PIXEL_SIG_ENABLE		BIT(15)
114 #define RKISP1_CIF_MI_CTRL_BURST_LEN_LUM_16		(0 << 16)
115 #define RKISP1_CIF_MI_CTRL_BURST_LEN_LUM_32		(1 << 16)
116 #define RKISP1_CIF_MI_CTRL_BURST_LEN_LUM_64		(2 << 16)
117 #define RKISP1_CIF_MI_CTRL_BURST_LEN_CHROM_16		(0 << 18)
118 #define RKISP1_CIF_MI_CTRL_BURST_LEN_CHROM_32		(1 << 18)
119 #define RKISP1_CIF_MI_CTRL_BURST_LEN_CHROM_64		(2 << 18)
120 #define RKISP1_CIF_MI_CTRL_INIT_BASE_EN			BIT(20)
121 #define RKISP1_CIF_MI_CTRL_INIT_OFFSET_EN		BIT(21)
122 #define RKISP1_MI_CTRL_MP_WRITE_YUV_PLA_OR_RAW8		(0 << 22)
123 #define RKISP1_MI_CTRL_MP_WRITE_YUV_SPLA		(1 << 22)
124 #define RKISP1_MI_CTRL_MP_WRITE_YUVINT			(2 << 22)
125 #define RKISP1_MI_CTRL_MP_WRITE_RAW12			(2 << 22)
126 #define RKISP1_MI_CTRL_SP_WRITE_PLA			(0 << 24)
127 #define RKISP1_MI_CTRL_SP_WRITE_SPLA			(1 << 24)
128 #define RKISP1_MI_CTRL_SP_WRITE_INT			(2 << 24)
129 #define RKISP1_MI_CTRL_SP_INPUT_YUV400			(0 << 26)
130 #define RKISP1_MI_CTRL_SP_INPUT_YUV420			(1 << 26)
131 #define RKISP1_MI_CTRL_SP_INPUT_YUV422			(2 << 26)
132 #define RKISP1_MI_CTRL_SP_INPUT_YUV444			(3 << 26)
133 #define RKISP1_MI_CTRL_SP_OUTPUT_YUV400			(0 << 28)
134 #define RKISP1_MI_CTRL_SP_OUTPUT_YUV420			(1 << 28)
135 #define RKISP1_MI_CTRL_SP_OUTPUT_YUV422			(2 << 28)
136 #define RKISP1_MI_CTRL_SP_OUTPUT_YUV444			(3 << 28)
137 #define RKISP1_MI_CTRL_SP_OUTPUT_RGB565			(4 << 28)
138 #define RKISP1_MI_CTRL_SP_OUTPUT_RGB666			(5 << 28)
139 #define RKISP1_MI_CTRL_SP_OUTPUT_RGB888			(6 << 28)
140 
141 #define RKISP1_MI_CTRL_MP_FMT_MASK			GENMASK(23, 22)
142 #define RKISP1_MI_CTRL_SP_FMT_MASK			GENMASK(30, 24)
143 
144 /* MI_INIT */
145 #define RKISP1_CIF_MI_INIT_SKIP				BIT(2)
146 #define RKISP1_CIF_MI_INIT_SOFT_UPD			BIT(4)
147 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_YUV400		(0 << 5)
148 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_YUV420		(1 << 5)
149 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_YUV422		(2 << 5)
150 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_YUV444		(3 << 5)
151 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_RAW12		(4 << 5)
152 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_RAW8		(5 << 5)
153 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_JPEG		(6 << 5)
154 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_RAW10		(7 << 5)
155 #define RKISP1_CIF_MI_INIT_MP_OUTPUT_MASK		(15 << 5)
156 
157 /* MI_CTRL_SHD */
158 #define RKISP1_CIF_MI_CTRL_SHD_MP_IN_ENABLED		BIT(0)
159 #define RKISP1_CIF_MI_CTRL_SHD_SP_IN_ENABLED		BIT(1)
160 #define RKISP1_CIF_MI_CTRL_SHD_JPEG_IN_ENABLED		BIT(2)
161 #define RKISP1_CIF_MI_CTRL_SHD_RAW_IN_ENABLED		BIT(3)
162 #define RKISP1_CIF_MI_CTRL_SHD_MP_OUT_ENABLED		BIT(16)
163 #define RKISP1_CIF_MI_CTRL_SHD_SP_OUT_ENABLED		BIT(17)
164 #define RKISP1_CIF_MI_CTRL_SHD_JPEG_OUT_ENABLED		BIT(18)
165 #define RKISP1_CIF_MI_CTRL_SHD_RAW_OUT_ENABLED		BIT(19)
166 
167 /* RSZ_CTRL */
168 #define RKISP1_CIF_RSZ_CTRL_SCALE_HY_ENABLE		BIT(0)
169 #define RKISP1_CIF_RSZ_CTRL_SCALE_HC_ENABLE		BIT(1)
170 #define RKISP1_CIF_RSZ_CTRL_SCALE_VY_ENABLE		BIT(2)
171 #define RKISP1_CIF_RSZ_CTRL_SCALE_VC_ENABLE		BIT(3)
172 #define RKISP1_CIF_RSZ_CTRL_SCALE_HY_UP			BIT(4)
173 #define RKISP1_CIF_RSZ_CTRL_SCALE_HC_UP			BIT(5)
174 #define RKISP1_CIF_RSZ_CTRL_SCALE_VY_UP			BIT(6)
175 #define RKISP1_CIF_RSZ_CTRL_SCALE_VC_UP			BIT(7)
176 #define RKISP1_CIF_RSZ_CTRL_CFG_UPD			BIT(8)
177 #define RKISP1_CIF_RSZ_CTRL_CFG_UPD_AUTO		BIT(9)
178 #define RKISP1_CIF_RSZ_SCALER_FACTOR			BIT(16)
179 
180 /* MI_IMSC - MI_MIS - MI_RIS - MI_ICR - MI_ISR */
181 #define RKISP1_CIF_MI_FRAME(stream)			BIT((stream)->id)
182 #define RKISP1_CIF_MI_MBLK_LINE				BIT(2)
183 #define RKISP1_CIF_MI_FILL_MP_Y				BIT(3)
184 #define RKISP1_CIF_MI_WRAP_Y(stream)			BIT(4 + (stream)->id * 3)
185 #define RKISP1_CIF_MI_WRAP_CB(stream)			BIT(5 + (stream)->id * 3)
186 #define RKISP1_CIF_MI_WRAP_CR(stream)			BIT(6 + (stream)->id * 3)
187 #define RKISP1_CIF_MI_DMA_READY				BIT(11)
188 
189 /* MI_STATUS */
190 #define RKISP1_CIF_MI_STATUS_MP_Y_FIFO_FULL		BIT(0)
191 #define RKISP1_CIF_MI_STATUS_SP_Y_FIFO_FULL		BIT(4)
192 
193 /* MI_DMA_CTRL */
194 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_LUM_16		(0 << 0)
195 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_LUM_32		(1 << 0)
196 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_LUM_64		(2 << 0)
197 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_CHROM_16	(0 << 2)
198 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_CHROM_32	(1 << 2)
199 #define RKISP1_CIF_MI_DMA_CTRL_BURST_LEN_CHROM_64	(2 << 2)
200 #define RKISP1_CIF_MI_DMA_CTRL_READ_FMT_PLANAR		(0 << 4)
201 #define RKISP1_CIF_MI_DMA_CTRL_READ_FMT_SPLANAR		(1 << 4)
202 #define RKISP1_CIF_MI_DMA_CTRL_READ_FMT_PACKED		(2 << 4)
203 #define RKISP1_CIF_MI_DMA_CTRL_FMT_YUV400		(0 << 6)
204 #define RKISP1_CIF_MI_DMA_CTRL_FMT_YUV420		(1 << 6)
205 #define RKISP1_CIF_MI_DMA_CTRL_FMT_YUV422		(2 << 6)
206 #define RKISP1_CIF_MI_DMA_CTRL_FMT_YUV444		(3 << 6)
207 #define RKISP1_CIF_MI_DMA_CTRL_BYTE_SWAP		BIT(8)
208 #define RKISP1_CIF_MI_DMA_CTRL_CONTINUOUS_ENA		BIT(9)
209 #define RKISP1_CIF_MI_DMA_CTRL_RGB_BAYER_NO		(0 << 12)
210 #define RKISP1_CIF_MI_DMA_CTRL_RGB_BAYER_8BIT		(1 << 12)
211 #define RKISP1_CIF_MI_DMA_CTRL_RGB_BAYER_16BIT		(2 << 12)
212 /* MI_DMA_START */
213 #define RKISP1_CIF_MI_DMA_START_ENABLE			BIT(0)
214 /* MI_XTD_FORMAT_CTRL  */
215 #define RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP	BIT(0)
216 #define RKISP1_CIF_MI_XTD_FMT_CTRL_SP_CB_CR_SWAP	BIT(1)
217 #define RKISP1_CIF_MI_XTD_FMT_CTRL_DMA_CB_CR_SWAP	BIT(2)
218 
219 /* MI_OUTPUT_ALIGN_FORMAT */
220 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_MP_LSB_ALIGNMENT			BIT(0)
221 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_MP_BYTE_SWAP_BYTES		BIT(1)
222 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_MP_BYTE_SWAP_WORDS		BIT(2)
223 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_MP_BYTE_SWAP_DWORDS		BIT(3)
224 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_SP_BYTE_SWAP_BYTES		BIT(4)
225 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_SP_BYTE_SWAP_WORDS		BIT(5)
226 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_SP_BYTE_SWAP_DWORDS		BIT(6)
227 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_DMA_BYTE_SWAP_BYTES		BIT(7)
228 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_DMA_BYTE_SWAP_WORDS		BIT(8)
229 #define RKISP1_CIF_OUTPUT_ALIGN_FORMAT_DMA_BYTE_SWAP_DWORDS		BIT(9)
230 
231 /* MI_MP_OUTPUT_FIFO_SIZE */
232 #define RKISP1_CIF_MI_MP_OUTPUT_FIFO_SIZE_OUTPUT_FIFO_DEPTH_FULL	(0 << 0)
233 #define RKISP1_CIF_MI_MP_OUTPUT_FIFO_SIZE_OUTPUT_FIFO_DEPTH_HALF	(1 << 0)
234 #define RKISP1_CIF_MI_MP_OUTPUT_FIFO_SIZE_OUTPUT_FIFO_DEPTH_QUARTER	(2 << 0)
235 #define RKISP1_CIF_MI_MP_OUTPUT_FIFO_SIZE_OUTPUT_FIFO_DEPTH_EIGHT	(3 << 0)
236 
237 /* VI_CCL */
238 #define RKISP1_CIF_CCL_CIF_CLK_DIS			BIT(2)
239 /* VI_ISP_CLK_CTRL */
240 #define RKISP1_CIF_CLK_CTRL_ISP_RAW			BIT(0)
241 #define RKISP1_CIF_CLK_CTRL_ISP_RGB			BIT(1)
242 #define RKISP1_CIF_CLK_CTRL_ISP_YUV			BIT(2)
243 #define RKISP1_CIF_CLK_CTRL_ISP_3A			BIT(3)
244 #define RKISP1_CIF_CLK_CTRL_MIPI_RAW			BIT(4)
245 #define RKISP1_CIF_CLK_CTRL_ISP_IE			BIT(5)
246 #define RKISP1_CIF_CLK_CTRL_RSZ_RAM			BIT(6)
247 #define RKISP1_CIF_CLK_CTRL_JPEG_RAM			BIT(7)
248 #define RKISP1_CIF_CLK_CTRL_ACLK_ISP			BIT(8)
249 #define RKISP1_CIF_CLK_CTRL_MI_IDC			BIT(9)
250 #define RKISP1_CIF_CLK_CTRL_MI_MP			BIT(10)
251 #define RKISP1_CIF_CLK_CTRL_MI_JPEG			BIT(11)
252 #define RKISP1_CIF_CLK_CTRL_MI_DP			BIT(12)
253 #define RKISP1_CIF_CLK_CTRL_MI_Y12			BIT(13)
254 #define RKISP1_CIF_CLK_CTRL_MI_SP			BIT(14)
255 #define RKISP1_CIF_CLK_CTRL_MI_RAW0			BIT(15)
256 #define RKISP1_CIF_CLK_CTRL_MI_RAW1			BIT(16)
257 #define RKISP1_CIF_CLK_CTRL_MI_READ			BIT(17)
258 #define RKISP1_CIF_CLK_CTRL_MI_RAWRD			BIT(18)
259 #define RKISP1_CIF_CLK_CTRL_CP				BIT(19)
260 #define RKISP1_CIF_CLK_CTRL_IE				BIT(20)
261 #define RKISP1_CIF_CLK_CTRL_SI				BIT(21)
262 #define RKISP1_CIF_CLK_CTRL_RSZM			BIT(22)
263 #define RKISP1_CIF_CLK_CTRL_DPMUX			BIT(23)
264 #define RKISP1_CIF_CLK_CTRL_JPEG			BIT(24)
265 #define RKISP1_CIF_CLK_CTRL_RSZS			BIT(25)
266 #define RKISP1_CIF_CLK_CTRL_MIPI			BIT(26)
267 #define RKISP1_CIF_CLK_CTRL_MARVINMI			BIT(27)
268 /* VI_ICCL */
269 #define RKISP1_CIF_VI_ICCL_ISP_CLK			BIT(0)
270 #define RKISP1_CIF_VI_ICCL_CP_CLK			BIT(1)
271 #define RKISP1_CIF_VI_ICCL_RES_2			BIT(2)
272 #define RKISP1_CIF_VI_ICCL_MRSZ_CLK			BIT(3)
273 #define RKISP1_CIF_VI_ICCL_SRSZ_CLK			BIT(4)
274 #define RKISP1_CIF_VI_ICCL_JPEG_CLK			BIT(5)
275 #define RKISP1_CIF_VI_ICCL_MI_CLK			BIT(6)
276 #define RKISP1_CIF_VI_ICCL_RES_7			BIT(7)
277 #define RKISP1_CIF_VI_ICCL_IE_CLK			BIT(8)
278 #define RKISP1_CIF_VI_ICCL_SIMP_CLK			BIT(9)
279 #define RKISP1_CIF_VI_ICCL_SMIA_CLK			BIT(10)
280 #define RKISP1_CIF_VI_ICCL_MIPI_CLK			BIT(11)
281 #define RKISP1_CIF_VI_ICCL_DCROP_CLK			BIT(12)
282 /* VI_IRCL */
283 #define RKISP1_CIF_VI_IRCL_ISP_SW_RST			BIT(0)
284 #define RKISP1_CIF_VI_IRCL_CP_SW_RST			BIT(1)
285 #define RKISP1_CIF_VI_IRCL_YCS_SW_RST			BIT(2)
286 #define RKISP1_CIF_VI_IRCL_MRSZ_SW_RST			BIT(3)
287 #define RKISP1_CIF_VI_IRCL_SRSZ_SW_RST			BIT(4)
288 #define RKISP1_CIF_VI_IRCL_JPEG_SW_RST			BIT(5)
289 #define RKISP1_CIF_VI_IRCL_MI_SW_RST			BIT(6)
290 #define RKISP1_CIF_VI_IRCL_CIF_SW_RST			BIT(7)
291 #define RKISP1_CIF_VI_IRCL_IE_SW_RST			BIT(8)
292 #define RKISP1_CIF_VI_IRCL_SI_SW_RST			BIT(9)
293 #define RKISP1_CIF_VI_IRCL_MIPI_SW_RST			BIT(11)
294 
295 /* C_PROC_CTR */
296 #define RKISP1_CIF_C_PROC_CTR_ENABLE			BIT(0)
297 #define RKISP1_CIF_C_PROC_YOUT_FULL			BIT(1)
298 #define RKISP1_CIF_C_PROC_YIN_FULL			BIT(2)
299 #define RKISP1_CIF_C_PROC_COUT_FULL			BIT(3)
300 #define RKISP1_CIF_C_PROC_CTRL_RESERVED			0xfffffffe
301 #define RKISP1_CIF_C_PROC_CONTRAST_RESERVED		0xffffff00
302 #define RKISP1_CIF_C_PROC_BRIGHTNESS_RESERVED		0xffffff00
303 #define RKISP1_CIF_C_PROC_HUE_RESERVED			0xffffff00
304 #define RKISP1_CIF_C_PROC_SATURATION_RESERVED		0xffffff00
305 #define RKISP1_CIF_C_PROC_MACC_RESERVED			0xe000e000
306 #define RKISP1_CIF_C_PROC_TONE_RESERVED			0xf000
307 /* DUAL_CROP_CTRL */
308 #define RKISP1_CIF_DUAL_CROP_MP_MODE_BYPASS		(0 << 0)
309 #define RKISP1_CIF_DUAL_CROP_MP_MODE_YUV		(1 << 0)
310 #define RKISP1_CIF_DUAL_CROP_MP_MODE_RAW		(2 << 0)
311 #define RKISP1_CIF_DUAL_CROP_SP_MODE_BYPASS		(0 << 2)
312 #define RKISP1_CIF_DUAL_CROP_SP_MODE_YUV		(1 << 2)
313 #define RKISP1_CIF_DUAL_CROP_SP_MODE_RAW		(2 << 2)
314 #define RKISP1_CIF_DUAL_CROP_CFG_UPD_PERMANENT		BIT(4)
315 #define RKISP1_CIF_DUAL_CROP_CFG_UPD			BIT(5)
316 #define RKISP1_CIF_DUAL_CROP_GEN_CFG_UPD		BIT(6)
317 
318 /* IMG_EFF_CTRL */
319 #define RKISP1_CIF_IMG_EFF_CTRL_ENABLE			BIT(0)
320 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_BLACKWHITE		(0 << 1)
321 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_NEGATIVE		(1 << 1)
322 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SEPIA		(2 << 1)
323 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_COLOR_SEL		(3 << 1)
324 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_EMBOSS		(4 << 1)
325 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SKETCH		(5 << 1)
326 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SHARPEN		(6 << 1)
327 #define RKISP1_CIF_IMG_EFF_CTRL_CFG_UPD			BIT(4)
328 #define RKISP1_CIF_IMG_EFF_CTRL_YCBCR_FULL		BIT(5)
329 
330 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_BLACKWHITE_SHIFT	0
331 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_NEGATIVE_SHIFT	1
332 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SEPIA_SHIFT	2
333 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_COLOR_SEL_SHIFT	3
334 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_EMBOSS_SHIFT	4
335 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SKETCH_SHIFT	5
336 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_SHARPEN_SHIFT	6
337 #define RKISP1_CIF_IMG_EFF_CTRL_MODE_MASK		0xe
338 
339 /* IMG_EFF_COLOR_SEL */
340 #define RKISP1_CIF_IMG_EFF_COLOR_RGB			0
341 #define RKISP1_CIF_IMG_EFF_COLOR_B			(1 << 0)
342 #define RKISP1_CIF_IMG_EFF_COLOR_G			(2 << 0)
343 #define RKISP1_CIF_IMG_EFF_COLOR_GB			(3 << 0)
344 #define RKISP1_CIF_IMG_EFF_COLOR_R			(4 << 0)
345 #define RKISP1_CIF_IMG_EFF_COLOR_RB			(5 << 0)
346 #define RKISP1_CIF_IMG_EFF_COLOR_RG			(6 << 0)
347 #define RKISP1_CIF_IMG_EFF_COLOR_RGB2			(7 << 0)
348 
349 /* MIPI_CTRL */
350 #define RKISP1_CIF_MIPI_CTRL_OUTPUT_ENA			BIT(0)
351 #define RKISP1_CIF_MIPI_CTRL_SHUTDOWNLANES(a)		(((a) & 0xf) << 8)
352 #define RKISP1_CIF_MIPI_CTRL_NUM_LANES(a)		(((a) & 0x3) << 12)
353 #define RKISP1_CIF_MIPI_CTRL_ERR_SOT_HS_SKIP		BIT(16)
354 #define RKISP1_CIF_MIPI_CTRL_ERR_SOT_SYNC_HS_SKIP	BIT(17)
355 #define RKISP1_CIF_MIPI_CTRL_CLOCKLANE_ENA		BIT(18)
356 
357 /* MIPI_DATA_SEL */
358 #define RKISP1_CIF_MIPI_DATA_SEL_VC(a)			(((a) & 0x3) << 6)
359 #define RKISP1_CIF_MIPI_DATA_SEL_DT(a)			(((a) & 0x3f) << 0)
360 
361 /* MIPI_IMSC, MIPI_RIS, MIPI_MIS, MIPI_ICR, MIPI_ISR */
362 #define RKISP1_CIF_MIPI_SYNC_FIFO_OVFLW(a)		(((a) & 0xf) << 0)
363 #define RKISP1_CIF_MIPI_ERR_SOT(a)			(((a) & 0xf) << 4)
364 #define RKISP1_CIF_MIPI_ERR_SOT_SYNC(a)			(((a) & 0xf) << 8)
365 #define RKISP1_CIF_MIPI_ERR_EOT_SYNC(a)			(((a) & 0xf) << 12)
366 #define RKISP1_CIF_MIPI_ERR_CTRL(a)			(((a) & 0xf) << 16)
367 #define RKISP1_CIF_MIPI_ERR_PROTOCOL			BIT(20)
368 #define RKISP1_CIF_MIPI_ERR_ECC1			BIT(21)
369 #define RKISP1_CIF_MIPI_ERR_ECC2			BIT(22)
370 #define RKISP1_CIF_MIPI_ERR_CS				BIT(23)
371 #define RKISP1_CIF_MIPI_FRAME_END			BIT(24)
372 #define RKISP1_CIF_MIPI_ADD_DATA_OVFLW			BIT(25)
373 #define RKISP1_CIF_MIPI_ADD_DATA_WATER_MARK		BIT(26)
374 
375 #define RKISP1_CIF_MIPI_ERR_CSI  (RKISP1_CIF_MIPI_ERR_PROTOCOL | \
376 	RKISP1_CIF_MIPI_ERR_ECC1 | \
377 	RKISP1_CIF_MIPI_ERR_ECC2 | \
378 	RKISP1_CIF_MIPI_ERR_CS)
379 
380 #define RKISP1_CIF_MIPI_ERR_DPHY  (RKISP1_CIF_MIPI_ERR_SOT(3) | \
381 	RKISP1_CIF_MIPI_ERR_SOT_SYNC(3) | \
382 	RKISP1_CIF_MIPI_ERR_EOT_SYNC(3) | \
383 	RKISP1_CIF_MIPI_ERR_CTRL(3))
384 
385 /* SUPER_IMPOSE */
386 #define RKISP1_CIF_SUPER_IMP_CTRL_NORMAL_MODE		BIT(0)
387 #define RKISP1_CIF_SUPER_IMP_CTRL_REF_IMG_MEM		BIT(1)
388 #define RKISP1_CIF_SUPER_IMP_CTRL_TRANSP_DIS		BIT(2)
389 
390 /* ISP HISTOGRAM CALCULATION : ISP_HIST_PROP */
391 #define RKISP1_CIF_ISP_HIST_PROP_MODE_DIS_V10		(0 << 0)
392 #define RKISP1_CIF_ISP_HIST_PROP_MODE_RGB_V10		(1 << 0)
393 #define RKISP1_CIF_ISP_HIST_PROP_MODE_RED_V10		(2 << 0)
394 #define RKISP1_CIF_ISP_HIST_PROP_MODE_GREEN_V10		(3 << 0)
395 #define RKISP1_CIF_ISP_HIST_PROP_MODE_BLUE_V10		(4 << 0)
396 #define RKISP1_CIF_ISP_HIST_PROP_MODE_LUM_V10		(5 << 0)
397 #define RKISP1_CIF_ISP_HIST_PROP_MODE_MASK_V10		0x7
398 #define RKISP1_CIF_ISP_HIST_PREDIV_SET_V10(x)		(((x) & 0x7f) << 3)
399 #define RKISP1_CIF_ISP_HIST_WEIGHT_SET_V10(v0, v1, v2, v3)	\
400 				     (((v0) & 0x1f) | (((v1) & 0x1f) << 8)  |\
401 				     (((v2) & 0x1f) << 16) | \
402 				     (((v3) & 0x1f) << 24))
403 
404 #define RKISP1_CIF_ISP_HIST_WINDOW_OFFSET_RESERVED_V10	0xfffff000
405 #define RKISP1_CIF_ISP_HIST_WINDOW_SIZE_RESERVED_V10	0xfffff800
406 #define RKISP1_CIF_ISP_HIST_WEIGHT_RESERVED_V10		0xe0e0e0e0
407 #define RKISP1_CIF_ISP_MAX_HIST_PREDIVIDER_V10		0x0000007f
408 #define RKISP1_CIF_ISP_HIST_ROW_NUM_V10			5
409 #define RKISP1_CIF_ISP_HIST_COLUMN_NUM_V10		5
410 #define RKISP1_CIF_ISP_HIST_GET_BIN_V10(x)		((x) & 0x000fffff)
411 
412 /* ISP HISTOGRAM CALCULATION : CIF_ISP_HIST */
413 #define RKISP1_CIF_ISP_HIST_CTRL_EN_SET_V12(x)		(((x) & 0x01) << 0)
414 #define RKISP1_CIF_ISP_HIST_CTRL_EN_MASK_V12		RKISP1_CIF_ISP_HIST_CTRL_EN_SET_V12(0x01)
415 #define RKISP1_CIF_ISP_HIST_CTRL_STEPSIZE_SET_V12(x)	(((x) & 0x7f) << 1)
416 #define RKISP1_CIF_ISP_HIST_CTRL_MODE_SET_V12(x)	(((x) & 0x07) << 8)
417 #define RKISP1_CIF_ISP_HIST_CTRL_MODE_MASK_V12		RKISP1_CIF_ISP_HIST_CTRL_MODE_SET_V12(0x07)
418 #define RKISP1_CIF_ISP_HIST_CTRL_AUTOSTOP_SET_V12(x)	(((x) & 0x01) << 11)
419 #define RKISP1_CIF_ISP_HIST_CTRL_WATERLINE_SET_V12(x)	(((x) & 0xfff) << 12)
420 #define RKISP1_CIF_ISP_HIST_CTRL_DATASEL_SET_V12(x)	(((x) & 0x07) << 24)
421 #define RKISP1_CIF_ISP_HIST_CTRL_INTRSEL_SET_V12(x)	(((x) & 0x01) << 27)
422 #define RKISP1_CIF_ISP_HIST_CTRL_WNDNUM_SET_V12(x)	(((x) & 0x03) << 28)
423 #define RKISP1_CIF_ISP_HIST_CTRL_DBGEN_SET_V12(x)	(((x) & 0x01) << 30)
424 #define RKISP1_CIF_ISP_HIST_ROW_NUM_V12		15
425 #define RKISP1_CIF_ISP_HIST_COLUMN_NUM_V12		15
426 #define RKISP1_CIF_ISP_HIST_WEIGHT_REG_SIZE_V12	\
427 				(RKISP1_CIF_ISP_HIST_ROW_NUM_V12 * RKISP1_CIF_ISP_HIST_COLUMN_NUM_V12)
428 
429 #define RKISP1_CIF_ISP_HIST_WEIGHT_SET_V12(v0, v1, v2, v3)	\
430 				(((v0) & 0x3f) | (((v1) & 0x3f) << 8) |\
431 				(((v2) & 0x3f) << 16) |\
432 				(((v3) & 0x3f) << 24))
433 
434 #define RKISP1_CIF_ISP_HIST_OFFS_SET_V12(v0, v1)	\
435 				(((v0) & 0x1fff) | (((v1) & 0x1fff) << 16))
436 #define RKISP1_CIF_ISP_HIST_SIZE_SET_V12(v0, v1)	\
437 				(((v0) & 0x7ff) | (((v1) & 0x7ff) << 16))
438 
439 #define RKISP1_CIF_ISP_HIST_GET_BIN0_V12(x)	\
440 				((x) & 0xffff)
441 #define RKISP1_CIF_ISP_HIST_GET_BIN1_V12(x)	\
442 				(((x) >> 16) & 0xffff)
443 
444 /* AUTO FOCUS MEASUREMENT:  ISP_AFM_CTRL */
445 #define RKISP1_ISP_AFM_CTRL_ENABLE			BIT(0)
446 
447 /* SHUTTER CONTROL */
448 #define RKISP1_CIF_ISP_SH_CTRL_SH_ENA			BIT(0)
449 #define RKISP1_CIF_ISP_SH_CTRL_REP_EN			BIT(1)
450 #define RKISP1_CIF_ISP_SH_CTRL_SRC_SH_TRIG		BIT(2)
451 #define RKISP1_CIF_ISP_SH_CTRL_EDGE_POS			BIT(3)
452 #define RKISP1_CIF_ISP_SH_CTRL_POL_LOW			BIT(4)
453 
454 /* FLASH MODULE */
455 /* ISP_FLASH_CMD */
456 #define RKISP1_CIFFLASH_CMD_PRELIGHT_ON			BIT(0)
457 #define RKISP1_CIFFLASH_CMD_FLASH_ON			BIT(1)
458 #define RKISP1_CIFFLASH_CMD_PRE_FLASH_ON		BIT(2)
459 /* ISP_FLASH_CONFIG */
460 #define RKISP1_CIFFLASH_CONFIG_PRELIGHT_END		BIT(0)
461 #define RKISP1_CIFFLASH_CONFIG_VSYNC_POS		BIT(1)
462 #define RKISP1_CIFFLASH_CONFIG_PRELIGHT_LOW		BIT(2)
463 #define RKISP1_CIFFLASH_CONFIG_SRC_FL_TRIG		BIT(3)
464 #define RKISP1_CIFFLASH_CONFIG_DELAY(a)			(((a) & 0xf) << 4)
465 
466 /* Demosaic:  ISP_DEMOSAIC */
467 #define RKISP1_CIF_ISP_DEMOSAIC_BYPASS			BIT(10)
468 #define RKISP1_CIF_ISP_DEMOSAIC_TH(x)			((x) & 0xff)
469 
470 /* ISP_FLAGS_SHD */
471 #define RKISP1_CIF_ISP_FLAGS_SHD_ISP_ENABLE_SHD		BIT(0)
472 #define RKISP1_CIF_ISP_FLAGS_SHD_ISP_ENABLE_INFORM_SHD	BIT(1)
473 #define RKISP1_CIF_ISP_FLAGS_SHD_INFORM_FIELD		BIT(2)
474 #define RKISP1_CIF_ISP_FLAGS_SHD_S_DATA_MASK		GENMASK(27, 16)
475 #define RKISP1_CIF_ISP_FLAGS_SHD_S_DATA_SHIFT		16
476 #define RKISP1_CIF_ISP_FLAGS_SHD_S_VSYNC		BIT(30)
477 #define RKISP1_CIF_ISP_FLAGS_SHD_S_HSYNC		BIT(31)
478 
479 /* AWB */
480 /* ISP_AWB_PROP */
481 #define RKISP1_CIF_ISP_AWB_YMAX_CMP_EN			BIT(2)
482 #define RKISP1_CIF_ISP_AWB_YMAX_READ(x)			(((x) >> 2) & 1)
483 #define RKISP1_CIF_ISP_AWB_MODE_RGB_EN			((1 << 31) | (0x2 << 0))
484 #define RKISP1_CIF_ISP_AWB_MODE_YCBCR_EN		((0 << 31) | (0x2 << 0))
485 #define RKISP1_CIF_ISP_AWB_MODE_MASK_NONE		0xfffffffc
486 #define RKISP1_CIF_ISP_AWB_MODE_READ(x)			((x) & 3)
487 #define RKISP1_CIF_ISP_AWB_SET_FRAMES_V12(x)		(((x) & 0x07) << 28)
488 #define RKISP1_CIF_ISP_AWB_SET_FRAMES_MASK_V12		RKISP1_CIF_ISP_AWB_SET_FRAMES_V12(0x07)
489 /* ISP_AWB_GAIN_RB, ISP_AWB_GAIN_G  */
490 #define RKISP1_CIF_ISP_AWB_GAIN_R_SET(x)		(((x) & 0x3ff) << 16)
491 #define RKISP1_CIF_ISP_AWB_GAIN_R_READ(x)		(((x) >> 16) & 0x3ff)
492 #define RKISP1_CIF_ISP_AWB_GAIN_B_SET(x)		((x) & 0x3fff)
493 #define RKISP1_CIF_ISP_AWB_GAIN_B_READ(x)		((x) & 0x3fff)
494 /* ISP_AWB_REF */
495 #define RKISP1_CIF_ISP_AWB_REF_CR_SET(x)		(((x) & 0xff) << 8)
496 #define RKISP1_CIF_ISP_AWB_REF_CR_READ(x)		(((x) >> 8) & 0xff)
497 #define RKISP1_CIF_ISP_AWB_REF_CB_READ(x)		((x) & 0xff)
498 /* ISP_AWB_THRESH */
499 #define RKISP1_CIF_ISP_AWB_MAX_CS_SET(x)		(((x) & 0xff) << 8)
500 #define RKISP1_CIF_ISP_AWB_MAX_CS_READ(x)		(((x) >> 8) & 0xff)
501 #define RKISP1_CIF_ISP_AWB_MIN_C_READ(x)		((x) & 0xff)
502 #define RKISP1_CIF_ISP_AWB_MIN_Y_SET(x)			(((x) & 0xff) << 16)
503 #define RKISP1_CIF_ISP_AWB_MIN_Y_READ(x)		(((x) >> 16) & 0xff)
504 #define RKISP1_CIF_ISP_AWB_MAX_Y_SET(x)			(((x) & 0xff) << 24)
505 #define RKISP1_CIF_ISP_AWB_MAX_Y_READ(x)			(((x) >> 24) & 0xff)
506 /* ISP_AWB_MEAN */
507 #define RKISP1_CIF_ISP_AWB_GET_MEAN_CR_R(x)		((x) & 0xff)
508 #define RKISP1_CIF_ISP_AWB_GET_MEAN_CB_B(x)		(((x) >> 8) & 0xff)
509 #define RKISP1_CIF_ISP_AWB_GET_MEAN_Y_G(x)		(((x) >> 16) & 0xff)
510 /* ISP_AWB_WHITE_CNT */
511 #define RKISP1_CIF_ISP_AWB_GET_PIXEL_CNT(x)		((x) & 0x3ffffff)
512 
513 #define RKISP1_CIF_ISP_AWB_GAINS_MAX_VAL		0x000003ff
514 #define RKISP1_CIF_ISP_AWB_WINDOW_OFFSET_MAX		0x00000fff
515 #define RKISP1_CIF_ISP_AWB_WINDOW_MAX_SIZE		0x00001fff
516 #define RKISP1_CIF_ISP_AWB_CBCR_MAX_REF			0x000000ff
517 #define RKISP1_CIF_ISP_AWB_THRES_MAX_YC			0x000000ff
518 
519 /* AE */
520 /* ISP_EXP_CTRL */
521 #define RKISP1_CIF_ISP_EXP_ENA				BIT(0)
522 #define RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP		BIT(1)
523 #define RKISP1_CIF_ISP_EXP_CTRL_WNDNUM_SET_V12(x)	(((x) & 0x03) << 2)
524 /*
525  *'1' luminance calculation according to  Y=(R+G+B) x 0.332 (85/256)
526  *'0' luminance calculation according to Y=16+0.25R+0.5G+0.1094B
527  */
528 #define RKISP1_CIF_ISP_EXP_CTRL_MEASMODE_1		BIT(31)
529 
530 /* ISP_EXP_H_SIZE */
531 #define RKISP1_CIF_ISP_EXP_H_SIZE_SET_V10(x)		((x) & 0x7ff)
532 #define RKISP1_CIF_ISP_EXP_HEIGHT_MASK_V10			0x000007ff
533 #define RKISP1_CIF_ISP_EXP_H_SIZE_SET_V12(x)		((x) & 0x7ff)
534 #define RKISP1_CIF_ISP_EXP_HEIGHT_MASK_V12		0x000007ff
535 /* ISP_EXP_V_SIZE : vertical size must be a multiple of 2). */
536 #define RKISP1_CIF_ISP_EXP_V_SIZE_SET_V10(x)		((x) & 0x7fe)
537 #define RKISP1_CIF_ISP_EXP_V_SIZE_SET_V12(x)		(((x) & 0x7fe) << 16)
538 
539 /* ISP_EXP_H_OFFSET */
540 #define RKISP1_CIF_ISP_EXP_H_OFFSET_SET_V10(x)		((x) & 0x1fff)
541 #define RKISP1_CIF_ISP_EXP_MAX_HOFFS_V10		2424
542 #define RKISP1_CIF_ISP_EXP_H_OFFSET_SET_V12(x)		((x) & 0x1fff)
543 #define RKISP1_CIF_ISP_EXP_MAX_HOFFS_V12		0x1fff
544 /* ISP_EXP_V_OFFSET */
545 #define RKISP1_CIF_ISP_EXP_V_OFFSET_SET_V10(x)		((x) & 0x1fff)
546 #define RKISP1_CIF_ISP_EXP_MAX_VOFFS_V10		1806
547 #define RKISP1_CIF_ISP_EXP_V_OFFSET_SET_V12(x)		(((x) & 0x1fff) << 16)
548 #define RKISP1_CIF_ISP_EXP_MAX_VOFFS_V12		0x1fff
549 
550 #define RKISP1_CIF_ISP_EXP_ROW_NUM_V10			5
551 #define RKISP1_CIF_ISP_EXP_COLUMN_NUM_V10			5
552 #define RKISP1_CIF_ISP_EXP_NUM_LUMA_REGS_V10 \
553 	(RKISP1_CIF_ISP_EXP_ROW_NUM_V10 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V10)
554 #define RKISP1_CIF_ISP_EXP_BLOCK_MAX_HSIZE_V10		516
555 #define RKISP1_CIF_ISP_EXP_BLOCK_MIN_HSIZE_V10		35
556 #define RKISP1_CIF_ISP_EXP_BLOCK_MAX_VSIZE_V10		390
557 #define RKISP1_CIF_ISP_EXP_BLOCK_MIN_VSIZE_V10		28
558 #define RKISP1_CIF_ISP_EXP_MAX_HSIZE_V10	\
559 	(RKISP1_CIF_ISP_EXP_BLOCK_MAX_HSIZE_V10 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V10 + 1)
560 #define RKISP1_CIF_ISP_EXP_MIN_HSIZE_V10	\
561 	(RKISP1_CIF_ISP_EXP_BLOCK_MIN_HSIZE_V10 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V10 + 1)
562 #define RKISP1_CIF_ISP_EXP_MAX_VSIZE_V10	\
563 	(RKISP1_CIF_ISP_EXP_BLOCK_MAX_VSIZE_V10 * RKISP1_CIF_ISP_EXP_ROW_NUM_V10 + 1)
564 #define RKISP1_CIF_ISP_EXP_MIN_VSIZE_V10	\
565 	(RKISP1_CIF_ISP_EXP_BLOCK_MIN_VSIZE_V10 * RKISP1_CIF_ISP_EXP_ROW_NUM_V10 + 1)
566 
567 #define RKISP1_CIF_ISP_EXP_ROW_NUM_V12			15
568 #define RKISP1_CIF_ISP_EXP_COLUMN_NUM_V12		15
569 #define RKISP1_CIF_ISP_EXP_NUM_LUMA_REGS_V12 \
570 	(RKISP1_CIF_ISP_EXP_ROW_NUM_V12 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V12)
571 
572 #define RKISP1_CIF_ISP_EXP_BLOCK_MAX_HSIZE_V12		0x7ff
573 #define RKISP1_CIF_ISP_EXP_BLOCK_MIN_HSIZE_V12		0xe
574 #define RKISP1_CIF_ISP_EXP_BLOCK_MAX_VSIZE_V12		0x7fe
575 #define RKISP1_CIF_ISP_EXP_BLOCK_MIN_VSIZE_V12		0xe
576 #define RKISP1_CIF_ISP_EXP_MAX_HSIZE_V12	\
577 	(RKISP1_CIF_ISP_EXP_BLOCK_MAX_HSIZE_V12 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V12 + 1)
578 #define RKISP1_CIF_ISP_EXP_MIN_HSIZE_V12	\
579 	(RKISP1_CIF_ISP_EXP_BLOCK_MIN_HSIZE_V12 * RKISP1_CIF_ISP_EXP_COLUMN_NUM_V12 + 1)
580 #define RKISP1_CIF_ISP_EXP_MAX_VSIZE_V12	\
581 	(RKISP1_CIF_ISP_EXP_BLOCK_MAX_VSIZE_V12 * RKISP1_CIF_ISP_EXP_ROW_NUM_V12 + 1)
582 #define RKISP1_CIF_ISP_EXP_MIN_VSIZE_V12	\
583 	(RKISP1_CIF_ISP_EXP_BLOCK_MIN_VSIZE_V12 * RKISP1_CIF_ISP_EXP_ROW_NUM_V12 + 1)
584 
585 #define RKISP1_CIF_ISP_EXP_GET_MEAN_xy0_V12(x)		((x) & 0xff)
586 #define RKISP1_CIF_ISP_EXP_GET_MEAN_xy1_V12(x)		(((x) >> 8) & 0xff)
587 #define RKISP1_CIF_ISP_EXP_GET_MEAN_xy2_V12(x)		(((x) >> 16) & 0xff)
588 #define RKISP1_CIF_ISP_EXP_GET_MEAN_xy3_V12(x)		(((x) >> 24) & 0xff)
589 
590 /* LSC: ISP_LSC_CTRL */
591 #define RKISP1_CIF_ISP_LSC_CTRL_ENA			BIT(0)
592 #define RKISP1_CIF_ISP_LSC_SECT_SIZE_RESERVED		0xfc00fc00
593 #define RKISP1_CIF_ISP_LSC_GRAD_RESERVED_V10		0xf000f000
594 #define RKISP1_CIF_ISP_LSC_SAMPLE_RESERVED_V10		0xf000f000
595 #define RKISP1_CIF_ISP_LSC_GRAD_RESERVED_V12		0xe000e000
596 #define RKISP1_CIF_ISP_LSC_SAMPLE_RESERVED_V12		0xe000e000
597 #define RKISP1_CIF_ISP_LSC_TABLE_DATA_V10(v0, v1)     \
598 	(((v0) & 0xfff) | (((v1) & 0xfff) << 12))
599 #define RKISP1_CIF_ISP_LSC_TABLE_DATA_V12(v0, v1)     \
600 	(((v0) & 0x1fff) | (((v1) & 0x1fff) << 13))
601 #define RKISP1_CIF_ISP_LSC_SECT_SIZE(v0, v1)      \
602 	(((v0) & 0xfff) | (((v1) & 0xfff) << 16))
603 #define RKISP1_CIF_ISP_LSC_SECT_GRAD(v0, v1)      \
604 	(((v0) & 0xfff) | (((v1) & 0xfff) << 16))
605 
606 /* LSC: ISP_LSC_TABLE_SEL */
607 #define RKISP1_CIF_ISP_LSC_TABLE_0			0
608 #define RKISP1_CIF_ISP_LSC_TABLE_1			1
609 
610 /* LSC: ISP_LSC_STATUS */
611 #define RKISP1_CIF_ISP_LSC_ACTIVE_TABLE			BIT(1)
612 #define RKISP1_CIF_ISP_LSC_TABLE_ADDRESS_0		0
613 #define RKISP1_CIF_ISP_LSC_TABLE_ADDRESS_153		153
614 
615 /* FLT */
616 /* ISP_FILT_MODE */
617 #define RKISP1_CIF_ISP_FLT_ENA				BIT(0)
618 
619 /*
620  * 0: green filter static mode (active filter factor = FILT_FAC_MID)
621  * 1: dynamic noise reduction/sharpen Default
622  */
623 #define RKISP1_CIF_ISP_FLT_MODE_DNR			BIT(1)
624 #define RKISP1_CIF_ISP_FLT_MODE_MAX			1
625 #define RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(x)		(((x) & 0x3) << 4)
626 #define RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(x)		(((x) & 0x3) << 6)
627 #define RKISP1_CIF_ISP_FLT_CHROMA_MODE_MAX		3
628 #define RKISP1_CIF_ISP_FLT_GREEN_STAGE1(x)		(((x) & 0xf) << 8)
629 #define RKISP1_CIF_ISP_FLT_GREEN_STAGE1_MAX		8
630 #define RKISP1_CIF_ISP_FLT_THREAD_RESERVED		0xfffffc00
631 #define RKISP1_CIF_ISP_FLT_FAC_RESERVED			0xffffffc0
632 #define RKISP1_CIF_ISP_FLT_LUM_WEIGHT_RESERVED		0xfff80000
633 
634 #define RKISP1_CIF_ISP_CTK_COEFF_RESERVED		0xfffff800
635 #define RKISP1_CIF_ISP_XTALK_OFFSET_RESERVED		0xfffff000
636 
637 /* GOC */
638 #define RKISP1_CIF_ISP_GAMMA_OUT_MODE_EQU		BIT(0)
639 #define RKISP1_CIF_ISP_GOC_MODE_MAX			1
640 #define RKISP1_CIF_ISP_GOC_RESERVED			0xfffff800
641 /* ISP_CTRL BIT 11*/
642 #define RKISP1_CIF_ISP_CTRL_ISP_GAMMA_OUT_ENA_READ(x)	(((x) >> 11) & 1)
643 
644 /* DPCC */
645 #define RKISP1_CIF_ISP_DPCC_MODE_DPCC_ENABLE		BIT(0)
646 #define RKISP1_CIF_ISP_DPCC_MODE_GRAYSCALE_MODE		BIT(1)
647 #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_MASK		GENMASK(3, 0)
648 #define RKISP1_CIF_ISP_DPCC_SET_USE_MASK		GENMASK(3, 0)
649 #define RKISP1_CIF_ISP_DPCC_METHODS_SET_MASK		0x00001f1f
650 #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_MASK		0x0000ffff
651 #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_MASK		0x00003f3f
652 #define RKISP1_CIF_ISP_DPCC_PG_FAC_MASK			0x00003f3f
653 #define RKISP1_CIF_ISP_DPCC_RND_THRESH_MASK		0x0000ffff
654 #define RKISP1_CIF_ISP_DPCC_RG_FAC_MASK			0x00003f3f
655 #define RKISP1_CIF_ISP_DPCC_RO_LIMIT_MASK		0x00000fff
656 #define RKISP1_CIF_ISP_DPCC_RND_OFFS_MASK		0x00000fff
657 
658 /* BLS */
659 /* ISP_BLS_CTRL */
660 #define RKISP1_CIF_ISP_BLS_ENA				BIT(0)
661 #define RKISP1_CIF_ISP_BLS_MODE_MEASURED		BIT(1)
662 #define RKISP1_CIF_ISP_BLS_MODE_FIXED			0
663 #define RKISP1_CIF_ISP_BLS_WINDOW_1			(1 << 2)
664 #define RKISP1_CIF_ISP_BLS_WINDOW_2			(2 << 2)
665 
666 /* GAMMA-IN */
667 #define RKISP1_CIFISP_DEGAMMA_X_RESERVED	\
668 	((1 << 31) | (1 << 27) | (1 << 23) | (1 << 19) |\
669 	(1 << 15) | (1 << 11) | (1 << 7) | (1 << 3))
670 #define RKISP1_CIFISP_DEGAMMA_Y_RESERVED		0xfffff000
671 
672 /* GAMMA-OUT */
673 #define RKISP1_CIF_ISP_GAMMA_VALUE_V12(x, y)	\
674 	(((x) & 0xfff) << 16 | ((y) & 0xfff) << 0)
675 
676 /* AFM */
677 #define RKISP1_CIF_ISP_AFM_ENA				BIT(0)
678 #define RKISP1_CIF_ISP_AFM_THRES_RESERVED		0xffff0000
679 #define RKISP1_CIF_ISP_AFM_VAR_SHIFT_RESERVED		0xfff8fff8
680 #define RKISP1_CIF_ISP_AFM_WINDOW_X_RESERVED		0xe000
681 #define RKISP1_CIF_ISP_AFM_WINDOW_Y_RESERVED		0xf000
682 #define RKISP1_CIF_ISP_AFM_WINDOW_X_MIN			0x5
683 #define RKISP1_CIF_ISP_AFM_WINDOW_Y_MIN			0x2
684 #define RKISP1_CIF_ISP_AFM_WINDOW_X(x)			(((x) & 0x1fff) << 16)
685 #define RKISP1_CIF_ISP_AFM_WINDOW_Y(x)			((x) & 0x1fff)
686 #define RKISP1_CIF_ISP_AFM_SET_SHIFT_a_V12(x, y)	(((x) & 0x7) << 16 | ((y) & 0x7) << 0)
687 #define RKISP1_CIF_ISP_AFM_SET_SHIFT_b_V12(x, y)	(((x) & 0x7) << 20 | ((y) & 0x7) << 4)
688 #define RKISP1_CIF_ISP_AFM_SET_SHIFT_c_V12(x, y)	(((x) & 0x7) << 24 | ((y) & 0x7) << 8)
689 #define RKISP1_CIF_ISP_AFM_GET_LUM_SHIFT_a_V12(x)	(((x) & 0x70000) >> 16)
690 #define RKISP1_CIF_ISP_AFM_GET_AFM_SHIFT_a_V12(x)	((x) & 0x7)
691 
692 /* DPF */
693 #define RKISP1_CIF_ISP_DPF_MODE_EN			BIT(0)
694 #define RKISP1_CIF_ISP_DPF_MODE_B_FLT_DIS		BIT(1)
695 #define RKISP1_CIF_ISP_DPF_MODE_GB_FLT_DIS		BIT(2)
696 #define RKISP1_CIF_ISP_DPF_MODE_GR_FLT_DIS		BIT(3)
697 #define RKISP1_CIF_ISP_DPF_MODE_R_FLT_DIS		BIT(4)
698 #define RKISP1_CIF_ISP_DPF_MODE_RB_FLTSIZE_9x9		BIT(5)
699 #define RKISP1_CIF_ISP_DPF_MODE_NLL_SEGMENTATION	BIT(6)
700 #define RKISP1_CIF_ISP_DPF_MODE_AWB_GAIN_COMP		BIT(7)
701 #define RKISP1_CIF_ISP_DPF_MODE_LSC_GAIN_COMP		BIT(8)
702 #define RKISP1_CIF_ISP_DPF_MODE_USE_NF_GAIN		BIT(9)
703 #define RKISP1_CIF_ISP_DPF_NF_GAIN_RESERVED		0xfffff000
704 #define RKISP1_CIF_ISP_DPF_SPATIAL_COEFF_MAX		0x1f
705 #define RKISP1_CIF_ISP_DPF_NLL_COEFF_N_MAX		0x3ff
706 
707 /* COMPAND */
708 #define RKISP1_CIF_ISP_COMPAND_CTRL_EXPAND_ENABLE	BIT(0)
709 #define RKISP1_CIF_ISP_COMPAND_CTRL_COMPRESS_ENABLE	BIT(1)
710 #define RKISP1_CIF_ISP_COMPAND_CTRL_SOFT_RESET_FLAG	BIT(2)
711 #define RKISP1_CIF_ISP_COMPAND_CTRL_BLS_ENABLE		BIT(3)
712 
713 /* =================================================================== */
714 /*                            CIF Registers                            */
715 /* =================================================================== */
716 #define RKISP1_CIF_CTRL_BASE			0x00000000
717 #define RKISP1_CIF_VI_CCL			(RKISP1_CIF_CTRL_BASE + 0x00000000)
718 #define RKISP1_CIF_VI_ID			(RKISP1_CIF_CTRL_BASE + 0x00000008)
719 #define RKISP1_CIF_VI_ISP_CLK_CTRL_V12		(RKISP1_CIF_CTRL_BASE + 0x0000000c)
720 #define RKISP1_CIF_VI_ICCL			(RKISP1_CIF_CTRL_BASE + 0x00000010)
721 #define RKISP1_CIF_VI_IRCL			(RKISP1_CIF_CTRL_BASE + 0x00000014)
722 #define RKISP1_CIF_VI_DPCL			(RKISP1_CIF_CTRL_BASE + 0x00000018)
723 
724 #define RKISP1_CIF_IMG_EFF_BASE			0x00000200
725 #define RKISP1_CIF_IMG_EFF_CTRL			(RKISP1_CIF_IMG_EFF_BASE + 0x00000000)
726 #define RKISP1_CIF_IMG_EFF_COLOR_SEL		(RKISP1_CIF_IMG_EFF_BASE + 0x00000004)
727 #define RKISP1_CIF_IMG_EFF_MAT_1		(RKISP1_CIF_IMG_EFF_BASE + 0x00000008)
728 #define RKISP1_CIF_IMG_EFF_MAT_2		(RKISP1_CIF_IMG_EFF_BASE + 0x0000000c)
729 #define RKISP1_CIF_IMG_EFF_MAT_3		(RKISP1_CIF_IMG_EFF_BASE + 0x00000010)
730 #define RKISP1_CIF_IMG_EFF_MAT_4		(RKISP1_CIF_IMG_EFF_BASE + 0x00000014)
731 #define RKISP1_CIF_IMG_EFF_MAT_5		(RKISP1_CIF_IMG_EFF_BASE + 0x00000018)
732 #define RKISP1_CIF_IMG_EFF_TINT			(RKISP1_CIF_IMG_EFF_BASE + 0x0000001c)
733 #define RKISP1_CIF_IMG_EFF_CTRL_SHD		(RKISP1_CIF_IMG_EFF_BASE + 0x00000020)
734 #define RKISP1_CIF_IMG_EFF_SHARPEN		(RKISP1_CIF_IMG_EFF_BASE + 0x00000024)
735 
736 #define RKISP1_CIF_SUPER_IMP_BASE		0x00000300
737 #define RKISP1_CIF_SUPER_IMP_CTRL		(RKISP1_CIF_SUPER_IMP_BASE + 0x00000000)
738 #define RKISP1_CIF_SUPER_IMP_OFFSET_X		(RKISP1_CIF_SUPER_IMP_BASE + 0x00000004)
739 #define RKISP1_CIF_SUPER_IMP_OFFSET_Y		(RKISP1_CIF_SUPER_IMP_BASE + 0x00000008)
740 #define RKISP1_CIF_SUPER_IMP_COLOR_Y		(RKISP1_CIF_SUPER_IMP_BASE + 0x0000000c)
741 #define RKISP1_CIF_SUPER_IMP_COLOR_CB		(RKISP1_CIF_SUPER_IMP_BASE + 0x00000010)
742 #define RKISP1_CIF_SUPER_IMP_COLOR_CR		(RKISP1_CIF_SUPER_IMP_BASE + 0x00000014)
743 
744 #define RKISP1_CIF_ISP_BASE			0x00000400
745 #define RKISP1_CIF_ISP_CTRL			(RKISP1_CIF_ISP_BASE + 0x00000000)
746 #define RKISP1_CIF_ISP_ACQ_PROP			(RKISP1_CIF_ISP_BASE + 0x00000004)
747 #define RKISP1_CIF_ISP_ACQ_H_OFFS		(RKISP1_CIF_ISP_BASE + 0x00000008)
748 #define RKISP1_CIF_ISP_ACQ_V_OFFS		(RKISP1_CIF_ISP_BASE + 0x0000000c)
749 #define RKISP1_CIF_ISP_ACQ_H_SIZE		(RKISP1_CIF_ISP_BASE + 0x00000010)
750 #define RKISP1_CIF_ISP_ACQ_V_SIZE		(RKISP1_CIF_ISP_BASE + 0x00000014)
751 #define RKISP1_CIF_ISP_ACQ_NR_FRAMES		(RKISP1_CIF_ISP_BASE + 0x00000018)
752 #define RKISP1_CIF_ISP_GAMMA_DX_LO		(RKISP1_CIF_ISP_BASE + 0x0000001c)
753 #define RKISP1_CIF_ISP_GAMMA_DX_HI		(RKISP1_CIF_ISP_BASE + 0x00000020)
754 #define RKISP1_CIF_ISP_GAMMA_R_Y0		(RKISP1_CIF_ISP_BASE + 0x00000024)
755 #define RKISP1_CIF_ISP_GAMMA_R_Y1		(RKISP1_CIF_ISP_BASE + 0x00000028)
756 #define RKISP1_CIF_ISP_GAMMA_R_Y2		(RKISP1_CIF_ISP_BASE + 0x0000002c)
757 #define RKISP1_CIF_ISP_GAMMA_R_Y3		(RKISP1_CIF_ISP_BASE + 0x00000030)
758 #define RKISP1_CIF_ISP_GAMMA_R_Y4		(RKISP1_CIF_ISP_BASE + 0x00000034)
759 #define RKISP1_CIF_ISP_GAMMA_R_Y5		(RKISP1_CIF_ISP_BASE + 0x00000038)
760 #define RKISP1_CIF_ISP_GAMMA_R_Y6		(RKISP1_CIF_ISP_BASE + 0x0000003c)
761 #define RKISP1_CIF_ISP_GAMMA_R_Y7		(RKISP1_CIF_ISP_BASE + 0x00000040)
762 #define RKISP1_CIF_ISP_GAMMA_R_Y8		(RKISP1_CIF_ISP_BASE + 0x00000044)
763 #define RKISP1_CIF_ISP_GAMMA_R_Y9		(RKISP1_CIF_ISP_BASE + 0x00000048)
764 #define RKISP1_CIF_ISP_GAMMA_R_Y10		(RKISP1_CIF_ISP_BASE + 0x0000004c)
765 #define RKISP1_CIF_ISP_GAMMA_R_Y11		(RKISP1_CIF_ISP_BASE + 0x00000050)
766 #define RKISP1_CIF_ISP_GAMMA_R_Y12		(RKISP1_CIF_ISP_BASE + 0x00000054)
767 #define RKISP1_CIF_ISP_GAMMA_R_Y13		(RKISP1_CIF_ISP_BASE + 0x00000058)
768 #define RKISP1_CIF_ISP_GAMMA_R_Y14		(RKISP1_CIF_ISP_BASE + 0x0000005c)
769 #define RKISP1_CIF_ISP_GAMMA_R_Y15		(RKISP1_CIF_ISP_BASE + 0x00000060)
770 #define RKISP1_CIF_ISP_GAMMA_R_Y16		(RKISP1_CIF_ISP_BASE + 0x00000064)
771 #define RKISP1_CIF_ISP_GAMMA_G_Y0		(RKISP1_CIF_ISP_BASE + 0x00000068)
772 #define RKISP1_CIF_ISP_GAMMA_G_Y1		(RKISP1_CIF_ISP_BASE + 0x0000006c)
773 #define RKISP1_CIF_ISP_GAMMA_G_Y2		(RKISP1_CIF_ISP_BASE + 0x00000070)
774 #define RKISP1_CIF_ISP_GAMMA_G_Y3		(RKISP1_CIF_ISP_BASE + 0x00000074)
775 #define RKISP1_CIF_ISP_GAMMA_G_Y4		(RKISP1_CIF_ISP_BASE + 0x00000078)
776 #define RKISP1_CIF_ISP_GAMMA_G_Y5		(RKISP1_CIF_ISP_BASE + 0x0000007c)
777 #define RKISP1_CIF_ISP_GAMMA_G_Y6		(RKISP1_CIF_ISP_BASE + 0x00000080)
778 #define RKISP1_CIF_ISP_GAMMA_G_Y7		(RKISP1_CIF_ISP_BASE + 0x00000084)
779 #define RKISP1_CIF_ISP_GAMMA_G_Y8		(RKISP1_CIF_ISP_BASE + 0x00000088)
780 #define RKISP1_CIF_ISP_GAMMA_G_Y9		(RKISP1_CIF_ISP_BASE + 0x0000008c)
781 #define RKISP1_CIF_ISP_GAMMA_G_Y10		(RKISP1_CIF_ISP_BASE + 0x00000090)
782 #define RKISP1_CIF_ISP_GAMMA_G_Y11		(RKISP1_CIF_ISP_BASE + 0x00000094)
783 #define RKISP1_CIF_ISP_GAMMA_G_Y12		(RKISP1_CIF_ISP_BASE + 0x00000098)
784 #define RKISP1_CIF_ISP_GAMMA_G_Y13		(RKISP1_CIF_ISP_BASE + 0x0000009c)
785 #define RKISP1_CIF_ISP_GAMMA_G_Y14		(RKISP1_CIF_ISP_BASE + 0x000000a0)
786 #define RKISP1_CIF_ISP_GAMMA_G_Y15		(RKISP1_CIF_ISP_BASE + 0x000000a4)
787 #define RKISP1_CIF_ISP_GAMMA_G_Y16		(RKISP1_CIF_ISP_BASE + 0x000000a8)
788 #define RKISP1_CIF_ISP_GAMMA_B_Y0		(RKISP1_CIF_ISP_BASE + 0x000000ac)
789 #define RKISP1_CIF_ISP_GAMMA_B_Y1		(RKISP1_CIF_ISP_BASE + 0x000000b0)
790 #define RKISP1_CIF_ISP_GAMMA_B_Y2		(RKISP1_CIF_ISP_BASE + 0x000000b4)
791 #define RKISP1_CIF_ISP_GAMMA_B_Y3		(RKISP1_CIF_ISP_BASE + 0x000000b8)
792 #define RKISP1_CIF_ISP_GAMMA_B_Y4		(RKISP1_CIF_ISP_BASE + 0x000000bc)
793 #define RKISP1_CIF_ISP_GAMMA_B_Y5		(RKISP1_CIF_ISP_BASE + 0x000000c0)
794 #define RKISP1_CIF_ISP_GAMMA_B_Y6		(RKISP1_CIF_ISP_BASE + 0x000000c4)
795 #define RKISP1_CIF_ISP_GAMMA_B_Y7		(RKISP1_CIF_ISP_BASE + 0x000000c8)
796 #define RKISP1_CIF_ISP_GAMMA_B_Y8		(RKISP1_CIF_ISP_BASE + 0x000000cc)
797 #define RKISP1_CIF_ISP_GAMMA_B_Y9		(RKISP1_CIF_ISP_BASE + 0x000000d0)
798 #define RKISP1_CIF_ISP_GAMMA_B_Y10		(RKISP1_CIF_ISP_BASE + 0x000000d4)
799 #define RKISP1_CIF_ISP_GAMMA_B_Y11		(RKISP1_CIF_ISP_BASE + 0x000000d8)
800 #define RKISP1_CIF_ISP_GAMMA_B_Y12		(RKISP1_CIF_ISP_BASE + 0x000000dc)
801 #define RKISP1_CIF_ISP_GAMMA_B_Y13		(RKISP1_CIF_ISP_BASE + 0x000000e0)
802 #define RKISP1_CIF_ISP_GAMMA_B_Y14		(RKISP1_CIF_ISP_BASE + 0x000000e4)
803 #define RKISP1_CIF_ISP_GAMMA_B_Y15		(RKISP1_CIF_ISP_BASE + 0x000000e8)
804 #define RKISP1_CIF_ISP_GAMMA_B_Y16		(RKISP1_CIF_ISP_BASE + 0x000000ec)
805 #define RKISP1_CIF_ISP_AWB_PROP_V10		(RKISP1_CIF_ISP_BASE + 0x00000110)
806 #define RKISP1_CIF_ISP_AWB_WND_H_OFFS_V10	(RKISP1_CIF_ISP_BASE + 0x00000114)
807 #define RKISP1_CIF_ISP_AWB_WND_V_OFFS_V10	(RKISP1_CIF_ISP_BASE + 0x00000118)
808 #define RKISP1_CIF_ISP_AWB_WND_H_SIZE_V10	(RKISP1_CIF_ISP_BASE + 0x0000011c)
809 #define RKISP1_CIF_ISP_AWB_WND_V_SIZE_V10	(RKISP1_CIF_ISP_BASE + 0x00000120)
810 #define RKISP1_CIF_ISP_AWB_FRAMES_V10		(RKISP1_CIF_ISP_BASE + 0x00000124)
811 #define RKISP1_CIF_ISP_AWB_REF_V10		(RKISP1_CIF_ISP_BASE + 0x00000128)
812 #define RKISP1_CIF_ISP_AWB_THRESH_V10		(RKISP1_CIF_ISP_BASE + 0x0000012c)
813 #define RKISP1_CIF_ISP_AWB_GAIN_G_V10		(RKISP1_CIF_ISP_BASE + 0x00000138)
814 #define RKISP1_CIF_ISP_AWB_GAIN_RB_V10		(RKISP1_CIF_ISP_BASE + 0x0000013c)
815 #define RKISP1_CIF_ISP_AWB_WHITE_CNT_V10	(RKISP1_CIF_ISP_BASE + 0x00000140)
816 #define RKISP1_CIF_ISP_AWB_MEAN_V10		(RKISP1_CIF_ISP_BASE + 0x00000144)
817 #define RKISP1_CIF_ISP_AWB_PROP_V12		(RKISP1_CIF_ISP_BASE + 0x00000110)
818 #define RKISP1_CIF_ISP_AWB_SIZE_V12		(RKISP1_CIF_ISP_BASE + 0x00000114)
819 #define RKISP1_CIF_ISP_AWB_OFFS_V12		(RKISP1_CIF_ISP_BASE + 0x00000118)
820 #define RKISP1_CIF_ISP_AWB_REF_V12		(RKISP1_CIF_ISP_BASE + 0x0000011c)
821 #define RKISP1_CIF_ISP_AWB_THRESH_V12		(RKISP1_CIF_ISP_BASE + 0x00000120)
822 #define RKISP1_CIF_ISP_X_COOR12_V12		(RKISP1_CIF_ISP_BASE + 0x00000124)
823 #define RKISP1_CIF_ISP_X_COOR34_V12		(RKISP1_CIF_ISP_BASE + 0x00000128)
824 #define RKISP1_CIF_ISP_AWB_WHITE_CNT_V12	(RKISP1_CIF_ISP_BASE + 0x0000012c)
825 #define RKISP1_CIF_ISP_AWB_MEAN_V12		(RKISP1_CIF_ISP_BASE + 0x00000130)
826 #define RKISP1_CIF_ISP_DEGAIN_V12		(RKISP1_CIF_ISP_BASE + 0x00000134)
827 #define RKISP1_CIF_ISP_AWB_GAIN_G_V12		(RKISP1_CIF_ISP_BASE + 0x00000138)
828 #define RKISP1_CIF_ISP_AWB_GAIN_RB_V12		(RKISP1_CIF_ISP_BASE + 0x0000013c)
829 #define RKISP1_CIF_ISP_REGION_LINE_V12		(RKISP1_CIF_ISP_BASE + 0x00000140)
830 #define RKISP1_CIF_ISP_WP_CNT_REGION0_V12	(RKISP1_CIF_ISP_BASE + 0x00000160)
831 #define RKISP1_CIF_ISP_WP_CNT_REGION1_V12	(RKISP1_CIF_ISP_BASE + 0x00000164)
832 #define RKISP1_CIF_ISP_WP_CNT_REGION2_V12	(RKISP1_CIF_ISP_BASE + 0x00000168)
833 #define RKISP1_CIF_ISP_WP_CNT_REGION3_V12	(RKISP1_CIF_ISP_BASE + 0x0000016c)
834 #define RKISP1_CIF_ISP_CC_COEFF_0		(RKISP1_CIF_ISP_BASE + 0x00000170)
835 #define RKISP1_CIF_ISP_CC_COEFF_1		(RKISP1_CIF_ISP_BASE + 0x00000174)
836 #define RKISP1_CIF_ISP_CC_COEFF_2		(RKISP1_CIF_ISP_BASE + 0x00000178)
837 #define RKISP1_CIF_ISP_CC_COEFF_3		(RKISP1_CIF_ISP_BASE + 0x0000017c)
838 #define RKISP1_CIF_ISP_CC_COEFF_4		(RKISP1_CIF_ISP_BASE + 0x00000180)
839 #define RKISP1_CIF_ISP_CC_COEFF_5		(RKISP1_CIF_ISP_BASE + 0x00000184)
840 #define RKISP1_CIF_ISP_CC_COEFF_6		(RKISP1_CIF_ISP_BASE + 0x00000188)
841 #define RKISP1_CIF_ISP_CC_COEFF_7		(RKISP1_CIF_ISP_BASE + 0x0000018c)
842 #define RKISP1_CIF_ISP_CC_COEFF_8		(RKISP1_CIF_ISP_BASE + 0x00000190)
843 #define RKISP1_CIF_ISP_OUT_H_OFFS		(RKISP1_CIF_ISP_BASE + 0x00000194)
844 #define RKISP1_CIF_ISP_OUT_V_OFFS		(RKISP1_CIF_ISP_BASE + 0x00000198)
845 #define RKISP1_CIF_ISP_OUT_H_SIZE		(RKISP1_CIF_ISP_BASE + 0x0000019c)
846 #define RKISP1_CIF_ISP_OUT_V_SIZE		(RKISP1_CIF_ISP_BASE + 0x000001a0)
847 #define RKISP1_CIF_ISP_DEMOSAIC			(RKISP1_CIF_ISP_BASE + 0x000001a4)
848 #define RKISP1_CIF_ISP_FLAGS_SHD		(RKISP1_CIF_ISP_BASE + 0x000001a8)
849 #define RKISP1_CIF_ISP_OUT_H_OFFS_SHD		(RKISP1_CIF_ISP_BASE + 0x000001ac)
850 #define RKISP1_CIF_ISP_OUT_V_OFFS_SHD		(RKISP1_CIF_ISP_BASE + 0x000001b0)
851 #define RKISP1_CIF_ISP_OUT_H_SIZE_SHD		(RKISP1_CIF_ISP_BASE + 0x000001b4)
852 #define RKISP1_CIF_ISP_OUT_V_SIZE_SHD		(RKISP1_CIF_ISP_BASE + 0x000001b8)
853 #define RKISP1_CIF_ISP_IMSC			(RKISP1_CIF_ISP_BASE + 0x000001bc)
854 #define RKISP1_CIF_ISP_RIS			(RKISP1_CIF_ISP_BASE + 0x000001c0)
855 #define RKISP1_CIF_ISP_MIS			(RKISP1_CIF_ISP_BASE + 0x000001c4)
856 #define RKISP1_CIF_ISP_ICR			(RKISP1_CIF_ISP_BASE + 0x000001c8)
857 #define RKISP1_CIF_ISP_ISR			(RKISP1_CIF_ISP_BASE + 0x000001cc)
858 #define RKISP1_CIF_ISP_CT_COEFF_0		(RKISP1_CIF_ISP_BASE + 0x000001d0)
859 #define RKISP1_CIF_ISP_CT_COEFF_1		(RKISP1_CIF_ISP_BASE + 0x000001d4)
860 #define RKISP1_CIF_ISP_CT_COEFF_2		(RKISP1_CIF_ISP_BASE + 0x000001d8)
861 #define RKISP1_CIF_ISP_CT_COEFF_3		(RKISP1_CIF_ISP_BASE + 0x000001dc)
862 #define RKISP1_CIF_ISP_CT_COEFF_4		(RKISP1_CIF_ISP_BASE + 0x000001e0)
863 #define RKISP1_CIF_ISP_CT_COEFF_5		(RKISP1_CIF_ISP_BASE + 0x000001e4)
864 #define RKISP1_CIF_ISP_CT_COEFF_6		(RKISP1_CIF_ISP_BASE + 0x000001e8)
865 #define RKISP1_CIF_ISP_CT_COEFF_7		(RKISP1_CIF_ISP_BASE + 0x000001ec)
866 #define RKISP1_CIF_ISP_CT_COEFF_8		(RKISP1_CIF_ISP_BASE + 0x000001f0)
867 #define RKISP1_CIF_ISP_GAMMA_OUT_MODE_V10	(RKISP1_CIF_ISP_BASE + 0x000001f4)
868 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_0_V10	(RKISP1_CIF_ISP_BASE + 0x000001f8)
869 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_1_V10	(RKISP1_CIF_ISP_BASE + 0x000001fc)
870 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_2_V10	(RKISP1_CIF_ISP_BASE + 0x00000200)
871 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_3_V10	(RKISP1_CIF_ISP_BASE + 0x00000204)
872 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_4_V10	(RKISP1_CIF_ISP_BASE + 0x00000208)
873 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_5_V10	(RKISP1_CIF_ISP_BASE + 0x0000020c)
874 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_6_V10	(RKISP1_CIF_ISP_BASE + 0x00000210)
875 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_7_V10	(RKISP1_CIF_ISP_BASE + 0x00000214)
876 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_8_V10	(RKISP1_CIF_ISP_BASE + 0x00000218)
877 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_9_V10	(RKISP1_CIF_ISP_BASE + 0x0000021c)
878 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_10_V10	(RKISP1_CIF_ISP_BASE + 0x00000220)
879 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_11_V10	(RKISP1_CIF_ISP_BASE + 0x00000224)
880 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_12_V10	(RKISP1_CIF_ISP_BASE + 0x00000228)
881 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_13_V10	(RKISP1_CIF_ISP_BASE + 0x0000022c)
882 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_14_V10	(RKISP1_CIF_ISP_BASE + 0x00000230)
883 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_15_V10	(RKISP1_CIF_ISP_BASE + 0x00000234)
884 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_16_V10	(RKISP1_CIF_ISP_BASE + 0x00000238)
885 #define RKISP1_CIF_ISP_ERR			(RKISP1_CIF_ISP_BASE + 0x0000023c)
886 #define RKISP1_CIF_ISP_ERR_CLR			(RKISP1_CIF_ISP_BASE + 0x00000240)
887 #define RKISP1_CIF_ISP_FRAME_COUNT		(RKISP1_CIF_ISP_BASE + 0x00000244)
888 #define RKISP1_CIF_ISP_CT_OFFSET_R		(RKISP1_CIF_ISP_BASE + 0x00000248)
889 #define RKISP1_CIF_ISP_CT_OFFSET_G		(RKISP1_CIF_ISP_BASE + 0x0000024c)
890 #define RKISP1_CIF_ISP_CT_OFFSET_B		(RKISP1_CIF_ISP_BASE + 0x00000250)
891 #define RKISP1_CIF_ISP_GAMMA_OUT_MODE_V12	(RKISP1_CIF_ISP_BASE + 0x00000300)
892 #define RKISP1_CIF_ISP_GAMMA_OUT_Y_0_V12	(RKISP1_CIF_ISP_BASE + 0x00000304)
893 
894 #define RKISP1_CIF_ISP_FLASH_BASE		0x00000660
895 #define RKISP1_CIF_ISP_FLASH_CMD		(RKISP1_CIF_ISP_FLASH_BASE + 0x00000000)
896 #define RKISP1_CIF_ISP_FLASH_CONFIG		(RKISP1_CIF_ISP_FLASH_BASE + 0x00000004)
897 #define RKISP1_CIF_ISP_FLASH_PREDIV		(RKISP1_CIF_ISP_FLASH_BASE + 0x00000008)
898 #define RKISP1_CIF_ISP_FLASH_DELAY		(RKISP1_CIF_ISP_FLASH_BASE + 0x0000000c)
899 #define RKISP1_CIF_ISP_FLASH_TIME		(RKISP1_CIF_ISP_FLASH_BASE + 0x00000010)
900 #define RKISP1_CIF_ISP_FLASH_MAXP		(RKISP1_CIF_ISP_FLASH_BASE + 0x00000014)
901 
902 #define RKISP1_CIF_ISP_SH_BASE			0x00000680
903 #define RKISP1_CIF_ISP_SH_CTRL			(RKISP1_CIF_ISP_SH_BASE + 0x00000000)
904 #define RKISP1_CIF_ISP_SH_PREDIV		(RKISP1_CIF_ISP_SH_BASE + 0x00000004)
905 #define RKISP1_CIF_ISP_SH_DELAY			(RKISP1_CIF_ISP_SH_BASE + 0x00000008)
906 #define RKISP1_CIF_ISP_SH_TIME			(RKISP1_CIF_ISP_SH_BASE + 0x0000000c)
907 
908 #define RKISP1_CIF_C_PROC_BASE			0x00000800
909 #define RKISP1_CIF_C_PROC_CTRL			(RKISP1_CIF_C_PROC_BASE + 0x00000000)
910 #define RKISP1_CIF_C_PROC_CONTRAST		(RKISP1_CIF_C_PROC_BASE + 0x00000004)
911 #define RKISP1_CIF_C_PROC_BRIGHTNESS		(RKISP1_CIF_C_PROC_BASE + 0x00000008)
912 #define RKISP1_CIF_C_PROC_SATURATION		(RKISP1_CIF_C_PROC_BASE + 0x0000000c)
913 #define RKISP1_CIF_C_PROC_HUE			(RKISP1_CIF_C_PROC_BASE + 0x00000010)
914 
915 #define RKISP1_CIF_DUAL_CROP_BASE		0x00000880
916 #define RKISP1_CIF_DUAL_CROP_CTRL		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000000)
917 #define RKISP1_CIF_DUAL_CROP_M_H_OFFS		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000004)
918 #define RKISP1_CIF_DUAL_CROP_M_V_OFFS		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000008)
919 #define RKISP1_CIF_DUAL_CROP_M_H_SIZE		(RKISP1_CIF_DUAL_CROP_BASE + 0x0000000c)
920 #define RKISP1_CIF_DUAL_CROP_M_V_SIZE		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000010)
921 #define RKISP1_CIF_DUAL_CROP_S_H_OFFS		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000014)
922 #define RKISP1_CIF_DUAL_CROP_S_V_OFFS		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000018)
923 #define RKISP1_CIF_DUAL_CROP_S_H_SIZE		(RKISP1_CIF_DUAL_CROP_BASE + 0x0000001c)
924 #define RKISP1_CIF_DUAL_CROP_S_V_SIZE		(RKISP1_CIF_DUAL_CROP_BASE + 0x00000020)
925 #define RKISP1_CIF_DUAL_CROP_M_H_OFFS_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000024)
926 #define RKISP1_CIF_DUAL_CROP_M_V_OFFS_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000028)
927 #define RKISP1_CIF_DUAL_CROP_M_H_SIZE_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x0000002c)
928 #define RKISP1_CIF_DUAL_CROP_M_V_SIZE_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000030)
929 #define RKISP1_CIF_DUAL_CROP_S_H_OFFS_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000034)
930 #define RKISP1_CIF_DUAL_CROP_S_V_OFFS_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000038)
931 #define RKISP1_CIF_DUAL_CROP_S_H_SIZE_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x0000003c)
932 #define RKISP1_CIF_DUAL_CROP_S_V_SIZE_SHD	(RKISP1_CIF_DUAL_CROP_BASE + 0x00000040)
933 
934 #define RKISP1_CIF_MRSZ_BASE			0x00000c00
935 #define RKISP1_CIF_SRSZ_BASE			0x00001000
936 #define RKISP1_CIF_RSZ_CTRL			0x0000
937 #define RKISP1_CIF_RSZ_SCALE_HY			0x0004
938 #define RKISP1_CIF_RSZ_SCALE_HCB		0x0008
939 #define RKISP1_CIF_RSZ_SCALE_HCR		0x000c
940 #define RKISP1_CIF_RSZ_SCALE_VY			0x0010
941 #define RKISP1_CIF_RSZ_SCALE_VC			0x0014
942 #define RKISP1_CIF_RSZ_PHASE_HY			0x0018
943 #define RKISP1_CIF_RSZ_PHASE_HC			0x001c
944 #define RKISP1_CIF_RSZ_PHASE_VY			0x0020
945 #define RKISP1_CIF_RSZ_PHASE_VC			0x0024
946 #define RKISP1_CIF_RSZ_SCALE_LUT_ADDR		0x0028
947 #define RKISP1_CIF_RSZ_SCALE_LUT		0x002c
948 #define RKISP1_CIF_RSZ_CTRL_SHD			0x0030
949 #define RKISP1_CIF_RSZ_SCALE_HY_SHD		0x0034
950 #define RKISP1_CIF_RSZ_SCALE_HCB_SHD		0x0038
951 #define RKISP1_CIF_RSZ_SCALE_HCR_SHD		0x003c
952 #define RKISP1_CIF_RSZ_SCALE_VY_SHD		0x0040
953 #define RKISP1_CIF_RSZ_SCALE_VC_SHD		0x0044
954 #define RKISP1_CIF_RSZ_PHASE_HY_SHD		0x0048
955 #define RKISP1_CIF_RSZ_PHASE_HC_SHD		0x004c
956 #define RKISP1_CIF_RSZ_PHASE_VY_SHD		0x0050
957 #define RKISP1_CIF_RSZ_PHASE_VC_SHD		0x0054
958 
959 #define RKISP1_CIF_MI_BASE			0x00001400
960 #define RKISP1_CIF_MI_CTRL			(RKISP1_CIF_MI_BASE + 0x00000000)
961 #define RKISP1_CIF_MI_INIT			(RKISP1_CIF_MI_BASE + 0x00000004)
962 #define RKISP1_CIF_MI_MP_Y_BASE_AD_INIT		(RKISP1_CIF_MI_BASE + 0x00000008)
963 #define RKISP1_CIF_MI_MP_Y_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x0000000c)
964 #define RKISP1_CIF_MI_MP_Y_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000010)
965 #define RKISP1_CIF_MI_MP_Y_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x00000014)
966 #define RKISP1_CIF_MI_MP_Y_IRQ_OFFS_INIT	(RKISP1_CIF_MI_BASE + 0x00000018)
967 #define RKISP1_CIF_MI_MP_CB_BASE_AD_INIT	(RKISP1_CIF_MI_BASE + 0x0000001c)
968 #define RKISP1_CIF_MI_MP_CB_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x00000020)
969 #define RKISP1_CIF_MI_MP_CB_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000024)
970 #define RKISP1_CIF_MI_MP_CB_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x00000028)
971 #define RKISP1_CIF_MI_MP_CR_BASE_AD_INIT	(RKISP1_CIF_MI_BASE + 0x0000002c)
972 #define RKISP1_CIF_MI_MP_CR_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x00000030)
973 #define RKISP1_CIF_MI_MP_CR_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000034)
974 #define RKISP1_CIF_MI_MP_CR_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x00000038)
975 #define RKISP1_CIF_MI_SP_Y_BASE_AD_INIT		(RKISP1_CIF_MI_BASE + 0x0000003c)
976 #define RKISP1_CIF_MI_SP_Y_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x00000040)
977 #define RKISP1_CIF_MI_SP_Y_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000044)
978 #define RKISP1_CIF_MI_SP_Y_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x00000048)
979 #define RKISP1_CIF_MI_SP_Y_LLENGTH		(RKISP1_CIF_MI_BASE + 0x0000004c)
980 #define RKISP1_CIF_MI_SP_CB_BASE_AD_INIT	(RKISP1_CIF_MI_BASE + 0x00000050)
981 #define RKISP1_CIF_MI_SP_CB_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x00000054)
982 #define RKISP1_CIF_MI_SP_CB_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000058)
983 #define RKISP1_CIF_MI_SP_CB_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x0000005c)
984 #define RKISP1_CIF_MI_SP_CR_BASE_AD_INIT	(RKISP1_CIF_MI_BASE + 0x00000060)
985 #define RKISP1_CIF_MI_SP_CR_SIZE_INIT		(RKISP1_CIF_MI_BASE + 0x00000064)
986 #define RKISP1_CIF_MI_SP_CR_OFFS_CNT_INIT	(RKISP1_CIF_MI_BASE + 0x00000068)
987 #define RKISP1_CIF_MI_SP_CR_OFFS_CNT_START	(RKISP1_CIF_MI_BASE + 0x0000006c)
988 #define RKISP1_CIF_MI_BYTE_CNT			(RKISP1_CIF_MI_BASE + 0x00000070)
989 #define RKISP1_CIF_MI_CTRL_SHD			(RKISP1_CIF_MI_BASE + 0x00000074)
990 #define RKISP1_CIF_MI_MP_Y_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x00000078)
991 #define RKISP1_CIF_MI_MP_Y_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x0000007c)
992 #define RKISP1_CIF_MI_MP_Y_OFFS_CNT_SHD		(RKISP1_CIF_MI_BASE + 0x00000080)
993 #define RKISP1_CIF_MI_MP_Y_IRQ_OFFS_SHD		(RKISP1_CIF_MI_BASE + 0x00000084)
994 #define RKISP1_CIF_MI_MP_CB_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x00000088)
995 #define RKISP1_CIF_MI_MP_CB_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x0000008c)
996 #define RKISP1_CIF_MI_MP_CB_OFFS_CNT_SHD	(RKISP1_CIF_MI_BASE + 0x00000090)
997 #define RKISP1_CIF_MI_MP_CR_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x00000094)
998 #define RKISP1_CIF_MI_MP_CR_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x00000098)
999 #define RKISP1_CIF_MI_MP_CR_OFFS_CNT_SHD	(RKISP1_CIF_MI_BASE + 0x0000009c)
1000 #define RKISP1_CIF_MI_SP_Y_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x000000a0)
1001 #define RKISP1_CIF_MI_SP_Y_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x000000a4)
1002 #define RKISP1_CIF_MI_SP_Y_OFFS_CNT_SHD		(RKISP1_CIF_MI_BASE + 0x000000a8)
1003 #define RKISP1_CIF_MI_SP_CB_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x000000b0)
1004 #define RKISP1_CIF_MI_SP_CB_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x000000b4)
1005 #define RKISP1_CIF_MI_SP_CB_OFFS_CNT_SHD	(RKISP1_CIF_MI_BASE + 0x000000b8)
1006 #define RKISP1_CIF_MI_SP_CR_BASE_AD_SHD		(RKISP1_CIF_MI_BASE + 0x000000bc)
1007 #define RKISP1_CIF_MI_SP_CR_SIZE_SHD		(RKISP1_CIF_MI_BASE + 0x000000c0)
1008 #define RKISP1_CIF_MI_SP_CR_OFFS_CNT_SHD	(RKISP1_CIF_MI_BASE + 0x000000c4)
1009 #define RKISP1_CIF_MI_DMA_Y_PIC_START_AD	(RKISP1_CIF_MI_BASE + 0x000000c8)
1010 #define RKISP1_CIF_MI_DMA_Y_PIC_WIDTH		(RKISP1_CIF_MI_BASE + 0x000000cc)
1011 #define RKISP1_CIF_MI_DMA_Y_LLENGTH		(RKISP1_CIF_MI_BASE + 0x000000d0)
1012 #define RKISP1_CIF_MI_DMA_Y_PIC_SIZE		(RKISP1_CIF_MI_BASE + 0x000000d4)
1013 #define RKISP1_CIF_MI_DMA_CB_PIC_START_AD	(RKISP1_CIF_MI_BASE + 0x000000d8)
1014 #define RKISP1_CIF_MI_DMA_CR_PIC_START_AD	(RKISP1_CIF_MI_BASE + 0x000000e8)
1015 #define RKISP1_CIF_MI_IMSC			(RKISP1_CIF_MI_BASE + 0x000000f8)
1016 #define RKISP1_CIF_MI_RIS			(RKISP1_CIF_MI_BASE + 0x000000fc)
1017 #define RKISP1_CIF_MI_MIS			(RKISP1_CIF_MI_BASE + 0x00000100)
1018 #define RKISP1_CIF_MI_ICR			(RKISP1_CIF_MI_BASE + 0x00000104)
1019 #define RKISP1_CIF_MI_ISR			(RKISP1_CIF_MI_BASE + 0x00000108)
1020 #define RKISP1_CIF_MI_STATUS			(RKISP1_CIF_MI_BASE + 0x0000010c)
1021 #define RKISP1_CIF_MI_STATUS_CLR		(RKISP1_CIF_MI_BASE + 0x00000110)
1022 #define RKISP1_CIF_MI_SP_Y_PIC_WIDTH		(RKISP1_CIF_MI_BASE + 0x00000114)
1023 #define RKISP1_CIF_MI_SP_Y_PIC_HEIGHT		(RKISP1_CIF_MI_BASE + 0x00000118)
1024 #define RKISP1_CIF_MI_SP_Y_PIC_SIZE		(RKISP1_CIF_MI_BASE + 0x0000011c)
1025 #define RKISP1_CIF_MI_DMA_CTRL			(RKISP1_CIF_MI_BASE + 0x00000120)
1026 #define RKISP1_CIF_MI_DMA_START			(RKISP1_CIF_MI_BASE + 0x00000124)
1027 #define RKISP1_CIF_MI_DMA_STATUS		(RKISP1_CIF_MI_BASE + 0x00000128)
1028 #define RKISP1_CIF_MI_PIXEL_COUNT		(RKISP1_CIF_MI_BASE + 0x0000012c)
1029 #define RKISP1_CIF_MI_MP_Y_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x00000130)
1030 #define RKISP1_CIF_MI_MP_CB_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x00000134)
1031 #define RKISP1_CIF_MI_MP_CR_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x00000138)
1032 #define RKISP1_CIF_MI_SP_Y_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x0000013c)
1033 #define RKISP1_CIF_MI_SP_CB_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x00000140)
1034 #define RKISP1_CIF_MI_SP_CR_BASE_AD_INIT2	(RKISP1_CIF_MI_BASE + 0x00000144)
1035 #define RKISP1_CIF_MI_XTD_FORMAT_CTRL		(RKISP1_CIF_MI_BASE + 0x00000148)
1036 #define RKISP1_CIF_MI_MP_HANDSHAKE_0		(RKISP1_CIF_MI_BASE + 0x0000014C)
1037 #define RKISP1_CIF_MI_MP_Y_LLENGTH		(RKISP1_CIF_MI_BASE + 0x00000150)
1038 #define RKISP1_CIF_MI_MP_Y_SLICE_OFFSET		(RKISP1_CIF_MI_BASE + 0x00000154)
1039 #define RKISP1_CIF_MI_MP_C_SLICE_OFFSET		(RKISP1_CIF_MI_BASE + 0x00000158)
1040 #define RKISP1_CIF_MI_OUTPUT_ALIGN_FORMAT	(RKISP1_CIF_MI_BASE + 0x0000015C)
1041 #define RKISP1_CIF_MI_MP_OUTPUT_FIFO_SIZE	(RKISP1_CIF_MI_BASE + 0x00000160)
1042 #define RKISP1_CIF_MI_MP_Y_PIC_WIDTH		(RKISP1_CIF_MI_BASE + 0x00000164)
1043 #define RKISP1_CIF_MI_MP_Y_PIC_HEIGHT		(RKISP1_CIF_MI_BASE + 0x00000168)
1044 #define RKISP1_CIF_MI_MP_Y_PIC_SIZE		(RKISP1_CIF_MI_BASE + 0x0000016C)
1045 
1046 #define RKISP1_CIF_SMIA_BASE			0x00001a00
1047 #define RKISP1_CIF_SMIA_CTRL			(RKISP1_CIF_SMIA_BASE + 0x00000000)
1048 #define RKISP1_CIF_SMIA_STATUS			(RKISP1_CIF_SMIA_BASE + 0x00000004)
1049 #define RKISP1_CIF_SMIA_IMSC			(RKISP1_CIF_SMIA_BASE + 0x00000008)
1050 #define RKISP1_CIF_SMIA_RIS			(RKISP1_CIF_SMIA_BASE + 0x0000000c)
1051 #define RKISP1_CIF_SMIA_MIS			(RKISP1_CIF_SMIA_BASE + 0x00000010)
1052 #define RKISP1_CIF_SMIA_ICR			(RKISP1_CIF_SMIA_BASE + 0x00000014)
1053 #define RKISP1_CIF_SMIA_ISR			(RKISP1_CIF_SMIA_BASE + 0x00000018)
1054 #define RKISP1_CIF_SMIA_DATA_FORMAT_SEL		(RKISP1_CIF_SMIA_BASE + 0x0000001c)
1055 #define RKISP1_CIF_SMIA_SOF_EMB_DATA_LINES	(RKISP1_CIF_SMIA_BASE + 0x00000020)
1056 #define RKISP1_CIF_SMIA_EMB_HSTART		(RKISP1_CIF_SMIA_BASE + 0x00000024)
1057 #define RKISP1_CIF_SMIA_EMB_HSIZE		(RKISP1_CIF_SMIA_BASE + 0x00000028)
1058 #define RKISP1_CIF_SMIA_EMB_VSTART		(RKISP1_CIF_SMIA_BASE + 0x0000002c)
1059 #define RKISP1_CIF_SMIA_NUM_LINES		(RKISP1_CIF_SMIA_BASE + 0x00000030)
1060 #define RKISP1_CIF_SMIA_EMB_DATA_FIFO		(RKISP1_CIF_SMIA_BASE + 0x00000034)
1061 #define RKISP1_CIF_SMIA_EMB_DATA_WATERMARK	(RKISP1_CIF_SMIA_BASE + 0x00000038)
1062 
1063 #define RKISP1_CIF_MIPI_BASE			0x00001c00
1064 #define RKISP1_CIF_MIPI_CTRL			(RKISP1_CIF_MIPI_BASE + 0x00000000)
1065 #define RKISP1_CIF_MIPI_STATUS			(RKISP1_CIF_MIPI_BASE + 0x00000004)
1066 #define RKISP1_CIF_MIPI_IMSC			(RKISP1_CIF_MIPI_BASE + 0x00000008)
1067 #define RKISP1_CIF_MIPI_RIS			(RKISP1_CIF_MIPI_BASE + 0x0000000c)
1068 #define RKISP1_CIF_MIPI_MIS			(RKISP1_CIF_MIPI_BASE + 0x00000010)
1069 #define RKISP1_CIF_MIPI_ICR			(RKISP1_CIF_MIPI_BASE + 0x00000014)
1070 #define RKISP1_CIF_MIPI_ISR			(RKISP1_CIF_MIPI_BASE + 0x00000018)
1071 #define RKISP1_CIF_MIPI_CUR_DATA_ID		(RKISP1_CIF_MIPI_BASE + 0x0000001c)
1072 #define RKISP1_CIF_MIPI_IMG_DATA_SEL		(RKISP1_CIF_MIPI_BASE + 0x00000020)
1073 #define RKISP1_CIF_MIPI_ADD_DATA_SEL_1		(RKISP1_CIF_MIPI_BASE + 0x00000024)
1074 #define RKISP1_CIF_MIPI_ADD_DATA_SEL_2		(RKISP1_CIF_MIPI_BASE + 0x00000028)
1075 #define RKISP1_CIF_MIPI_ADD_DATA_SEL_3		(RKISP1_CIF_MIPI_BASE + 0x0000002c)
1076 #define RKISP1_CIF_MIPI_ADD_DATA_SEL_4		(RKISP1_CIF_MIPI_BASE + 0x00000030)
1077 #define RKISP1_CIF_MIPI_ADD_DATA_FIFO		(RKISP1_CIF_MIPI_BASE + 0x00000034)
1078 #define RKISP1_CIF_MIPI_FIFO_FILL_LEVEL		(RKISP1_CIF_MIPI_BASE + 0x00000038)
1079 #define RKISP1_CIF_MIPI_COMPRESSED_MODE		(RKISP1_CIF_MIPI_BASE + 0x0000003c)
1080 #define RKISP1_CIF_MIPI_FRAME			(RKISP1_CIF_MIPI_BASE + 0x00000040)
1081 #define RKISP1_CIF_MIPI_GEN_SHORT_DT		(RKISP1_CIF_MIPI_BASE + 0x00000044)
1082 #define RKISP1_CIF_MIPI_GEN_SHORT_8_9		(RKISP1_CIF_MIPI_BASE + 0x00000048)
1083 #define RKISP1_CIF_MIPI_GEN_SHORT_A_B		(RKISP1_CIF_MIPI_BASE + 0x0000004c)
1084 #define RKISP1_CIF_MIPI_GEN_SHORT_C_D		(RKISP1_CIF_MIPI_BASE + 0x00000050)
1085 #define RKISP1_CIF_MIPI_GEN_SHORT_E_F		(RKISP1_CIF_MIPI_BASE + 0x00000054)
1086 
1087 #define RKISP1_CIF_ISP_AFM_BASE			0x00002000
1088 #define RKISP1_CIF_ISP_AFM_CTRL			(RKISP1_CIF_ISP_AFM_BASE + 0x00000000)
1089 #define RKISP1_CIF_ISP_AFM_LT_A			(RKISP1_CIF_ISP_AFM_BASE + 0x00000004)
1090 #define RKISP1_CIF_ISP_AFM_RB_A			(RKISP1_CIF_ISP_AFM_BASE + 0x00000008)
1091 #define RKISP1_CIF_ISP_AFM_LT_B			(RKISP1_CIF_ISP_AFM_BASE + 0x0000000c)
1092 #define RKISP1_CIF_ISP_AFM_RB_B			(RKISP1_CIF_ISP_AFM_BASE + 0x00000010)
1093 #define RKISP1_CIF_ISP_AFM_LT_C			(RKISP1_CIF_ISP_AFM_BASE + 0x00000014)
1094 #define RKISP1_CIF_ISP_AFM_RB_C			(RKISP1_CIF_ISP_AFM_BASE + 0x00000018)
1095 #define RKISP1_CIF_ISP_AFM_THRES		(RKISP1_CIF_ISP_AFM_BASE + 0x0000001c)
1096 #define RKISP1_CIF_ISP_AFM_VAR_SHIFT		(RKISP1_CIF_ISP_AFM_BASE + 0x00000020)
1097 #define RKISP1_CIF_ISP_AFM_SUM_A		(RKISP1_CIF_ISP_AFM_BASE + 0x00000024)
1098 #define RKISP1_CIF_ISP_AFM_SUM_B		(RKISP1_CIF_ISP_AFM_BASE + 0x00000028)
1099 #define RKISP1_CIF_ISP_AFM_SUM_C		(RKISP1_CIF_ISP_AFM_BASE + 0x0000002c)
1100 #define RKISP1_CIF_ISP_AFM_LUM_A		(RKISP1_CIF_ISP_AFM_BASE + 0x00000030)
1101 #define RKISP1_CIF_ISP_AFM_LUM_B		(RKISP1_CIF_ISP_AFM_BASE + 0x00000034)
1102 #define RKISP1_CIF_ISP_AFM_LUM_C		(RKISP1_CIF_ISP_AFM_BASE + 0x00000038)
1103 
1104 #define RKISP1_CIF_ISP_LSC_BASE			0x00002200
1105 #define RKISP1_CIF_ISP_LSC_CTRL			(RKISP1_CIF_ISP_LSC_BASE + 0x00000000)
1106 #define RKISP1_CIF_ISP_LSC_R_TABLE_ADDR		(RKISP1_CIF_ISP_LSC_BASE + 0x00000004)
1107 #define RKISP1_CIF_ISP_LSC_GR_TABLE_ADDR	(RKISP1_CIF_ISP_LSC_BASE + 0x00000008)
1108 #define RKISP1_CIF_ISP_LSC_B_TABLE_ADDR		(RKISP1_CIF_ISP_LSC_BASE + 0x0000000c)
1109 #define RKISP1_CIF_ISP_LSC_GB_TABLE_ADDR	(RKISP1_CIF_ISP_LSC_BASE + 0x00000010)
1110 #define RKISP1_CIF_ISP_LSC_R_TABLE_DATA		(RKISP1_CIF_ISP_LSC_BASE + 0x00000014)
1111 #define RKISP1_CIF_ISP_LSC_GR_TABLE_DATA	(RKISP1_CIF_ISP_LSC_BASE + 0x00000018)
1112 #define RKISP1_CIF_ISP_LSC_B_TABLE_DATA		(RKISP1_CIF_ISP_LSC_BASE + 0x0000001c)
1113 #define RKISP1_CIF_ISP_LSC_GB_TABLE_DATA	(RKISP1_CIF_ISP_LSC_BASE + 0x00000020)
1114 #define RKISP1_CIF_ISP_LSC_XGRAD(n)		(RKISP1_CIF_ISP_LSC_BASE + 0x00000024 + (n) * 4)
1115 #define RKISP1_CIF_ISP_LSC_YGRAD(n)		(RKISP1_CIF_ISP_LSC_BASE + 0x00000034 + (n) * 4)
1116 #define RKISP1_CIF_ISP_LSC_XSIZE(n)		(RKISP1_CIF_ISP_LSC_BASE + 0x00000044 + (n) * 4)
1117 #define RKISP1_CIF_ISP_LSC_YSIZE(n)		(RKISP1_CIF_ISP_LSC_BASE + 0x00000054 + (n) * 4)
1118 #define RKISP1_CIF_ISP_LSC_TABLE_SEL		(RKISP1_CIF_ISP_LSC_BASE + 0x00000064)
1119 #define RKISP1_CIF_ISP_LSC_STATUS		(RKISP1_CIF_ISP_LSC_BASE + 0x00000068)
1120 
1121 #define RKISP1_CIF_ISP_IS_BASE			0x00002300
1122 #define RKISP1_CIF_ISP_IS_CTRL			(RKISP1_CIF_ISP_IS_BASE + 0x00000000)
1123 #define RKISP1_CIF_ISP_IS_RECENTER		(RKISP1_CIF_ISP_IS_BASE + 0x00000004)
1124 #define RKISP1_CIF_ISP_IS_H_OFFS		(RKISP1_CIF_ISP_IS_BASE + 0x00000008)
1125 #define RKISP1_CIF_ISP_IS_V_OFFS		(RKISP1_CIF_ISP_IS_BASE + 0x0000000c)
1126 #define RKISP1_CIF_ISP_IS_H_SIZE		(RKISP1_CIF_ISP_IS_BASE + 0x00000010)
1127 #define RKISP1_CIF_ISP_IS_V_SIZE		(RKISP1_CIF_ISP_IS_BASE + 0x00000014)
1128 #define RKISP1_CIF_ISP_IS_MAX_DX		(RKISP1_CIF_ISP_IS_BASE + 0x00000018)
1129 #define RKISP1_CIF_ISP_IS_MAX_DY		(RKISP1_CIF_ISP_IS_BASE + 0x0000001c)
1130 #define RKISP1_CIF_ISP_IS_DISPLACE		(RKISP1_CIF_ISP_IS_BASE + 0x00000020)
1131 #define RKISP1_CIF_ISP_IS_H_OFFS_SHD		(RKISP1_CIF_ISP_IS_BASE + 0x00000024)
1132 #define RKISP1_CIF_ISP_IS_V_OFFS_SHD		(RKISP1_CIF_ISP_IS_BASE + 0x00000028)
1133 #define RKISP1_CIF_ISP_IS_H_SIZE_SHD		(RKISP1_CIF_ISP_IS_BASE + 0x0000002c)
1134 #define RKISP1_CIF_ISP_IS_V_SIZE_SHD		(RKISP1_CIF_ISP_IS_BASE + 0x00000030)
1135 
1136 #define RKISP1_CIF_ISP_HIST_BASE_V10		0x00002400
1137 #define RKISP1_CIF_ISP_HIST_PROP_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000000)
1138 #define RKISP1_CIF_ISP_HIST_H_OFFS_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000004)
1139 #define RKISP1_CIF_ISP_HIST_V_OFFS_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000008)
1140 #define RKISP1_CIF_ISP_HIST_H_SIZE_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000000c)
1141 #define RKISP1_CIF_ISP_HIST_V_SIZE_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000010)
1142 #define RKISP1_CIF_ISP_HIST_BIN_0_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000014)
1143 #define RKISP1_CIF_ISP_HIST_BIN_1_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000018)
1144 #define RKISP1_CIF_ISP_HIST_BIN_2_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000001c)
1145 #define RKISP1_CIF_ISP_HIST_BIN_3_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000020)
1146 #define RKISP1_CIF_ISP_HIST_BIN_4_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000024)
1147 #define RKISP1_CIF_ISP_HIST_BIN_5_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000028)
1148 #define RKISP1_CIF_ISP_HIST_BIN_6_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000002c)
1149 #define RKISP1_CIF_ISP_HIST_BIN_7_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000030)
1150 #define RKISP1_CIF_ISP_HIST_BIN_8_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000034)
1151 #define RKISP1_CIF_ISP_HIST_BIN_9_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000038)
1152 #define RKISP1_CIF_ISP_HIST_BIN_10_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000003c)
1153 #define RKISP1_CIF_ISP_HIST_BIN_11_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000040)
1154 #define RKISP1_CIF_ISP_HIST_BIN_12_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000044)
1155 #define RKISP1_CIF_ISP_HIST_BIN_13_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000048)
1156 #define RKISP1_CIF_ISP_HIST_BIN_14_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000004c)
1157 #define RKISP1_CIF_ISP_HIST_BIN_15_V10		(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000050)
1158 #define RKISP1_CIF_ISP_HIST_WEIGHT_00TO30_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000054)
1159 #define RKISP1_CIF_ISP_HIST_WEIGHT_40TO21_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000058)
1160 #define RKISP1_CIF_ISP_HIST_WEIGHT_31TO12_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000005c)
1161 #define RKISP1_CIF_ISP_HIST_WEIGHT_22TO03_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000060)
1162 #define RKISP1_CIF_ISP_HIST_WEIGHT_13TO43_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000064)
1163 #define RKISP1_CIF_ISP_HIST_WEIGHT_04TO34_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x00000068)
1164 #define RKISP1_CIF_ISP_HIST_WEIGHT_44_V10	(RKISP1_CIF_ISP_HIST_BASE_V10 + 0x0000006c)
1165 
1166 #define RKISP1_CIF_ISP_FILT_BASE		0x00002500
1167 #define RKISP1_CIF_ISP_FILT_MODE		(RKISP1_CIF_ISP_FILT_BASE + 0x00000000)
1168 #define RKISP1_CIF_ISP_FILT_THRESH_BL0		(RKISP1_CIF_ISP_FILT_BASE + 0x00000028)
1169 #define RKISP1_CIF_ISP_FILT_THRESH_BL1		(RKISP1_CIF_ISP_FILT_BASE + 0x0000002c)
1170 #define RKISP1_CIF_ISP_FILT_THRESH_SH0		(RKISP1_CIF_ISP_FILT_BASE + 0x00000030)
1171 #define RKISP1_CIF_ISP_FILT_THRESH_SH1		(RKISP1_CIF_ISP_FILT_BASE + 0x00000034)
1172 #define RKISP1_CIF_ISP_FILT_LUM_WEIGHT		(RKISP1_CIF_ISP_FILT_BASE + 0x00000038)
1173 #define RKISP1_CIF_ISP_FILT_FAC_SH1		(RKISP1_CIF_ISP_FILT_BASE + 0x0000003c)
1174 #define RKISP1_CIF_ISP_FILT_FAC_SH0		(RKISP1_CIF_ISP_FILT_BASE + 0x00000040)
1175 #define RKISP1_CIF_ISP_FILT_FAC_MID		(RKISP1_CIF_ISP_FILT_BASE + 0x00000044)
1176 #define RKISP1_CIF_ISP_FILT_FAC_BL0		(RKISP1_CIF_ISP_FILT_BASE + 0x00000048)
1177 #define RKISP1_CIF_ISP_FILT_FAC_BL1		(RKISP1_CIF_ISP_FILT_BASE + 0x0000004c)
1178 
1179 #define RKISP1_CIF_ISP_CAC_BASE			0x00002580
1180 #define RKISP1_CIF_ISP_CAC_CTRL			(RKISP1_CIF_ISP_CAC_BASE + 0x00000000)
1181 #define RKISP1_CIF_ISP_CAC_COUNT_START		(RKISP1_CIF_ISP_CAC_BASE + 0x00000004)
1182 #define RKISP1_CIF_ISP_CAC_A			(RKISP1_CIF_ISP_CAC_BASE + 0x00000008)
1183 #define RKISP1_CIF_ISP_CAC_B			(RKISP1_CIF_ISP_CAC_BASE + 0x0000000c)
1184 #define RKISP1_CIF_ISP_CAC_C			(RKISP1_CIF_ISP_CAC_BASE + 0x00000010)
1185 #define RKISP1_CIF_ISP_X_NORM			(RKISP1_CIF_ISP_CAC_BASE + 0x00000014)
1186 #define RKISP1_CIF_ISP_Y_NORM			(RKISP1_CIF_ISP_CAC_BASE + 0x00000018)
1187 
1188 #define RKISP1_CIF_ISP_EXP_BASE			0x00002600
1189 #define RKISP1_CIF_ISP_EXP_CTRL			(RKISP1_CIF_ISP_EXP_BASE + 0x00000000)
1190 #define RKISP1_CIF_ISP_EXP_H_OFFSET_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000004)
1191 #define RKISP1_CIF_ISP_EXP_V_OFFSET_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000008)
1192 #define RKISP1_CIF_ISP_EXP_H_SIZE_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000000c)
1193 #define RKISP1_CIF_ISP_EXP_V_SIZE_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000010)
1194 #define RKISP1_CIF_ISP_EXP_MEAN_00_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000014)
1195 #define RKISP1_CIF_ISP_EXP_MEAN_10_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000018)
1196 #define RKISP1_CIF_ISP_EXP_MEAN_20_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000001c)
1197 #define RKISP1_CIF_ISP_EXP_MEAN_30_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000020)
1198 #define RKISP1_CIF_ISP_EXP_MEAN_40_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000024)
1199 #define RKISP1_CIF_ISP_EXP_MEAN_01_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000028)
1200 #define RKISP1_CIF_ISP_EXP_MEAN_11_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000002c)
1201 #define RKISP1_CIF_ISP_EXP_MEAN_21_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000030)
1202 #define RKISP1_CIF_ISP_EXP_MEAN_31_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000034)
1203 #define RKISP1_CIF_ISP_EXP_MEAN_41_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000038)
1204 #define RKISP1_CIF_ISP_EXP_MEAN_02_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000003c)
1205 #define RKISP1_CIF_ISP_EXP_MEAN_12_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000040)
1206 #define RKISP1_CIF_ISP_EXP_MEAN_22_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000044)
1207 #define RKISP1_CIF_ISP_EXP_MEAN_32_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000048)
1208 #define RKISP1_CIF_ISP_EXP_MEAN_42_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000004c)
1209 #define RKISP1_CIF_ISP_EXP_MEAN_03_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000050)
1210 #define RKISP1_CIF_ISP_EXP_MEAN_13_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000054)
1211 #define RKISP1_CIF_ISP_EXP_MEAN_23_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000058)
1212 #define RKISP1_CIF_ISP_EXP_MEAN_33_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000005c)
1213 #define RKISP1_CIF_ISP_EXP_MEAN_43_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000060)
1214 #define RKISP1_CIF_ISP_EXP_MEAN_04_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000064)
1215 #define RKISP1_CIF_ISP_EXP_MEAN_14_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000068)
1216 #define RKISP1_CIF_ISP_EXP_MEAN_24_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x0000006c)
1217 #define RKISP1_CIF_ISP_EXP_MEAN_34_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000070)
1218 #define RKISP1_CIF_ISP_EXP_MEAN_44_V10		(RKISP1_CIF_ISP_EXP_BASE + 0x00000074)
1219 #define RKISP1_CIF_ISP_EXP_SIZE_V12		(RKISP1_CIF_ISP_EXP_BASE + 0x00000004)
1220 #define RKISP1_CIF_ISP_EXP_OFFS_V12		(RKISP1_CIF_ISP_EXP_BASE + 0x00000008)
1221 #define RKISP1_CIF_ISP_EXP_MEAN_V12		(RKISP1_CIF_ISP_EXP_BASE + 0x0000000c)
1222 
1223 #define RKISP1_CIF_ISP_BLS_BASE			0x00002700
1224 #define RKISP1_CIF_ISP_BLS_CTRL			(RKISP1_CIF_ISP_BLS_BASE + 0x00000000)
1225 #define RKISP1_CIF_ISP_BLS_SAMPLES		(RKISP1_CIF_ISP_BLS_BASE + 0x00000004)
1226 #define RKISP1_CIF_ISP_BLS_H1_START		(RKISP1_CIF_ISP_BLS_BASE + 0x00000008)
1227 #define RKISP1_CIF_ISP_BLS_H1_STOP		(RKISP1_CIF_ISP_BLS_BASE + 0x0000000c)
1228 #define RKISP1_CIF_ISP_BLS_V1_START		(RKISP1_CIF_ISP_BLS_BASE + 0x00000010)
1229 #define RKISP1_CIF_ISP_BLS_V1_STOP		(RKISP1_CIF_ISP_BLS_BASE + 0x00000014)
1230 #define RKISP1_CIF_ISP_BLS_H2_START		(RKISP1_CIF_ISP_BLS_BASE + 0x00000018)
1231 #define RKISP1_CIF_ISP_BLS_H2_STOP		(RKISP1_CIF_ISP_BLS_BASE + 0x0000001c)
1232 #define RKISP1_CIF_ISP_BLS_V2_START		(RKISP1_CIF_ISP_BLS_BASE + 0x00000020)
1233 #define RKISP1_CIF_ISP_BLS_V2_STOP		(RKISP1_CIF_ISP_BLS_BASE + 0x00000024)
1234 #define RKISP1_CIF_ISP_BLS_A_FIXED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000028)
1235 #define RKISP1_CIF_ISP_BLS_B_FIXED		(RKISP1_CIF_ISP_BLS_BASE + 0x0000002c)
1236 #define RKISP1_CIF_ISP_BLS_C_FIXED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000030)
1237 #define RKISP1_CIF_ISP_BLS_D_FIXED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000034)
1238 #define RKISP1_CIF_ISP_BLS_A_MEASURED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000038)
1239 #define RKISP1_CIF_ISP_BLS_B_MEASURED		(RKISP1_CIF_ISP_BLS_BASE + 0x0000003c)
1240 #define RKISP1_CIF_ISP_BLS_C_MEASURED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000040)
1241 #define RKISP1_CIF_ISP_BLS_D_MEASURED		(RKISP1_CIF_ISP_BLS_BASE + 0x00000044)
1242 
1243 #define RKISP1_CIF_ISP_DPF_BASE			0x00002800
1244 #define RKISP1_CIF_ISP_DPF_MODE			(RKISP1_CIF_ISP_DPF_BASE + 0x00000000)
1245 #define RKISP1_CIF_ISP_DPF_STRENGTH_R		(RKISP1_CIF_ISP_DPF_BASE + 0x00000004)
1246 #define RKISP1_CIF_ISP_DPF_STRENGTH_G		(RKISP1_CIF_ISP_DPF_BASE + 0x00000008)
1247 #define RKISP1_CIF_ISP_DPF_STRENGTH_B		(RKISP1_CIF_ISP_DPF_BASE + 0x0000000c)
1248 #define RKISP1_CIF_ISP_DPF_S_WEIGHT_G_1_4	(RKISP1_CIF_ISP_DPF_BASE + 0x00000010)
1249 #define RKISP1_CIF_ISP_DPF_S_WEIGHT_G_5_6	(RKISP1_CIF_ISP_DPF_BASE + 0x00000014)
1250 #define RKISP1_CIF_ISP_DPF_S_WEIGHT_RB_1_4	(RKISP1_CIF_ISP_DPF_BASE + 0x00000018)
1251 #define RKISP1_CIF_ISP_DPF_S_WEIGHT_RB_5_6	(RKISP1_CIF_ISP_DPF_BASE + 0x0000001c)
1252 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_0		(RKISP1_CIF_ISP_DPF_BASE + 0x00000020)
1253 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_1		(RKISP1_CIF_ISP_DPF_BASE + 0x00000024)
1254 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_2		(RKISP1_CIF_ISP_DPF_BASE + 0x00000028)
1255 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_3		(RKISP1_CIF_ISP_DPF_BASE + 0x0000002c)
1256 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_4		(RKISP1_CIF_ISP_DPF_BASE + 0x00000030)
1257 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_5		(RKISP1_CIF_ISP_DPF_BASE + 0x00000034)
1258 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_6		(RKISP1_CIF_ISP_DPF_BASE + 0x00000038)
1259 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_7		(RKISP1_CIF_ISP_DPF_BASE + 0x0000003c)
1260 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_8		(RKISP1_CIF_ISP_DPF_BASE + 0x00000040)
1261 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_9		(RKISP1_CIF_ISP_DPF_BASE + 0x00000044)
1262 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_10	(RKISP1_CIF_ISP_DPF_BASE + 0x00000048)
1263 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_11	(RKISP1_CIF_ISP_DPF_BASE + 0x0000004c)
1264 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_12	(RKISP1_CIF_ISP_DPF_BASE + 0x00000050)
1265 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_13	(RKISP1_CIF_ISP_DPF_BASE + 0x00000054)
1266 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_14	(RKISP1_CIF_ISP_DPF_BASE + 0x00000058)
1267 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_15	(RKISP1_CIF_ISP_DPF_BASE + 0x0000005c)
1268 #define RKISP1_CIF_ISP_DPF_NULL_COEFF_16	(RKISP1_CIF_ISP_DPF_BASE + 0x00000060)
1269 #define RKISP1_CIF_ISP_DPF_NF_GAIN_R		(RKISP1_CIF_ISP_DPF_BASE + 0x00000064)
1270 #define RKISP1_CIF_ISP_DPF_NF_GAIN_GR		(RKISP1_CIF_ISP_DPF_BASE + 0x00000068)
1271 #define RKISP1_CIF_ISP_DPF_NF_GAIN_GB		(RKISP1_CIF_ISP_DPF_BASE + 0x0000006c)
1272 #define RKISP1_CIF_ISP_DPF_NF_GAIN_B		(RKISP1_CIF_ISP_DPF_BASE + 0x00000070)
1273 
1274 #define RKISP1_CIF_ISP_DPCC_BASE		0x00002900
1275 #define RKISP1_CIF_ISP_DPCC_MODE		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000000)
1276 #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000004)
1277 #define RKISP1_CIF_ISP_DPCC_SET_USE		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000008)
1278 #define RKISP1_CIF_ISP_DPCC_METHODS_SET_1	(RKISP1_CIF_ISP_DPCC_BASE + 0x0000000c)
1279 #define RKISP1_CIF_ISP_DPCC_METHODS_SET_2	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000010)
1280 #define RKISP1_CIF_ISP_DPCC_METHODS_SET_3	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000014)
1281 #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_1	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000018)
1282 #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_1	(RKISP1_CIF_ISP_DPCC_BASE + 0x0000001c)
1283 #define RKISP1_CIF_ISP_DPCC_PG_FAC_1		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000020)
1284 #define RKISP1_CIF_ISP_DPCC_RND_THRESH_1	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000024)
1285 #define RKISP1_CIF_ISP_DPCC_RG_FAC_1		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000028)
1286 #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_2	(RKISP1_CIF_ISP_DPCC_BASE + 0x0000002c)
1287 #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_2	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000030)
1288 #define RKISP1_CIF_ISP_DPCC_PG_FAC_2		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000034)
1289 #define RKISP1_CIF_ISP_DPCC_RND_THRESH_2	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000038)
1290 #define RKISP1_CIF_ISP_DPCC_RG_FAC_2		(RKISP1_CIF_ISP_DPCC_BASE + 0x0000003c)
1291 #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_3	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000040)
1292 #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_3	(RKISP1_CIF_ISP_DPCC_BASE + 0x00000044)
1293 #define RKISP1_CIF_ISP_DPCC_PG_FAC_3		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000048)
1294 #define RKISP1_CIF_ISP_DPCC_RND_THRESH_3	(RKISP1_CIF_ISP_DPCC_BASE + 0x0000004c)
1295 #define RKISP1_CIF_ISP_DPCC_RG_FAC_3		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000050)
1296 #define RKISP1_CIF_ISP_DPCC_RO_LIMITS		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000054)
1297 #define RKISP1_CIF_ISP_DPCC_RND_OFFS		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000058)
1298 #define RKISP1_CIF_ISP_DPCC_BPT_CTRL		(RKISP1_CIF_ISP_DPCC_BASE + 0x0000005c)
1299 #define RKISP1_CIF_ISP_DPCC_BPT_NUMBER		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000060)
1300 #define RKISP1_CIF_ISP_DPCC_BPT_ADDR		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000064)
1301 #define RKISP1_CIF_ISP_DPCC_BPT_DATA		(RKISP1_CIF_ISP_DPCC_BASE + 0x00000068)
1302 
1303 #define RKISP1_CIF_ISP_WDR_BASE			0x00002a00
1304 #define RKISP1_CIF_ISP_WDR_CTRL			(RKISP1_CIF_ISP_WDR_BASE + 0x00000000)
1305 #define RKISP1_CIF_ISP_WDR_TONECURVE_1		(RKISP1_CIF_ISP_WDR_BASE + 0x00000004)
1306 #define RKISP1_CIF_ISP_WDR_TONECURVE_2		(RKISP1_CIF_ISP_WDR_BASE + 0x00000008)
1307 #define RKISP1_CIF_ISP_WDR_TONECURVE_3		(RKISP1_CIF_ISP_WDR_BASE + 0x0000000c)
1308 #define RKISP1_CIF_ISP_WDR_TONECURVE_4		(RKISP1_CIF_ISP_WDR_BASE + 0x00000010)
1309 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_0	(RKISP1_CIF_ISP_WDR_BASE + 0x00000014)
1310 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_1	(RKISP1_CIF_ISP_WDR_BASE + 0x00000018)
1311 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_2	(RKISP1_CIF_ISP_WDR_BASE + 0x0000001c)
1312 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_3	(RKISP1_CIF_ISP_WDR_BASE + 0x00000020)
1313 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_4	(RKISP1_CIF_ISP_WDR_BASE + 0x00000024)
1314 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_5	(RKISP1_CIF_ISP_WDR_BASE + 0x00000028)
1315 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_6	(RKISP1_CIF_ISP_WDR_BASE + 0x0000002c)
1316 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_7	(RKISP1_CIF_ISP_WDR_BASE + 0x00000030)
1317 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_8	(RKISP1_CIF_ISP_WDR_BASE + 0x00000034)
1318 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_9	(RKISP1_CIF_ISP_WDR_BASE + 0x00000038)
1319 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_10	(RKISP1_CIF_ISP_WDR_BASE + 0x0000003c)
1320 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_11	(RKISP1_CIF_ISP_WDR_BASE + 0x00000040)
1321 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_12	(RKISP1_CIF_ISP_WDR_BASE + 0x00000044)
1322 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_13	(RKISP1_CIF_ISP_WDR_BASE + 0x00000048)
1323 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_14	(RKISP1_CIF_ISP_WDR_BASE + 0x0000004c)
1324 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_15	(RKISP1_CIF_ISP_WDR_BASE + 0x00000050)
1325 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_16	(RKISP1_CIF_ISP_WDR_BASE + 0x00000054)
1326 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_17	(RKISP1_CIF_ISP_WDR_BASE + 0x00000058)
1327 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_18	(RKISP1_CIF_ISP_WDR_BASE + 0x0000005c)
1328 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_19	(RKISP1_CIF_ISP_WDR_BASE + 0x00000060)
1329 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_20	(RKISP1_CIF_ISP_WDR_BASE + 0x00000064)
1330 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_21	(RKISP1_CIF_ISP_WDR_BASE + 0x00000068)
1331 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_22	(RKISP1_CIF_ISP_WDR_BASE + 0x0000006c)
1332 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_23	(RKISP1_CIF_ISP_WDR_BASE + 0x00000070)
1333 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_24	(RKISP1_CIF_ISP_WDR_BASE + 0x00000074)
1334 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_25	(RKISP1_CIF_ISP_WDR_BASE + 0x00000078)
1335 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_26	(RKISP1_CIF_ISP_WDR_BASE + 0x0000007c)
1336 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_27	(RKISP1_CIF_ISP_WDR_BASE + 0x00000080)
1337 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_28	(RKISP1_CIF_ISP_WDR_BASE + 0x00000084)
1338 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_29	(RKISP1_CIF_ISP_WDR_BASE + 0x00000088)
1339 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_30	(RKISP1_CIF_ISP_WDR_BASE + 0x0000008c)
1340 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_31	(RKISP1_CIF_ISP_WDR_BASE + 0x00000090)
1341 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_32	(RKISP1_CIF_ISP_WDR_BASE + 0x00000094)
1342 #define RKISP1_CIF_ISP_WDR_OFFSET		(RKISP1_CIF_ISP_WDR_BASE + 0x00000098)
1343 #define RKISP1_CIF_ISP_WDR_DELTAMIN		(RKISP1_CIF_ISP_WDR_BASE + 0x0000009c)
1344 #define RKISP1_CIF_ISP_WDR_TONECURVE_1_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000a0)
1345 #define RKISP1_CIF_ISP_WDR_TONECURVE_2_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000a4)
1346 #define RKISP1_CIF_ISP_WDR_TONECURVE_3_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000a8)
1347 #define RKISP1_CIF_ISP_WDR_TONECURVE_4_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000ac)
1348 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_0_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000b0)
1349 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_1_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000b4)
1350 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_2_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000b8)
1351 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_3_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000bc)
1352 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_4_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000c0)
1353 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_5_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000c4)
1354 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_6_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000c8)
1355 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_7_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000cc)
1356 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_8_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000d0)
1357 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_9_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000d4)
1358 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_10_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000d8)
1359 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_11_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000dc)
1360 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_12_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000e0)
1361 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_13_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000e4)
1362 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_14_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000e8)
1363 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_15_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000ec)
1364 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_16_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000f0)
1365 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_17_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000f4)
1366 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_18_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000f8)
1367 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_19_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x000000fc)
1368 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_20_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000100)
1369 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_21_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000104)
1370 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_22_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000108)
1371 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_23_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x0000010c)
1372 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_24_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000110)
1373 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_25_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000114)
1374 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_26_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000118)
1375 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_27_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x0000011c)
1376 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_28_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000120)
1377 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_29_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000124)
1378 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_30_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000128)
1379 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_31_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x0000012c)
1380 #define RKISP1_CIF_ISP_WDR_TONECURVE_YM_32_SHD	(RKISP1_CIF_ISP_WDR_BASE + 0x00000130)
1381 
1382 #define RKISP1_CIF_ISP_HIST_BASE_V12		0x00002c00
1383 #define RKISP1_CIF_ISP_HIST_CTRL_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x00000000)
1384 #define RKISP1_CIF_ISP_HIST_SIZE_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x00000004)
1385 #define RKISP1_CIF_ISP_HIST_OFFS_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x00000008)
1386 #define RKISP1_CIF_ISP_HIST_DBG1_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x0000000c)
1387 #define RKISP1_CIF_ISP_HIST_DBG2_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x0000001c)
1388 #define RKISP1_CIF_ISP_HIST_DBG3_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x0000002c)
1389 #define RKISP1_CIF_ISP_HIST_WEIGHT_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x0000003c)
1390 #define RKISP1_CIF_ISP_HIST_BIN_V12		(RKISP1_CIF_ISP_HIST_BASE_V12 + 0x00000120)
1391 
1392 #define RKISP1_CIF_ISP_VSM_BASE			0x00002f00
1393 #define RKISP1_CIF_ISP_VSM_MODE			(RKISP1_CIF_ISP_VSM_BASE + 0x00000000)
1394 #define RKISP1_CIF_ISP_VSM_H_OFFS		(RKISP1_CIF_ISP_VSM_BASE + 0x00000004)
1395 #define RKISP1_CIF_ISP_VSM_V_OFFS		(RKISP1_CIF_ISP_VSM_BASE + 0x00000008)
1396 #define RKISP1_CIF_ISP_VSM_H_SIZE		(RKISP1_CIF_ISP_VSM_BASE + 0x0000000c)
1397 #define RKISP1_CIF_ISP_VSM_V_SIZE		(RKISP1_CIF_ISP_VSM_BASE + 0x00000010)
1398 #define RKISP1_CIF_ISP_VSM_H_SEGMENTS		(RKISP1_CIF_ISP_VSM_BASE + 0x00000014)
1399 #define RKISP1_CIF_ISP_VSM_V_SEGMENTS		(RKISP1_CIF_ISP_VSM_BASE + 0x00000018)
1400 #define RKISP1_CIF_ISP_VSM_DELTA_H		(RKISP1_CIF_ISP_VSM_BASE + 0x0000001c)
1401 #define RKISP1_CIF_ISP_VSM_DELTA_V		(RKISP1_CIF_ISP_VSM_BASE + 0x00000020)
1402 
1403 #define RKISP1_CIF_ISP_COMPAND_BASE			0x00003200
1404 #define RKISP1_CIF_ISP_COMPAND_CTRL			(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000000)
1405 #define RKISP1_CIF_ISP_COMPAND_BLS_A_FIXED		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000004)
1406 #define RKISP1_CIF_ISP_COMPAND_BLS_B_FIXED		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000008)
1407 #define RKISP1_CIF_ISP_COMPAND_BLS_C_FIXED		(RKISP1_CIF_ISP_COMPAND_BASE + 0x0000000c)
1408 #define RKISP1_CIF_ISP_COMPAND_BLS_D_FIXED		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000010)
1409 #define RKISP1_CIF_ISP_COMPAND_EXPAND_PX_N(n)		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000014 + (n) * 4)
1410 #define RKISP1_CIF_ISP_COMPAND_COMPRESS_PX_N(n)		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000040 + (n) * 4)
1411 #define RKISP1_CIF_ISP_COMPAND_EXPAND_Y_ADDR		(RKISP1_CIF_ISP_COMPAND_BASE + 0x0000006c)
1412 #define RKISP1_CIF_ISP_COMPAND_EXPAND_Y_WRITE_DATA	(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000070)
1413 #define RKISP1_CIF_ISP_COMPAND_COMPRESS_Y_ADDR		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000074)
1414 #define RKISP1_CIF_ISP_COMPAND_COMPRESS_Y_WRITE_DATA	(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000078)
1415 #define RKISP1_CIF_ISP_COMPAND_EXPAND_X_ADDR		(RKISP1_CIF_ISP_COMPAND_BASE + 0x0000007c)
1416 #define RKISP1_CIF_ISP_COMPAND_EXPAND_X_WRITE_DATA	(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000080)
1417 #define RKISP1_CIF_ISP_COMPAND_COMPRESS_X_ADDR		(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000084)
1418 #define RKISP1_CIF_ISP_COMPAND_COMPRESS_X_WRITE_DATA	(RKISP1_CIF_ISP_COMPAND_BASE + 0x00000088)
1419 
1420 #define RKISP1_CIF_ISP_CSI0_BASE		0x00007000
1421 #define RKISP1_CIF_ISP_CSI0_CTRL0		(RKISP1_CIF_ISP_CSI0_BASE + 0x00000000)
1422 
1423 #endif /* _RKISP1_REGS_H */
1424