aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/m5mols/m5mols_reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/m5mols/m5mols_reg.h')
-rw-r--r--drivers/media/video/m5mols/m5mols_reg.h247
1 files changed, 99 insertions, 148 deletions
diff --git a/drivers/media/video/m5mols/m5mols_reg.h b/drivers/media/video/m5mols/m5mols_reg.h
index c755bd6edfe..ae4aced0f9b 100644
--- a/drivers/media/video/m5mols/m5mols_reg.h
+++ b/drivers/media/video/m5mols/m5mols_reg.h
@@ -55,39 +55,31 @@
55 * There is many registers between customer version address and awb one. For 55 * There is many registers between customer version address and awb one. For
56 * more specific contents, see definition if file m5mols.h. 56 * more specific contents, see definition if file m5mols.h.
57 */ 57 */
58#define CAT0_VER_CUSTOMER 0x00 /* customer version */ 58#define SYSTEM_VER_CUSTOMER I2C_REG(CAT_SYSTEM, 0x00, 1)
59#define CAT0_VER_PROJECT 0x01 /* project version */ 59#define SYSTEM_VER_PROJECT I2C_REG(CAT_SYSTEM, 0x01, 1)
60#define CAT0_VER_FIRMWARE 0x02 /* Firmware version */ 60#define SYSTEM_VER_FIRMWARE I2C_REG(CAT_SYSTEM, 0x02, 2)
61#define CAT0_VER_HARDWARE 0x04 /* Hardware version */ 61#define SYSTEM_VER_HARDWARE I2C_REG(CAT_SYSTEM, 0x04, 2)
62#define CAT0_VER_PARAMETER 0x06 /* Parameter version */ 62#define SYSTEM_VER_PARAMETER I2C_REG(CAT_SYSTEM, 0x06, 2)
63#define CAT0_VER_AWB 0x08 /* Auto WB version */ 63#define SYSTEM_VER_AWB I2C_REG(CAT_SYSTEM, 0x08, 2)
64#define CAT0_VER_STRING 0x0a /* string including M-5MOLS */ 64
65#define CAT0_SYSMODE 0x0b /* SYSTEM mode register */ 65#define SYSTEM_SYSMODE I2C_REG(CAT_SYSTEM, 0x0b, 1)
66#define CAT0_STATUS 0x0c /* SYSTEM mode status register */
67#define CAT0_INT_FACTOR 0x10 /* interrupt pending register */
68#define CAT0_INT_ENABLE 0x11 /* interrupt enable register */
69
70#define SYSTEM_VER_CUSTOMER I2C_REG(CAT_SYSTEM, CAT0_VER_CUSTOMER, 1)
71#define SYSTEM_VER_PROJECT I2C_REG(CAT_SYSTEM, CAT0_VER_PROJECT, 1)
72#define SYSTEM_VER_FIRMWARE I2C_REG(CAT_SYSTEM, CAT0_VER_FIRMWARE, 2)
73#define SYSTEM_VER_HARDWARE I2C_REG(CAT_SYSTEM, CAT0_VER_HARDWARE, 2)
74#define SYSTEM_VER_PARAMETER I2C_REG(CAT_SYSTEM, CAT0_VER_PARAMETER, 2)
75#define SYSTEM_VER_AWB I2C_REG(CAT_SYSTEM, CAT0_VER_AWB, 2)
76
77#define SYSTEM_SYSMODE I2C_REG(CAT_SYSTEM, CAT0_SYSMODE, 1)
78#define REG_SYSINIT 0x00 /* SYSTEM mode */ 66#define REG_SYSINIT 0x00 /* SYSTEM mode */
79#define REG_PARAMETER 0x01 /* PARAMETER mode */ 67#define REG_PARAMETER 0x01 /* PARAMETER mode */
80#define REG_MONITOR 0x02 /* MONITOR mode */ 68#define REG_MONITOR 0x02 /* MONITOR mode */
81#define REG_CAPTURE 0x03 /* CAPTURE mode */ 69#define REG_CAPTURE 0x03 /* CAPTURE mode */
82 70
83#define SYSTEM_CMD(__cmd) I2C_REG(CAT_SYSTEM, cmd, 1) 71#define SYSTEM_CMD(__cmd) I2C_REG(CAT_SYSTEM, cmd, 1)
84#define SYSTEM_VER_STRING I2C_REG(CAT_SYSTEM, CAT0_VER_STRING, 1) 72#define SYSTEM_VER_STRING I2C_REG(CAT_SYSTEM, 0x0a, 1)
85#define REG_SAMSUNG_ELECTRO "SE" /* Samsung Electro-Mechanics */ 73#define REG_SAMSUNG_ELECTRO "SE" /* Samsung Electro-Mechanics */
86#define REG_SAMSUNG_OPTICS "OP" /* Samsung Fiber-Optics */ 74#define REG_SAMSUNG_OPTICS "OP" /* Samsung Fiber-Optics */
87#define REG_SAMSUNG_TECHWIN "TB" /* Samsung Techwin */ 75#define REG_SAMSUNG_TECHWIN "TB" /* Samsung Techwin */
76/* SYSTEM mode status */
77#define SYSTEM_STATUS I2C_REG(CAT_SYSTEM, 0x0c, 1)
88 78
89#define SYSTEM_INT_FACTOR I2C_REG(CAT_SYSTEM, CAT0_INT_FACTOR, 1) 79/* Interrupt pending register */
90#define SYSTEM_INT_ENABLE I2C_REG(CAT_SYSTEM, CAT0_INT_ENABLE, 1) 80#define SYSTEM_INT_FACTOR I2C_REG(CAT_SYSTEM, 0x10, 1)
81/* interrupt enable register */
82#define SYSTEM_INT_ENABLE I2C_REG(CAT_SYSTEM, 0x11, 1)
91#define REG_INT_MODE (1 << 0) 83#define REG_INT_MODE (1 << 0)
92#define REG_INT_AF (1 << 1) 84#define REG_INT_AF (1 << 1)
93#define REG_INT_ZOOM (1 << 2) 85#define REG_INT_ZOOM (1 << 2)
@@ -105,20 +97,20 @@
105 * can handle with preview(MONITOR) resolution size/frame per second/interface 97 * can handle with preview(MONITOR) resolution size/frame per second/interface
106 * between the sensor and the Application Processor/even the image effect. 98 * between the sensor and the Application Processor/even the image effect.
107 */ 99 */
108#define CAT1_DATA_INTERFACE 0x00 /* interface between sensor and AP */
109#define CAT1_MONITOR_SIZE 0x01 /* resolution at the MONITOR mode */
110#define CAT1_MONITOR_FPS 0x02 /* frame per second at this mode */
111#define CAT1_EFFECT 0x0b /* image effects */
112 100
113#define PARM_MON_SIZE I2C_REG(CAT_PARAM, CAT1_MONITOR_SIZE, 1) 101/* Resolution in the MONITOR mode */
102#define PARM_MON_SIZE I2C_REG(CAT_PARAM, 0x01, 1)
114 103
115#define PARM_MON_FPS I2C_REG(CAT_PARAM, CAT1_MONITOR_FPS, 1) 104/* Frame rate */
105#define PARM_MON_FPS I2C_REG(CAT_PARAM, 0x02, 1)
116#define REG_FPS_30 0x02 106#define REG_FPS_30 0x02
117 107
118#define PARM_INTERFACE I2C_REG(CAT_PARAM, CAT1_DATA_INTERFACE, 1) 108/* Video bus between the sensor and a host processor */
109#define PARM_INTERFACE I2C_REG(CAT_PARAM, 0x00, 1)
119#define REG_INTERFACE_MIPI 0x02 110#define REG_INTERFACE_MIPI 0x02
120 111
121#define PARM_EFFECT I2C_REG(CAT_PARAM, CAT1_EFFECT, 1) 112/* Image effects */
113#define PARM_EFFECT I2C_REG(CAT_PARAM, 0x0b, 1)
122#define REG_EFFECT_OFF 0x00 114#define REG_EFFECT_OFF 0x00
123#define REG_EFFECT_NEGA 0x01 115#define REG_EFFECT_NEGA 0x01
124#define REG_EFFECT_EMBOSS 0x06 116#define REG_EFFECT_EMBOSS 0x06
@@ -135,39 +127,37 @@
135 * another options like zoom/color effect(different with effect in PARAMETER 127 * another options like zoom/color effect(different with effect in PARAMETER
136 * mode)/anti hand shaking algorithm. 128 * mode)/anti hand shaking algorithm.
137 */ 129 */
138#define CAT2_ZOOM 0x01 /* set the zoom position & execute */ 130
139#define CAT2_ZOOM_STEP 0x03 /* set the zoom step */ 131/* Target digital zoom position */
140#define CAT2_CFIXB 0x09 /* CB value for color effect */ 132#define MON_ZOOM I2C_REG(CAT_MONITOR, 0x01, 1)
141#define CAT2_CFIXR 0x0a /* CR value for color effect */ 133
142#define CAT2_COLOR_EFFECT 0x0b /* set on/off of color effect */ 134/* CR value for color effect */
143#define CAT2_CHROMA_LVL 0x0f /* set chroma level */ 135#define MON_CFIXR I2C_REG(CAT_MONITOR, 0x0a, 1)
144#define CAT2_CHROMA_EN 0x10 /* set on/off of choroma */ 136/* CB value for color effect */
145#define CAT2_EDGE_LVL 0x11 /* set sharpness level */ 137#define MON_CFIXB I2C_REG(CAT_MONITOR, 0x09, 1)
146#define CAT2_EDGE_EN 0x12 /* set on/off sharpness */
147#define CAT2_TONE_CTL 0x25 /* set tone color(contrast) */
148
149#define MON_ZOOM I2C_REG(CAT_MONITOR, CAT2_ZOOM, 1)
150
151#define MON_CFIXR I2C_REG(CAT_MONITOR, CAT2_CFIXR, 1)
152#define MON_CFIXB I2C_REG(CAT_MONITOR, CAT2_CFIXB, 1)
153#define REG_CFIXB_SEPIA 0xd8 138#define REG_CFIXB_SEPIA 0xd8
154#define REG_CFIXR_SEPIA 0x18 139#define REG_CFIXR_SEPIA 0x18
155 140
156#define MON_EFFECT I2C_REG(CAT_MONITOR, CAT2_COLOR_EFFECT, 1) 141#define MON_EFFECT I2C_REG(CAT_MONITOR, 0x0b, 1)
157#define REG_COLOR_EFFECT_OFF 0x00 142#define REG_COLOR_EFFECT_OFF 0x00
158#define REG_COLOR_EFFECT_ON 0x01 143#define REG_COLOR_EFFECT_ON 0x01
159 144
160#define MON_CHROMA_EN I2C_REG(CAT_MONITOR, CAT2_CHROMA_EN, 1) 145/* Chroma enable */
161#define MON_CHROMA_LVL I2C_REG(CAT_MONITOR, CAT2_CHROMA_LVL, 1) 146#define MON_CHROMA_EN I2C_REG(CAT_MONITOR, 0x10, 1)
147/* Chroma level */
148#define MON_CHROMA_LVL I2C_REG(CAT_MONITOR, 0x0f, 1)
162#define REG_CHROMA_OFF 0x00 149#define REG_CHROMA_OFF 0x00
163#define REG_CHROMA_ON 0x01 150#define REG_CHROMA_ON 0x01
164 151
165#define MON_EDGE_EN I2C_REG(CAT_MONITOR, CAT2_EDGE_EN, 1) 152/* Sharpness on/off */
166#define MON_EDGE_LVL I2C_REG(CAT_MONITOR, CAT2_EDGE_LVL, 1) 153#define MON_EDGE_EN I2C_REG(CAT_MONITOR, 0x12, 1)
154/* Sharpness level */
155#define MON_EDGE_LVL I2C_REG(CAT_MONITOR, 0x11, 1)
167#define REG_EDGE_OFF 0x00 156#define REG_EDGE_OFF 0x00
168#define REG_EDGE_ON 0x01 157#define REG_EDGE_ON 0x01
169 158
170#define MON_TONE_CTL I2C_REG(CAT_MONITOR, CAT2_TONE_CTL, 1) 159/* Set color tone (contrast) */
160#define MON_TONE_CTL I2C_REG(CAT_MONITOR, 0x25, 1)
171 161
172/* 162/*
173 * Category 3 - Auto Exposure 163 * Category 3 - Auto Exposure
@@ -179,27 +169,20 @@
179 * different. So, this category also provide getting the max/min values. And, 169 * different. So, this category also provide getting the max/min values. And,
180 * each MONITOR and CAPTURE mode has each gain/shutter/max exposure values. 170 * each MONITOR and CAPTURE mode has each gain/shutter/max exposure values.
181 */ 171 */
182#define CAT3_AE_LOCK 0x00 /* locking Auto exposure */ 172
183#define CAT3_AE_MODE 0x01 /* set AE mode, mode means range */ 173/* Auto Exposure locking */
184#define CAT3_ISO 0x05 /* set ISO */ 174#define AE_LOCK I2C_REG(CAT_AE, 0x00, 1)
185#define CAT3_EV_PRESET_MONITOR 0x0a /* EV(scenemode) preset for MONITOR */
186#define CAT3_EV_PRESET_CAPTURE 0x0b /* EV(scenemode) preset for CAPTURE */
187#define CAT3_MANUAL_GAIN_MON 0x12 /* meteoring value for the MONITOR */
188#define CAT3_MAX_GAIN_MON 0x1a /* max gain value for the MONITOR */
189#define CAT3_MANUAL_GAIN_CAP 0x26 /* meteoring value for the CAPTURE */
190#define CAT3_AE_INDEX 0x38 /* AE index */
191
192#define AE_LOCK I2C_REG(CAT_AE, CAT3_AE_LOCK, 1)
193#define REG_AE_UNLOCK 0x00 175#define REG_AE_UNLOCK 0x00
194#define REG_AE_LOCK 0x01 176#define REG_AE_LOCK 0x01
195 177
196#define AE_MODE I2C_REG(CAT_AE, CAT3_AE_MODE, 1) 178/* Auto Exposure algorithm mode */
179#define AE_MODE I2C_REG(CAT_AE, 0x01, 1)
197#define REG_AE_OFF 0x00 /* AE off */ 180#define REG_AE_OFF 0x00 /* AE off */
198#define REG_AE_ALL 0x01 /* calc AE in all block integral */ 181#define REG_AE_ALL 0x01 /* calc AE in all block integral */
199#define REG_AE_CENTER 0x03 /* calc AE in center weighted */ 182#define REG_AE_CENTER 0x03 /* calc AE in center weighted */
200#define REG_AE_SPOT 0x06 /* calc AE in specific spot */ 183#define REG_AE_SPOT 0x06 /* calc AE in specific spot */
201 184
202#define AE_ISO I2C_REG(CAT_AE, CAT3_ISO, 1) 185#define AE_ISO I2C_REG(CAT_AE, 0x05, 1)
203#define REG_ISO_AUTO 0x00 186#define REG_ISO_AUTO 0x00
204#define REG_ISO_50 0x01 187#define REG_ISO_50 0x01
205#define REG_ISO_100 0x02 188#define REG_ISO_100 0x02
@@ -207,8 +190,10 @@
207#define REG_ISO_400 0x04 190#define REG_ISO_400 0x04
208#define REG_ISO_800 0x05 191#define REG_ISO_800 0x05
209 192
210#define AE_EV_PRESET_MONITOR I2C_REG(CAT_AE, CAT3_EV_PRESET_MONITOR, 1) 193/* EV (scenemode) preset for MONITOR */
211#define AE_EV_PRESET_CAPTURE I2C_REG(CAT_AE, CAT3_EV_PRESET_CAPTURE, 1) 194#define AE_EV_PRESET_MONITOR I2C_REG(CAT_AE, 0x0a, 1)
195/* EV (scenemode) preset for CAPTURE */
196#define AE_EV_PRESET_CAPTURE I2C_REG(CAT_AE, 0x0b, 1)
212#define REG_SCENE_NORMAL 0x00 197#define REG_SCENE_NORMAL 0x00
213#define REG_SCENE_PORTRAIT 0x01 198#define REG_SCENE_PORTRAIT 0x01
214#define REG_SCENE_LANDSCAPE 0x02 199#define REG_SCENE_LANDSCAPE 0x02
@@ -224,11 +209,14 @@
224#define REG_SCENE_TEXT 0x0c 209#define REG_SCENE_TEXT 0x0c
225#define REG_SCENE_CANDLE 0x0d 210#define REG_SCENE_CANDLE 0x0d
226 211
227#define AE_MAN_GAIN_MON I2C_REG(CAT_AE, CAT3_MANUAL_GAIN_MON, 2) 212/* Manual gain in MONITOR mode */
228#define AE_MAX_GAIN_MON I2C_REG(CAT_AE, CAT3_MAX_GAIN_MON, 2) 213#define AE_MAN_GAIN_MON I2C_REG(CAT_AE, 0x12, 2)
229#define AE_MAN_GAIN_CAP I2C_REG(CAT_AE, CAT3_MANUAL_GAIN_CAP, 2) 214/* Maximum gain in MONITOR mode */
215#define AE_MAX_GAIN_MON I2C_REG(CAT_AE, 0x1a, 2)
216/* Manual gain in CAPTURE mode */
217#define AE_MAN_GAIN_CAP I2C_REG(CAT_AE, 0x26, 2)
230 218
231#define AE_INDEX I2C_REG(CAT_AE, CAT3_AE_INDEX, 1) 219#define AE_INDEX I2C_REG(CAT_AE, 0x38, 1)
232#define REG_AE_INDEX_20_NEG 0x00 220#define REG_AE_INDEX_20_NEG 0x00
233#define REG_AE_INDEX_15_NEG 0x01 221#define REG_AE_INDEX_15_NEG 0x01
234#define REG_AE_INDEX_10_NEG 0x02 222#define REG_AE_INDEX_10_NEG 0x02
@@ -241,22 +229,19 @@
241 229
242/* 230/*
243 * Category 6 - White Balance 231 * Category 6 - White Balance
244 *
245 * This category provide AWB locking/mode/preset/speed/gain bias, etc.
246 */ 232 */
247#define CAT6_AWB_LOCK 0x00 /* locking Auto Whitebalance */
248#define CAT6_AWB_MODE 0x02 /* set Auto or Manual */
249#define CAT6_AWB_MANUAL 0x03 /* set Manual(preset) value */
250 233
251#define AWB_LOCK I2C_REG(CAT_WB, CAT6_AWB_LOCK, 1) 234/* Auto Whitebalance locking */
235#define AWB_LOCK I2C_REG(CAT_WB, 0x00, 1)
252#define REG_AWB_UNLOCK 0x00 236#define REG_AWB_UNLOCK 0x00
253#define REG_AWB_LOCK 0x01 237#define REG_AWB_LOCK 0x01
254 238
255#define AWB_MODE I2C_REG(CAT_WB, CAT6_AWB_MODE, 1) 239#define AWB_MODE I2C_REG(CAT_WB, 0x02, 1)
256#define REG_AWB_AUTO 0x01 /* AWB off */ 240#define REG_AWB_AUTO 0x01 /* AWB off */
257#define REG_AWB_PRESET 0x02 /* AWB preset */ 241#define REG_AWB_PRESET 0x02 /* AWB preset */
258 242
259#define AWB_MANUAL I2C_REG(CAT_WB, CAT6_AWB_MANUAL, 1) 243/* Manual WB (preset) */
244#define AWB_MANUAL I2C_REG(CAT_WB, 0x03, 1)
260#define REG_AWB_INCANDESCENT 0x01 245#define REG_AWB_INCANDESCENT 0x01
261#define REG_AWB_FLUORESCENT_1 0x02 246#define REG_AWB_FLUORESCENT_1 0x02
262#define REG_AWB_FLUORESCENT_2 0x03 247#define REG_AWB_FLUORESCENT_2 0x03
@@ -269,42 +254,25 @@
269/* 254/*
270 * Category 7 - EXIF information 255 * Category 7 - EXIF information
271 */ 256 */
272#define CAT7_INFO_EXPTIME_NU 0x00 257#define EXIF_INFO_EXPTIME_NU I2C_REG(CAT_EXIF, 0x00, 4)
273#define CAT7_INFO_EXPTIME_DE 0x04 258#define EXIF_INFO_EXPTIME_DE I2C_REG(CAT_EXIF, 0x04, 4)
274#define CAT7_INFO_TV_NU 0x08 259#define EXIF_INFO_TV_NU I2C_REG(CAT_EXIF, 0x08, 4)
275#define CAT7_INFO_TV_DE 0x0c 260#define EXIF_INFO_TV_DE I2C_REG(CAT_EXIF, 0x0c, 4)
276#define CAT7_INFO_AV_NU 0x10 261#define EXIF_INFO_AV_NU I2C_REG(CAT_EXIF, 0x10, 4)
277#define CAT7_INFO_AV_DE 0x14 262#define EXIF_INFO_AV_DE I2C_REG(CAT_EXIF, 0x14, 4)
278#define CAT7_INFO_BV_NU 0x18 263#define EXIF_INFO_BV_NU I2C_REG(CAT_EXIF, 0x18, 4)
279#define CAT7_INFO_BV_DE 0x1c 264#define EXIF_INFO_BV_DE I2C_REG(CAT_EXIF, 0x1c, 4)
280#define CAT7_INFO_EBV_NU 0x20 265#define EXIF_INFO_EBV_NU I2C_REG(CAT_EXIF, 0x20, 4)
281#define CAT7_INFO_EBV_DE 0x24 266#define EXIF_INFO_EBV_DE I2C_REG(CAT_EXIF, 0x24, 4)
282#define CAT7_INFO_ISO 0x28 267#define EXIF_INFO_ISO I2C_REG(CAT_EXIF, 0x28, 2)
283#define CAT7_INFO_FLASH 0x2a 268#define EXIF_INFO_FLASH I2C_REG(CAT_EXIF, 0x2a, 2)
284#define CAT7_INFO_SDR 0x2c 269#define EXIF_INFO_SDR I2C_REG(CAT_EXIF, 0x2c, 2)
285#define CAT7_INFO_QVAL 0x2e 270#define EXIF_INFO_QVAL I2C_REG(CAT_EXIF, 0x2e, 2)
286
287#define EXIF_INFO_EXPTIME_NU I2C_REG(CAT_EXIF, CAT7_INFO_EXPTIME_NU, 4)
288#define EXIF_INFO_EXPTIME_DE I2C_REG(CAT_EXIF, CAT7_INFO_EXPTIME_DE, 4)
289#define EXIF_INFO_TV_NU I2C_REG(CAT_EXIF, CAT7_INFO_TV_NU, 4)
290#define EXIF_INFO_TV_DE I2C_REG(CAT_EXIF, CAT7_INFO_TV_DE, 4)
291#define EXIF_INFO_AV_NU I2C_REG(CAT_EXIF, CAT7_INFO_AV_NU, 4)
292#define EXIF_INFO_AV_DE I2C_REG(CAT_EXIF, CAT7_INFO_AV_DE, 4)
293#define EXIF_INFO_BV_NU I2C_REG(CAT_EXIF, CAT7_INFO_BV_NU, 4)
294#define EXIF_INFO_BV_DE I2C_REG(CAT_EXIF, CAT7_INFO_BV_DE, 4)
295#define EXIF_INFO_EBV_NU I2C_REG(CAT_EXIF, CAT7_INFO_EBV_NU, 4)
296#define EXIF_INFO_EBV_DE I2C_REG(CAT_EXIF, CAT7_INFO_EBV_DE, 4)
297#define EXIF_INFO_ISO I2C_REG(CAT_EXIF, CAT7_INFO_ISO, 2)
298#define EXIF_INFO_FLASH I2C_REG(CAT_EXIF, CAT7_INFO_FLASH, 2)
299#define EXIF_INFO_SDR I2C_REG(CAT_EXIF, CAT7_INFO_SDR, 2)
300#define EXIF_INFO_QVAL I2C_REG(CAT_EXIF, CAT7_INFO_QVAL, 2)
301 271
302/* 272/*
303 * Category 9 - Face Detection 273 * Category 9 - Face Detection
304 */ 274 */
305#define CAT9_FD_CTL 0x00 275#define FD_CTL I2C_REG(CAT_FD, 0x00, 1)
306
307#define FD_CTL I2C_REG(CAT_FD, CAT9_FD_CTL, 1)
308#define BIT_FD_EN 0 276#define BIT_FD_EN 0
309#define BIT_FD_DRAW_FACE_FRAME 4 277#define BIT_FD_DRAW_FACE_FRAME 4
310#define BIT_FD_DRAW_SMILE_LVL 6 278#define BIT_FD_DRAW_SMILE_LVL 6
@@ -314,62 +282,50 @@
314/* 282/*
315 * Category A - Lens Parameter 283 * Category A - Lens Parameter
316 */ 284 */
317#define CATA_AF_MODE 0x01 285#define AF_MODE I2C_REG(CAT_LENS, 0x01, 1)
318#define CATA_AF_EXECUTE 0x02
319#define CATA_AF_STATUS 0x03
320#define CATA_AF_VERSION 0x0a
321
322#define AF_MODE I2C_REG(CAT_LENS, CATA_AF_MODE, 1)
323#define REG_AF_NORMAL 0x00 /* Normal AF, one time */ 286#define REG_AF_NORMAL 0x00 /* Normal AF, one time */
324#define REG_AF_MACRO 0x01 /* Macro AF, one time */ 287#define REG_AF_MACRO 0x01 /* Macro AF, one time */
325#define REG_AF_POWEROFF 0x07 288#define REG_AF_POWEROFF 0x07
326 289
327#define AF_EXECUTE I2C_REG(CAT_LENS, CATA_AF_EXECUTE, 1) 290#define AF_EXECUTE I2C_REG(CAT_LENS, 0x02, 1)
328#define REG_AF_STOP 0x00 291#define REG_AF_STOP 0x00
329#define REG_AF_EXE_AUTO 0x01 292#define REG_AF_EXE_AUTO 0x01
330#define REG_AF_EXE_CAF 0x02 293#define REG_AF_EXE_CAF 0x02
331 294
332#define AF_STATUS I2C_REG(CAT_LENS, CATA_AF_STATUS, 1) 295#define AF_STATUS I2C_REG(CAT_LENS, 0x03, 1)
333#define REG_AF_FAIL 0x00 296#define REG_AF_FAIL 0x00
334#define REG_AF_SUCCESS 0x02 297#define REG_AF_SUCCESS 0x02
335#define REG_AF_IDLE 0x04 298#define REG_AF_IDLE 0x04
336#define REG_AF_BUSY 0x05 299#define REG_AF_BUSY 0x05
337 300
338#define AF_VERSION I2C_REG(CAT_LENS, CATA_AF_VERSION, 1) 301#define AF_VERSION I2C_REG(CAT_LENS, 0x0a, 1)
339 302
340/* 303/*
341 * Category B - CAPTURE Parameter 304 * Category B - CAPTURE Parameter
342 */ 305 */
343#define CATB_YUVOUT_MAIN 0x00 306#define CAPP_YUVOUT_MAIN I2C_REG(CAT_CAPT_PARM, 0x00, 1)
344#define CATB_MAIN_IMAGE_SIZE 0x01
345#define CATB_MCC_MODE 0x1d
346#define CATB_WDR_EN 0x2c
347#define CATB_LIGHT_CTRL 0x40
348#define CATB_FLASH_CTRL 0x41
349
350#define CAPP_YUVOUT_MAIN I2C_REG(CAT_CAPT_PARM, CATB_YUVOUT_MAIN, 1)
351#define REG_YUV422 0x00 307#define REG_YUV422 0x00
352#define REG_BAYER10 0x05 308#define REG_BAYER10 0x05
353#define REG_BAYER8 0x06 309#define REG_BAYER8 0x06
354#define REG_JPEG 0x10 310#define REG_JPEG 0x10
355 311
356#define CAPP_MAIN_IMAGE_SIZE I2C_REG(CAT_CAPT_PARM, CATB_MAIN_IMAGE_SIZE, 1) 312#define CAPP_MAIN_IMAGE_SIZE I2C_REG(CAT_CAPT_PARM, 0x01, 1)
357 313
358#define CAPP_MCC_MODE I2C_REG(CAT_CAPT_PARM, CATB_MCC_MODE, 1) 314#define CAPP_MCC_MODE I2C_REG(CAT_CAPT_PARM, 0x1d, 1)
359#define REG_MCC_OFF 0x00 315#define REG_MCC_OFF 0x00
360#define REG_MCC_NORMAL 0x01 316#define REG_MCC_NORMAL 0x01
361 317
362#define CAPP_WDR_EN I2C_REG(CAT_CAPT_PARM, CATB_WDR_EN, 1) 318#define CAPP_WDR_EN I2C_REG(CAT_CAPT_PARM, 0x2c, 1)
363#define REG_WDR_OFF 0x00 319#define REG_WDR_OFF 0x00
364#define REG_WDR_ON 0x01 320#define REG_WDR_ON 0x01
365#define REG_WDR_AUTO 0x02 321#define REG_WDR_AUTO 0x02
366 322
367#define CAPP_LIGHT_CTRL I2C_REG(CAT_CAPT_PARM, CATB_LIGHT_CTRL, 1) 323#define CAPP_LIGHT_CTRL I2C_REG(CAT_CAPT_PARM, 0x40, 1)
368#define REG_LIGHT_OFF 0x00 324#define REG_LIGHT_OFF 0x00
369#define REG_LIGHT_ON 0x01 325#define REG_LIGHT_ON 0x01
370#define REG_LIGHT_AUTO 0x02 326#define REG_LIGHT_AUTO 0x02
371 327
372#define CAPP_FLASH_CTRL I2C_REG(CAT_CAPT_PARM, CATB_FLASH_CTRL, 1) 328#define CAPP_FLASH_CTRL I2C_REG(CAT_CAPT_PARM, 0x41, 1)
373#define REG_FLASH_OFF 0x00 329#define REG_FLASH_OFF 0x00
374#define REG_FLASH_ON 0x01 330#define REG_FLASH_ON 0x01
375#define REG_FLASH_AUTO 0x02 331#define REG_FLASH_AUTO 0x02
@@ -377,34 +333,29 @@
377/* 333/*
378 * Category C - CAPTURE Control 334 * Category C - CAPTURE Control
379 */ 335 */
380#define CATC_CAP_MODE 0x00 336#define CAPC_MODE I2C_REG(CAT_CAPT_CTRL, 0x00, 1)
381#define CATC_CAP_SEL_FRAME 0x06 /* It determines Single or Multi */
382#define CATC_CAP_START 0x09
383#define CATC_CAP_IMAGE_SIZE 0x0d
384#define CATC_CAP_THUMB_SIZE 0x11
385
386#define CAPC_MODE I2C_REG(CAT_CAPT_CTRL, CATC_CAP_MODE, 1)
387#define REG_CAP_NONE 0x00 337#define REG_CAP_NONE 0x00
388#define REG_CAP_ANTI_SHAKE 0x02 338#define REG_CAP_ANTI_SHAKE 0x02
389 339
390#define CAPC_SEL_FRAME I2C_REG(CAT_CAPT_CTRL, CATC_CAP_SEL_FRAME, 1) 340/* Select single- or multi-shot capture */
341#define CAPC_SEL_FRAME I2C_REG(CAT_CAPT_CTRL, 0x06, 1)
391 342
392#define CAPC_START I2C_REG(CAT_CAPT_CTRL, CATC_CAP_START, 1) 343#define CAPC_START I2C_REG(CAT_CAPT_CTRL, 0x09, 1)
393#define REG_CAP_START_MAIN 0x01 344#define REG_CAP_START_MAIN 0x01
394#define REG_CAP_START_THUMB 0x03 345#define REG_CAP_START_THUMB 0x03
395 346
396#define CAPC_IMAGE_SIZE I2C_REG(CAT_CAPT_CTRL, CATC_CAP_IMAGE_SIZE, 4) 347#define CAPC_IMAGE_SIZE I2C_REG(CAT_CAPT_CTRL, 0x0d, 4)
397#define CAPC_THUMB_SIZE I2C_REG(CAT_CAPT_CTRL, CATC_CAP_THUMB_SIZE, 4) 348#define CAPC_THUMB_SIZE I2C_REG(CAT_CAPT_CTRL, 0x11, 4)
398 349
399/* 350/*
400 * Category F - Flash 351 * Category F - Flash
401 * 352 *
402 * This mode provides functions about internal flash stuff and system startup. 353 * This mode provides functions about internal flash stuff and system startup.
403 */ 354 */
404#define CATF_CAM_START 0x12 /* It starts internal ARM core booting
405 * after power-up */
406 355
407#define FLASH_CAM_START I2C_REG(CAT_FLASH, CATF_CAM_START, 1) 356/* Starts internal ARM core booting after power-up */
408#define REG_START_ARM_BOOT 0x01 357#define FLASH_CAM_START I2C_REG(CAT_FLASH, 0x12, 1)
358#define REG_START_ARM_BOOT 0x01 /* write value */
359#define REG_IN_FLASH_MODE 0x00 /* read value */
409 360
410#endif /* M5MOLS_REG_H */ 361#endif /* M5MOLS_REG_H */