aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-06 04:31:02 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 09:17:37 -0400
commit12595d46bf0d361b7f96fb24c9dc7fe5ce82b3f7 (patch)
tree30a8015cb5607aa6fa70f02759391367a6285efc /arch/arm/mach-omap2/board-4430sdp.c
parent4010c07c2307a8238ef4a742d4080de4a577575b (diff)
OMAP4: 4430SDP: Add panel support to board file
4430SDP has two Taal DSI panels, connected to DSI 1 and DSI 2 modules. The panels use a common PWM backlight, which will be implemented later when the PWM driver has been improved to support the backlight. Until the PWM driver has been improved, the following hack added to arch/arm/mach-omap2/board-4430sdp.c can be used to set the backlight to max: static int omap_4430sdp_hack_backlight(void) { twl_i2c_write_u8(TWL_MODULE_PWM, 0x7f, LED_PWM2OFF); twl_i2c_write_u8(TWL_MODULE_PWM, 0x7f, LED_PWM2ON); twl_i2c_write_u8(TWL6030_MODULE_ID1, 0x30, TWL6030_TOGGLE3); return 0; } late_initcall(omap_4430sdp_hack_backlight); Signed-off-by: Archit Taneja <archit@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/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c130
1 files changed, 128 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 62ec9f5d181e..187fcae14fff 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -38,6 +38,7 @@
38#include <plat/mmc.h> 38#include <plat/mmc.h>
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 <linux/wl12xx.h> 42#include <linux/wl12xx.h>
42 43
43#include "mux.h" 44#include "mux.h"
@@ -52,6 +53,7 @@
52#define OMAP4_SFH7741_ENABLE_GPIO 188 53#define OMAP4_SFH7741_ENABLE_GPIO 188
53#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 54#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
54#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 55#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
56#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
55 57
56#define GPIO_WIFI_PMENA 54 58#define GPIO_WIFI_PMENA 54
57#define GPIO_WIFI_IRQ 53 59#define GPIO_WIFI_IRQ 53
@@ -634,6 +636,119 @@ static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
634 gpio_free(HDMI_GPIO_HPD); 636 gpio_free(HDMI_GPIO_HPD);
635} 637}
636 638
639static struct nokia_dsi_panel_data dsi1_panel = {
640 .name = "taal",
641 .reset_gpio = 102,
642 .use_ext_te = false,
643 .ext_te_gpio = 101,
644 .esd_interval = 0,
645};
646
647static struct omap_dss_device sdp4430_lcd_device = {
648 .name = "lcd",
649 .driver_name = "taal",
650 .type = OMAP_DISPLAY_TYPE_DSI,
651 .data = &dsi1_panel,
652 .phy.dsi = {
653 .clk_lane = 1,
654 .clk_pol = 0,
655 .data1_lane = 2,
656 .data1_pol = 0,
657 .data2_lane = 3,
658 .data2_pol = 0,
659
660 .module = 0,
661 },
662
663 .clocks = {
664 .dispc = {
665 .channel = {
666 /* Logic Clock = 172.8 MHz */
667 .lck_div = 1,
668 /* Pixel Clock = 34.56 MHz */
669 .pck_div = 5,
670 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,
671 },
672 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
673 },
674
675 .dsi = {
676 .regn = 16, /* Fint = 2.4 MHz */
677 .regm = 180, /* DDR Clock = 216 MHz */
678 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
679 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
680
681 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
682 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI,
683 },
684 },
685 .channel = OMAP_DSS_CHANNEL_LCD,
686};
687
688static struct nokia_dsi_panel_data dsi2_panel = {
689 .name = "taal",
690 .reset_gpio = 104,
691 .use_ext_te = false,
692 .ext_te_gpio = 103,
693 .esd_interval = 0,
694};
695
696static struct omap_dss_device sdp4430_lcd2_device = {
697 .name = "lcd2",
698 .driver_name = "taal",
699 .type = OMAP_DISPLAY_TYPE_DSI,
700 .data = &dsi2_panel,
701 .phy.dsi = {
702 .clk_lane = 1,
703 .clk_pol = 0,
704 .data1_lane = 2,
705 .data1_pol = 0,
706 .data2_lane = 3,
707 .data2_pol = 0,
708
709 .module = 1,
710 },
711
712 .clocks = {
713 .dispc = {
714 .channel = {
715 /* Logic Clock = 172.8 MHz */
716 .lck_div = 1,
717 /* Pixel Clock = 34.56 MHz */
718 .pck_div = 5,
719 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC,
720 },
721 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
722 },
723
724 .dsi = {
725 .regn = 16, /* Fint = 2.4 MHz */
726 .regm = 180, /* DDR Clock = 216 MHz */
727 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
728 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
729
730 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
731 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI,
732 },
733 },
734 .channel = OMAP_DSS_CHANNEL_LCD2,
735};
736
737static void sdp4430_lcd_init(void)
738{
739 int r;
740
741 r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
742 "lcd1_reset_gpio");
743 if (r)
744 pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
745
746 r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
747 "lcd2_reset_gpio");
748 if (r)
749 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
750}
751
637static struct omap_dss_device sdp4430_hdmi_device = { 752static struct omap_dss_device sdp4430_hdmi_device = {
638 .name = "hdmi", 753 .name = "hdmi",
639 .driver_name = "hdmi_panel", 754 .driver_name = "hdmi_panel",
@@ -644,17 +759,28 @@ static struct omap_dss_device sdp4430_hdmi_device = {
644}; 759};
645 760
646static struct omap_dss_device *sdp4430_dss_devices[] = { 761static struct omap_dss_device *sdp4430_dss_devices[] = {
762 &sdp4430_lcd_device,
763 &sdp4430_lcd2_device,
647 &sdp4430_hdmi_device, 764 &sdp4430_hdmi_device,
648}; 765};
649 766
650static struct omap_dss_board_info sdp4430_dss_data = { 767static struct omap_dss_board_info sdp4430_dss_data = {
651 .num_devices = ARRAY_SIZE(sdp4430_dss_devices), 768 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
652 .devices = sdp4430_dss_devices, 769 .devices = sdp4430_dss_devices,
653 .default_device = &sdp4430_hdmi_device, 770 .default_device = &sdp4430_lcd_device,
654}; 771};
655 772
656void omap_4430sdp_display_init(void) 773static void omap_4430sdp_display_init(void)
657{ 774{
775 int r;
776
777 /* Enable LCD2 by default (instead of Pico DLP) */
778 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
779 "display_sel");
780 if (r)
781 pr_err("%s: Could not get display_sel GPIO\n", __func__);
782
783 sdp4430_lcd_init();
658 sdp4430_hdmi_mux_init(); 784 sdp4430_hdmi_mux_init();
659 omap_display_init(&sdp4430_dss_data); 785 omap_display_init(&sdp4430_dss_data);
660} 786}