blob: 1d743d87a70fa85b79b97d4774eda97160e037c8 [file] [log] [blame]
Suresh Vankadara8df2c752012-01-18 00:18:03 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Stepan Moskovchenko39236d72011-11-30 17:42:23 -08002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
Stepan Moskovchenko39236d72011-11-30 17:42:23 -080014#include <asm/mach-types.h>
Kevin Chaneb6b6072012-01-17 11:54:54 -080015#include <linux/gpio.h>
Stepan Moskovchenko39236d72011-11-30 17:42:23 -080016#include <mach/board.h>
17#include <mach/msm_bus_board.h>
Stepan Moskovchenko39236d72011-11-30 17:42:23 -080018#include <mach/gpiomux.h>
19#include "devices.h"
Stepan Moskovchenko5a83dba2011-12-05 17:30:17 -080020#include "board-8930.h"
Stepan Moskovchenko39236d72011-11-30 17:42:23 -080021
22#if (defined(CONFIG_GPIO_SX150X) || defined(CONFIG_GPIO_SX150X_MODULE)) && \
23 defined(CONFIG_I2C)
24
25static struct i2c_board_info cam_expander_i2c_info[] = {
26 {
27 I2C_BOARD_INFO("sx1508q", 0x22),
28 .platform_data = &msm8930_sx150x_data[SX150X_CAM]
29 },
30};
31
32static struct msm_cam_expander_info cam_expander_info[] = {
33 {
34 cam_expander_i2c_info,
35 MSM_8930_GSBI4_QUP_I2C_BUS_ID,
36 },
37};
38#endif
39
40static struct gpiomux_setting cam_settings[] = {
41 {
42 .func = GPIOMUX_FUNC_GPIO, /*suspend*/
43 .drv = GPIOMUX_DRV_2MA,
44 .pull = GPIOMUX_PULL_DOWN,
45 },
46
47 {
48 .func = GPIOMUX_FUNC_1, /*active 1*/
49 .drv = GPIOMUX_DRV_2MA,
50 .pull = GPIOMUX_PULL_NONE,
51 },
52
53 {
54 .func = GPIOMUX_FUNC_GPIO, /*active 2*/
55 .drv = GPIOMUX_DRV_2MA,
56 .pull = GPIOMUX_PULL_NONE,
57 },
58
59 {
60 .func = GPIOMUX_FUNC_1, /*active 3*/
61 .drv = GPIOMUX_DRV_8MA,
62 .pull = GPIOMUX_PULL_NONE,
63 },
64
65 {
66 .func = GPIOMUX_FUNC_5, /*active 4*/
67 .drv = GPIOMUX_DRV_8MA,
68 .pull = GPIOMUX_PULL_UP,
69 },
70
71 {
72 .func = GPIOMUX_FUNC_6, /*active 5*/
73 .drv = GPIOMUX_DRV_8MA,
74 .pull = GPIOMUX_PULL_UP,
75 },
76
77 {
78 .func = GPIOMUX_FUNC_2, /*active 6*/
79 .drv = GPIOMUX_DRV_2MA,
80 .pull = GPIOMUX_PULL_UP,
81 },
82
83 {
84 .func = GPIOMUX_FUNC_3, /*active 7*/
85 .drv = GPIOMUX_DRV_8MA,
86 .pull = GPIOMUX_PULL_UP,
87 },
88
89 {
90 .func = GPIOMUX_FUNC_GPIO, /*i2c suspend*/
91 .drv = GPIOMUX_DRV_2MA,
92 .pull = GPIOMUX_PULL_KEEPER,
93 },
94
95};
96
97
Kevin Chaneb6b6072012-01-17 11:54:54 -080098static struct msm_gpiomux_config msm8930_cam_common_configs[] = {
Stepan Moskovchenko39236d72011-11-30 17:42:23 -080099 {
100 .gpio = 2,
101 .settings = {
102 [GPIOMUX_ACTIVE] = &cam_settings[2],
103 [GPIOMUX_SUSPENDED] = &cam_settings[0],
104 },
105 },
106 {
107 .gpio = 3,
108 .settings = {
109 [GPIOMUX_ACTIVE] = &cam_settings[1],
110 [GPIOMUX_SUSPENDED] = &cam_settings[0],
111 },
112 },
113 {
114 .gpio = 4,
115 .settings = {
116 [GPIOMUX_ACTIVE] = &cam_settings[1],
117 [GPIOMUX_SUSPENDED] = &cam_settings[0],
118 },
119 },
120 {
121 .gpio = 5,
122 .settings = {
123 [GPIOMUX_ACTIVE] = &cam_settings[1],
124 [GPIOMUX_SUSPENDED] = &cam_settings[0],
125 },
126 },
127 {
128 .gpio = 76,
129 .settings = {
130 [GPIOMUX_ACTIVE] = &cam_settings[2],
131 [GPIOMUX_SUSPENDED] = &cam_settings[0],
132 },
133 },
134 {
135 .gpio = 107,
136 .settings = {
137 [GPIOMUX_ACTIVE] = &cam_settings[2],
138 [GPIOMUX_SUSPENDED] = &cam_settings[0],
139 },
140 },
141};
142
Kevin Chaneb6b6072012-01-17 11:54:54 -0800143static struct msm_gpiomux_config msm8930_cam_2d_configs[] = {
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800144 {
145 .gpio = 18,
146 .settings = {
147 [GPIOMUX_ACTIVE] = &cam_settings[3],
148 [GPIOMUX_SUSPENDED] = &cam_settings[8],
149 },
150 },
151 {
152 .gpio = 19,
153 .settings = {
154 [GPIOMUX_ACTIVE] = &cam_settings[3],
155 [GPIOMUX_SUSPENDED] = &cam_settings[8],
156 },
157 },
158 {
159 .gpio = 20,
160 .settings = {
161 [GPIOMUX_ACTIVE] = &cam_settings[3],
162 [GPIOMUX_SUSPENDED] = &cam_settings[8],
163 },
164 },
165 {
166 .gpio = 21,
167 .settings = {
168 [GPIOMUX_ACTIVE] = &cam_settings[3],
169 [GPIOMUX_SUSPENDED] = &cam_settings[8],
170 },
171 },
172};
173
174#ifdef CONFIG_MSM_CAMERA
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800175#define VFE_CAMIF_TIMER1_GPIO 2
176#define VFE_CAMIF_TIMER2_GPIO 3
177#define VFE_CAMIF_TIMER3_GPIO_INT 4
178static struct msm_camera_sensor_strobe_flash_data strobe_flash_xenon = {
179 .flash_trigger = VFE_CAMIF_TIMER2_GPIO,
180 .flash_charge = VFE_CAMIF_TIMER1_GPIO,
181 .flash_charge_done = VFE_CAMIF_TIMER3_GPIO_INT,
182 .flash_recharge_duration = 50000,
183 .irq = MSM_GPIO_TO_INT(VFE_CAMIF_TIMER3_GPIO_INT),
184};
185
186#ifdef CONFIG_MSM_CAMERA_FLASH
187static struct msm_camera_sensor_flash_src msm_flash_src = {
188 .flash_sr_type = MSM_CAMERA_FLASH_SRC_EXT,
189 ._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1,
190 ._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2,
191#if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \
192 defined(CONFIG_GPIO_SX150X_MODULE))
193 ._fsrc.ext_driver_src.expander_info = cam_expander_info,
194#endif
195};
196#endif
197
198static struct msm_bus_vectors cam_init_vectors[] = {
199 {
200 .src = MSM_BUS_MASTER_VFE,
201 .dst = MSM_BUS_SLAVE_EBI_CH0,
202 .ab = 0,
203 .ib = 0,
204 },
205 {
206 .src = MSM_BUS_MASTER_VPE,
207 .dst = MSM_BUS_SLAVE_EBI_CH0,
208 .ab = 0,
209 .ib = 0,
210 },
211 {
212 .src = MSM_BUS_MASTER_JPEG_ENC,
213 .dst = MSM_BUS_SLAVE_EBI_CH0,
214 .ab = 0,
215 .ib = 0,
216 },
217};
218
219static struct msm_bus_vectors cam_preview_vectors[] = {
220 {
221 .src = MSM_BUS_MASTER_VFE,
222 .dst = MSM_BUS_SLAVE_EBI_CH0,
223 .ab = 27648000,
224 .ib = 110592000,
225 },
226 {
227 .src = MSM_BUS_MASTER_VPE,
228 .dst = MSM_BUS_SLAVE_EBI_CH0,
229 .ab = 0,
230 .ib = 0,
231 },
232 {
233 .src = MSM_BUS_MASTER_JPEG_ENC,
234 .dst = MSM_BUS_SLAVE_EBI_CH0,
235 .ab = 0,
236 .ib = 0,
237 },
238};
239
240static struct msm_bus_vectors cam_video_vectors[] = {
241 {
242 .src = MSM_BUS_MASTER_VFE,
243 .dst = MSM_BUS_SLAVE_EBI_CH0,
244 .ab = 140451840,
245 .ib = 561807360,
246 },
247 {
248 .src = MSM_BUS_MASTER_VPE,
249 .dst = MSM_BUS_SLAVE_EBI_CH0,
250 .ab = 206807040,
251 .ib = 488816640,
252 },
253 {
254 .src = MSM_BUS_MASTER_JPEG_ENC,
255 .dst = MSM_BUS_SLAVE_EBI_CH0,
256 .ab = 0,
257 .ib = 0,
258 },
259};
260
261static struct msm_bus_vectors cam_snapshot_vectors[] = {
262 {
263 .src = MSM_BUS_MASTER_VFE,
264 .dst = MSM_BUS_SLAVE_EBI_CH0,
265 .ab = 274423680,
266 .ib = 1097694720,
267 },
268 {
269 .src = MSM_BUS_MASTER_VPE,
270 .dst = MSM_BUS_SLAVE_EBI_CH0,
271 .ab = 0,
272 .ib = 0,
273 },
274 {
275 .src = MSM_BUS_MASTER_JPEG_ENC,
276 .dst = MSM_BUS_SLAVE_EBI_CH0,
277 .ab = 540000000,
278 .ib = 1350000000,
279 },
280};
281
282static struct msm_bus_vectors cam_zsl_vectors[] = {
283 {
284 .src = MSM_BUS_MASTER_VFE,
285 .dst = MSM_BUS_SLAVE_EBI_CH0,
286 .ab = 302071680,
287 .ib = 1208286720,
288 },
289 {
290 .src = MSM_BUS_MASTER_VPE,
291 .dst = MSM_BUS_SLAVE_EBI_CH0,
292 .ab = 0,
293 .ib = 0,
294 },
295 {
296 .src = MSM_BUS_MASTER_JPEG_ENC,
297 .dst = MSM_BUS_SLAVE_EBI_CH0,
298 .ab = 540000000,
299 .ib = 1350000000,
300 },
301};
302
303static struct msm_bus_paths cam_bus_client_config[] = {
304 {
305 ARRAY_SIZE(cam_init_vectors),
306 cam_init_vectors,
307 },
308 {
309 ARRAY_SIZE(cam_preview_vectors),
310 cam_preview_vectors,
311 },
312 {
313 ARRAY_SIZE(cam_video_vectors),
314 cam_video_vectors,
315 },
316 {
317 ARRAY_SIZE(cam_snapshot_vectors),
318 cam_snapshot_vectors,
319 },
320 {
321 ARRAY_SIZE(cam_zsl_vectors),
322 cam_zsl_vectors,
323 },
324};
325
326static struct msm_bus_scale_pdata cam_bus_client_pdata = {
327 cam_bus_client_config,
328 ARRAY_SIZE(cam_bus_client_config),
329 .name = "msm_camera",
330};
331
332static struct msm_camera_device_platform_data msm_camera_csi_device_data[] = {
333 {
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800334 .csid_core = 0,
Suresh Vankadara8df2c752012-01-18 00:18:03 +0530335 .is_csiphy = 1,
336 .is_csid = 1,
337 .is_ispif = 1,
338 .is_vpe = 1,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800339 .cam_bus_scale_table = &cam_bus_client_pdata,
340 },
341 {
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800342 .csid_core = 1,
Suresh Vankadara8df2c752012-01-18 00:18:03 +0530343 .is_csiphy = 1,
344 .is_csid = 1,
345 .is_ispif = 1,
346 .is_vpe = 1,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800347 .cam_bus_scale_table = &cam_bus_client_pdata,
348 },
349};
350
Kevin Chaneb6b6072012-01-17 11:54:54 -0800351static struct camera_vreg_t msm_8930_back_cam_vreg[] = {
Kevin Chaneb6b6072012-01-17 11:54:54 -0800352 {"cam_vdig", REG_LDO, 1200000, 1200000, 105000},
Sreesudhan Ramakrish Ramkumarec27a6e2012-02-11 20:41:19 -0800353 {"cam_vio", REG_LDO, 1800000, 1800000, 16000},
354 {"cam_vana", REG_LDO, 2800000, 2850000, 85600},
Kevin Chaneb6b6072012-01-17 11:54:54 -0800355 {"cam_vaf", REG_LDO, 2800000, 2850000, 300000},
356};
357
358static struct camera_vreg_t msm_8930_front_cam_vreg[] = {
Kevin Chaneb6b6072012-01-17 11:54:54 -0800359 {"cam_vio", REG_LDO, 1800000, 1800000, 16000},
Sreesudhan Ramakrish Ramkumarec27a6e2012-02-11 20:41:19 -0800360 {"cam_vana", REG_LDO, 2800000, 2850000, 85600},
Kevin Chaneb6b6072012-01-17 11:54:54 -0800361 {"cam_vdig", REG_LDO, 1200000, 1200000, 105000},
362};
363
364static struct gpio msm8930_common_cam_gpio[] = {
365 {5, GPIOF_DIR_IN, "CAMIF_MCLK"},
366 {20, GPIOF_DIR_IN, "CAMIF_I2C_DATA"},
367 {21, GPIOF_DIR_IN, "CAMIF_I2C_CLK"},
368};
369
370static struct gpio msm8930_front_cam_gpio[] = {
371 {76, GPIOF_DIR_OUT, "CAM_RESET"},
372};
373
374static struct gpio msm8930_back_cam_gpio[] = {
375 {107, GPIOF_DIR_OUT, "CAM_RESET"},
376};
377
378static struct msm_gpio_set_tbl msm8930_front_cam_gpio_set_tbl[] = {
379 {76, GPIOF_OUT_INIT_LOW, 1000},
380 {76, GPIOF_OUT_INIT_HIGH, 4000},
381};
382
383static struct msm_gpio_set_tbl msm8930_back_cam_gpio_set_tbl[] = {
384 {107, GPIOF_OUT_INIT_LOW, 1000},
385 {107, GPIOF_OUT_INIT_HIGH, 4000},
386};
387
388static struct msm_camera_gpio_conf msm_8930_front_cam_gpio_conf = {
389 .cam_gpiomux_conf_tbl = msm8930_cam_2d_configs,
390 .cam_gpiomux_conf_tbl_size = ARRAY_SIZE(msm8930_cam_2d_configs),
391 .cam_gpio_common_tbl = msm8930_common_cam_gpio,
392 .cam_gpio_common_tbl_size = ARRAY_SIZE(msm8930_common_cam_gpio),
393 .cam_gpio_req_tbl = msm8930_front_cam_gpio,
394 .cam_gpio_req_tbl_size = ARRAY_SIZE(msm8930_front_cam_gpio),
395 .cam_gpio_set_tbl = msm8930_front_cam_gpio_set_tbl,
396 .cam_gpio_set_tbl_size = ARRAY_SIZE(msm8930_front_cam_gpio_set_tbl),
397};
398
399static struct msm_camera_gpio_conf msm_8930_back_cam_gpio_conf = {
400 .cam_gpiomux_conf_tbl = msm8930_cam_2d_configs,
401 .cam_gpiomux_conf_tbl_size = ARRAY_SIZE(msm8930_cam_2d_configs),
402 .cam_gpio_common_tbl = msm8930_common_cam_gpio,
403 .cam_gpio_common_tbl_size = ARRAY_SIZE(msm8930_common_cam_gpio),
404 .cam_gpio_req_tbl = msm8930_back_cam_gpio,
405 .cam_gpio_req_tbl_size = ARRAY_SIZE(msm8930_back_cam_gpio),
406 .cam_gpio_set_tbl = msm8930_back_cam_gpio_set_tbl,
407 .cam_gpio_set_tbl_size = ARRAY_SIZE(msm8930_back_cam_gpio_set_tbl),
408};
409
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800410static struct i2c_board_info imx074_actuator_i2c_info = {
411 I2C_BOARD_INFO("imx074_act", 0x11),
412};
413
414static struct msm_actuator_info imx074_actuator_info = {
415 .board_info = &imx074_actuator_i2c_info,
416 .bus_id = MSM_8930_GSBI4_QUP_I2C_BUS_ID,
417 .vcm_pwd = 0,
418 .vcm_enable = 1,
419};
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800420
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800421static struct msm_camera_sensor_flash_data flash_imx074 = {
422 .flash_type = MSM_CAMERA_FLASH_LED,
423#ifdef CONFIG_MSM_CAMERA_FLASH
424 .flash_src = &msm_flash_src
425#endif
426};
427
428static struct msm_camera_sensor_platform_info sensor_board_info_imx074 = {
429 .mount_angle = 90,
Kevin Chaneb6b6072012-01-17 11:54:54 -0800430 .cam_vreg = msm_8930_back_cam_vreg,
431 .num_vreg = ARRAY_SIZE(msm_8930_back_cam_vreg),
432 .gpio_conf = &msm_8930_back_cam_gpio_conf,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800433};
434
435static struct msm_camera_sensor_info msm_camera_sensor_imx074_data = {
436 .sensor_name = "imx074",
437 .pdata = &msm_camera_csi_device_data[0],
438 .flash_data = &flash_imx074,
439 .strobe_flash_data = &strobe_flash_xenon,
440 .sensor_platform_info = &sensor_board_info_imx074,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800441 .csi_if = 1,
442 .camera_type = BACK_CAMERA_2D,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800443 .actuator_info = &imx074_actuator_info
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800444};
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800445
Sreesudhan Ramakrish Ramkumarec27a6e2012-02-11 20:41:19 -0800446static struct camera_vreg_t msm_8930_mt9m114_vreg[] = {
Sreesudhan Ramakrish Ramkumarec27a6e2012-02-11 20:41:19 -0800447 {"cam_vio", REG_LDO, 1800000, 1800000, 16000},
448 {"cam_vdig", REG_LDO, 1200000, 1200000, 105000},
449 {"cam_vana", REG_LDO, 2800000, 2850000, 85600},
450 {"cam_vaf", REG_LDO, 2800000, 2850000, 300000},
451};
452
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800453static struct msm_camera_sensor_flash_data flash_mt9m114 = {
454 .flash_type = MSM_CAMERA_FLASH_NONE
455};
456
457static struct msm_camera_sensor_platform_info sensor_board_info_mt9m114 = {
458 .mount_angle = 90,
Sreesudhan Ramakrish Ramkumarec27a6e2012-02-11 20:41:19 -0800459 .cam_vreg = msm_8930_mt9m114_vreg,
460 .num_vreg = ARRAY_SIZE(msm_8930_mt9m114_vreg),
Sreesudhan Ramakrish Ramkumar61c877d2012-02-23 22:22:19 -0800461 .gpio_conf = &msm_8930_front_cam_gpio_conf,
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800462};
463
464static struct msm_camera_sensor_info msm_camera_sensor_mt9m114_data = {
465 .sensor_name = "mt9m114",
Sreesudhan Ramakrish Ramkumar61c877d2012-02-23 22:22:19 -0800466 .pdata = &msm_camera_csi_device_data[1],
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800467 .flash_data = &flash_mt9m114,
468 .sensor_platform_info = &sensor_board_info_mt9m114,
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800469 .csi_if = 1,
Sreesudhan Ramakrish Ramkumar61c877d2012-02-23 22:22:19 -0800470 .camera_type = FRONT_CAMERA_2D,
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800471};
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800472
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800473static struct msm_camera_sensor_flash_data flash_ov2720 = {
474 .flash_type = MSM_CAMERA_FLASH_NONE,
475};
476
477static struct msm_camera_sensor_platform_info sensor_board_info_ov2720 = {
478 .mount_angle = 0,
Kevin Chaneb6b6072012-01-17 11:54:54 -0800479 .cam_vreg = msm_8930_front_cam_vreg,
480 .num_vreg = ARRAY_SIZE(msm_8930_front_cam_vreg),
481 .gpio_conf = &msm_8930_front_cam_gpio_conf,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800482};
483
484static struct msm_camera_sensor_info msm_camera_sensor_ov2720_data = {
485 .sensor_name = "ov2720",
486 .pdata = &msm_camera_csi_device_data[1],
487 .flash_data = &flash_ov2720,
488 .sensor_platform_info = &sensor_board_info_ov2720,
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800489 .csi_if = 1,
490 .camera_type = FRONT_CAMERA_2D,
491};
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800492
Sreesudhan Ramakrish Ramkumar8f11b8b2012-01-04 17:09:05 -0800493static struct camera_vreg_t msm_8930_s5k3l1yx_vreg[] = {
Sreesudhan Ramakrish Ramkumar8f11b8b2012-01-04 17:09:05 -0800494 {"cam_vdig", REG_LDO, 1200000, 1200000, 105000},
495 {"cam_vana", REG_LDO, 2800000, 2850000, 85600},
Jeyaprakash Soundrapandian49eef5a2012-02-08 13:57:20 -0800496 {"cam_vio", REG_LDO, 1800000, 1800000, 16000},
497 {"cam_vaf", REG_LDO, 2800000, 2850000, 300000},
Sreesudhan Ramakrish Ramkumar8f11b8b2012-01-04 17:09:05 -0800498};
499
500static struct msm_camera_sensor_flash_data flash_s5k3l1yx = {
501 .flash_type = MSM_CAMERA_FLASH_NONE,
502};
503
504static struct msm_camera_sensor_platform_info sensor_board_info_s5k3l1yx = {
505 .mount_angle = 0,
506 .cam_vreg = msm_8930_s5k3l1yx_vreg,
507 .num_vreg = ARRAY_SIZE(msm_8930_s5k3l1yx_vreg),
508 .gpio_conf = &msm_8930_back_cam_gpio_conf,
509};
510
511static struct msm_camera_sensor_info msm_camera_sensor_s5k3l1yx_data = {
512 .sensor_name = "s5k3l1yx",
513 .pdata = &msm_camera_csi_device_data[0],
514 .flash_data = &flash_s5k3l1yx,
515 .sensor_platform_info = &sensor_board_info_s5k3l1yx,
516 .csi_if = 1,
517 .camera_type = BACK_CAMERA_2D,
518};
519
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800520void __init msm8930_init_cam(void)
521{
Kevin Chaneb6b6072012-01-17 11:54:54 -0800522 msm_gpiomux_install(msm8930_cam_common_configs,
523 ARRAY_SIZE(msm8930_cam_common_configs));
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800524
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800525 platform_device_register(&msm8960_device_csiphy0);
526 platform_device_register(&msm8960_device_csiphy1);
527 platform_device_register(&msm8960_device_csid0);
528 platform_device_register(&msm8960_device_csid1);
529 platform_device_register(&msm8960_device_ispif);
530 platform_device_register(&msm8960_device_vfe);
531 platform_device_register(&msm8960_device_vpe);
532}
Kevin Chan09f4e662011-12-16 08:17:02 -0800533
534#ifdef CONFIG_I2C
535struct i2c_board_info msm8930_camera_i2c_boardinfo[] = {
Kevin Chan09f4e662011-12-16 08:17:02 -0800536 {
537 I2C_BOARD_INFO("imx074", 0x1A),
538 .platform_data = &msm_camera_sensor_imx074_data,
539 },
Kevin Chan09f4e662011-12-16 08:17:02 -0800540 {
541 I2C_BOARD_INFO("ov2720", 0x6C),
542 .platform_data = &msm_camera_sensor_ov2720_data,
543 },
Sreesudhan Ramakrish Ramkumarbc5f5b82011-12-28 17:10:30 -0800544 {
545 I2C_BOARD_INFO("mt9m114", 0x48),
546 .platform_data = &msm_camera_sensor_mt9m114_data,
547 },
Sreesudhan Ramakrish Ramkumar8f11b8b2012-01-04 17:09:05 -0800548 {
549 I2C_BOARD_INFO("s5k3l1yx", 0x20),
550 .platform_data = &msm_camera_sensor_s5k3l1yx_data,
551 },
Kevin Chan09f4e662011-12-16 08:17:02 -0800552#ifdef CONFIG_MSM_CAMERA_FLASH_SC628A
553 {
554 I2C_BOARD_INFO("sc628a", 0x6E),
555 },
556#endif
557};
558
559struct msm_camera_board_info msm8930_camera_board_info = {
560 .board_info = msm8930_camera_i2c_boardinfo,
561 .num_i2c_board_info = ARRAY_SIZE(msm8930_camera_i2c_boardinfo),
562};
563#endif
Stepan Moskovchenko39236d72011-11-30 17:42:23 -0800564#endif