Commit | Line | Data |
---|---|---|
c109f816 EA |
1 | /* |
2 | * Driver for the mt9m111 sensor | |
3 | * | |
0c505e68 | 4 | * Copyright (C) 2008 Erik Andrén |
c109f816 EA |
5 | * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. |
6 | * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br> | |
7 | * | |
8 | * Portions of code to USB interface and ALi driver software, | |
9 | * Copyright (c) 2006 Willem Duinker | |
10 | * v4l2 interface modeled after the V4L2 driver | |
11 | * for SN9C10x PC Camera Controllers | |
12 | * | |
13 | * Some defines taken from the mt9m111 sensor driver | |
14 | * Copyright (C) 2008, Robert Jarzmik <robert.jarzmik@free.fr> | |
15 | * | |
16 | * This program is free software; you can redistribute it and/or | |
17 | * modify it under the terms of the GNU General Public License as | |
18 | * published by the Free Software Foundation, version 2. | |
19 | * | |
20 | */ | |
21 | ||
22 | #ifndef M5602_MT9M111_H_ | |
23 | #define M5602_MT9M111_H_ | |
24 | ||
25 | #include "m5602_sensor.h" | |
26 | ||
27 | /*****************************************************************************/ | |
28 | ||
29 | #define MT9M111_SC_CHIPVER 0x00 | |
30 | #define MT9M111_SC_ROWSTART 0x01 | |
31 | #define MT9M111_SC_COLSTART 0x02 | |
32 | #define MT9M111_SC_WINDOW_HEIGHT 0x03 | |
33 | #define MT9M111_SC_WINDOW_WIDTH 0x04 | |
34 | #define MT9M111_SC_HBLANK_CONTEXT_B 0x05 | |
35 | #define MT9M111_SC_VBLANK_CONTEXT_B 0x06 | |
36 | #define MT9M111_SC_HBLANK_CONTEXT_A 0x07 | |
37 | #define MT9M111_SC_VBLANK_CONTEXT_A 0x08 | |
38 | #define MT9M111_SC_SHUTTER_WIDTH 0x09 | |
39 | #define MT9M111_SC_ROW_SPEED 0x0a | |
40 | ||
41 | #define MT9M111_SC_EXTRA_DELAY 0x0b | |
42 | #define MT9M111_SC_SHUTTER_DELAY 0x0c | |
43 | #define MT9M111_SC_RESET 0x0d | |
44 | #define MT9M111_SC_R_MODE_CONTEXT_B 0x20 | |
45 | #define MT9M111_SC_R_MODE_CONTEXT_A 0x21 | |
46 | #define MT9M111_SC_FLASH_CONTROL 0x23 | |
47 | #define MT9M111_SC_GREEN_1_GAIN 0x2b | |
48 | #define MT9M111_SC_BLUE_GAIN 0x2c | |
49 | #define MT9M111_SC_RED_GAIN 0x2d | |
50 | #define MT9M111_SC_GREEN_2_GAIN 0x2e | |
51 | #define MT9M111_SC_GLOBAL_GAIN 0x2f | |
52 | ||
53 | #define MT9M111_RMB_MIRROR_ROWS (1 << 0) | |
54 | #define MT9M111_RMB_MIRROR_COLS (1 << 1) | |
55 | ||
56 | #define MT9M111_CONTEXT_CONTROL 0xc8 | |
57 | #define MT9M111_PAGE_MAP 0xf0 | |
58 | #define MT9M111_BYTEWISE_ADDRESS 0xf1 | |
59 | ||
60 | #define MT9M111_CP_OPERATING_MODE_CTL 0x06 | |
61 | #define MT9M111_CP_LUMA_OFFSET 0x34 | |
62 | #define MT9M111_CP_LUMA_CLIP 0x35 | |
63 | #define MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A 0x3a | |
64 | #define MT9M111_CP_LENS_CORRECTION_1 0x3b | |
65 | #define MT9M111_CP_DEFECT_CORR_CONTEXT_A 0x4c | |
66 | #define MT9M111_CP_DEFECT_CORR_CONTEXT_B 0x4d | |
67 | #define MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B 0x9b | |
68 | #define MT9M111_CP_GLOBAL_CLK_CONTROL 0xb3 | |
69 | ||
70 | #define MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18 0x65 | |
71 | #define MT9M111_CC_AWB_PARAMETER_7 0x28 | |
72 | ||
73 | #define MT9M111_SENSOR_CORE 0x00 | |
74 | #define MT9M111_COLORPIPE 0x01 | |
75 | #define MT9M111_CAMERA_CONTROL 0x02 | |
76 | ||
320aaab8 EA |
77 | #define MT9M111_COLOR_MATRIX_BYPASS (1 << 4) |
78 | ||
c109f816 EA |
79 | #define INITIAL_MAX_GAIN 64 |
80 | #define DEFAULT_GAIN 283 | |
81 | ||
82 | /*****************************************************************************/ | |
83 | ||
84 | /* Kernel module parameters */ | |
85 | extern int force_sensor; | |
86 | extern int dump_sensor; | |
c109f816 EA |
87 | |
88 | int mt9m111_probe(struct sd *sd); | |
89 | int mt9m111_init(struct sd *sd); | |
04f15655 | 90 | void mt9m111_disconnect(struct sd *sd); |
c109f816 | 91 | |
dac136e6 | 92 | const static struct m5602_sensor mt9m111 = { |
e4cc4fcc EA |
93 | .name = "MT9M111", |
94 | ||
95 | .i2c_slave_id = 0xba, | |
96 | .i2c_regW = 2, | |
97 | ||
98 | .probe = mt9m111_probe, | |
99 | .init = mt9m111_init, | |
04f15655 | 100 | .disconnect = mt9m111_disconnect, |
c109f816 EA |
101 | }; |
102 | ||
103 | static const unsigned char preinit_mt9m111[][4] = | |
104 | { | |
105 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | |
106 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | |
107 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
108 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
109 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00}, | |
110 | {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00}, | |
111 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
112 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
113 | ||
114 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
115 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xf7}, | |
116 | ||
117 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
118 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
119 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
120 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
121 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
122 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
123 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
124 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
125 | ||
126 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
127 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
128 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
129 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
130 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
131 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
132 | ||
133 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00} | |
134 | }; | |
135 | ||
136 | static const unsigned char init_mt9m111[][4] = | |
137 | { | |
138 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | |
139 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | |
140 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
141 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
142 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
143 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00}, | |
144 | {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00}, | |
145 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
146 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
147 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
148 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
149 | ||
150 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
151 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xff}, | |
152 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xff}, | |
153 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xde}, | |
154 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xff}, | |
155 | {SENSOR, MT9M111_SC_RESET, 0xff, 0xf7}, | |
156 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
157 | ||
158 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00}, | |
159 | ||
160 | {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0xff, 0xff}, | |
161 | ||
162 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
163 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
164 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
165 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
166 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
167 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
168 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
169 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
170 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00}, | |
171 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
172 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
173 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
174 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
175 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
176 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
177 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
178 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
179 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
180 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
181 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
182 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, | |
183 | ||
184 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
185 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, | |
186 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
187 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
188 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
189 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
190 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
c109f816 EA |
191 | {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, |
192 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, 0x01}, | |
193 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_B, 0x00, 0x01}, | |
194 | {SENSOR, MT9M111_CP_LUMA_OFFSET, 0x00, 0x00}, | |
195 | {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, | |
196 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, | |
197 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, | |
198 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00}, | |
199 | ||
200 | {SENSOR, 0xcd, 0x00, 0x0e}, | |
201 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00}, | |
202 | {SENSOR, 0xd0, 0x00, 0x40}, | |
203 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, | |
204 | {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, | |
205 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
206 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07}, | |
207 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
208 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, | |
209 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
210 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
211 | {SENSOR, 0x33, 0x03, 0x49}, | |
212 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
213 | ||
214 | {SENSOR, 0x33, 0x03, 0x49}, | |
215 | {SENSOR, 0x34, 0xc0, 0x19}, | |
216 | {SENSOR, 0x3f, 0x20, 0x20}, | |
217 | {SENSOR, 0x40, 0x20, 0x20}, | |
218 | {SENSOR, 0x5a, 0xc0, 0x0a}, | |
219 | {SENSOR, 0x70, 0x7b, 0x0a}, | |
220 | {SENSOR, 0x71, 0xff, 0x00}, | |
221 | {SENSOR, 0x72, 0x19, 0x0e}, | |
222 | {SENSOR, 0x73, 0x18, 0x0f}, | |
223 | {SENSOR, 0x74, 0x57, 0x32}, | |
224 | {SENSOR, 0x75, 0x56, 0x34}, | |
225 | {SENSOR, 0x76, 0x73, 0x35}, | |
226 | {SENSOR, 0x77, 0x30, 0x12}, | |
227 | {SENSOR, 0x78, 0x79, 0x02}, | |
228 | {SENSOR, 0x79, 0x75, 0x06}, | |
229 | {SENSOR, 0x7a, 0x77, 0x0a}, | |
230 | {SENSOR, 0x7b, 0x78, 0x09}, | |
231 | {SENSOR, 0x7c, 0x7d, 0x06}, | |
232 | {SENSOR, 0x7d, 0x31, 0x10}, | |
233 | {SENSOR, 0x7e, 0x00, 0x7e}, | |
234 | {SENSOR, 0x80, 0x59, 0x04}, | |
235 | {SENSOR, 0x81, 0x59, 0x04}, | |
236 | {SENSOR, 0x82, 0x57, 0x0a}, | |
237 | {SENSOR, 0x83, 0x58, 0x0b}, | |
238 | {SENSOR, 0x84, 0x47, 0x0c}, | |
239 | {SENSOR, 0x85, 0x48, 0x0e}, | |
240 | {SENSOR, 0x86, 0x5b, 0x02}, | |
241 | {SENSOR, 0x87, 0x00, 0x5c}, | |
242 | {SENSOR, MT9M111_CONTEXT_CONTROL, 0x00, 0x08}, | |
243 | {SENSOR, 0x60, 0x00, 0x80}, | |
244 | {SENSOR, 0x61, 0x00, 0x00}, | |
245 | {SENSOR, 0x62, 0x00, 0x00}, | |
246 | {SENSOR, 0x63, 0x00, 0x00}, | |
247 | {SENSOR, 0x64, 0x00, 0x00}, | |
248 | ||
249 | {SENSOR, MT9M111_SC_ROWSTART, 0x00, 0x0d}, | |
250 | {SENSOR, MT9M111_SC_COLSTART, 0x00, 0x18}, | |
251 | {SENSOR, MT9M111_SC_WINDOW_HEIGHT, 0x04, 0x04}, | |
252 | {SENSOR, MT9M111_SC_WINDOW_WIDTH, 0x05, 0x08}, | |
253 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_B, 0x01, 0x38}, | |
254 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_B, 0x00, 0x11}, | |
255 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_A, 0x01, 0x38}, | |
256 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_A, 0x00, 0x11}, | |
257 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x03}, | |
258 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x03}, | |
259 | {SENSOR, 0x30, 0x04, 0x00}, | |
260 | ||
c109f816 EA |
261 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, |
262 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0xf4}, | |
c109f816 | 263 | |
c109f816 EA |
264 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, |
265 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, | |
266 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
267 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
268 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, | |
269 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, | |
270 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
271 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00}, | |
272 | {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, | |
273 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
274 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
275 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
276 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
277 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
278 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
279 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
280 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
281 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00}, | |
282 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
283 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
284 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
285 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
286 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
287 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
288 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
289 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
290 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
291 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
292 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
293 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, | |
294 | ||
295 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
296 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, | |
297 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
298 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
299 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
300 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
301 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
c109f816 EA |
302 | {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, |
303 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, 0x01}, | |
304 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_B, 0x00, 0x01}, | |
305 | {SENSOR, MT9M111_CP_LUMA_OFFSET, 0x00, 0x00}, | |
306 | {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, | |
307 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, | |
308 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, | |
309 | ||
310 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00}, | |
311 | {SENSOR, 0xcd, 0x00, 0x0e}, | |
312 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00}, | |
313 | {SENSOR, 0xd0, 0x00, 0x40}, | |
314 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, | |
315 | {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, | |
316 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
317 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07}, | |
318 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
319 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, | |
320 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
321 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
322 | {SENSOR, 0x33, 0x03, 0x49}, | |
323 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
324 | ||
325 | {SENSOR, 0x33, 0x03, 0x49}, | |
326 | {SENSOR, 0x34, 0xc0, 0x19}, | |
327 | {SENSOR, 0x3f, 0x20, 0x20}, | |
328 | {SENSOR, 0x40, 0x20, 0x20}, | |
329 | {SENSOR, 0x5a, 0xc0, 0x0a}, | |
330 | {SENSOR, 0x70, 0x7b, 0x0a}, | |
331 | {SENSOR, 0x71, 0xff, 0x00}, | |
332 | {SENSOR, 0x72, 0x19, 0x0e}, | |
333 | {SENSOR, 0x73, 0x18, 0x0f}, | |
334 | {SENSOR, 0x74, 0x57, 0x32}, | |
335 | {SENSOR, 0x75, 0x56, 0x34}, | |
336 | {SENSOR, 0x76, 0x73, 0x35}, | |
337 | {SENSOR, 0x77, 0x30, 0x12}, | |
338 | {SENSOR, 0x78, 0x79, 0x02}, | |
339 | {SENSOR, 0x79, 0x75, 0x06}, | |
340 | {SENSOR, 0x7a, 0x77, 0x0a}, | |
341 | {SENSOR, 0x7b, 0x78, 0x09}, | |
342 | {SENSOR, 0x7c, 0x7d, 0x06}, | |
343 | {SENSOR, 0x7d, 0x31, 0x10}, | |
344 | {SENSOR, 0x7e, 0x00, 0x7e}, | |
345 | {SENSOR, 0x80, 0x59, 0x04}, | |
346 | {SENSOR, 0x81, 0x59, 0x04}, | |
347 | {SENSOR, 0x82, 0x57, 0x0a}, | |
348 | {SENSOR, 0x83, 0x58, 0x0b}, | |
349 | {SENSOR, 0x84, 0x47, 0x0c}, | |
350 | {SENSOR, 0x85, 0x48, 0x0e}, | |
351 | {SENSOR, 0x86, 0x5b, 0x02}, | |
352 | {SENSOR, 0x87, 0x00, 0x5c}, | |
353 | {SENSOR, MT9M111_CONTEXT_CONTROL, 0x00, 0x08}, | |
354 | {SENSOR, 0x60, 0x00, 0x80}, | |
355 | {SENSOR, 0x61, 0x00, 0x00}, | |
356 | {SENSOR, 0x62, 0x00, 0x00}, | |
357 | {SENSOR, 0x63, 0x00, 0x00}, | |
358 | {SENSOR, 0x64, 0x00, 0x00}, | |
359 | ||
360 | {SENSOR, MT9M111_SC_ROWSTART, 0x00, 0x0d}, | |
361 | {SENSOR, MT9M111_SC_COLSTART, 0x00, 0x18}, | |
362 | {SENSOR, MT9M111_SC_WINDOW_HEIGHT, 0x04, 0x04}, | |
363 | {SENSOR, MT9M111_SC_WINDOW_WIDTH, 0x05, 0x08}, | |
364 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_B, 0x01, 0x38}, | |
365 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_B, 0x00, 0x11}, | |
366 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_A, 0x01, 0x38}, | |
367 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_A, 0x00, 0x11}, | |
368 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x03}, | |
369 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x03}, | |
370 | {SENSOR, 0x30, 0x04, 0x00}, | |
371 | ||
c109f816 EA |
372 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
373 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
374 | ||
375 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
376 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, | |
377 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
378 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
379 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, | |
380 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, | |
381 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
382 | ||
383 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00}, | |
384 | {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, | |
385 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
386 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
387 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
388 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
389 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
390 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
391 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
392 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
393 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00}, | |
394 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
395 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
396 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
397 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
398 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
399 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
400 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
401 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
402 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
403 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
404 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
405 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, | |
406 | ||
407 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
408 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, | |
409 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
410 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
411 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
412 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
413 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
c109f816 EA |
414 | {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, |
415 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, 0x01}, | |
416 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_B, 0x00, 0x01}, | |
417 | {SENSOR, MT9M111_CP_LUMA_OFFSET, 0x00, 0x00}, | |
418 | {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, | |
419 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, | |
420 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, | |
421 | ||
422 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00}, | |
423 | {SENSOR, 0xcd, 0x00, 0x0e}, | |
424 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00}, | |
425 | {SENSOR, 0xd0, 0x00, 0x40}, | |
426 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, | |
427 | {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, | |
428 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
429 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07}, | |
430 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
431 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, | |
432 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
433 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
434 | {SENSOR, 0x33, 0x03, 0x49}, | |
435 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
436 | ||
437 | {SENSOR, 0x33, 0x03, 0x49}, | |
438 | {SENSOR, 0x34, 0xc0, 0x19}, | |
439 | {SENSOR, 0x3f, 0x20, 0x20}, | |
440 | {SENSOR, 0x40, 0x20, 0x20}, | |
441 | {SENSOR, 0x5a, 0xc0, 0x0a}, | |
442 | {SENSOR, 0x70, 0x7b, 0x0a}, | |
443 | {SENSOR, 0x71, 0xff, 0x00}, | |
444 | {SENSOR, 0x72, 0x19, 0x0e}, | |
445 | {SENSOR, 0x73, 0x18, 0x0f}, | |
446 | {SENSOR, 0x74, 0x57, 0x32}, | |
447 | {SENSOR, 0x75, 0x56, 0x34}, | |
448 | {SENSOR, 0x76, 0x73, 0x35}, | |
449 | {SENSOR, 0x77, 0x30, 0x12}, | |
450 | {SENSOR, 0x78, 0x79, 0x02}, | |
451 | {SENSOR, 0x79, 0x75, 0x06}, | |
452 | {SENSOR, 0x7a, 0x77, 0x0a}, | |
453 | {SENSOR, 0x7b, 0x78, 0x09}, | |
454 | {SENSOR, 0x7c, 0x7d, 0x06}, | |
455 | {SENSOR, 0x7d, 0x31, 0x10}, | |
456 | {SENSOR, 0x7e, 0x00, 0x7e}, | |
457 | {SENSOR, 0x80, 0x59, 0x04}, | |
458 | {SENSOR, 0x81, 0x59, 0x04}, | |
459 | {SENSOR, 0x82, 0x57, 0x0a}, | |
460 | {SENSOR, 0x83, 0x58, 0x0b}, | |
461 | {SENSOR, 0x84, 0x47, 0x0c}, | |
462 | {SENSOR, 0x85, 0x48, 0x0e}, | |
463 | {SENSOR, 0x86, 0x5b, 0x02}, | |
464 | {SENSOR, 0x87, 0x00, 0x5c}, | |
465 | {SENSOR, MT9M111_CONTEXT_CONTROL, 0x00, 0x08}, | |
466 | {SENSOR, 0x60, 0x00, 0x80}, | |
467 | {SENSOR, 0x61, 0x00, 0x00}, | |
468 | {SENSOR, 0x62, 0x00, 0x00}, | |
469 | {SENSOR, 0x63, 0x00, 0x00}, | |
470 | {SENSOR, 0x64, 0x00, 0x00}, | |
471 | ||
472 | {SENSOR, MT9M111_SC_ROWSTART, 0x00, 0x0d}, | |
473 | {SENSOR, MT9M111_SC_COLSTART, 0x00, 0x18}, | |
474 | {SENSOR, MT9M111_SC_WINDOW_HEIGHT, 0x04, 0x04}, | |
475 | {SENSOR, MT9M111_SC_WINDOW_WIDTH, 0x05, 0x08}, | |
476 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_B, 0x01, 0x38}, | |
477 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_B, 0x00, 0x11}, | |
478 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_A, 0x01, 0x38}, | |
479 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_A, 0x00, 0x11}, | |
480 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x03}, | |
481 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x03}, | |
482 | {SENSOR, 0x30, 0x04, 0x00}, | |
483 | ||
c109f816 EA |
484 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, |
485 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0xf4}, | |
c109f816 EA |
486 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
487 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
488 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
489 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
490 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
491 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
492 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, | |
493 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
494 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
495 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
496 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
497 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
498 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
499 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
500 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
501 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
502 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
503 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
504 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, | |
505 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
506 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
507 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
508 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, | |
509 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
510 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
511 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00}, | |
512 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
513 | {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, | |
514 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
515 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
516 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
517 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
518 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
519 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
520 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
521 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
522 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00}, | |
523 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
524 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
525 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
526 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
527 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
528 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
529 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
530 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
531 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
532 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
533 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
534 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, | |
535 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
536 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
537 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
538 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
539 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, | |
540 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
541 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
542 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
543 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
544 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
545 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
546 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
547 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
548 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
549 | ||
550 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
551 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
c109f816 EA |
552 | {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, |
553 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, 0x01}, | |
554 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_B, 0x00, 0x01}, | |
555 | {SENSOR, MT9M111_CP_LUMA_OFFSET, 0x00, 0x00}, | |
556 | {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, | |
557 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, | |
558 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, | |
559 | ||
560 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
561 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00}, | |
562 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
563 | {SENSOR, 0xcd, 0x00, 0x0e}, | |
564 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
565 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00}, | |
566 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
567 | {SENSOR, 0xd0, 0x00, 0x40}, | |
568 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, | |
569 | {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, | |
570 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
571 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
572 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
573 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07}, | |
574 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
575 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
576 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
577 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, | |
578 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
579 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
580 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
581 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
582 | {SENSOR, 0x33, 0x03, 0x49}, | |
583 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
584 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
585 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
586 | ||
587 | {SENSOR, 0x33, 0x03, 0x49}, | |
588 | {SENSOR, 0x34, 0xc0, 0x19}, | |
589 | {SENSOR, 0x3f, 0x20, 0x20}, | |
590 | {SENSOR, 0x40, 0x20, 0x20}, | |
591 | {SENSOR, 0x5a, 0xc0, 0x0a}, | |
592 | {SENSOR, 0x70, 0x7b, 0x0a}, | |
593 | {SENSOR, 0x71, 0xff, 0x00}, | |
594 | {SENSOR, 0x72, 0x19, 0x0e}, | |
595 | {SENSOR, 0x73, 0x18, 0x0f}, | |
596 | {SENSOR, 0x74, 0x57, 0x32}, | |
597 | {SENSOR, 0x75, 0x56, 0x34}, | |
598 | {SENSOR, 0x76, 0x73, 0x35}, | |
599 | {SENSOR, 0x77, 0x30, 0x12}, | |
600 | {SENSOR, 0x78, 0x79, 0x02}, | |
601 | {SENSOR, 0x79, 0x75, 0x06}, | |
602 | {SENSOR, 0x7a, 0x77, 0x0a}, | |
603 | {SENSOR, 0x7b, 0x78, 0x09}, | |
604 | {SENSOR, 0x7c, 0x7d, 0x06}, | |
605 | {SENSOR, 0x7d, 0x31, 0x10}, | |
606 | {SENSOR, 0x7e, 0x00, 0x7e}, | |
607 | {SENSOR, 0x80, 0x59, 0x04}, | |
608 | {SENSOR, 0x81, 0x59, 0x04}, | |
609 | {SENSOR, 0x82, 0x57, 0x0a}, | |
610 | {SENSOR, 0x83, 0x58, 0x0b}, | |
611 | {SENSOR, 0x84, 0x47, 0x0c}, | |
612 | {SENSOR, 0x85, 0x48, 0x0e}, | |
613 | {SENSOR, 0x86, 0x5b, 0x02}, | |
614 | {SENSOR, 0x87, 0x00, 0x5c}, | |
615 | {SENSOR, MT9M111_CONTEXT_CONTROL, 0x00, 0x08}, | |
616 | {SENSOR, 0x60, 0x00, 0x80}, | |
617 | {SENSOR, 0x61, 0x00, 0x00}, | |
618 | {SENSOR, 0x62, 0x00, 0x00}, | |
619 | {SENSOR, 0x63, 0x00, 0x00}, | |
620 | {SENSOR, 0x64, 0x00, 0x00}, | |
621 | {SENSOR, MT9M111_SC_ROWSTART, 0x00, 0x0d}, | |
622 | {SENSOR, MT9M111_SC_COLSTART, 0x00, 0x12}, | |
623 | {SENSOR, MT9M111_SC_WINDOW_HEIGHT, 0x04, 0x00}, | |
624 | {SENSOR, MT9M111_SC_WINDOW_WIDTH, 0x05, 0x10}, | |
625 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_B, 0x01, 0x60}, | |
626 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_B, 0x00, 0x11}, | |
627 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_A, 0x01, 0x60}, | |
628 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_A, 0x00, 0x11}, | |
629 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x0f}, | |
630 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x0f}, | |
631 | {SENSOR, 0x30, 0x04, 0x00}, | |
632 | ||
c109f816 EA |
633 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, |
634 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90}, | |
c109f816 EA |
635 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
636 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
637 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
638 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
639 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
640 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
641 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, | |
642 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
643 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
644 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
645 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
646 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
647 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
648 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
649 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
650 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
651 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
652 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
653 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, | |
654 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
655 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
656 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
657 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, | |
658 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
659 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
660 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00}, | |
661 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
662 | {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, | |
663 | ||
664 | {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, | |
665 | {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, | |
666 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, | |
667 | {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, | |
668 | {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00}, | |
669 | {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, | |
670 | {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, | |
671 | {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, | |
672 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00}, | |
673 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
674 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
675 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
676 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
677 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
678 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
679 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
680 | {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, | |
681 | {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, | |
682 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, | |
683 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, | |
684 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, | |
685 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
686 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
687 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
688 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
689 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, | |
690 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
691 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
692 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
693 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
694 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, | |
695 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
696 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
697 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00}, | |
698 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
699 | {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, | |
700 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, | |
320aaab8 EA |
701 | {SENSOR, MT9M111_CP_OPERATING_MODE_CTL, 0x00, |
702 | MT9M111_CP_OPERATING_MODE_CTL}, | |
c109f816 EA |
703 | {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, |
704 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, 0x01}, | |
705 | {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_B, 0x00, 0x01}, | |
706 | {SENSOR, MT9M111_CP_LUMA_OFFSET, 0x00, 0x00}, | |
707 | {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, | |
708 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, | |
709 | {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, | |
710 | ||
711 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
712 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00}, | |
713 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
714 | {SENSOR, 0xcd, 0x00, 0x0e}, | |
715 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
716 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00}, | |
717 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
718 | {SENSOR, 0xd0, 0x00, 0x40}, | |
719 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, | |
720 | {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, | |
721 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
722 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
723 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
724 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07}, | |
725 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
726 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00}, | |
727 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
728 | {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, | |
729 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
730 | ||
731 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
732 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
733 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
734 | {SENSOR, 0x33, 0x03, 0x49}, | |
735 | {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00}, | |
736 | {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00}, | |
737 | {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00}, | |
738 | ||
739 | {SENSOR, 0x33, 0x03, 0x49}, | |
740 | {SENSOR, 0x34, 0xc0, 0x19}, | |
741 | {SENSOR, 0x3f, 0x20, 0x20}, | |
742 | {SENSOR, 0x40, 0x20, 0x20}, | |
743 | {SENSOR, 0x5a, 0xc0, 0x0a}, | |
744 | {SENSOR, 0x70, 0x7b, 0x0a}, | |
745 | {SENSOR, 0x71, 0xff, 0x00}, | |
746 | {SENSOR, 0x72, 0x19, 0x0e}, | |
747 | {SENSOR, 0x73, 0x18, 0x0f}, | |
748 | {SENSOR, 0x74, 0x57, 0x32}, | |
749 | {SENSOR, 0x75, 0x56, 0x34}, | |
750 | {SENSOR, 0x76, 0x73, 0x35}, | |
751 | {SENSOR, 0x77, 0x30, 0x12}, | |
752 | {SENSOR, 0x78, 0x79, 0x02}, | |
753 | {SENSOR, 0x79, 0x75, 0x06}, | |
754 | {SENSOR, 0x7a, 0x77, 0x0a}, | |
755 | {SENSOR, 0x7b, 0x78, 0x09}, | |
756 | {SENSOR, 0x7c, 0x7d, 0x06}, | |
757 | {SENSOR, 0x7d, 0x31, 0x10}, | |
758 | {SENSOR, 0x7e, 0x00, 0x7e}, | |
759 | {SENSOR, 0x80, 0x59, 0x04}, | |
760 | {SENSOR, 0x81, 0x59, 0x04}, | |
761 | {SENSOR, 0x82, 0x57, 0x0a}, | |
762 | {SENSOR, 0x83, 0x58, 0x0b}, | |
763 | {SENSOR, 0x84, 0x47, 0x0c}, | |
764 | {SENSOR, 0x85, 0x48, 0x0e}, | |
765 | {SENSOR, 0x86, 0x5b, 0x02}, | |
766 | {SENSOR, 0x87, 0x00, 0x5c}, | |
767 | {SENSOR, MT9M111_CONTEXT_CONTROL, 0x00, 0x08}, | |
768 | {SENSOR, 0x60, 0x00, 0x80}, | |
769 | {SENSOR, 0x61, 0x00, 0x00}, | |
770 | {SENSOR, 0x62, 0x00, 0x00}, | |
771 | {SENSOR, 0x63, 0x00, 0x00}, | |
772 | {SENSOR, 0x64, 0x00, 0x00}, | |
773 | ||
774 | {SENSOR, MT9M111_SC_ROWSTART, 0x00, 0x0d}, | |
775 | {SENSOR, MT9M111_SC_COLSTART, 0x00, 0x12}, | |
776 | {SENSOR, MT9M111_SC_WINDOW_HEIGHT, 0x04, 0x00}, | |
777 | {SENSOR, MT9M111_SC_WINDOW_WIDTH, 0x05, 0x10}, | |
778 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_B, 0x01, 0x60}, | |
779 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_B, 0x00, 0x11}, | |
780 | {SENSOR, MT9M111_SC_HBLANK_CONTEXT_A, 0x01, 0x60}, | |
781 | {SENSOR, MT9M111_SC_VBLANK_CONTEXT_A, 0x00, 0x11}, | |
782 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x0f}, | |
783 | {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x0f}, | |
784 | {SENSOR, 0x30, 0x04, 0x00}, | |
785 | ||
786 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, | |
787 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
788 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | |
789 | {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, | |
790 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00}, | |
791 | {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00}, | |
792 | {BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00}, | |
793 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | |
794 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | |
795 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | |
796 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | |
797 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00}, | |
320aaab8 | 798 | {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0, 0x00}, /* 480 */ |
c109f816 EA |
799 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, |
800 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | |
801 | {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00}, | |
802 | {BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00}, | |
803 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00}, | |
804 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00}, | |
cedacfec | 805 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00}, /* 639*/ |
c109f816 EA |
806 | {BRIDGE, M5602_XB_HSYNC_PARA, 0x7f, 0x00}, |
807 | {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00}, | |
808 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | |
809 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | |
810 | ||
811 | {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, | |
812 | /* Set number of blank rows chosen to 400 */ | |
813 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90}, | |
c109f816 EA |
814 | }; |
815 | ||
816 | #endif |