aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-30 18:30:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-30 18:30:01 -0400
commitacff987d94cbdb4049f3706bed1f1792f8ef6837 (patch)
tree36bded977aab5d80cf9aeb5467f83dd554a25d01 /arch/arm/mach-omap2
parentce949717b559709423c1ef716a9db16d1dcadaed (diff)
parentb57287ba497b63a0d87a058631bbddfed9392e9f (diff)
Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (270 commits) video: platinumfb: Add __devexit_p at necessary place drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data drivers/video: fsl-diu-fb: merge diu_hw into fsl_diu_data drivers/video: fsl-diu-fb: only DIU modes 0 and 1 are supported drivers/video: fsl-diu-fb: remove unused panel operating mode support drivers/video: fsl-diu-fb: use an enum for the AOI index drivers/video: fsl-diu-fb: add several new video modes drivers/video: fsl-diu-fb: remove broken screen blanking support drivers/video: fsl-diu-fb: move some definitions out of the header file drivers/video: fsl-diu-fb: fix some ioctls video: da8xx-fb: Increased resolution configuration of revised LCDC IP OMAPDSS: picodlp: add missing #include <linux/module.h> fb: fix au1100fb bitrot. mx3fb: fix NULL pointer dereference in screen blanking. video: irq: Remove IRQF_DISABLED smscufx: change edid data to u8 instead of char OMAPDSS: DISPC: zorder support for DSS overlays OMAPDSS: DISPC: VIDEO3 pipeline support OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting video/omap: fix build dependencies ... Fix up conflicts in: - drivers/staging/xgifb/XGI_main_26.c Changes to XGIfb_pan_var() - drivers/video/omap/{lcd_apollon.c,lcd_ldp.c,lcd_overo.c} Removed (or in the case of apollon.c, merged into the generic DSS panel in drivers/video/omap2/displays/panel-generic-dpi.c)
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c78
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c7
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c208
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c6
-rw-r--r--arch/arm/mach-omap2/board-apollon.c35
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c6
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c10
-rw-r--r--arch/arm/mach-omap2/board-h4.c42
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c8
-rw-r--r--arch/arm/mach-omap2/board-ldp.c122
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c8
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c7
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c40
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c18
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c8
-rw-r--r--arch/arm/mach-omap2/board-overo.c7
-rw-r--r--arch/arm/mach-omap2/board-rx51.c25
-rw-r--r--arch/arm/mach-omap2/display.c60
-rw-r--r--arch/arm/mach-omap2/twl-common.c11
20 files changed, 509 insertions, 199 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 87f43ade4405..f8ce84b69eb1 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -39,6 +39,9 @@
39#include <plat/usb.h> 39#include <plat/usb.h>
40#include <plat/gpmc-smc91x.h> 40#include <plat/gpmc-smc91x.h>
41 41
42#include <video/omapdss.h>
43#include <video/omap-panel-generic-dpi.h>
44
42#include "mux.h" 45#include "mux.h"
43#include "hsmmc.h" 46#include "hsmmc.h"
44#include "common-board-devices.h" 47#include "common-board-devices.h"
@@ -99,20 +102,72 @@ static struct platform_device sdp2430_flash_device = {
99 .resource = &sdp2430_flash_resource, 102 .resource = &sdp2430_flash_resource,
100}; 103};
101 104
102static struct platform_device sdp2430_lcd_device = {
103 .name = "sdp2430_lcd",
104 .id = -1,
105};
106
107static struct platform_device *sdp2430_devices[] __initdata = { 105static struct platform_device *sdp2430_devices[] __initdata = {
108 &sdp2430_flash_device, 106 &sdp2430_flash_device,
107};
108
109/* LCD */
110#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
111#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
112
113static int sdp2430_panel_enable_lcd(struct omap_dss_device *dssdev)
114{
115 gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 1);
116 gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 1);
117
118 return 0;
119}
120
121static void sdp2430_panel_disable_lcd(struct omap_dss_device *dssdev)
122{
123 gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 0);
124 gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 0);
125}
126
127static struct panel_generic_dpi_data sdp2430_panel_data = {
128 .name = "nec_nl2432dr22-11b",
129 .platform_enable = sdp2430_panel_enable_lcd,
130 .platform_disable = sdp2430_panel_disable_lcd,
131};
132
133static struct omap_dss_device sdp2430_lcd_device = {
134 .name = "lcd",
135 .driver_name = "generic_dpi_panel",
136 .type = OMAP_DISPLAY_TYPE_DPI,
137 .phy.dpi.data_lines = 16,
138 .data = &sdp2430_panel_data,
139};
140
141static struct omap_dss_device *sdp2430_dss_devices[] = {
109 &sdp2430_lcd_device, 142 &sdp2430_lcd_device,
110}; 143};
111 144
112static struct omap_lcd_config sdp2430_lcd_config __initdata = { 145static struct omap_dss_board_info sdp2430_dss_data = {
113 .ctrl_name = "internal", 146 .num_devices = ARRAY_SIZE(sdp2430_dss_devices),
147 .devices = sdp2430_dss_devices,
148 .default_device = &sdp2430_lcd_device,
114}; 149};
115 150
151static void __init sdp2430_display_init(void)
152{
153 int r;
154
155 static struct gpio gpios[] __initdata = {
156 { SDP2430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
157 "LCD reset" },
158 { SDP2430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW,
159 "LCD Backlight" },
160 };
161
162 r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
163 if (r) {
164 pr_err("Cannot request LCD GPIOs, error %d\n", r);
165 return;
166 }
167
168 omap_display_init(&sdp2430_dss_data);
169}
170
116#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) 171#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
117 172
118static struct omap_smc91x_platform_data board_smc91x_data = { 173static struct omap_smc91x_platform_data board_smc91x_data = {
@@ -137,10 +192,6 @@ static inline void board_smc91x_init(void)
137 192
138#endif 193#endif
139 194
140static struct omap_board_config_kernel sdp2430_config[] __initdata = {
141 {OMAP_TAG_LCD, &sdp2430_lcd_config},
142};
143
144static void __init omap_2430sdp_init_early(void) 195static void __init omap_2430sdp_init_early(void)
145{ 196{
146 omap2_init_common_infrastructure(); 197 omap2_init_common_infrastructure();
@@ -229,9 +280,6 @@ static void __init omap_2430sdp_init(void)
229{ 280{
230 omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); 281 omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
231 282
232 omap_board_config = sdp2430_config;
233 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
234
235 omap2430_i2c_init(); 283 omap2430_i2c_init();
236 284
237 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 285 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
@@ -247,6 +295,8 @@ static void __init omap_2430sdp_init(void)
247 /* Turn off secondary LCD backlight */ 295 /* Turn off secondary LCD backlight */
248 gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW, 296 gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW,
249 "Secondary LCD backlight"); 297 "Secondary LCD backlight");
298
299 sdp2430_display_init();
250} 300}
251 301
252static void __init omap_2430sdp_map_io(void) 302static void __init omap_2430sdp_map_io(void)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 2430531b2239..204beddcb949 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -37,7 +37,7 @@
37#include <plat/dma.h> 37#include <plat/dma.h>
38#include <plat/gpmc.h> 38#include <plat/gpmc.h>
39#include <video/omapdss.h> 39#include <video/omapdss.h>
40#include <video/omap-panel-generic-dpi.h> 40#include <video/omap-panel-dvi.h>
41 41
42#include <plat/gpmc-smc91x.h> 42#include <plat/gpmc-smc91x.h>
43 43
@@ -186,8 +186,7 @@ static struct omap_dss_device sdp3430_lcd_device = {
186 .platform_disable = sdp3430_panel_disable_lcd, 186 .platform_disable = sdp3430_panel_disable_lcd,
187}; 187};
188 188
189static struct panel_generic_dpi_data dvi_panel = { 189static struct panel_dvi_platform_data dvi_panel = {
190 .name = "generic",
191 .platform_enable = sdp3430_panel_enable_dvi, 190 .platform_enable = sdp3430_panel_enable_dvi,
192 .platform_disable = sdp3430_panel_disable_dvi, 191 .platform_disable = sdp3430_panel_disable_dvi,
193}; 192};
@@ -195,7 +194,7 @@ static struct panel_generic_dpi_data dvi_panel = {
195static struct omap_dss_device sdp3430_dvi_device = { 194static struct omap_dss_device sdp3430_dvi_device = {
196 .name = "dvi", 195 .name = "dvi",
197 .type = OMAP_DISPLAY_TYPE_DPI, 196 .type = OMAP_DISPLAY_TYPE_DPI,
198 .driver_name = "generic_dpi_panel", 197 .driver_name = "dvi",
199 .data = &dvi_panel, 198 .data = &dvi_panel,
200 .phy.dpi.data_lines = 24, 199 .phy.dpi.data_lines = 24,
201}; 200};
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index be931105d681..484cec54882a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -38,6 +38,8 @@
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>
42#include <video/omap-panel-picodlp.h>
41#include <linux/wl12xx.h> 43#include <linux/wl12xx.h>
42 44
43#include "mux.h" 45#include "mux.h"
@@ -52,6 +54,8 @@
52#define OMAP4_SFH7741_ENABLE_GPIO 188 54#define OMAP4_SFH7741_ENABLE_GPIO 188
53#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 55#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
54#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 56#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
57#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
58#define DLP_POWER_ON_GPIO 40
55 59
56#define GPIO_WIFI_PMENA 54 60#define GPIO_WIFI_PMENA 54
57#define GPIO_WIFI_IRQ 53 61#define GPIO_WIFI_IRQ 53
@@ -340,11 +344,6 @@ static int __init omap_ethernet_init(void)
340 return status; 344 return status;
341} 345}
342 346
343static struct platform_device sdp4430_lcd_device = {
344 .name = "sdp4430_lcd",
345 .id = -1,
346};
347
348static struct regulator_consumer_supply sdp4430_vbat_supply[] = { 347static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
349 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), 348 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
350 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), 349 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
@@ -374,21 +373,12 @@ static struct platform_device sdp4430_vbat = {
374}; 373};
375 374
376static struct platform_device *sdp4430_devices[] __initdata = { 375static struct platform_device *sdp4430_devices[] __initdata = {
377 &sdp4430_lcd_device,
378 &sdp4430_gpio_keys_device, 376 &sdp4430_gpio_keys_device,
379 &sdp4430_leds_gpio, 377 &sdp4430_leds_gpio,
380 &sdp4430_leds_pwm, 378 &sdp4430_leds_pwm,
381 &sdp4430_vbat, 379 &sdp4430_vbat,
382}; 380};
383 381
384static struct omap_lcd_config sdp4430_lcd_config __initdata = {
385 .ctrl_name = "internal",
386};
387
388static struct omap_board_config_kernel sdp4430_config[] __initdata = {
389 { OMAP_TAG_LCD, &sdp4430_lcd_config },
390};
391
392static void __init omap_4430sdp_init_early(void) 382static void __init omap_4430sdp_init_early(void)
393{ 383{
394 omap2_init_common_infrastructure(); 384 omap2_init_common_infrastructure();
@@ -648,37 +638,202 @@ static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
648 gpio_free(HDMI_GPIO_HPD); 638 gpio_free(HDMI_GPIO_HPD);
649} 639}
650 640
651static struct omap_dss_device sdp4430_hdmi_device = { 641static struct nokia_dsi_panel_data dsi1_panel = {
652 .name = "hdmi", 642 .name = "taal",
653 .driver_name = "hdmi_panel", 643 .reset_gpio = 102,
654 .type = OMAP_DISPLAY_TYPE_HDMI, 644 .use_ext_te = false,
655 .clocks = { 645 .ext_te_gpio = 101,
656 .dispc = { 646 .esd_interval = 0,
647};
648
649static struct omap_dss_device sdp4430_lcd_device = {
650 .name = "lcd",
651 .driver_name = "taal",
652 .type = OMAP_DISPLAY_TYPE_DSI,
653 .data = &dsi1_panel,
654 .phy.dsi = {
655 .clk_lane = 1,
656 .clk_pol = 0,
657 .data1_lane = 2,
658 .data1_pol = 0,
659 .data2_lane = 3,
660 .data2_pol = 0,
661
662 .module = 0,
663 },
664
665 .clocks = {
666 .dispc = {
667 .channel = {
668 /* Logic Clock = 172.8 MHz */
669 .lck_div = 1,
670 /* Pixel Clock = 34.56 MHz */
671 .pck_div = 5,
672 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,
673 },
657 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, 674 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
658 }, 675 },
659 .hdmi = { 676
660 .regn = 15, 677 .dsi = {
661 .regm2 = 1, 678 .regn = 16, /* Fint = 2.4 MHz */
679 .regm = 180, /* DDR Clock = 216 MHz */
680 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
681 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
682
683 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
684 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI,
685 },
686 },
687 .channel = OMAP_DSS_CHANNEL_LCD,
688};
689
690static struct nokia_dsi_panel_data dsi2_panel = {
691 .name = "taal",
692 .reset_gpio = 104,
693 .use_ext_te = false,
694 .ext_te_gpio = 103,
695 .esd_interval = 0,
696};
697
698static struct omap_dss_device sdp4430_lcd2_device = {
699 .name = "lcd2",
700 .driver_name = "taal",
701 .type = OMAP_DISPLAY_TYPE_DSI,
702 .data = &dsi2_panel,
703 .phy.dsi = {
704 .clk_lane = 1,
705 .clk_pol = 0,
706 .data1_lane = 2,
707 .data1_pol = 0,
708 .data2_lane = 3,
709 .data2_pol = 0,
710
711 .module = 1,
712 },
713
714 .clocks = {
715 .dispc = {
716 .channel = {
717 /* Logic Clock = 172.8 MHz */
718 .lck_div = 1,
719 /* Pixel Clock = 34.56 MHz */
720 .pck_div = 5,
721 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC,
722 },
723 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
724 },
725
726 .dsi = {
727 .regn = 16, /* Fint = 2.4 MHz */
728 .regm = 180, /* DDR Clock = 216 MHz */
729 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
730 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
731
732 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
733 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI,
662 }, 734 },
663 }, 735 },
736 .channel = OMAP_DSS_CHANNEL_LCD2,
737};
738
739static void sdp4430_lcd_init(void)
740{
741 int r;
742
743 r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
744 "lcd1_reset_gpio");
745 if (r)
746 pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
747
748 r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
749 "lcd2_reset_gpio");
750 if (r)
751 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
752}
753
754static struct omap_dss_device sdp4430_hdmi_device = {
755 .name = "hdmi",
756 .driver_name = "hdmi_panel",
757 .type = OMAP_DISPLAY_TYPE_HDMI,
664 .platform_enable = sdp4430_panel_enable_hdmi, 758 .platform_enable = sdp4430_panel_enable_hdmi,
665 .platform_disable = sdp4430_panel_disable_hdmi, 759 .platform_disable = sdp4430_panel_disable_hdmi,
666 .channel = OMAP_DSS_CHANNEL_DIGIT, 760 .channel = OMAP_DSS_CHANNEL_DIGIT,
667}; 761};
668 762
763static struct picodlp_panel_data sdp4430_picodlp_pdata = {
764 .picodlp_adapter_id = 2,
765 .emu_done_gpio = 44,
766 .pwrgood_gpio = 45,
767};
768
769static 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
786static 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
794static 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
800static 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
669static struct omap_dss_device *sdp4430_dss_devices[] = { 811static struct omap_dss_device *sdp4430_dss_devices[] = {
812 &sdp4430_lcd_device,
813 &sdp4430_lcd2_device,
670 &sdp4430_hdmi_device, 814 &sdp4430_hdmi_device,
815 &sdp4430_picodlp_device,
671}; 816};
672 817
673static struct omap_dss_board_info sdp4430_dss_data = { 818static struct omap_dss_board_info sdp4430_dss_data = {
674 .num_devices = ARRAY_SIZE(sdp4430_dss_devices), 819 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
675 .devices = sdp4430_dss_devices, 820 .devices = sdp4430_dss_devices,
676 .default_device = &sdp4430_hdmi_device, 821 .default_device = &sdp4430_lcd_device,
677}; 822};
678 823
679void omap_4430sdp_display_init(void) 824static void omap_4430sdp_display_init(void)
680{ 825{
826 int r;
827
828 /* Enable LCD2 by default (instead of Pico DLP) */
829 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
830 "display_sel");
831 if (r)
832 pr_err("%s: Could not get display_sel GPIO\n", __func__);
833
834 sdp4430_lcd_init();
681 sdp4430_hdmi_mux_init(); 835 sdp4430_hdmi_mux_init();
836 sdp4430_picodlp_init();
682 omap_display_init(&sdp4430_dss_data); 837 omap_display_init(&sdp4430_dss_data);
683} 838}
684 839
@@ -802,9 +957,6 @@ static void __init omap_4430sdp_init(void)
802 package = OMAP_PACKAGE_CBL; 957 package = OMAP_PACKAGE_CBL;
803 omap4_mux_init(board_mux, NULL, package); 958 omap4_mux_init(board_mux, NULL, package);
804 959
805 omap_board_config = sdp4430_config;
806 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
807
808 omap4_i2c_init(); 960 omap4_i2c_init();
809 omap_sfh7741prox_init(); 961 omap_sfh7741prox_init();
810 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 962 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 1325085e453d..ab10f75984d8 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -36,6 +36,7 @@
36#include <plat/usb.h> 36#include <plat/usb.h>
37#include <video/omapdss.h> 37#include <video/omapdss.h>
38#include <video/omap-panel-generic-dpi.h> 38#include <video/omap-panel-generic-dpi.h>
39#include <video/omap-panel-dvi.h>
39 40
40#include "mux.h" 41#include "mux.h"
41#include "control.h" 42#include "control.h"
@@ -333,8 +334,7 @@ static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
333 dvi_enabled = 0; 334 dvi_enabled = 0;
334} 335}
335 336
336static struct panel_generic_dpi_data dvi_panel = { 337static struct panel_dvi_platform_data dvi_panel = {
337 .name = "generic",
338 .platform_enable = am3517_evm_panel_enable_dvi, 338 .platform_enable = am3517_evm_panel_enable_dvi,
339 .platform_disable = am3517_evm_panel_disable_dvi, 339 .platform_disable = am3517_evm_panel_disable_dvi,
340}; 340};
@@ -342,7 +342,7 @@ static struct panel_generic_dpi_data dvi_panel = {
342static struct omap_dss_device am3517_evm_dvi_device = { 342static struct omap_dss_device am3517_evm_dvi_device = {
343 .type = OMAP_DISPLAY_TYPE_DPI, 343 .type = OMAP_DISPLAY_TYPE_DPI,
344 .name = "dvi", 344 .name = "dvi",
345 .driver_name = "generic_dpi_panel", 345 .driver_name = "dvi",
346 .data = &dvi_panel, 346 .data = &dvi_panel,
347 .phy.dpi.data_lines = 24, 347 .phy.dpi.data_lines = 24,
348}; 348};
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 67800e647d7a..ad55351e0cab 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -40,6 +40,9 @@
40#include <plat/common.h> 40#include <plat/common.h>
41#include <plat/gpmc.h> 41#include <plat/gpmc.h>
42 42
43#include <video/omapdss.h>
44#include <video/omap-panel-generic-dpi.h>
45
43#include "mux.h" 46#include "mux.h"
44#include "control.h" 47#include "control.h"
45 48
@@ -149,11 +152,6 @@ static struct platform_device apollon_smc91x_device = {
149 .resource = apollon_smc91x_resources, 152 .resource = apollon_smc91x_resources,
150}; 153};
151 154
152static struct platform_device apollon_lcd_device = {
153 .name = "apollon_lcd",
154 .id = -1,
155};
156
157static struct omap_led_config apollon_led_config[] = { 155static struct omap_led_config apollon_led_config[] = {
158 { 156 {
159 .cdev = { 157 .cdev = {
@@ -191,7 +189,6 @@ static struct platform_device apollon_led_device = {
191static struct platform_device *apollon_devices[] __initdata = { 189static struct platform_device *apollon_devices[] __initdata = {
192 &apollon_onenand_device, 190 &apollon_onenand_device,
193 &apollon_smc91x_device, 191 &apollon_smc91x_device,
194 &apollon_lcd_device,
195 &apollon_led_device, 192 &apollon_led_device,
196}; 193};
197 194
@@ -265,12 +262,26 @@ static struct omap_usb_config apollon_usb_config __initdata = {
265 .pins[0] = 6, 262 .pins[0] = 6,
266}; 263};
267 264
268static struct omap_lcd_config apollon_lcd_config __initdata = { 265static struct panel_generic_dpi_data apollon_panel_data = {
269 .ctrl_name = "internal", 266 .name = "apollon",
270}; 267};
271 268
272static struct omap_board_config_kernel apollon_config[] __initdata = { 269static struct omap_dss_device apollon_lcd_device = {
273 { OMAP_TAG_LCD, &apollon_lcd_config }, 270 .name = "lcd",
271 .driver_name = "generic_dpi_panel",
272 .type = OMAP_DISPLAY_TYPE_DPI,
273 .phy.dpi.data_lines = 18,
274 .data = &apollon_panel_data,
275};
276
277static struct omap_dss_device *apollon_dss_devices[] = {
278 &apollon_lcd_device,
279};
280
281static struct omap_dss_board_info apollon_dss_data = {
282 .num_devices = ARRAY_SIZE(apollon_dss_devices),
283 .devices = apollon_dss_devices,
284 .default_device = &apollon_lcd_device,
274}; 285};
275 286
276static void __init omap_apollon_init_early(void) 287static void __init omap_apollon_init_early(void)
@@ -314,8 +325,6 @@ static void __init omap_apollon_init(void)
314 u32 v; 325 u32 v;
315 326
316 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); 327 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
317 omap_board_config = apollon_config;
318 omap_board_config_size = ARRAY_SIZE(apollon_config);
319 328
320 apollon_init_smc91x(); 329 apollon_init_smc91x();
321 apollon_led_init(); 330 apollon_led_init();
@@ -340,6 +349,8 @@ static void __init omap_apollon_init(void)
340 */ 349 */
341 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); 350 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
342 omap_serial_init(); 351 omap_serial_init();
352
353 omap_display_init(&apollon_dss_data);
343} 354}
344 355
345static void __init omap_apollon_map_io(void) 356static void __init omap_apollon_map_io(void)
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 38179c175503..6e0f0d2e39bc 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -43,6 +43,7 @@
43#include <plat/usb.h> 43#include <plat/usb.h>
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-generic-dpi.h> 45#include <video/omap-panel-generic-dpi.h>
46#include <video/omap-panel-dvi.h>
46#include <plat/mcspi.h> 47#include <plat/mcspi.h>
47 48
48#include <mach/hardware.h> 49#include <mach/hardware.h>
@@ -242,8 +243,7 @@ static struct omap_dss_device cm_t35_lcd_device = {
242 .phy.dpi.data_lines = 18, 243 .phy.dpi.data_lines = 18,
243}; 244};
244 245
245static struct panel_generic_dpi_data dvi_panel = { 246static struct panel_dvi_platform_data dvi_panel = {
246 .name = "generic",
247 .platform_enable = cm_t35_panel_enable_dvi, 247 .platform_enable = cm_t35_panel_enable_dvi,
248 .platform_disable = cm_t35_panel_disable_dvi, 248 .platform_disable = cm_t35_panel_disable_dvi,
249}; 249};
@@ -251,7 +251,7 @@ static struct panel_generic_dpi_data dvi_panel = {
251static struct omap_dss_device cm_t35_dvi_device = { 251static struct omap_dss_device cm_t35_dvi_device = {
252 .name = "dvi", 252 .name = "dvi",
253 .type = OMAP_DISPLAY_TYPE_DPI, 253 .type = OMAP_DISPLAY_TYPE_DPI,
254 .driver_name = "generic_dpi_panel", 254 .driver_name = "dvi",
255 .data = &dvi_panel, 255 .data = &dvi_panel,
256 .phy.dpi.data_lines = 24, 256 .phy.dpi.data_lines = 24,
257}; 257};
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 99a42432ac93..d9bfe54917e4 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -47,6 +47,7 @@
47#include <plat/usb.h> 47#include <plat/usb.h>
48#include <video/omapdss.h> 48#include <video/omapdss.h>
49#include <video/omap-panel-generic-dpi.h> 49#include <video/omap-panel-generic-dpi.h>
50#include <video/omap-panel-dvi.h>
50 51
51#include <plat/mcspi.h> 52#include <plat/mcspi.h>
52#include <linux/input/matrix_keypad.h> 53#include <linux/input/matrix_keypad.h>
@@ -139,7 +140,7 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
139}; 140};
140 141
141static struct panel_generic_dpi_data lcd_panel = { 142static struct panel_generic_dpi_data lcd_panel = {
142 .name = "generic", 143 .name = "innolux_at070tn83",
143 .platform_enable = devkit8000_panel_enable_lcd, 144 .platform_enable = devkit8000_panel_enable_lcd,
144 .platform_disable = devkit8000_panel_disable_lcd, 145 .platform_disable = devkit8000_panel_disable_lcd,
145}; 146};
@@ -152,8 +153,7 @@ static struct omap_dss_device devkit8000_lcd_device = {
152 .phy.dpi.data_lines = 24, 153 .phy.dpi.data_lines = 24,
153}; 154};
154 155
155static struct panel_generic_dpi_data dvi_panel = { 156static struct panel_dvi_platform_data dvi_panel = {
156 .name = "generic",
157 .platform_enable = devkit8000_panel_enable_dvi, 157 .platform_enable = devkit8000_panel_enable_dvi,
158 .platform_disable = devkit8000_panel_disable_dvi, 158 .platform_disable = devkit8000_panel_disable_dvi,
159}; 159};
@@ -161,7 +161,7 @@ static struct panel_generic_dpi_data dvi_panel = {
161static struct omap_dss_device devkit8000_dvi_device = { 161static struct omap_dss_device devkit8000_dvi_device = {
162 .name = "dvi", 162 .name = "dvi",
163 .type = OMAP_DISPLAY_TYPE_DPI, 163 .type = OMAP_DISPLAY_TYPE_DPI,
164 .driver_name = "generic_dpi_panel", 164 .driver_name = "dvi",
165 .data = &dvi_panel, 165 .data = &dvi_panel,
166 .phy.dpi.data_lines = 24, 166 .phy.dpi.data_lines = 24,
167}; 167};
@@ -267,7 +267,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
267 267
268static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { 268static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
269 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 269 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
270 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 270 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
271}; 271};
272 272
273/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 273/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 82421a4cfa92..8fcf79628ca1 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -39,6 +39,9 @@
39#include <plat/dma.h> 39#include <plat/dma.h>
40#include <plat/gpmc.h> 40#include <plat/gpmc.h>
41 41
42#include <video/omapdss.h>
43#include <video/omap-panel-generic-dpi.h>
44
42#include "mux.h" 45#include "mux.h"
43#include "control.h" 46#include "control.h"
44 47
@@ -156,17 +159,33 @@ static struct platform_device h4_kp_device = {
156 }, 159 },
157}; 160};
158 161
159static struct platform_device h4_lcd_device = {
160 .name = "lcd_h4",
161 .id = -1,
162};
163
164static struct platform_device *h4_devices[] __initdata = { 162static struct platform_device *h4_devices[] __initdata = {
165 &h4_flash_device, 163 &h4_flash_device,
166 &h4_kp_device, 164 &h4_kp_device,
165};
166
167static struct panel_generic_dpi_data h4_panel_data = {
168 .name = "h4",
169};
170
171static struct omap_dss_device h4_lcd_device = {
172 .name = "lcd",
173 .driver_name = "generic_dpi_panel",
174 .type = OMAP_DISPLAY_TYPE_DPI,
175 .phy.dpi.data_lines = 16,
176 .data = &h4_panel_data,
177};
178
179static struct omap_dss_device *h4_dss_devices[] = {
167 &h4_lcd_device, 180 &h4_lcd_device,
168}; 181};
169 182
183static struct omap_dss_board_info h4_dss_data = {
184 .num_devices = ARRAY_SIZE(h4_dss_devices),
185 .devices = h4_dss_devices,
186 .default_device = &h4_lcd_device,
187};
188
170/* 2420 Sysboot setup (2430 is different) */ 189/* 2420 Sysboot setup (2430 is different) */
171static u32 get_sysboot_value(void) 190static u32 get_sysboot_value(void)
172{ 191{
@@ -270,10 +289,6 @@ static void __init h4_init_flash(void)
270 h4_flash_resource.end = base + SZ_64M - 1; 289 h4_flash_resource.end = base + SZ_64M - 1;
271} 290}
272 291
273static struct omap_lcd_config h4_lcd_config __initdata = {
274 .ctrl_name = "internal",
275};
276
277static struct omap_usb_config h4_usb_config __initdata = { 292static struct omap_usb_config h4_usb_config __initdata = {
278 /* S1.10 OFF -- usb "download port" 293 /* S1.10 OFF -- usb "download port"
279 * usb0 switched to Mini-B port and isp1105 transceiver; 294 * usb0 switched to Mini-B port and isp1105 transceiver;
@@ -285,10 +300,6 @@ static struct omap_usb_config h4_usb_config __initdata = {
285 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ 300 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
286}; 301};
287 302
288static struct omap_board_config_kernel h4_config[] __initdata = {
289 { OMAP_TAG_LCD, &h4_lcd_config },
290};
291
292static void __init omap_h4_init_early(void) 303static void __init omap_h4_init_early(void)
293{ 304{
294 omap2_init_common_infrastructure(); 305 omap2_init_common_infrastructure();
@@ -330,9 +341,6 @@ static void __init omap_h4_init(void)
330{ 341{
331 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); 342 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
332 343
333 omap_board_config = h4_config;
334 omap_board_config_size = ARRAY_SIZE(h4_config);
335
336 /* 344 /*
337 * Make sure the serial ports are muxed on at this point. 345 * Make sure the serial ports are muxed on at this point.
338 * You have to mux them off in device drivers later on 346 * You have to mux them off in device drivers later on
@@ -371,6 +379,8 @@ static void __init omap_h4_init(void)
371 omap2_usbfs_init(&h4_usb_config); 379 omap2_usbfs_init(&h4_usb_config);
372 omap_serial_init(); 380 omap_serial_init();
373 h4_init_flash(); 381 h4_init_flash();
382
383 omap_display_init(&h4_dss_data);
374} 384}
375 385
376static void __init omap_h4_map_io(void) 386static void __init omap_h4_map_io(void)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 7040352b16b4..96f9ef34d2fb 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -32,7 +32,7 @@
32#include <plat/gpmc.h> 32#include <plat/gpmc.h>
33#include <plat/usb.h> 33#include <plat/usb.h>
34#include <video/omapdss.h> 34#include <video/omapdss.h>
35#include <video/omap-panel-generic-dpi.h> 35#include <video/omap-panel-dvi.h>
36#include <plat/onenand.h> 36#include <plat/onenand.h>
37 37
38#include "mux.h" 38#include "mux.h"
@@ -455,16 +455,16 @@ static void igep2_disable_dvi(struct omap_dss_device *dssdev)
455 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0); 455 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
456} 456}
457 457
458static struct panel_generic_dpi_data dvi_panel = { 458static struct panel_dvi_platform_data dvi_panel = {
459 .name = "generic",
460 .platform_enable = igep2_enable_dvi, 459 .platform_enable = igep2_enable_dvi,
461 .platform_disable = igep2_disable_dvi, 460 .platform_disable = igep2_disable_dvi,
461 .i2c_bus_num = 3,
462}; 462};
463 463
464static struct omap_dss_device igep2_dvi_device = { 464static struct omap_dss_device igep2_dvi_device = {
465 .type = OMAP_DISPLAY_TYPE_DPI, 465 .type = OMAP_DISPLAY_TYPE_DPI,
466 .name = "dvi", 466 .name = "dvi",
467 .driver_name = "generic_dpi_panel", 467 .driver_name = "dvi",
468 .data = &dvi_panel, 468 .data = &dvi_panel,
469 .phy.dpi.data_lines = 24, 469 .phy.dpi.data_lines = 24,
470}; 470};
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index abe8c7e496a2..f8f8a68a4899 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -27,6 +27,7 @@
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/smsc911x.h> 28#include <linux/smsc911x.h>
29#include <linux/mmc/host.h> 29#include <linux/mmc/host.h>
30#include <linux/gpio.h>
30 31
31#include <mach/hardware.h> 32#include <mach/hardware.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
@@ -43,6 +44,9 @@
43#include <plat/usb.h> 44#include <plat/usb.h>
44#include <plat/gpmc-smsc911x.h> 45#include <plat/gpmc-smsc911x.h>
45 46
47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h>
49
46#include "board-flash.h" 50#include "board-flash.h"
47#include "mux.h" 51#include "mux.h"
48#include "hsmmc.h" 52#include "hsmmc.h"
@@ -179,29 +183,108 @@ static inline void __init ldp_init_smsc911x(void)
179 gpmc_smsc911x_init(&smsc911x_cfg); 183 gpmc_smsc911x_init(&smsc911x_cfg);
180} 184}
181 185
182static struct platform_device ldp_lcd_device = { 186/* LCD */
183 .name = "ldp_lcd", 187
184 .id = -1, 188static int ldp_backlight_gpio;
189static int ldp_lcd_enable_gpio;
190
191#define LCD_PANEL_RESET_GPIO 55
192#define LCD_PANEL_QVGA_GPIO 56
193
194static int ldp_panel_enable_lcd(struct omap_dss_device *dssdev)
195{
196 if (gpio_is_valid(ldp_lcd_enable_gpio))
197 gpio_direction_output(ldp_lcd_enable_gpio, 1);
198 if (gpio_is_valid(ldp_backlight_gpio))
199 gpio_direction_output(ldp_backlight_gpio, 1);
200
201 return 0;
202}
203
204static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev)
205{
206 if (gpio_is_valid(ldp_lcd_enable_gpio))
207 gpio_direction_output(ldp_lcd_enable_gpio, 0);
208 if (gpio_is_valid(ldp_backlight_gpio))
209 gpio_direction_output(ldp_backlight_gpio, 0);
210}
211
212static struct panel_generic_dpi_data ldp_panel_data = {
213 .name = "nec_nl2432dr22-11b",
214 .platform_enable = ldp_panel_enable_lcd,
215 .platform_disable = ldp_panel_disable_lcd,
185}; 216};
186 217
187static struct omap_lcd_config ldp_lcd_config __initdata = { 218static struct omap_dss_device ldp_lcd_device = {
188 .ctrl_name = "internal", 219 .name = "lcd",
220 .driver_name = "generic_dpi_panel",
221 .type = OMAP_DISPLAY_TYPE_DPI,
222 .phy.dpi.data_lines = 18,
223 .data = &ldp_panel_data,
224};
225
226static struct omap_dss_device *ldp_dss_devices[] = {
227 &ldp_lcd_device,
189}; 228};
190 229
191static struct omap_board_config_kernel ldp_config[] __initdata = { 230static struct omap_dss_board_info ldp_dss_data = {
192 { OMAP_TAG_LCD, &ldp_lcd_config }, 231 .num_devices = ARRAY_SIZE(ldp_dss_devices),
232 .devices = ldp_dss_devices,
233 .default_device = &ldp_lcd_device,
193}; 234};
194 235
236static void __init ldp_display_init(void)
237{
238 int r;
239
240 static struct gpio gpios[] __initdata = {
241 {LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
242 {LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
243 };
244
245 r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
246 if (r) {
247 pr_err("Cannot request LCD GPIOs, error %d\n", r);
248 return;
249 }
250
251 omap_display_init(&ldp_dss_data);
252}
253
195static void __init omap_ldp_init_early(void) 254static void __init omap_ldp_init_early(void)
196{ 255{
197 omap2_init_common_infrastructure(); 256 omap2_init_common_infrastructure();
198 omap2_init_common_devices(NULL, NULL); 257 omap2_init_common_devices(NULL, NULL);
199} 258}
200 259
260static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
261{
262 int r;
263
264 struct gpio gpios[] = {
265 {gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"},
266 {gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"},
267 };
268
269 r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
270 if (r) {
271 pr_err("Cannot request LCD GPIOs, error %d\n", r);
272 ldp_backlight_gpio = -EINVAL;
273 ldp_lcd_enable_gpio = -EINVAL;
274 return r;
275 }
276
277 ldp_backlight_gpio = gpio + 15;
278 ldp_lcd_enable_gpio = gpio + 7;
279
280 return 0;
281}
282
201static struct twl4030_gpio_platform_data ldp_gpio_data = { 283static struct twl4030_gpio_platform_data ldp_gpio_data = {
202 .gpio_base = OMAP_MAX_GPIO_LINES, 284 .gpio_base = OMAP_MAX_GPIO_LINES,
203 .irq_base = TWL4030_GPIO_IRQ_BASE, 285 .irq_base = TWL4030_GPIO_IRQ_BASE,
204 .irq_end = TWL4030_GPIO_IRQ_END, 286 .irq_end = TWL4030_GPIO_IRQ_END,
287 .setup = ldp_twl_gpio_setup,
205}; 288};
206 289
207static struct regulator_consumer_supply ldp_vmmc1_supply[] = { 290static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
@@ -243,10 +326,31 @@ static struct regulator_init_data ldp_vaux1 = {
243 .consumer_supplies = ldp_vaux1_supplies, 326 .consumer_supplies = ldp_vaux1_supplies,
244}; 327};
245 328
329static struct regulator_consumer_supply ldp_vpll2_supplies[] = {
330 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
331 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
332};
333
334static struct regulator_init_data ldp_vpll2 = {
335 .constraints = {
336 .name = "VDVI",
337 .min_uV = 1800000,
338 .max_uV = 1800000,
339 .apply_uV = true,
340 .valid_modes_mask = REGULATOR_MODE_NORMAL
341 | REGULATOR_MODE_STANDBY,
342 .valid_ops_mask = REGULATOR_CHANGE_MODE
343 | REGULATOR_CHANGE_STATUS,
344 },
345 .num_consumer_supplies = ARRAY_SIZE(ldp_vpll2_supplies),
346 .consumer_supplies = ldp_vpll2_supplies,
347};
348
246static struct twl4030_platform_data ldp_twldata = { 349static struct twl4030_platform_data ldp_twldata = {
247 /* platform_data for children goes here */ 350 /* platform_data for children goes here */
248 .vmmc1 = &ldp_vmmc1, 351 .vmmc1 = &ldp_vmmc1,
249 .vaux1 = &ldp_vaux1, 352 .vaux1 = &ldp_vaux1,
353 .vpll2 = &ldp_vpll2,
250 .gpio = &ldp_gpio_data, 354 .gpio = &ldp_gpio_data,
251 .keypad = &ldp_kp_twl4030_data, 355 .keypad = &ldp_kp_twl4030_data,
252}; 356};
@@ -272,7 +376,6 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
272}; 376};
273 377
274static struct platform_device *ldp_devices[] __initdata = { 378static struct platform_device *ldp_devices[] __initdata = {
275 &ldp_lcd_device,
276 &ldp_gpio_keys_device, 379 &ldp_gpio_keys_device,
277}; 380};
278 381
@@ -317,8 +420,6 @@ static struct mtd_partition ldp_nand_partitions[] = {
317static void __init omap_ldp_init(void) 420static void __init omap_ldp_init(void)
318{ 421{
319 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 422 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
320 omap_board_config = ldp_config;
321 omap_board_config_size = ARRAY_SIZE(ldp_config);
322 ldp_init_smsc911x(); 423 ldp_init_smsc911x();
323 omap_i2c_init(); 424 omap_i2c_init();
324 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); 425 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
@@ -329,6 +430,7 @@ static void __init omap_ldp_init(void)
329 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); 430 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
330 431
331 omap2_hsmmc_init(mmc); 432 omap2_hsmmc_init(mmc);
433 ldp_display_init();
332} 434}
333 435
334MACHINE_START(OMAP_LDP, "OMAP LDP board") 436MACHINE_START(OMAP_LDP, "OMAP LDP board")
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 1fde8a0474bb..928933ba28ce 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -42,7 +42,7 @@
42#include <plat/board.h> 42#include <plat/board.h>
43#include <plat/common.h> 43#include <plat/common.h>
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-generic-dpi.h> 45#include <video/omap-panel-dvi.h>
46#include <plat/gpmc.h> 46#include <plat/gpmc.h>
47#include <plat/nand.h> 47#include <plat/nand.h>
48#include <plat/usb.h> 48#include <plat/usb.h>
@@ -203,16 +203,16 @@ static void beagle_disable_dvi(struct omap_dss_device *dssdev)
203 gpio_set_value(dssdev->reset_gpio, 0); 203 gpio_set_value(dssdev->reset_gpio, 0);
204} 204}
205 205
206static struct panel_generic_dpi_data dvi_panel = { 206static struct panel_dvi_platform_data dvi_panel = {
207 .name = "generic",
208 .platform_enable = beagle_enable_dvi, 207 .platform_enable = beagle_enable_dvi,
209 .platform_disable = beagle_disable_dvi, 208 .platform_disable = beagle_disable_dvi,
209 .i2c_bus_num = 3,
210}; 210};
211 211
212static struct omap_dss_device beagle_dvi_device = { 212static struct omap_dss_device beagle_dvi_device = {
213 .type = OMAP_DISPLAY_TYPE_DPI, 213 .type = OMAP_DISPLAY_TYPE_DPI,
214 .name = "dvi", 214 .name = "dvi",
215 .driver_name = "generic_dpi_panel", 215 .driver_name = "dvi",
216 .data = &dvi_panel, 216 .data = &dvi_panel,
217 .phy.dpi.data_lines = 24, 217 .phy.dpi.data_lines = 24,
218 .reset_gpio = -EINVAL, 218 .reset_gpio = -EINVAL,
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 15c69a0c1ce5..0d5a9e46a6af 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -45,7 +45,7 @@
45#include <plat/common.h> 45#include <plat/common.h>
46#include <plat/mcspi.h> 46#include <plat/mcspi.h>
47#include <video/omapdss.h> 47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 48#include <video/omap-panel-dvi.h>
49 49
50#include "mux.h" 50#include "mux.h"
51#include "sdram-micron-mt46h32m32lf-6.h" 51#include "sdram-micron-mt46h32m32lf-6.h"
@@ -247,8 +247,7 @@ static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
247 dvi_enabled = 0; 247 dvi_enabled = 0;
248} 248}
249 249
250static struct panel_generic_dpi_data dvi_panel = { 250static struct panel_dvi_platform_data dvi_panel = {
251 .name = "generic",
252 .platform_enable = omap3_evm_enable_dvi, 251 .platform_enable = omap3_evm_enable_dvi,
253 .platform_disable = omap3_evm_disable_dvi, 252 .platform_disable = omap3_evm_disable_dvi,
254}; 253};
@@ -256,7 +255,7 @@ static struct panel_generic_dpi_data dvi_panel = {
256static struct omap_dss_device omap3_evm_dvi_device = { 255static struct omap_dss_device omap3_evm_dvi_device = {
257 .name = "dvi", 256 .name = "dvi",
258 .type = OMAP_DISPLAY_TYPE_DPI, 257 .type = OMAP_DISPLAY_TYPE_DPI,
259 .driver_name = "generic_dpi_panel", 258 .driver_name = "dvi",
260 .data = &dvi_panel, 259 .data = &dvi_panel,
261 .phy.dpi.data_lines = 24, 260 .phy.dpi.data_lines = 24,
262}; 261};
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index ace56938dd3b..cca523eb73b4 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -335,7 +335,7 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
335static struct regulator_consumer_supply pandora_vdds_supplies[] = { 335static struct regulator_consumer_supply pandora_vdds_supplies[] = {
336 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 336 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
337 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 337 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
338 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 338 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
339}; 339};
340 340
341static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { 341static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index ba13e1d5d0ab..4732589ad97e 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -41,6 +41,7 @@
41#include <plat/usb.h> 41#include <plat/usb.h>
42#include <video/omapdss.h> 42#include <video/omapdss.h>
43#include <video/omap-panel-generic-dpi.h> 43#include <video/omap-panel-generic-dpi.h>
44#include <video/omap-panel-dvi.h>
44 45
45#include <plat/mcspi.h> 46#include <plat/mcspi.h>
46#include <linux/input/matrix_keypad.h> 47#include <linux/input/matrix_keypad.h>
@@ -107,39 +108,6 @@ static void __init omap3_stalker_display_init(void)
107 return; 108 return;
108} 109}
109 110
110static int omap3_stalker_enable_lcd(struct omap_dss_device *dssdev)
111{
112 if (dvi_enabled) {
113 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
114 return -EINVAL;
115 }
116 gpio_set_value(DSS_ENABLE_GPIO, 1);
117 gpio_set_value(LCD_PANEL_BKLIGHT_GPIO, 1);
118 lcd_enabled = 1;
119 return 0;
120}
121
122static void omap3_stalker_disable_lcd(struct omap_dss_device *dssdev)
123{
124 gpio_set_value(DSS_ENABLE_GPIO, 0);
125 gpio_set_value(LCD_PANEL_BKLIGHT_GPIO, 0);
126 lcd_enabled = 0;
127}
128
129static struct panel_generic_dpi_data lcd_panel = {
130 .name = "generic",
131 .platform_enable = omap3_stalker_enable_lcd,
132 .platform_disable = omap3_stalker_disable_lcd,
133};
134
135static struct omap_dss_device omap3_stalker_lcd_device = {
136 .name = "lcd",
137 .driver_name = "generic_dpi_panel",
138 .data = &lcd_panel,
139 .phy.dpi.data_lines = 24,
140 .type = OMAP_DISPLAY_TYPE_DPI,
141};
142
143static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev) 111static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
144{ 112{
145 return 0; 113 return 0;
@@ -179,8 +147,7 @@ static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
179 dvi_enabled = 0; 147 dvi_enabled = 0;
180} 148}
181 149
182static struct panel_generic_dpi_data dvi_panel = { 150static struct panel_dvi_platform_data dvi_panel = {
183 .name = "generic",
184 .platform_enable = omap3_stalker_enable_dvi, 151 .platform_enable = omap3_stalker_enable_dvi,
185 .platform_disable = omap3_stalker_disable_dvi, 152 .platform_disable = omap3_stalker_disable_dvi,
186}; 153};
@@ -188,13 +155,12 @@ static struct panel_generic_dpi_data dvi_panel = {
188static struct omap_dss_device omap3_stalker_dvi_device = { 155static struct omap_dss_device omap3_stalker_dvi_device = {
189 .name = "dvi", 156 .name = "dvi",
190 .type = OMAP_DISPLAY_TYPE_DPI, 157 .type = OMAP_DISPLAY_TYPE_DPI,
191 .driver_name = "generic_dpi_panel", 158 .driver_name = "dvi",
192 .data = &dvi_panel, 159 .data = &dvi_panel,
193 .phy.dpi.data_lines = 24, 160 .phy.dpi.data_lines = 24,
194}; 161};
195 162
196static struct omap_dss_device *omap3_stalker_dss_devices[] = { 163static struct omap_dss_device *omap3_stalker_dss_devices[] = {
197 &omap3_stalker_lcd_device,
198 &omap3_stalker_tv_device, 164 &omap3_stalker_tv_device,
199 &omap3_stalker_dvi_device, 165 &omap3_stalker_dvi_device,
200}; 166};
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 49e4bd207cb6..abb68913e047 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -104,15 +104,6 @@ static struct omap2_hsmmc_info mmc[] = {
104 {} /* Terminator */ 104 {} /* Terminator */
105}; 105};
106 106
107static struct platform_device omap3_touchbook_lcd_device = {
108 .name = "omap3touchbook_lcd",
109 .id = -1,
110};
111
112static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
113 .ctrl_name = "internal",
114};
115
116static struct regulator_consumer_supply touchbook_vmmc1_supply[] = { 107static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
117 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 108 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
118}; 109};
@@ -165,14 +156,12 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
165static struct regulator_consumer_supply touchbook_vdac_supply[] = { 156static struct regulator_consumer_supply touchbook_vdac_supply[] = {
166{ 157{
167 .supply = "vdac", 158 .supply = "vdac",
168 .dev = &omap3_touchbook_lcd_device.dev,
169}, 159},
170}; 160};
171 161
172static struct regulator_consumer_supply touchbook_vdvi_supply[] = { 162static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
173{ 163{
174 .supply = "vdvi", 164 .supply = "vdvi",
175 .dev = &omap3_touchbook_lcd_device.dev,
176}, 165},
177}; 166};
178 167
@@ -316,10 +305,6 @@ static struct platform_device keys_gpio = {
316 }, 305 },
317}; 306};
318 307
319static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
320 { OMAP_TAG_LCD, &omap3_touchbook_lcd_config },
321};
322
323#ifdef CONFIG_OMAP_MUX 308#ifdef CONFIG_OMAP_MUX
324static struct omap_board_mux board_mux[] __initdata = { 309static struct omap_board_mux board_mux[] __initdata = {
325 { .reg_offset = OMAP_MUX_TERMINATOR }, 310 { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -339,7 +324,6 @@ static void __init omap3_touchbook_init_irq(void)
339} 324}
340 325
341static struct platform_device *omap3_touchbook_devices[] __initdata = { 326static struct platform_device *omap3_touchbook_devices[] __initdata = {
342 &omap3_touchbook_lcd_device,
343 &leds_gpio, 327 &leds_gpio,
344 &keys_gpio, 328 &keys_gpio,
345}; 329};
@@ -376,8 +360,6 @@ early_param("tbr", early_touchbook_revision);
376static void __init omap3_touchbook_init(void) 360static void __init omap3_touchbook_init(void)
377{ 361{
378 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 362 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
379 omap_board_config = omap3_touchbook_config;
380 omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
381 363
382 pm_power_off = omap3_touchbook_poweroff; 364 pm_power_off = omap3_touchbook_poweroff;
383 365
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 683bede73d54..ed38d8fd090f 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -40,7 +40,7 @@
40#include <plat/common.h> 40#include <plat/common.h>
41#include <plat/usb.h> 41#include <plat/usb.h>
42#include <plat/mmc.h> 42#include <plat/mmc.h>
43#include <video/omap-panel-generic-dpi.h> 43#include <video/omap-panel-dvi.h>
44 44
45#include "hsmmc.h" 45#include "hsmmc.h"
46#include "control.h" 46#include "control.h"
@@ -455,16 +455,16 @@ static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
455} 455}
456 456
457/* Using generic display panel */ 457/* Using generic display panel */
458static struct panel_generic_dpi_data omap4_dvi_panel = { 458static struct panel_dvi_platform_data omap4_dvi_panel = {
459 .name = "generic",
460 .platform_enable = omap4_panda_enable_dvi, 459 .platform_enable = omap4_panda_enable_dvi,
461 .platform_disable = omap4_panda_disable_dvi, 460 .platform_disable = omap4_panda_disable_dvi,
461 .i2c_bus_num = 3,
462}; 462};
463 463
464struct omap_dss_device omap4_panda_dvi_device = { 464struct omap_dss_device omap4_panda_dvi_device = {
465 .type = OMAP_DISPLAY_TYPE_DPI, 465 .type = OMAP_DISPLAY_TYPE_DPI,
466 .name = "dvi", 466 .name = "dvi",
467 .driver_name = "generic_dpi_panel", 467 .driver_name = "dvi",
468 .data = &omap4_dvi_panel, 468 .data = &omap4_dvi_panel,
469 .phy.dpi.data_lines = 24, 469 .phy.dpi.data_lines = 24,
470 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 470 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index e592fb134c4e..ec0f60c1cb7c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -46,6 +46,7 @@
46#include <plat/common.h> 46#include <plat/common.h>
47#include <video/omapdss.h> 47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 48#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-dvi.h>
49#include <plat/gpmc.h> 50#include <plat/gpmc.h>
50#include <mach/hardware.h> 51#include <mach/hardware.h>
51#include <plat/nand.h> 52#include <plat/nand.h>
@@ -182,16 +183,16 @@ static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
182 dvi_enabled = 0; 183 dvi_enabled = 0;
183} 184}
184 185
185static struct panel_generic_dpi_data dvi_panel = { 186static struct panel_dvi_platform_data dvi_panel = {
186 .name = "generic",
187 .platform_enable = overo_panel_enable_dvi, 187 .platform_enable = overo_panel_enable_dvi,
188 .platform_disable = overo_panel_disable_dvi, 188 .platform_disable = overo_panel_disable_dvi,
189 .i2c_bus_num = 3,
189}; 190};
190 191
191static struct omap_dss_device overo_dvi_device = { 192static struct omap_dss_device overo_dvi_device = {
192 .name = "dvi", 193 .name = "dvi",
193 .type = OMAP_DISPLAY_TYPE_DPI, 194 .type = OMAP_DISPLAY_TYPE_DPI,
194 .driver_name = "generic_dpi_panel", 195 .driver_name = "dvi",
195 .data = &dvi_panel, 196 .data = &dvi_panel,
196 .phy.dpi.data_lines = 24, 197 .phy.dpi.data_lines = 24,
197}; 198};
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index a6c473bbb3d6..faa2a8e28de5 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -79,29 +79,6 @@ static struct cpuidle_params rx51_cpuidle_params[] = {
79 {7505 + 15274, 484329, 1}, 79 {7505 + 15274, 484329, 1},
80}; 80};
81 81
82static struct omap_lcd_config rx51_lcd_config = {
83 .ctrl_name = "internal",
84};
85
86static struct omap_fbmem_config rx51_fbmem0_config = {
87 .size = 752 * 1024,
88};
89
90static struct omap_fbmem_config rx51_fbmem1_config = {
91 .size = 752 * 1024,
92};
93
94static struct omap_fbmem_config rx51_fbmem2_config = {
95 .size = 752 * 1024,
96};
97
98static struct omap_board_config_kernel rx51_config[] = {
99 { OMAP_TAG_FBMEM, &rx51_fbmem0_config },
100 { OMAP_TAG_FBMEM, &rx51_fbmem1_config },
101 { OMAP_TAG_FBMEM, &rx51_fbmem2_config },
102 { OMAP_TAG_LCD, &rx51_lcd_config },
103};
104
105static void __init rx51_init_early(void) 82static void __init rx51_init_early(void)
106{ 83{
107 struct omap_sdrc_params *sdrc_params; 84 struct omap_sdrc_params *sdrc_params;
@@ -128,8 +105,6 @@ static struct omap_musb_board_data musb_board_data = {
128static void __init rx51_init(void) 105static void __init rx51_init(void)
129{ 106{
130 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 107 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
131 omap_board_config = rx51_config;
132 omap_board_config_size = ARRAY_SIZE(rx51_config);
133 omap3_pm_init_cpuidle(rx51_cpuidle_params); 108 omap3_pm_init_cpuidle(rx51_cpuidle_params);
134 omap_serial_init(); 109 omap_serial_init();
135 usb_musb_init(&musb_board_data); 110 usb_musb_init(&musb_board_data);
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index a5b7a236aa5b..62510ec863c6 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -27,6 +27,8 @@
27#include <plat/omap_device.h> 27#include <plat/omap_device.h>
28#include <plat/omap-pm.h> 28#include <plat/omap-pm.h>
29 29
30#include "control.h"
31
30static struct platform_device omap_display_device = { 32static struct platform_device omap_display_device = {
31 .name = "omapdss", 33 .name = "omapdss",
32 .id = -1, 34 .id = -1,
@@ -61,7 +63,7 @@ static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
61 { "dss_dispc", "omapdss_dispc", -1 }, 63 { "dss_dispc", "omapdss_dispc", -1 },
62 { "dss_rfbi", "omapdss_rfbi", -1 }, 64 { "dss_rfbi", "omapdss_rfbi", -1 },
63 { "dss_venc", "omapdss_venc", -1 }, 65 { "dss_venc", "omapdss_venc", -1 },
64 { "dss_dsi1", "omapdss_dsi1", -1 }, 66 { "dss_dsi1", "omapdss_dsi", 0 },
65}; 67};
66 68
67static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { 69static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
@@ -69,11 +71,58 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
69 { "dss_dispc", "omapdss_dispc", -1 }, 71 { "dss_dispc", "omapdss_dispc", -1 },
70 { "dss_rfbi", "omapdss_rfbi", -1 }, 72 { "dss_rfbi", "omapdss_rfbi", -1 },
71 { "dss_venc", "omapdss_venc", -1 }, 73 { "dss_venc", "omapdss_venc", -1 },
72 { "dss_dsi1", "omapdss_dsi1", -1 }, 74 { "dss_dsi1", "omapdss_dsi", 0 },
73 { "dss_dsi2", "omapdss_dsi2", -1 }, 75 { "dss_dsi2", "omapdss_dsi", 1 },
74 { "dss_hdmi", "omapdss_hdmi", -1 }, 76 { "dss_hdmi", "omapdss_hdmi", -1 },
75}; 77};
76 78
79static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
80{
81 u32 enable_mask, enable_shift;
82 u32 pipd_mask, pipd_shift;
83 u32 reg;
84
85 if (dsi_id == 0) {
86 enable_mask = OMAP4_DSI1_LANEENABLE_MASK;
87 enable_shift = OMAP4_DSI1_LANEENABLE_SHIFT;
88 pipd_mask = OMAP4_DSI1_PIPD_MASK;
89 pipd_shift = OMAP4_DSI1_PIPD_SHIFT;
90 } else if (dsi_id == 1) {
91 enable_mask = OMAP4_DSI2_LANEENABLE_MASK;
92 enable_shift = OMAP4_DSI2_LANEENABLE_SHIFT;
93 pipd_mask = OMAP4_DSI2_PIPD_MASK;
94 pipd_shift = OMAP4_DSI2_PIPD_SHIFT;
95 } else {
96 return -ENODEV;
97 }
98
99 reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
100
101 reg &= ~enable_mask;
102 reg &= ~pipd_mask;
103
104 reg |= (lanes << enable_shift) & enable_mask;
105 reg |= (lanes << pipd_shift) & pipd_mask;
106
107 omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
108
109 return 0;
110}
111
112static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
113{
114 if (cpu_is_omap44xx())
115 return omap4_dsi_mux_pads(dsi_id, lane_mask);
116
117 return 0;
118}
119
120static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
121{
122 if (cpu_is_omap44xx())
123 omap4_dsi_mux_pads(dsi_id, 0);
124}
125
77int __init omap_display_init(struct omap_dss_board_info *board_data) 126int __init omap_display_init(struct omap_dss_board_info *board_data)
78{ 127{
79 int r = 0; 128 int r = 0;
@@ -96,6 +145,11 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
96 oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); 145 oh_count = ARRAY_SIZE(omap4_dss_hwmod_data);
97 } 146 }
98 147
148 if (board_data->dsi_enable_pads == NULL)
149 board_data->dsi_enable_pads = omap_dsi_enable_pads;
150 if (board_data->dsi_disable_pads == NULL)
151 board_data->dsi_disable_pads = omap_dsi_disable_pads;
152
99 pdata.board_data = board_data; 153 pdata.board_data = board_data;
100 pdata.board_data->get_context_loss_count = 154 pdata.board_data->get_context_loss_count =
101 omap_pm_get_dev_context_loss_count; 155 omap_pm_get_dev_context_loss_count;
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index daa056ed8738..522435772168 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -99,7 +99,7 @@ static struct regulator_init_data omap3_vdac_idata = {
99 99
100static struct regulator_consumer_supply omap3_vpll2_supplies[] = { 100static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
101 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 101 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
102 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 102 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
103}; 103};
104 104
105static struct regulator_init_data omap3_vpll2_idata = { 105static struct regulator_init_data omap3_vpll2_idata = {
@@ -235,6 +235,12 @@ static struct regulator_init_data omap4_vana_idata = {
235 }, 235 },
236}; 236};
237 237
238static struct regulator_consumer_supply omap4_vcxio_supply[] = {
239 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dss"),
240 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
241 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.1"),
242};
243
238static struct regulator_init_data omap4_vcxio_idata = { 244static struct regulator_init_data omap4_vcxio_idata = {
239 .constraints = { 245 .constraints = {
240 .min_uV = 1800000, 246 .min_uV = 1800000,
@@ -243,7 +249,10 @@ static struct regulator_init_data omap4_vcxio_idata = {
243 | REGULATOR_MODE_STANDBY, 249 | REGULATOR_MODE_STANDBY,
244 .valid_ops_mask = REGULATOR_CHANGE_MODE 250 .valid_ops_mask = REGULATOR_CHANGE_MODE
245 | REGULATOR_CHANGE_STATUS, 251 | REGULATOR_CHANGE_STATUS,
252 .always_on = true,
246 }, 253 },
254 .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply),
255 .consumer_supplies = omap4_vcxio_supply,
247}; 256};
248 257
249static struct regulator_init_data omap4_vusb_idata = { 258static struct regulator_init_data omap4_vusb_idata = {