diff options
author | Dmitry Lifshitz <lifshitz@compulab.co.il> | 2012-06-13 08:55:09 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-07-02 07:09:04 -0400 |
commit | d396be47300a52faf834c1e5fdb48d7d36aa45cf (patch) | |
tree | e8cbf87931e70753aba207a7c30d965d19541bc8 /arch/arm/mach-omap2/board-cm-t35.c | |
parent | e2fb50521c3811eddd60d911bc6d4d191f5d6e61 (diff) |
ARM: OMAP3: cm-t35: add mt9t001 camera sensor support
Setup pinmux for CPI and register the mt9t001 camera sensor
in ISP subsystem.
Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index ded100c80a91..05c66e847484 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -490,6 +490,51 @@ static struct twl4030_platform_data cm_t35_twldata = { | |||
490 | .power = &cm_t35_power_data, | 490 | .power = &cm_t35_power_data, |
491 | }; | 491 | }; |
492 | 492 | ||
493 | #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) | ||
494 | #include <media/omap3isp.h> | ||
495 | #include "devices.h" | ||
496 | |||
497 | static struct i2c_board_info cm_t35_isp_i2c_boardinfo[] = { | ||
498 | { | ||
499 | I2C_BOARD_INFO("mt9t001", 0x5d), | ||
500 | }, | ||
501 | }; | ||
502 | |||
503 | static struct isp_subdev_i2c_board_info cm_t35_isp_primary_subdevs[] = { | ||
504 | { | ||
505 | .board_info = &cm_t35_isp_i2c_boardinfo[0], | ||
506 | .i2c_adapter_id = 3, | ||
507 | }, | ||
508 | { NULL, 0, }, | ||
509 | }; | ||
510 | |||
511 | static struct isp_v4l2_subdevs_group cm_t35_isp_subdevs[] = { | ||
512 | { | ||
513 | .subdevs = cm_t35_isp_primary_subdevs, | ||
514 | .interface = ISP_INTERFACE_PARALLEL, | ||
515 | .bus = { | ||
516 | .parallel = { | ||
517 | .clk_pol = 1, | ||
518 | }, | ||
519 | }, | ||
520 | }, | ||
521 | { NULL, 0, }, | ||
522 | }; | ||
523 | |||
524 | static struct isp_platform_data cm_t35_isp_pdata = { | ||
525 | .subdevs = cm_t35_isp_subdevs, | ||
526 | }; | ||
527 | |||
528 | static void __init cm_t35_init_camera(void) | ||
529 | { | ||
530 | if (omap3_init_camera(&cm_t35_isp_pdata) < 0) | ||
531 | pr_warn("CM-T3x: Failed registering camera device!\n"); | ||
532 | } | ||
533 | |||
534 | #else | ||
535 | static inline void cm_t35_init_camera(void) {} | ||
536 | #endif /* CONFIG_VIDEO_OMAP3 */ | ||
537 | |||
493 | static void __init cm_t35_init_i2c(void) | 538 | static void __init cm_t35_init_i2c(void) |
494 | { | 539 | { |
495 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, | 540 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, |
@@ -497,6 +542,8 @@ static void __init cm_t35_init_i2c(void) | |||
497 | TWL_COMMON_PDATA_AUDIO); | 542 | TWL_COMMON_PDATA_AUDIO); |
498 | 543 | ||
499 | omap3_pmic_init("tps65930", &cm_t35_twldata); | 544 | omap3_pmic_init("tps65930", &cm_t35_twldata); |
545 | |||
546 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
500 | } | 547 | } |
501 | 548 | ||
502 | #ifdef CONFIG_OMAP_MUX | 549 | #ifdef CONFIG_OMAP_MUX |
@@ -574,6 +621,27 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
574 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 621 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
575 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 622 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
576 | 623 | ||
624 | /* Camera */ | ||
625 | OMAP3_MUX(CAM_HS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
626 | OMAP3_MUX(CAM_VS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
627 | OMAP3_MUX(CAM_XCLKA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
628 | OMAP3_MUX(CAM_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
629 | OMAP3_MUX(CAM_FLD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
630 | OMAP3_MUX(CAM_D0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
631 | OMAP3_MUX(CAM_D1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
632 | OMAP3_MUX(CAM_D2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
633 | OMAP3_MUX(CAM_D3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
634 | OMAP3_MUX(CAM_D4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
635 | OMAP3_MUX(CAM_D5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
636 | OMAP3_MUX(CAM_D6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
637 | OMAP3_MUX(CAM_D7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
638 | OMAP3_MUX(CAM_D8, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | ||
639 | OMAP3_MUX(CAM_D9, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | ||
640 | OMAP3_MUX(CAM_STROBE, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
641 | |||
642 | OMAP3_MUX(CAM_D10, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN), | ||
643 | OMAP3_MUX(CAM_D11, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN), | ||
644 | |||
577 | /* display controls */ | 645 | /* display controls */ |
578 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 646 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
579 | OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 647 | OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
@@ -646,6 +714,7 @@ static void __init cm_t3x_common_init(void) | |||
646 | 714 | ||
647 | usb_musb_init(NULL); | 715 | usb_musb_init(NULL); |
648 | cm_t35_init_usbh(); | 716 | cm_t35_init_usbh(); |
717 | cm_t35_init_camera(); | ||
649 | } | 718 | } |
650 | 719 | ||
651 | static void __init cm_t35_init(void) | 720 | static void __init cm_t35_init(void) |