1 #ifdef CONFIG_VIDEO_RK29
2 #include <plat/rk_camera.h>
5 Simple camera device registration:
7 new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X
8 face,\ // sensor face information, it can be back or front
9 pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX
10 flash_attach,\ // sensor is attach flash or not
11 mir,\ // sensor image mirror and flip control information
12 i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X
13 cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X
15 Comprehensive camera device registration:
17 new_camera_device_ex(sensor_name,\
19 ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X
20 pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX
21 pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X
22 rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX
23 rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X
25 pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X
27 res,\ // sensor resolution, this is real resolution or resoltuion after interpolate
30 i2c_spd,\ // i2c speed , 100000 = 100KHz
31 i2c_addr,\ // the i2c slave device address for sensor
33 mclk)\ // sensor input clock rate, 24 or 48
36 static struct rkcamera_platform_data new_camera[] = {
38 /* new_camera_device(RK29_CAM_SENSOR_OV2659,
45 new_camera_device(RK29_CAM_SENSOR_GC0308,
53 new_camera_device(RK29_CAM_SENSOR_GC0308,
63 /*---------------- Camera Sensor Macro Define Begin ------------------------*/
64 /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/
65 #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_GC2035 /* back camera sensor */
66 #define CONFIG_SENSOR_IIC_ADDR_0 0x00
67 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 1
68 #define CONFIG_SENSOR_CIF_INDEX_0 0
69 #define CONFIG_SENSOR_ORIENTATION_0 90
70 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO
71 #define CONFIG_SENSOR_RESET_PIN_0 INVALID_GPIO
72 #define CONFIG_SENSOR_POWERDN_PIN_0 RK30_PIN3_PB3
73 #define CONFIG_SENSOR_FALSH_PIN_0 INVALID_GPIO
74 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_0 RK29_CAM_POWERACTIVE_L
75 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_0 RK29_CAM_RESETACTIVE_L
76 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_0 RK29_CAM_POWERDNACTIVE_H
77 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_0 RK29_CAM_FLASHACTIVE_H
79 #define CONFIG_SENSOR_QCIF_FPS_FIXED_0 15000
80 #define CONFIG_SENSOR_240X160_FPS_FIXED_0 15000
81 #define CONFIG_SENSOR_QVGA_FPS_FIXED_0 15000
82 #define CONFIG_SENSOR_CIF_FPS_FIXED_0 15000
83 #define CONFIG_SENSOR_VGA_FPS_FIXED_0 15000
84 #define CONFIG_SENSOR_480P_FPS_FIXED_0 15000
85 #define CONFIG_SENSOR_SVGA_FPS_FIXED_0 15000
86 #define CONFIG_SENSOR_720P_FPS_FIXED_0 30000
88 #define CONFIG_SENSOR_01 RK29_CAM_SENSOR_OV5642 /* back camera sensor 1 */
89 #define CONFIG_SENSOR_IIC_ADDR_01 0x00
90 #define CONFIG_SENSOR_CIF_INDEX_01 0
91 #define CONFIG_SENSOR_IIC_ADAPTER_ID_01 4
92 #define CONFIG_SENSOR_ORIENTATION_01 90
93 #define CONFIG_SENSOR_POWER_PIN_01 INVALID_GPIO
94 #define CONFIG_SENSOR_RESET_PIN_01 INVALID_GPIO
95 #define CONFIG_SENSOR_POWERDN_PIN_01 RK2928_PIN3_PB3
96 #define CONFIG_SENSOR_FALSH_PIN_01 INVALID_GPIO
97 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_01 RK29_CAM_POWERACTIVE_L
98 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_01 RK29_CAM_RESETACTIVE_L
99 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_01 RK29_CAM_POWERDNACTIVE_H
100 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_01 RK29_CAM_FLASHACTIVE_L
102 #define CONFIG_SENSOR_QCIF_FPS_FIXED_01 15000
103 #define CONFIG_SENSOR_240X160_FPS_FIXED_01 15000
104 #define CONFIG_SENSOR_QVGA_FPS_FIXED_01 15000
105 #define CONFIG_SENSOR_CIF_FPS_FIXED_01 15000
106 #define CONFIG_SENSOR_VGA_FPS_FIXED_01 15000
107 #define CONFIG_SENSOR_480P_FPS_FIXED_01 15000
108 #define CONFIG_SENSOR_SVGA_FPS_FIXED_01 15000
109 #define CONFIG_SENSOR_720P_FPS_FIXED_01 30000
111 #define CONFIG_SENSOR_02 RK29_CAM_SENSOR_OV5640 /* back camera sensor 2 */
112 #define CONFIG_SENSOR_IIC_ADDR_02 0x00
113 #define CONFIG_SENSOR_CIF_INDEX_02 0
114 #define CONFIG_SENSOR_IIC_ADAPTER_ID_02 4
115 #define CONFIG_SENSOR_ORIENTATION_02 90
116 #define CONFIG_SENSOR_POWER_PIN_02 INVALID_GPIO
117 #define CONFIG_SENSOR_RESET_PIN_02 INVALID_GPIO
118 #define CONFIG_SENSOR_POWERDN_PIN_02 RK2928_PIN3_PB3
119 #define CONFIG_SENSOR_FALSH_PIN_02 INVALID_GPIO
120 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_02 RK29_CAM_POWERACTIVE_L
121 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_02 RK29_CAM_RESETACTIVE_L
122 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_02 RK29_CAM_POWERDNACTIVE_H
123 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_02 RK29_CAM_FLASHACTIVE_L
125 #define CONFIG_SENSOR_QCIF_FPS_FIXED_02 15000
126 #define CONFIG_SENSOR_240X160_FPS_FIXED_02 15000
127 #define CONFIG_SENSOR_QVGA_FPS_FIXED_02 15000
128 #define CONFIG_SENSOR_CIF_FPS_FIXED_02 15000
129 #define CONFIG_SENSOR_VGA_FPS_FIXED_02 15000
130 #define CONFIG_SENSOR_480P_FPS_FIXED_02 15000
131 #define CONFIG_SENSOR_SVGA_FPS_FIXED_02 15000
132 #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000
134 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */
135 #define CONFIG_SENSOR_IIC_ADDR_1 0x00
136 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1
137 #define CONFIG_SENSOR_CIF_INDEX_1 0
138 #define CONFIG_SENSOR_ORIENTATION_1 270
139 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO
140 #define CONFIG_SENSOR_RESET_PIN_1 INVALID_GPIO
141 #define CONFIG_SENSOR_POWERDN_PIN_1 RK30_PIN3_PD7
142 #define CONFIG_SENSOR_FALSH_PIN_1 INVALID_GPIO
143 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_1 RK29_CAM_POWERACTIVE_L
144 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_1 RK29_CAM_RESETACTIVE_L
145 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_1 RK29_CAM_POWERDNACTIVE_H
146 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_1 RK29_CAM_FLASHACTIVE_L
148 #define CONFIG_SENSOR_QCIF_FPS_FIXED_1 15000
149 #define CONFIG_SENSOR_240X160_FPS_FIXED_1 15000
150 #define CONFIG_SENSOR_QVGA_FPS_FIXED_1 15000
151 #define CONFIG_SENSOR_CIF_FPS_FIXED_1 15000
152 #define CONFIG_SENSOR_VGA_FPS_FIXED_1 15000
153 #define CONFIG_SENSOR_480P_FPS_FIXED_1 15000
154 #define CONFIG_SENSOR_SVGA_FPS_FIXED_1 15000
155 #define CONFIG_SENSOR_720P_FPS_FIXED_1 30000
157 #define CONFIG_SENSOR_11 RK29_CAM_SENSOR_OV2659 /* front camera sensor 1 */
158 #define CONFIG_SENSOR_IIC_ADDR_11 0x00
159 #define CONFIG_SENSOR_IIC_ADAPTER_ID_11 3
160 #define CONFIG_SENSOR_CIF_INDEX_11 0
161 #define CONFIG_SENSOR_ORIENTATION_11 270
162 #define CONFIG_SENSOR_POWER_PIN_11 INVALID_GPIO
163 #define CONFIG_SENSOR_RESET_PIN_11 INVALID_GPIO
164 #define CONFIG_SENSOR_POWERDN_PIN_11 INVALID_GPIO
165 #define CONFIG_SENSOR_FALSH_PIN_11 INVALID_GPIO
166 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_11 RK29_CAM_POWERACTIVE_L
167 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_11 RK29_CAM_RESETACTIVE_L
168 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_11 RK29_CAM_POWERDNACTIVE_H
169 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_11 RK29_CAM_FLASHACTIVE_L
171 #define CONFIG_SENSOR_QCIF_FPS_FIXED_11 15000
172 #define CONFIG_SENSOR_240X160_FPS_FIXED_11 15000
173 #define CONFIG_SENSOR_QVGA_FPS_FIXED_11 15000
174 #define CONFIG_SENSOR_CIF_FPS_FIXED_11 15000
175 #define CONFIG_SENSOR_VGA_FPS_FIXED_11 15000
176 #define CONFIG_SENSOR_480P_FPS_FIXED_11 15000
177 #define CONFIG_SENSOR_SVGA_FPS_FIXED_11 15000
178 #define CONFIG_SENSOR_720P_FPS_FIXED_11 30000
180 #define CONFIG_SENSOR_12 RK29_CAM_SENSOR_OV2659//RK29_CAM_SENSOR_OV2655 /* front camera sensor 2 */
181 #define CONFIG_SENSOR_IIC_ADDR_12 0x00
182 #define CONFIG_SENSOR_IIC_ADAPTER_ID_12 3
183 #define CONFIG_SENSOR_CIF_INDEX_12 0
184 #define CONFIG_SENSOR_ORIENTATION_12 270
185 #define CONFIG_SENSOR_POWER_PIN_12 INVALID_GPIO
186 #define CONFIG_SENSOR_RESET_PIN_12 INVALID_GPIO
187 #define CONFIG_SENSOR_POWERDN_PIN_12 INVALID_GPIO
188 #define CONFIG_SENSOR_FALSH_PIN_12 INVALID_GPIO
189 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_12 RK29_CAM_POWERACTIVE_L
190 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_12 RK29_CAM_RESETACTIVE_L
191 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_12 RK29_CAM_POWERDNACTIVE_H
192 #define CONFIG_SENSOR_FLASHACTIVE_LEVEL_12 RK29_CAM_FLASHACTIVE_L
194 #define CONFIG_SENSOR_QCIF_FPS_FIXED_12 15000
195 #define CONFIG_SENSOR_240X160_FPS_FIXED_12 15000
196 #define CONFIG_SENSOR_QVGA_FPS_FIXED_12 15000
197 #define CONFIG_SENSOR_CIF_FPS_FIXED_12 15000
198 #define CONFIG_SENSOR_VGA_FPS_FIXED_12 15000
199 #define CONFIG_SENSOR_480P_FPS_FIXED_12 15000
200 #define CONFIG_SENSOR_SVGA_FPS_FIXED_12 15000
201 #define CONFIG_SENSOR_720P_FPS_FIXED_12 30000
204 #endif //#ifdef CONFIG_VIDEO_RK29
205 /*---------------- Camera Sensor Configuration Macro End------------------------*/
206 #include "../../../drivers/media/video/rk2928_camera.c"
207 /*---------------- Camera Sensor Macro Define End ---------*/
209 #define PMEM_CAM_SIZE PMEM_CAM_NECESSARY
210 /*****************************************************************************************
212 * author: ddl@rock-chips.com
213 *****************************************************************************************/
214 #ifdef CONFIG_VIDEO_RK29
216 #define CONFIG_SENSOR_POWER_IOCTL_USR 0 //define this refer to your board layout
217 #define CONFIG_SENSOR_RESET_IOCTL_USR 0
218 #define CONFIG_SENSOR_POWERDOWN_IOCTL_USR 0
219 #define CONFIG_SENSOR_FLASH_IOCTL_USR 0
221 #define CAMERA_NAME "gc0308_back_4"
222 #define CONFIG_SENSOR_POWER_IOCTL_USR 1 //define this refer to your board layout
223 #define CONFIG_SENSOR_RESET_IOCTL_USR 0
224 #define CONFIG_SENSOR_POWERDOWN_IOCTL_USR 1
225 #define CONFIG_SENSOR_FLASH_IOCTL_USR 0
226 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_PMU 1
230 static void rk_cif_power(int on)
232 struct regulator *ldo_18,*ldo_28;
234 ldo_28 = regulator_get(NULL, "ldo7"); // vcc28_cif
235 ldo_18 = regulator_get(NULL, "ldo1"); // vcc18_cif
237 ldo_28 = regulator_get(NULL, "vaux1"); // vcc28_cif
238 ldo_18 = regulator_get(NULL, "vdig1"); // vcc18_cif
240 if (ldo_28 == NULL || IS_ERR(ldo_28) || ldo_18 == NULL || IS_ERR(ldo_18)){
241 printk("get cif ldo failed!\n");
245 regulator_disable(ldo_28);
246 regulator_put(ldo_28);
247 regulator_disable(ldo_18);
248 regulator_put(ldo_18);
252 regulator_set_voltage(ldo_28, 2800000, 2800000);
253 regulator_enable(ldo_28);
254 // printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_28));
255 regulator_put(ldo_28);
257 regulator_set_voltage(ldo_18, 1800000, 1800000);
258 // regulator_set_suspend_voltage(ldo, 1800000);
259 regulator_enable(ldo_18);
260 // printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_18));
261 regulator_put(ldo_18);
265 #if CONFIG_SENSOR_POWER_IOCTL_USR
266 static int sensor_power_usr_cb (struct rk29camera_gpio_res *res,int on)
268 //#error "CONFIG_SENSOR_POWER_IOCTL_USR is 1, sensor_power_usr_cb function must be writed!!";
269 struct regulator *ldo_18,*ldo_28;
272 ldo_28 = regulator_get(NULL, "ldo7"); // vcc28_cif
273 ldo_18 = regulator_get(NULL, "ldo1"); // vcc18_cif
275 ldo_28 = regulator_get(NULL, "vaux1"); // vcc28_cif
276 ldo_18 = regulator_get(NULL, "vdig1"); // vcc18_cif
279 if (ldo_28 == NULL || IS_ERR(ldo_28) || ldo_18 == NULL || IS_ERR(ldo_18)){
280 printk("get cif ldo failed!\n");
284 while(regulator_is_enabled(ldo_28)>0)
285 regulator_disable(ldo_28);
286 regulator_put(ldo_28);
287 while(regulator_is_enabled(ldo_18)>0)
288 regulator_disable(ldo_18);
289 regulator_put(ldo_18);
292 regulator_set_voltage(ldo_28, 2800000, 2800000);
293 regulator_enable(ldo_28);
294 //printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_28));
295 regulator_put(ldo_28);
297 regulator_set_voltage(ldo_18, 1800000, 1800000);
298 //regulator_set_suspend_voltage(ldo, 1800000);
299 regulator_enable(ldo_18);
300 //printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_18));
301 regulator_put(ldo_18);
308 #if CONFIG_SENSOR_RESET_IOCTL_USR
309 static int sensor_reset_usr_cb (struct rk29camera_gpio_res *res,int on)
311 #error "CONFIG_SENSOR_RESET_IOCTL_USR is 1, sensor_reset_usr_cb function must be writed!!";
315 #if CONFIG_SENSOR_POWERDOWN_IOCTL_USR
316 static void rk_cif_powerdowen(int on)
318 struct regulator *ldo_28;
319 ldo_28 = regulator_get(NULL, "vpll"); // vcc28_cif
320 if (ldo_28 == NULL || IS_ERR(ldo_28) ){
321 printk("get cif vpll ldo failed!\n");
325 // if((res->gpio_flag & RK29_CAM_POWERDNACTIVE_MASK) == RK29_CAM_POWERDNACTIVE_H) {
326 if( CONFIG_SENSOR_POWERDNACTIVE_LEVEL_PMU ) {
327 printk("hjc:%s[%d],on=%d\n",__func__,__LINE__,on);
328 if(on == 0){//enable camera
329 regulator_set_voltage(ldo_28, 2500000, 2500000);
330 regulator_enable(ldo_28);
331 printk(" %s set vpll vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_28));
332 regulator_put(ldo_28);
334 }else{//disable camera
335 if(regulator_is_enabled(ldo_28)>0){
336 printk("%s[%d]\n",__func__,__LINE__);
337 int a = regulator_disable(ldo_28);
341 regulator_put(ldo_28);
346 printk("hjc:%s[%d],on=%d\n",__func__,__LINE__,on);
348 if(on == 1){//enable camera
349 regulator_set_voltage(ldo_28, 2500000, 2500000);
350 regulator_enable(ldo_28);
351 printk(" %s set vpll vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_28));
352 regulator_put(ldo_28);
353 }else{//disable camera
354 if(regulator_is_enabled(ldo_28)>0){
355 regulator_disable(ldo_28);
357 regulator_put(ldo_28);
362 static int sensor_powerdown_usr_cb (struct rk29camera_gpio_res *res,int on)
364 int camera_powerdown = res->gpio_powerdown;
366 #if 1 //defined(CONFIG_MACH_RK2926_V86)
368 printk("hjc:%s,%s,on=%d\n\n\n",__func__,res->dev_name,on);
369 if(strcmp(res->dev_name,CAMERA_NAME)==0)//"gc0308_front_3") == 0)
371 //Èç¹ûΪpmu¿ØÖƵÄÒý½Å£¬"ov5642_front_1" ¸ù¾Ý sensorÃû×Ö £¬Ç°ºóÖà £¬ sensorÐòºÅÈ·¶¨
372 //¾ßÌåpmu¿ØÖƲÙ×÷£¬¿É²Î¿¼ÎļþĩβµÄ²Î¿¼´úÂë
373 //printk("\n\n%s.............pwm power,on=%d\n",__FUNCTION__,on);
374 rk_cif_powerdowen(on);
375 }else{ //gpio¿ØÖƵIJÙ×÷
376 // int camera_powerdown = res->gpio_powerdown;
377 int camera_ioflag = res->gpio_flag;
378 int camera_io_init = res->gpio_init; // int ret = 0;
379 if (camera_powerdown != INVALID_GPIO) {
380 if (camera_io_init & RK29_CAM_POWERDNACTIVE_MASK) {
382 gpio_set_value(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
383 printk("%s..%s..PowerDownPin=%d ..PinLevel = %x \n",__FUNCTION__,res->dev_name,camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
385 gpio_set_value(camera_powerdown,(((~camera_ioflag)&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
386 printk("%s..%s..PowerDownPin= %d..PinLevel = %x \n",__FUNCTION__,res->dev_name, camera_powerdown, (((~camera_ioflag)&RK29_CAM_POWERDNACTIVE_MASK)>>RK29_CAM_POWERDNACTIVE_BITPOS));
388 } else { ret = RK29_CAM_EIO_REQUESTFAIL;
389 printk("%s..%s..PowerDownPin=%d request failed!\n",__FUNCTION__,res->dev_name,camera_powerdown); }
391 ret = RK29_CAM_EIO_INVALID;
396 #error "CONFIG_SENSOR_POWERDOWN_IOCTL_USR is 1, sensor_powerdown_usr_cb function must be writed!!";
401 #if CONFIG_SENSOR_FLASH_IOCTL_USR
402 static int sensor_flash_usr_cb (struct rk29camera_gpio_res *res,int on)
404 #error "CONFIG_SENSOR_FLASH_IOCTL_USR is 1, sensor_flash_usr_cb function must be writed!!";
408 static struct rk29camera_platform_ioctl_cb sensor_ioctl_cb = {
409 #if CONFIG_SENSOR_POWER_IOCTL_USR
410 .sensor_power_cb = sensor_power_usr_cb,
412 .sensor_power_cb = NULL,
415 #if CONFIG_SENSOR_RESET_IOCTL_USR
416 .sensor_reset_cb = sensor_reset_usr_cb,
418 .sensor_reset_cb = NULL,
421 #if CONFIG_SENSOR_POWERDOWN_IOCTL_USR
422 .sensor_powerdown_cb = sensor_powerdown_usr_cb,
424 .sensor_powerdown_cb = NULL,
427 #if CONFIG_SENSOR_FLASH_IOCTL_USR
428 .sensor_flash_cb = sensor_flash_usr_cb,
430 .sensor_flash_cb = NULL,
434 #if CONFIG_SENSOR_IIC_ADDR_0
435 static struct reginfo_t rk_init_data_sensor_reg_0[] =
439 static struct reginfo_t rk_init_data_sensor_winseqreg_0[] ={
444 #if CONFIG_SENSOR_IIC_ADDR_1
445 static struct reginfo_t rk_init_data_sensor_reg_1[] =
449 static struct reginfo_t rk_init_data_sensor_winseqreg_1[] =
454 #if CONFIG_SENSOR_IIC_ADDR_01
455 static struct reginfo_t rk_init_data_sensor_reg_01[] =
459 static struct reginfo_t rk_init_data_sensor_winseqreg_01[] =
464 #if CONFIG_SENSOR_IIC_ADDR_02
465 static struct reginfo_t rk_init_data_sensor_reg_02[] =
469 static struct reginfo_t rk_init_data_sensor_winseqreg_02[] =
474 #if CONFIG_SENSOR_IIC_ADDR_11
475 static struct reginfo_t rk_init_data_sensor_reg_11[] =
479 static struct reginfo_t rk_init_data_sensor_winseqreg_11[] =
484 #if CONFIG_SENSOR_IIC_ADDR_12
485 static struct reginfo_t rk_init_data_sensor_reg_12[] =
489 static struct reginfo_t rk_init_data_sensor_winseqreg_12[] =
494 static rk_sensor_user_init_data_s rk_init_data_sensor[RK_CAM_NUM] =
496 #if CONFIG_SENSOR_IIC_ADDR_0
498 .rk_sensor_init_width = INVALID_VALUE,
499 .rk_sensor_init_height = INVALID_VALUE,
500 .rk_sensor_init_bus_param = INVALID_VALUE,
501 .rk_sensor_init_pixelcode = INVALID_VALUE,
502 .rk_sensor_init_data = rk_init_data_sensor_reg_0,
503 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_0,
504 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_0) / sizeof(struct reginfo_t),
505 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_0) / sizeof(struct reginfo_t),
509 .rk_sensor_init_width = INVALID_VALUE,
510 .rk_sensor_init_height = INVALID_VALUE,
511 .rk_sensor_init_bus_param = INVALID_VALUE,
512 .rk_sensor_init_pixelcode = INVALID_VALUE,
513 .rk_sensor_init_data = NULL,
514 .rk_sensor_init_winseq = NULL,
515 .rk_sensor_winseq_size = 0,
516 .rk_sensor_init_data_size = 0,
519 #if CONFIG_SENSOR_IIC_ADDR_1
521 .rk_sensor_init_width = INVALID_VALUE,
522 .rk_sensor_init_height = INVALID_VALUE,
523 .rk_sensor_init_bus_param = INVALID_VALUE,
524 .rk_sensor_init_pixelcode = INVALID_VALUE,
525 .rk_sensor_init_data = rk_init_data_sensor_reg_1,
526 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_1,
527 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_1) / sizeof(struct reginfo_t),
528 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_1) / sizeof(struct reginfo_t),
532 .rk_sensor_init_width = INVALID_VALUE,
533 .rk_sensor_init_height = INVALID_VALUE,
534 .rk_sensor_init_bus_param = INVALID_VALUE,
535 .rk_sensor_init_pixelcode = INVALID_VALUE,
536 .rk_sensor_init_data = NULL,
537 .rk_sensor_init_winseq = NULL,
538 .rk_sensor_winseq_size = 0,
539 .rk_sensor_init_data_size = 0,
542 #if CONFIG_SENSOR_IIC_ADDR_01
544 .rk_sensor_init_width = INVALID_VALUE,
545 .rk_sensor_init_height = INVALID_VALUE,
546 .rk_sensor_init_bus_param = INVALID_VALUE,
547 .rk_sensor_init_pixelcode = INVALID_VALUE,
548 .rk_sensor_init_data = rk_init_data_sensor_reg_01,
549 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_01,
550 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_01) / sizeof(struct reginfo_t),
551 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_01) / sizeof(struct reginfo_t),
555 .rk_sensor_init_width = INVALID_VALUE,
556 .rk_sensor_init_height = INVALID_VALUE,
557 .rk_sensor_init_bus_param = INVALID_VALUE,
558 .rk_sensor_init_pixelcode = INVALID_VALUE,
559 .rk_sensor_init_data = NULL,
560 .rk_sensor_init_winseq = NULL,
561 .rk_sensor_winseq_size = 0,
562 .rk_sensor_init_data_size = 0,
565 #if CONFIG_SENSOR_IIC_ADDR_02
567 .rk_sensor_init_width = INVALID_VALUE,
568 .rk_sensor_init_height = INVALID_VALUE,
569 .rk_sensor_init_bus_param = INVALID_VALUE,
570 .rk_sensor_init_pixelcode = INVALID_VALUE,
571 .rk_sensor_init_data = rk_init_data_sensor_reg_02,
572 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_02,
573 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_02) / sizeof(struct reginfo_t),
574 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_02) / sizeof(struct reginfo_t),
578 .rk_sensor_init_width = INVALID_VALUE,
579 .rk_sensor_init_height = INVALID_VALUE,
580 .rk_sensor_init_bus_param = INVALID_VALUE,
581 .rk_sensor_init_pixelcode = INVALID_VALUE,
582 .rk_sensor_init_data = NULL,
583 .rk_sensor_init_winseq = NULL,
584 .rk_sensor_winseq_size = 0,
585 .rk_sensor_init_data_size = 0,
588 #if CONFIG_SENSOR_IIC_ADDR_11
590 .rk_sensor_init_width = INVALID_VALUE,
591 .rk_sensor_init_height = INVALID_VALUE,
592 .rk_sensor_init_bus_param = INVALID_VALUE,
593 .rk_sensor_init_pixelcode = INVALID_VALUE,
594 .rk_sensor_init_data = rk_init_data_sensor_reg_11,
595 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_11,
596 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_11) / sizeof(struct reginfo_t),
597 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_11) / sizeof(struct reginfo_t),
601 .rk_sensor_init_width = INVALID_VALUE,
602 .rk_sensor_init_height = INVALID_VALUE,
603 .rk_sensor_init_bus_param = INVALID_VALUE,
604 .rk_sensor_init_pixelcode = INVALID_VALUE,
605 .rk_sensor_init_data = NULL,
606 .rk_sensor_init_winseq = NULL,
607 .rk_sensor_winseq_size = 0,
608 .rk_sensor_init_data_size = 0,
611 #if CONFIG_SENSOR_IIC_ADDR_12
613 .rk_sensor_init_width = INVALID_VALUE,
614 .rk_sensor_init_height = INVALID_VALUE,
615 .rk_sensor_init_bus_param = INVALID_VALUE,
616 .rk_sensor_init_pixelcode = INVALID_VALUE,
617 .rk_sensor_init_data = rk_init_data_sensor_reg_12,
618 .rk_sensor_init_winseq = rk_init_data_sensor_winseqreg_12,
619 .rk_sensor_winseq_size = sizeof(rk_init_data_sensor_winseqreg_12) / sizeof(struct reginfo_t),
620 .rk_sensor_init_data_size = sizeof(rk_init_data_sensor_reg_12) / sizeof(struct reginfo_t),
624 .rk_sensor_init_width = INVALID_VALUE,
625 .rk_sensor_init_height = INVALID_VALUE,
626 .rk_sensor_init_bus_param = INVALID_VALUE,
627 .rk_sensor_init_pixelcode = INVALID_VALUE,
628 .rk_sensor_init_data = NULL,
629 .rk_sensor_init_winseq = NULL,
630 .rk_sensor_winseq_size = 0,
631 .rk_sensor_init_data_size = 0,
636 #include "../../../drivers/media/video/rk2928_camera.c"
638 #endif /* CONFIG_VIDEO_RK29 */