Go to the documentation of this file.
17 #define FIMC_REG_CISRCFMT 0x00
18 #define FIMC_REG_CISRCFMT_ITU601_8BIT (1 << 31)
19 #define FIMC_REG_CISRCFMT_ITU601_16BIT (1 << 29)
20 #define FIMC_REG_CISRCFMT_ORDER422_YCBYCR (0 << 14)
21 #define FIMC_REG_CISRCFMT_ORDER422_YCRYCB (1 << 14)
22 #define FIMC_REG_CISRCFMT_ORDER422_CBYCRY (2 << 14)
23 #define FIMC_REG_CISRCFMT_ORDER422_CRYCBY (3 << 14)
26 #define FIMC_REG_CIWDOFST 0x04
27 #define FIMC_REG_CIWDOFST_OFF_EN (1 << 31)
28 #define FIMC_REG_CIWDOFST_CLROVFIY (1 << 30)
29 #define FIMC_REG_CIWDOFST_CLROVRLB (1 << 29)
30 #define FIMC_REG_CIWDOFST_HOROFF_MASK (0x7ff << 16)
31 #define FIMC_REG_CIWDOFST_CLROVFICB (1 << 15)
32 #define FIMC_REG_CIWDOFST_CLROVFICR (1 << 14)
33 #define FIMC_REG_CIWDOFST_VEROFF_MASK (0xfff << 0)
36 #define FIMC_REG_CIGCTRL 0x08
37 #define FIMC_REG_CIGCTRL_SWRST (1 << 31)
38 #define FIMC_REG_CIGCTRL_CAMRST_A (1 << 30)
39 #define FIMC_REG_CIGCTRL_SELCAM_ITU_A (1 << 29)
40 #define FIMC_REG_CIGCTRL_TESTPAT_NORMAL (0 << 27)
41 #define FIMC_REG_CIGCTRL_TESTPAT_COLOR_BAR (1 << 27)
42 #define FIMC_REG_CIGCTRL_TESTPAT_HOR_INC (2 << 27)
43 #define FIMC_REG_CIGCTRL_TESTPAT_VER_INC (3 << 27)
44 #define FIMC_REG_CIGCTRL_TESTPAT_MASK (3 << 27)
45 #define FIMC_REG_CIGCTRL_TESTPAT_SHIFT 27
46 #define FIMC_REG_CIGCTRL_INVPOLPCLK (1 << 26)
47 #define FIMC_REG_CIGCTRL_INVPOLVSYNC (1 << 25)
48 #define FIMC_REG_CIGCTRL_INVPOLHREF (1 << 24)
49 #define FIMC_REG_CIGCTRL_IRQ_OVFEN (1 << 22)
50 #define FIMC_REG_CIGCTRL_HREF_MASK (1 << 21)
51 #define FIMC_REG_CIGCTRL_IRQ_LEVEL (1 << 20)
52 #define FIMC_REG_CIGCTRL_IRQ_CLR (1 << 19)
53 #define FIMC_REG_CIGCTRL_IRQ_ENABLE (1 << 16)
54 #define FIMC_REG_CIGCTRL_SHDW_DISABLE (1 << 12)
55 #define FIMC_REG_CIGCTRL_CAM_JPEG (1 << 8)
56 #define FIMC_REG_CIGCTRL_SELCAM_MIPI_A (1 << 7)
57 #define FIMC_REG_CIGCTRL_CAMIF_SELWB (1 << 6)
59 #define FIMC_REG_CIGCTRL_CSC_ITU601_709 (1 << 5)
60 #define FIMC_REG_CIGCTRL_INVPOLHSYNC (1 << 4)
61 #define FIMC_REG_CIGCTRL_SELCAM_MIPI (1 << 3)
62 #define FIMC_REG_CIGCTRL_INVPOLFIELD (1 << 1)
63 #define FIMC_REG_CIGCTRL_INTERLACE (1 << 0)
66 #define FIMC_REG_CIWDOFST2 0x14
67 #define FIMC_REG_CIWDOFST2_HOROFF_MASK (0xfff << 16)
68 #define FIMC_REG_CIWDOFST2_VEROFF_MASK (0xfff << 0)
71 #define FIMC_REG_CIOYSA(n) (0x18 + (n) * 4)
72 #define FIMC_REG_CIOCBSA(n) (0x28 + (n) * 4)
73 #define FIMC_REG_CIOCRSA(n) (0x38 + (n) * 4)
76 #define FIMC_REG_CITRGFMT 0x48
77 #define FIMC_REG_CITRGFMT_INROT90 (1 << 31)
78 #define FIMC_REG_CITRGFMT_YCBCR420 (0 << 29)
79 #define FIMC_REG_CITRGFMT_YCBCR422 (1 << 29)
80 #define FIMC_REG_CITRGFMT_YCBCR422_1P (2 << 29)
81 #define FIMC_REG_CITRGFMT_RGB (3 << 29)
82 #define FIMC_REG_CITRGFMT_FMT_MASK (3 << 29)
83 #define FIMC_REG_CITRGFMT_HSIZE_MASK (0xfff << 16)
84 #define FIMC_REG_CITRGFMT_FLIP_SHIFT 14
85 #define FIMC_REG_CITRGFMT_FLIP_NORMAL (0 << 14)
86 #define FIMC_REG_CITRGFMT_FLIP_X_MIRROR (1 << 14)
87 #define FIMC_REG_CITRGFMT_FLIP_Y_MIRROR (2 << 14)
88 #define FIMC_REG_CITRGFMT_FLIP_180 (3 << 14)
89 #define FIMC_REG_CITRGFMT_FLIP_MASK (3 << 14)
90 #define FIMC_REG_CITRGFMT_OUTROT90 (1 << 13)
91 #define FIMC_REG_CITRGFMT_VSIZE_MASK (0xfff << 0)
94 #define FIMC_REG_CIOCTRL 0x4c
95 #define FIMC_REG_CIOCTRL_ORDER422_MASK (3 << 0)
96 #define FIMC_REG_CIOCTRL_ORDER422_CRYCBY (0 << 0)
97 #define FIMC_REG_CIOCTRL_ORDER422_CBYCRY (1 << 0)
98 #define FIMC_REG_CIOCTRL_ORDER422_YCRYCB (2 << 0)
99 #define FIMC_REG_CIOCTRL_ORDER422_YCBYCR (3 << 0)
100 #define FIMC_REG_CIOCTRL_LASTIRQ_ENABLE (1 << 2)
101 #define FIMC_REG_CIOCTRL_YCBCR_3PLANE (0 << 3)
102 #define FIMC_REG_CIOCTRL_YCBCR_2PLANE (1 << 3)
103 #define FIMC_REG_CIOCTRL_YCBCR_PLANE_MASK (1 << 3)
104 #define FIMC_REG_CIOCTRL_ALPHA_OUT_MASK (0xff << 4)
105 #define FIMC_REG_CIOCTRL_RGB16FMT_MASK (3 << 16)
106 #define FIMC_REG_CIOCTRL_RGB565 (0 << 16)
107 #define FIMC_REG_CIOCTRL_ARGB1555 (1 << 16)
108 #define FIMC_REG_CIOCTRL_ARGB4444 (2 << 16)
109 #define FIMC_REG_CIOCTRL_ORDER2P_SHIFT 24
110 #define FIMC_REG_CIOCTRL_ORDER2P_MASK (3 << 24)
111 #define FIMC_REG_CIOCTRL_ORDER422_2P_LSB_CRCB (0 << 24)
114 #define FIMC_REG_CISCPRERATIO 0x50
116 #define FIMC_REG_CISCPREDST 0x54
119 #define FIMC_REG_CISCCTRL 0x58
120 #define FIMC_REG_CISCCTRL_SCALERBYPASS (1 << 31)
121 #define FIMC_REG_CISCCTRL_SCALEUP_H (1 << 30)
122 #define FIMC_REG_CISCCTRL_SCALEUP_V (1 << 29)
123 #define FIMC_REG_CISCCTRL_CSCR2Y_WIDE (1 << 28)
124 #define FIMC_REG_CISCCTRL_CSCY2R_WIDE (1 << 27)
125 #define FIMC_REG_CISCCTRL_LCDPATHEN_FIFO (1 << 26)
126 #define FIMC_REG_CISCCTRL_INTERLACE (1 << 25)
127 #define FIMC_REG_CISCCTRL_SCALERSTART (1 << 15)
128 #define FIMC_REG_CISCCTRL_INRGB_FMT_RGB565 (0 << 13)
129 #define FIMC_REG_CISCCTRL_INRGB_FMT_RGB666 (1 << 13)
130 #define FIMC_REG_CISCCTRL_INRGB_FMT_RGB888 (2 << 13)
131 #define FIMC_REG_CISCCTRL_INRGB_FMT_MASK (3 << 13)
132 #define FIMC_REG_CISCCTRL_OUTRGB_FMT_RGB565 (0 << 11)
133 #define FIMC_REG_CISCCTRL_OUTRGB_FMT_RGB666 (1 << 11)
134 #define FIMC_REG_CISCCTRL_OUTRGB_FMT_RGB888 (2 << 11)
135 #define FIMC_REG_CISCCTRL_OUTRGB_FMT_MASK (3 << 11)
136 #define FIMC_REG_CISCCTRL_RGB_EXT (1 << 10)
137 #define FIMC_REG_CISCCTRL_ONE2ONE (1 << 9)
138 #define FIMC_REG_CISCCTRL_MHRATIO(x) ((x) << 16)
139 #define FIMC_REG_CISCCTRL_MVRATIO(x) ((x) << 0)
140 #define FIMC_REG_CISCCTRL_MHRATIO_MASK (0x1ff << 16)
141 #define FIMC_REG_CISCCTRL_MVRATIO_MASK (0x1ff << 0)
142 #define FIMC_REG_CISCCTRL_MHRATIO_EXT(x) (((x) >> 6) << 16)
143 #define FIMC_REG_CISCCTRL_MVRATIO_EXT(x) (((x) >> 6) << 0)
146 #define FIMC_REG_CITAREA 0x5c
147 #define FIMC_REG_CITAREA_MASK 0x0fffffff
150 #define FIMC_REG_CISTATUS 0x64
151 #define FIMC_REG_CISTATUS_OVFIY (1 << 31)
152 #define FIMC_REG_CISTATUS_OVFICB (1 << 30)
153 #define FIMC_REG_CISTATUS_OVFICR (1 << 29)
154 #define FIMC_REG_CISTATUS_VSYNC (1 << 28)
155 #define FIMC_REG_CISTATUS_FRAMECNT_MASK (3 << 26)
156 #define FIMC_REG_CISTATUS_FRAMECNT_SHIFT 26
157 #define FIMC_REG_CISTATUS_WINOFF_EN (1 << 25)
158 #define FIMC_REG_CISTATUS_IMGCPT_EN (1 << 22)
159 #define FIMC_REG_CISTATUS_IMGCPT_SCEN (1 << 21)
160 #define FIMC_REG_CISTATUS_VSYNC_A (1 << 20)
161 #define FIMC_REG_CISTATUS_VSYNC_B (1 << 19)
162 #define FIMC_REG_CISTATUS_OVRLB (1 << 18)
163 #define FIMC_REG_CISTATUS_FRAME_END (1 << 17)
164 #define FIMC_REG_CISTATUS_LASTCAPT_END (1 << 16)
165 #define FIMC_REG_CISTATUS_VVALID_A (1 << 15)
166 #define FIMC_REG_CISTATUS_VVALID_B (1 << 14)
169 #define FIMC_REG_CISTATUS2 0x68
172 #define FIMC_REG_CIIMGCPT 0xc0
173 #define FIMC_REG_CIIMGCPT_IMGCPTEN (1 << 31)
174 #define FIMC_REG_CIIMGCPT_IMGCPTEN_SC (1 << 30)
175 #define FIMC_REG_CIIMGCPT_CPT_FREN_ENABLE (1 << 25)
176 #define FIMC_REG_CIIMGCPT_CPT_FRMOD_CNT (1 << 18)
179 #define FIMC_REG_CICPTSEQ 0xc4
182 #define FIMC_REG_CIIMGEFF 0xd0
183 #define FIMC_REG_CIIMGEFF_IE_ENABLE (1 << 30)
184 #define FIMC_REG_CIIMGEFF_IE_SC_BEFORE (0 << 29)
185 #define FIMC_REG_CIIMGEFF_IE_SC_AFTER (1 << 29)
186 #define FIMC_REG_CIIMGEFF_FIN_BYPASS (0 << 26)
187 #define FIMC_REG_CIIMGEFF_FIN_ARBITRARY (1 << 26)
188 #define FIMC_REG_CIIMGEFF_FIN_NEGATIVE (2 << 26)
189 #define FIMC_REG_CIIMGEFF_FIN_ARTFREEZE (3 << 26)
190 #define FIMC_REG_CIIMGEFF_FIN_EMBOSSING (4 << 26)
191 #define FIMC_REG_CIIMGEFF_FIN_SILHOUETTE (5 << 26)
192 #define FIMC_REG_CIIMGEFF_FIN_MASK (7 << 26)
193 #define FIMC_REG_CIIMGEFF_PAT_CBCR_MASK ((0xff << 13) | 0xff)
196 #define FIMC_REG_CIIYSA(n) (0xd4 + (n) * 0x70)
197 #define FIMC_REG_CIICBSA(n) (0xd8 + (n) * 0x70)
198 #define FIMC_REG_CIICRSA(n) (0xdc + (n) * 0x70)
201 #define FIMC_REG_CIREAL_ISIZE 0xf8
202 #define FIMC_REG_CIREAL_ISIZE_AUTOLOAD_EN (1 << 31)
203 #define FIMC_REG_CIREAL_ISIZE_ADDR_CH_DIS (1 << 30)
206 #define FIMC_REG_MSCTRL 0xfc
207 #define FIMC_REG_MSCTRL_IN_BURST_COUNT_MASK (0xf << 24)
208 #define FIMC_REG_MSCTRL_2P_IN_ORDER_MASK (3 << 16)
209 #define FIMC_REG_MSCTRL_2P_IN_ORDER_SHIFT 16
210 #define FIMC_REG_MSCTRL_C_INT_IN_3PLANE (0 << 15)
211 #define FIMC_REG_MSCTRL_C_INT_IN_2PLANE (1 << 15)
212 #define FIMC_REG_MSCTRL_C_INT_IN_MASK (1 << 15)
213 #define FIMC_REG_MSCTRL_FLIP_SHIFT 13
214 #define FIMC_REG_MSCTRL_FLIP_MASK (3 << 13)
215 #define FIMC_REG_MSCTRL_FLIP_NORMAL (0 << 13)
216 #define FIMC_REG_MSCTRL_FLIP_X_MIRROR (1 << 13)
217 #define FIMC_REG_MSCTRL_FLIP_Y_MIRROR (2 << 13)
218 #define FIMC_REG_MSCTRL_FLIP_180 (3 << 13)
219 #define FIMC_REG_MSCTRL_FIFO_CTRL_FULL (1 << 12)
220 #define FIMC_REG_MSCTRL_ORDER422_SHIFT 4
221 #define FIMC_REG_MSCTRL_ORDER422_YCBYCR (0 << 4)
222 #define FIMC_REG_MSCTRL_ORDER422_CBYCRY (1 << 4)
223 #define FIMC_REG_MSCTRL_ORDER422_YCRYCB (2 << 4)
224 #define FIMC_REG_MSCTRL_ORDER422_CRYCBY (3 << 4)
225 #define FIMC_REG_MSCTRL_ORDER422_MASK (3 << 4)
226 #define FIMC_REG_MSCTRL_INPUT_EXTCAM (0 << 3)
227 #define FIMC_REG_MSCTRL_INPUT_MEMORY (1 << 3)
228 #define FIMC_REG_MSCTRL_INPUT_MASK (1 << 3)
229 #define FIMC_REG_MSCTRL_INFORMAT_YCBCR420 (0 << 1)
230 #define FIMC_REG_MSCTRL_INFORMAT_YCBCR422 (1 << 1)
231 #define FIMC_REG_MSCTRL_INFORMAT_YCBCR422_1P (2 << 1)
232 #define FIMC_REG_MSCTRL_INFORMAT_RGB (3 << 1)
233 #define FIMC_REG_MSCTRL_INFORMAT_MASK (3 << 1)
234 #define FIMC_REG_MSCTRL_ENVID (1 << 0)
235 #define FIMC_REG_MSCTRL_IN_BURST_COUNT(x) ((x) << 24)
238 #define FIMC_REG_CIOYOFF 0x168
239 #define FIMC_REG_CIOCBOFF 0x16c
240 #define FIMC_REG_CIOCROFF 0x170
243 #define FIMC_REG_CIIYOFF 0x174
244 #define FIMC_REG_CIICBOFF 0x178
245 #define FIMC_REG_CIICROFF 0x17c
248 #define FIMC_REG_ORGISIZE 0x180
251 #define FIMC_REG_ORGOSIZE 0x184
254 #define FIMC_REG_CIEXTEN 0x188
255 #define FIMC_REG_CIEXTEN_MHRATIO_EXT(x) (((x) & 0x3f) << 10)
256 #define FIMC_REG_CIEXTEN_MVRATIO_EXT(x) ((x) & 0x3f)
257 #define FIMC_REG_CIEXTEN_MHRATIO_EXT_MASK (0x3f << 10)
258 #define FIMC_REG_CIEXTEN_MVRATIO_EXT_MASK 0x3f
260 #define FIMC_REG_CIDMAPARAM 0x18c
261 #define FIMC_REG_CIDMAPARAM_R_LINEAR (0 << 29)
262 #define FIMC_REG_CIDMAPARAM_R_64X32 (3 << 29)
263 #define FIMC_REG_CIDMAPARAM_W_LINEAR (0 << 13)
264 #define FIMC_REG_CIDMAPARAM_W_64X32 (3 << 13)
265 #define FIMC_REG_CIDMAPARAM_TILE_MASK ((3 << 29) | (3 << 13))
268 #define FIMC_REG_CSIIMGFMT 0x194
269 #define FIMC_REG_CSIIMGFMT_YCBCR422_8BIT 0x1e
270 #define FIMC_REG_CSIIMGFMT_RAW8 0x2a
271 #define FIMC_REG_CSIIMGFMT_RAW10 0x2b
272 #define FIMC_REG_CSIIMGFMT_RAW12 0x2c
274 #define FIMC_REG_CSIIMGFMT_USER(x) (0x30 + x - 1)
277 #define FIMC_REG_CIFCNTSEQ 0x1fc