@@ -38,6 +38,7 @@
#include <plat/omap4-keypad.h>
#include <plat/display.h>
#include <plat/nokia-dsi-panel.h>
+#include <plat/panel-picodlp.h>
#include "mux.h"
#include "hsmmc.h"
@@ -52,6 +53,8 @@
#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
#define LCD_BL_GPIO 27 /* LCD Backlight GPIO */
+#define OMAP4_DLP_POWER_ON_GPIO 40
+#define OMAP4_DLP_DISPLAY_SELECT_GPIO 59
/* PWM2 and TOGGLE3 register offsets */
#define LED_PWM2ON 0x03
#define LED_PWM2OFF 0x04
@@ -812,9 +815,64 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.channel = OMAP_DSS_CHANNEL_DIGIT,
};
+static struct picodlp_panel_data sdp4430_picodlp_pdata = {
+ .picodlp_adapter_id = 2,
+ .emu_done_gpio = 44,
+ .pwrgood_gpio = 45,
+};
+
+static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
+{
+ int status;
+ struct gpio picodlp_gpios[] = {
+ {OMAP4_DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
+ "DLP POWER ON"},
+ {OMAP4_DLP_DISPLAY_SELECT_GPIO, GPIOF_OUT_INIT_LOW,
+ "DLP DISPLAY SELECT"},
+ };
+
+ status = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
+ if (status)
+ goto error1;
+
+ gpio_set_value(OMAP4_DLP_DISPLAY_SELECT_GPIO, 1);
+ gpio_set_value(OMAP4_DLP_POWER_ON_GPIO, 1);
+
+ return 0;
+error1:
+ pr_err("Cannot request OMAP4_DLP_GPIOs, error %d\n", status);
+ return status;
+}
+
+static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
+{
+ struct gpio picodlp_gpios[] = {
+ {OMAP4_DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
+ "DLP POWER ON"},
+ {OMAP4_DLP_DISPLAY_SELECT_GPIO, GPIOF_OUT_INIT_LOW,
+ "DLP DISPLAY SELECT"},
+ };
+ gpio_set_value(OMAP4_DLP_POWER_ON_GPIO, 0);
+ gpio_set_value(OMAP4_DLP_DISPLAY_SELECT_GPIO, 0);
+
+ gpio_free_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
+}
+
+static struct omap_dss_device sdp4430_picodlp_device = {
+ .name = "picodlp",
+ .driver_name = "picodlp_panel",
+ .type = OMAP_DISPLAY_TYPE_DPI,
+ .phy.dpi.data_lines = 24,
+ .channel = OMAP_DSS_CHANNEL_LCD2,
+ .platform_enable = sdp4430_panel_enable_picodlp,
+ .platform_disable = sdp4430_panel_disable_picodlp,
+ .data = &sdp4430_picodlp_pdata,
+};
+
static struct omap_dss_device *sdp4430_dss_devices[] = {
&sdp4430_lcd_device,
&sdp4430_hdmi_device,
+ &sdp4430_picodlp_device,
};
static struct omap_dss_board_info sdp4430_dss_data = {