diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-03 07:39:09 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 09:17:45 -0400 |
commit | bfdf7ab110293340afc9aba246e8b9ddb0f56145 (patch) | |
tree | ed0f465d3d3931e01ae0ee72e784ebc04e163e60 /arch/arm/mach-omap2 | |
parent | 12595d46bf0d361b7f96fb24c9dc7fe5ce82b3f7 (diff) |
OMAP4: 4430SDP: Add picodlp support to board file
An on-board projector named picodlp is available for OMAP4430 SDP.
Entry for this picodlp as a panel is being added in dss_devices array to
the board file. It needs 4 GPIO pins for interfacing with host
processor and these are defined and two of them are configured in board
file. Two GPIOs power_on and display_select are configured here.
picodlp also needs an i2c client over i2c controller-2 at address 0x1b.
Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Mythri P K <mythripk@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 187fcae14fff..d3874a68b059 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <plat/omap4-keypad.h> | 39 | #include <plat/omap4-keypad.h> |
40 | #include <video/omapdss.h> | 40 | #include <video/omapdss.h> |
41 | #include <video/omap-panel-nokia-dsi.h> | 41 | #include <video/omap-panel-nokia-dsi.h> |
42 | #include <video/omap-panel-picodlp.h> | ||
42 | #include <linux/wl12xx.h> | 43 | #include <linux/wl12xx.h> |
43 | 44 | ||
44 | #include "mux.h" | 45 | #include "mux.h" |
@@ -54,6 +55,7 @@ | |||
54 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | 55 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ |
55 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
56 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ | 57 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ |
58 | #define DLP_POWER_ON_GPIO 40 | ||
57 | 59 | ||
58 | #define GPIO_WIFI_PMENA 54 | 60 | #define GPIO_WIFI_PMENA 54 |
59 | #define GPIO_WIFI_IRQ 53 | 61 | #define GPIO_WIFI_IRQ 53 |
@@ -758,10 +760,59 @@ static struct omap_dss_device sdp4430_hdmi_device = { | |||
758 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 760 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
759 | }; | 761 | }; |
760 | 762 | ||
763 | static struct picodlp_panel_data sdp4430_picodlp_pdata = { | ||
764 | .picodlp_adapter_id = 2, | ||
765 | .emu_done_gpio = 44, | ||
766 | .pwrgood_gpio = 45, | ||
767 | }; | ||
768 | |||
769 | static void sdp4430_picodlp_init(void) | ||
770 | { | ||
771 | int r; | ||
772 | const struct gpio picodlp_gpios[] = { | ||
773 | {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW, | ||
774 | "DLP POWER ON"}, | ||
775 | {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN, | ||
776 | "DLP EMU DONE"}, | ||
777 | {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW, | ||
778 | "DLP PWRGOOD"}, | ||
779 | }; | ||
780 | |||
781 | r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios)); | ||
782 | if (r) | ||
783 | pr_err("Cannot request PicoDLP GPIOs, error %d\n", r); | ||
784 | } | ||
785 | |||
786 | static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev) | ||
787 | { | ||
788 | gpio_set_value(DISPLAY_SEL_GPIO, 0); | ||
789 | gpio_set_value(DLP_POWER_ON_GPIO, 1); | ||
790 | |||
791 | return 0; | ||
792 | } | ||
793 | |||
794 | static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev) | ||
795 | { | ||
796 | gpio_set_value(DLP_POWER_ON_GPIO, 0); | ||
797 | gpio_set_value(DISPLAY_SEL_GPIO, 1); | ||
798 | } | ||
799 | |||
800 | static struct omap_dss_device sdp4430_picodlp_device = { | ||
801 | .name = "picodlp", | ||
802 | .driver_name = "picodlp_panel", | ||
803 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
804 | .phy.dpi.data_lines = 24, | ||
805 | .channel = OMAP_DSS_CHANNEL_LCD2, | ||
806 | .platform_enable = sdp4430_panel_enable_picodlp, | ||
807 | .platform_disable = sdp4430_panel_disable_picodlp, | ||
808 | .data = &sdp4430_picodlp_pdata, | ||
809 | }; | ||
810 | |||
761 | static struct omap_dss_device *sdp4430_dss_devices[] = { | 811 | static struct omap_dss_device *sdp4430_dss_devices[] = { |
762 | &sdp4430_lcd_device, | 812 | &sdp4430_lcd_device, |
763 | &sdp4430_lcd2_device, | 813 | &sdp4430_lcd2_device, |
764 | &sdp4430_hdmi_device, | 814 | &sdp4430_hdmi_device, |
815 | &sdp4430_picodlp_device, | ||
765 | }; | 816 | }; |
766 | 817 | ||
767 | static struct omap_dss_board_info sdp4430_dss_data = { | 818 | static struct omap_dss_board_info sdp4430_dss_data = { |
@@ -782,6 +833,7 @@ static void omap_4430sdp_display_init(void) | |||
782 | 833 | ||
783 | sdp4430_lcd_init(); | 834 | sdp4430_lcd_init(); |
784 | sdp4430_hdmi_mux_init(); | 835 | sdp4430_hdmi_mux_init(); |
836 | sdp4430_picodlp_init(); | ||
785 | omap_display_init(&sdp4430_dss_data); | 837 | omap_display_init(&sdp4430_dss_data); |
786 | } | 838 | } |
787 | 839 | ||