aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-31 18:17:39 -0400
committerArnd Bergmann <arnd@arndb.de>2011-10-31 18:17:39 -0400
commit034ee299122c6b145d6d3cafb9ef5c329a4ab990 (patch)
tree0fb4dba7b72d28e1dc4d3bab1317a9a98302a7a5 /arch/arm/mach-omap2
parentd6bb0f27709b91e674ce1441e2dd5e68620edf14 (diff)
parent3e28189038bb831512cf4f8313e1aead97c3e63f (diff)
Merge branch 'depends/omap2_dss' into next/cleanup
Omap cleanups conflicted with omap2_dss work in a nontrivial way, this is the most logical fixup. Conflicts: arch/arm/mach-omap2/board-2430sdp.c arch/arm/mach-omap2/board-4430sdp.c arch/arm/mach-omap2/board-apollon.c arch/arm/mach-omap2/board-h4.c arch/arm/mach-omap2/board-ldp.c arch/arm/mach-omap2/board-rx51.c Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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.c34
-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.c123
-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, 508 insertions, 200 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index bb5452eb842d..69d698c6c5df 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 struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { 195static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
145 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 196 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
146}; 197};
@@ -222,9 +273,6 @@ static void __init omap_2430sdp_init(void)
222{ 273{
223 omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); 274 omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
224 275
225 omap_board_config = sdp2430_config;
226 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
227
228 omap2430_i2c_init(); 276 omap2430_i2c_init();
229 277
230 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 278 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
@@ -241,6 +289,8 @@ static void __init omap_2430sdp_init(void)
241 /* Turn off secondary LCD backlight */ 289 /* Turn off secondary LCD backlight */
242 gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW, 290 gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW,
243 "Secondary LCD backlight"); 291 "Secondary LCD backlight");
292
293 sdp2430_display_init();
244} 294}
245 295
246MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") 296MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 5b5999caf71d..77142c13fa13 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 6a4fbb2b4aaa..32a3a7fe0e95 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 struct omap_musb_board_data musb_board_data = { 382static struct omap_musb_board_data musb_board_data = {
393 .interface_type = MUSB_INTERFACE_UTMI, 383 .interface_type = MUSB_INTERFACE_UTMI,
394 .mode = MUSB_OTG, 384 .mode = MUSB_OTG,
@@ -642,37 +632,202 @@ static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
642 gpio_free(HDMI_GPIO_HPD); 632 gpio_free(HDMI_GPIO_HPD);
643} 633}
644 634
645static struct omap_dss_device sdp4430_hdmi_device = { 635static struct nokia_dsi_panel_data dsi1_panel = {
646 .name = "hdmi", 636 .name = "taal",
647 .driver_name = "hdmi_panel", 637 .reset_gpio = 102,
648 .type = OMAP_DISPLAY_TYPE_HDMI, 638 .use_ext_te = false,
649 .clocks = { 639 .ext_te_gpio = 101,
650 .dispc = { 640 .esd_interval = 0,
641};
642
643static struct omap_dss_device sdp4430_lcd_device = {
644 .name = "lcd",
645 .driver_name = "taal",
646 .type = OMAP_DISPLAY_TYPE_DSI,
647 .data = &dsi1_panel,
648 .phy.dsi = {
649 .clk_lane = 1,
650 .clk_pol = 0,
651 .data1_lane = 2,
652 .data1_pol = 0,
653 .data2_lane = 3,
654 .data2_pol = 0,
655
656 .module = 0,
657 },
658
659 .clocks = {
660 .dispc = {
661 .channel = {
662 /* Logic Clock = 172.8 MHz */
663 .lck_div = 1,
664 /* Pixel Clock = 34.56 MHz */
665 .pck_div = 5,
666 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,
667 },
651 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, 668 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
652 }, 669 },
653 .hdmi = { 670
654 .regn = 15, 671 .dsi = {
655 .regm2 = 1, 672 .regn = 16, /* Fint = 2.4 MHz */
673 .regm = 180, /* DDR Clock = 216 MHz */
674 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
675 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
676
677 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
678 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI,
679 },
680 },
681 .channel = OMAP_DSS_CHANNEL_LCD,
682};
683
684static struct nokia_dsi_panel_data dsi2_panel = {
685 .name = "taal",
686 .reset_gpio = 104,
687 .use_ext_te = false,
688 .ext_te_gpio = 103,
689 .esd_interval = 0,
690};
691
692static struct omap_dss_device sdp4430_lcd2_device = {
693 .name = "lcd2",
694 .driver_name = "taal",
695 .type = OMAP_DISPLAY_TYPE_DSI,
696 .data = &dsi2_panel,
697 .phy.dsi = {
698 .clk_lane = 1,
699 .clk_pol = 0,
700 .data1_lane = 2,
701 .data1_pol = 0,
702 .data2_lane = 3,
703 .data2_pol = 0,
704
705 .module = 1,
706 },
707
708 .clocks = {
709 .dispc = {
710 .channel = {
711 /* Logic Clock = 172.8 MHz */
712 .lck_div = 1,
713 /* Pixel Clock = 34.56 MHz */
714 .pck_div = 5,
715 .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC,
716 },
717 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
718 },
719
720 .dsi = {
721 .regn = 16, /* Fint = 2.4 MHz */
722 .regm = 180, /* DDR Clock = 216 MHz */
723 .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */
724 .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
725
726 .lp_clk_div = 10, /* LP Clock = 8.64 MHz */
727 .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI,
656 }, 728 },
657 }, 729 },
730 .channel = OMAP_DSS_CHANNEL_LCD2,
731};
732
733static void sdp4430_lcd_init(void)
734{
735 int r;
736
737 r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
738 "lcd1_reset_gpio");
739 if (r)
740 pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
741
742 r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
743 "lcd2_reset_gpio");
744 if (r)
745 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
746}
747
748static struct omap_dss_device sdp4430_hdmi_device = {
749 .name = "hdmi",
750 .driver_name = "hdmi_panel",
751 .type = OMAP_DISPLAY_TYPE_HDMI,
658 .platform_enable = sdp4430_panel_enable_hdmi, 752 .platform_enable = sdp4430_panel_enable_hdmi,
659 .platform_disable = sdp4430_panel_disable_hdmi, 753 .platform_disable = sdp4430_panel_disable_hdmi,
660 .channel = OMAP_DSS_CHANNEL_DIGIT, 754 .channel = OMAP_DSS_CHANNEL_DIGIT,
661}; 755};
662 756
757static struct picodlp_panel_data sdp4430_picodlp_pdata = {
758 .picodlp_adapter_id = 2,
759 .emu_done_gpio = 44,
760 .pwrgood_gpio = 45,
761};
762
763static void sdp4430_picodlp_init(void)
764{
765 int r;
766 const struct gpio picodlp_gpios[] = {
767 {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
768 "DLP POWER ON"},
769 {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
770 "DLP EMU DONE"},
771 {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
772 "DLP PWRGOOD"},
773 };
774
775 r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
776 if (r)
777 pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
778}
779
780static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
781{
782 gpio_set_value(DISPLAY_SEL_GPIO, 0);
783 gpio_set_value(DLP_POWER_ON_GPIO, 1);
784
785 return 0;
786}
787
788static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
789{
790 gpio_set_value(DLP_POWER_ON_GPIO, 0);
791 gpio_set_value(DISPLAY_SEL_GPIO, 1);
792}
793
794static struct omap_dss_device sdp4430_picodlp_device = {
795 .name = "picodlp",
796 .driver_name = "picodlp_panel",
797 .type = OMAP_DISPLAY_TYPE_DPI,
798 .phy.dpi.data_lines = 24,
799 .channel = OMAP_DSS_CHANNEL_LCD2,
800 .platform_enable = sdp4430_panel_enable_picodlp,
801 .platform_disable = sdp4430_panel_disable_picodlp,
802 .data = &sdp4430_picodlp_pdata,
803};
804
663static struct omap_dss_device *sdp4430_dss_devices[] = { 805static struct omap_dss_device *sdp4430_dss_devices[] = {
806 &sdp4430_lcd_device,
807 &sdp4430_lcd2_device,
664 &sdp4430_hdmi_device, 808 &sdp4430_hdmi_device,
809 &sdp4430_picodlp_device,
665}; 810};
666 811
667static struct omap_dss_board_info sdp4430_dss_data = { 812static struct omap_dss_board_info sdp4430_dss_data = {
668 .num_devices = ARRAY_SIZE(sdp4430_dss_devices), 813 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
669 .devices = sdp4430_dss_devices, 814 .devices = sdp4430_dss_devices,
670 .default_device = &sdp4430_hdmi_device, 815 .default_device = &sdp4430_lcd_device,
671}; 816};
672 817
673void omap_4430sdp_display_init(void) 818static void omap_4430sdp_display_init(void)
674{ 819{
820 int r;
821
822 /* Enable LCD2 by default (instead of Pico DLP) */
823 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
824 "display_sel");
825 if (r)
826 pr_err("%s: Could not get display_sel GPIO\n", __func__);
827
828 sdp4430_lcd_init();
675 sdp4430_hdmi_mux_init(); 829 sdp4430_hdmi_mux_init();
830 sdp4430_picodlp_init();
676 omap_display_init(&sdp4430_dss_data); 831 omap_display_init(&sdp4430_dss_data);
677} 832}
678 833
@@ -796,9 +951,6 @@ static void __init omap_4430sdp_init(void)
796 package = OMAP_PACKAGE_CBL; 951 package = OMAP_PACKAGE_CBL;
797 omap4_mux_init(board_mux, NULL, package); 952 omap4_mux_init(board_mux, NULL, package);
798 953
799 omap_board_config = sdp4430_config;
800 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
801
802 omap4_i2c_init(); 954 omap4_i2c_init();
803 omap_sfh7741prox_init(); 955 omap_sfh7741prox_init();
804 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 956 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 65a5912278ac..d314f033c9df 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 29c409b68b52..de8134b7f580 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",
267};
268
269static struct omap_dss_device apollon_lcd_device = {
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,
270}; 279};
271 280
272static struct omap_board_config_kernel apollon_config[] __initdata = { 281static struct omap_dss_board_info apollon_dss_data = {
273 { OMAP_TAG_LCD, &apollon_lcd_config }, 282 .num_devices = ARRAY_SIZE(apollon_dss_devices),
283 .devices = apollon_dss_devices,
284 .default_device = &apollon_lcd_device,
274}; 285};
275 286
276static struct gpio apollon_gpio_leds[] __initdata = { 287static struct gpio apollon_gpio_leds[] __initdata = {
@@ -308,8 +319,6 @@ static void __init omap_apollon_init(void)
308 u32 v; 319 u32 v;
309 320
310 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); 321 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
311 omap_board_config = apollon_config;
312 omap_board_config_size = ARRAY_SIZE(apollon_config);
313 322
314 apollon_init_smc91x(); 323 apollon_init_smc91x();
315 apollon_led_init(); 324 apollon_led_init();
@@ -335,6 +344,7 @@ static void __init omap_apollon_init(void)
335 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); 344 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
336 omap_serial_init(); 345 omap_serial_init();
337 omap_sdrc_init(NULL, NULL); 346 omap_sdrc_init(NULL, NULL);
347 omap_display_init(&apollon_dss_data);
338} 348}
339 349
340MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") 350MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 5665e688bd26..bd1bcacb40f9 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 556df32d88ea..42918940c530 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 fe75c195f69f..9a114bd910b1 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -40,6 +40,9 @@
40#include <plat/dma.h> 40#include <plat/dma.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
@@ -157,17 +160,33 @@ static struct platform_device h4_kp_device = {
157 }, 160 },
158}; 161};
159 162
160static struct platform_device h4_lcd_device = {
161 .name = "lcd_h4",
162 .id = -1,
163};
164
165static struct platform_device *h4_devices[] __initdata = { 163static struct platform_device *h4_devices[] __initdata = {
166 &h4_flash_device, 164 &h4_flash_device,
167 &h4_kp_device, 165 &h4_kp_device,
166};
167
168static struct panel_generic_dpi_data h4_panel_data = {
169 .name = "h4",
170};
171
172static struct omap_dss_device h4_lcd_device = {
173 .name = "lcd",
174 .driver_name = "generic_dpi_panel",
175 .type = OMAP_DISPLAY_TYPE_DPI,
176 .phy.dpi.data_lines = 16,
177 .data = &h4_panel_data,
178};
179
180static struct omap_dss_device *h4_dss_devices[] = {
168 &h4_lcd_device, 181 &h4_lcd_device,
169}; 182};
170 183
184static struct omap_dss_board_info h4_dss_data = {
185 .num_devices = ARRAY_SIZE(h4_dss_devices),
186 .devices = h4_dss_devices,
187 .default_device = &h4_lcd_device,
188};
189
171/* 2420 Sysboot setup (2430 is different) */ 190/* 2420 Sysboot setup (2430 is different) */
172static u32 get_sysboot_value(void) 191static u32 get_sysboot_value(void)
173{ 192{
@@ -271,10 +290,6 @@ static void __init h4_init_flash(void)
271 h4_flash_resource.end = base + SZ_64M - 1; 290 h4_flash_resource.end = base + SZ_64M - 1;
272} 291}
273 292
274static struct omap_lcd_config h4_lcd_config __initdata = {
275 .ctrl_name = "internal",
276};
277
278static struct omap_usb_config h4_usb_config __initdata = { 293static struct omap_usb_config h4_usb_config __initdata = {
279 /* S1.10 OFF -- usb "download port" 294 /* S1.10 OFF -- usb "download port"
280 * usb0 switched to Mini-B port and isp1105 transceiver; 295 * usb0 switched to Mini-B port and isp1105 transceiver;
@@ -286,10 +301,6 @@ static struct omap_usb_config h4_usb_config __initdata = {
286 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ 301 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
287}; 302};
288 303
289static struct omap_board_config_kernel h4_config[] __initdata = {
290 { OMAP_TAG_LCD, &h4_lcd_config },
291};
292
293static struct at24_platform_data m24c01 = { 304static struct at24_platform_data m24c01 = {
294 .byte_len = SZ_1K / 8, 305 .byte_len = SZ_1K / 8,
295 .page_size = 16, 306 .page_size = 16,
@@ -320,9 +331,6 @@ static void __init omap_h4_init(void)
320{ 331{
321 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); 332 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
322 333
323 omap_board_config = h4_config;
324 omap_board_config_size = ARRAY_SIZE(h4_config);
325
326 /* 334 /*
327 * Make sure the serial ports are muxed on at this point. 335 * Make sure the serial ports are muxed on at this point.
328 * You have to mux them off in device drivers later on 336 * You have to mux them off in device drivers later on
@@ -362,6 +370,8 @@ static void __init omap_h4_init(void)
362 omap_serial_init(); 370 omap_serial_init();
363 omap_sdrc_init(NULL, NULL); 371 omap_sdrc_init(NULL, NULL);
364 h4_init_flash(); 372 h4_init_flash();
373
374 omap_display_init(&h4_dss_data);
365} 375}
366 376
367MACHINE_START(OMAP_H4, "OMAP2420 H4 board") 377MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e20cad6a0835..d0a3f78a9b69 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 0fa28be2cfda..2a2545153d15 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>
@@ -34,7 +35,6 @@
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35 36
36#include <plat/mcspi.h> 37#include <plat/mcspi.h>
37#include <mach/gpio.h>
38#include <plat/board.h> 38#include <plat/board.h>
39#include <plat/common.h> 39#include <plat/common.h>
40#include <plat/gpmc.h> 40#include <plat/gpmc.h>
@@ -44,6 +44,9 @@
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <plat/gpmc-smsc911x.h> 45#include <plat/gpmc-smsc911x.h>
46 46
47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h>
49
47#include "board-flash.h" 50#include "board-flash.h"
48#include "mux.h" 51#include "mux.h"
49#include "hsmmc.h" 52#include "hsmmc.h"
@@ -180,23 +183,102 @@ static inline void __init ldp_init_smsc911x(void)
180 gpmc_smsc911x_init(&smsc911x_cfg); 183 gpmc_smsc911x_init(&smsc911x_cfg);
181} 184}
182 185
183static struct platform_device ldp_lcd_device = { 186/* LCD */
184 .name = "ldp_lcd", 187
185 .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,
186}; 216};
187 217
188static struct omap_lcd_config ldp_lcd_config __initdata = { 218static struct omap_dss_device ldp_lcd_device = {
189 .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,
190}; 228};
191 229
192static struct omap_board_config_kernel ldp_config[] __initdata = { 230static struct omap_dss_board_info ldp_dss_data = {
193 { 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,
194}; 234};
195 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
254static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
255{
256 int r;
257
258 struct gpio gpios[] = {
259 {gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"},
260 {gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"},
261 };
262
263 r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
264 if (r) {
265 pr_err("Cannot request LCD GPIOs, error %d\n", r);
266 ldp_backlight_gpio = -EINVAL;
267 ldp_lcd_enable_gpio = -EINVAL;
268 return r;
269 }
270
271 ldp_backlight_gpio = gpio + 15;
272 ldp_lcd_enable_gpio = gpio + 7;
273
274 return 0;
275}
276
196static struct twl4030_gpio_platform_data ldp_gpio_data = { 277static struct twl4030_gpio_platform_data ldp_gpio_data = {
197 .gpio_base = OMAP_MAX_GPIO_LINES, 278 .gpio_base = OMAP_MAX_GPIO_LINES,
198 .irq_base = TWL4030_GPIO_IRQ_BASE, 279 .irq_base = TWL4030_GPIO_IRQ_BASE,
199 .irq_end = TWL4030_GPIO_IRQ_END, 280 .irq_end = TWL4030_GPIO_IRQ_END,
281 .setup = ldp_twl_gpio_setup,
200}; 282};
201 283
202static struct regulator_consumer_supply ldp_vmmc1_supply[] = { 284static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
@@ -238,10 +320,31 @@ static struct regulator_init_data ldp_vaux1 = {
238 .consumer_supplies = ldp_vaux1_supplies, 320 .consumer_supplies = ldp_vaux1_supplies,
239}; 321};
240 322
323static struct regulator_consumer_supply ldp_vpll2_supplies[] = {
324 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
325 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
326};
327
328static struct regulator_init_data ldp_vpll2 = {
329 .constraints = {
330 .name = "VDVI",
331 .min_uV = 1800000,
332 .max_uV = 1800000,
333 .apply_uV = true,
334 .valid_modes_mask = REGULATOR_MODE_NORMAL
335 | REGULATOR_MODE_STANDBY,
336 .valid_ops_mask = REGULATOR_CHANGE_MODE
337 | REGULATOR_CHANGE_STATUS,
338 },
339 .num_consumer_supplies = ARRAY_SIZE(ldp_vpll2_supplies),
340 .consumer_supplies = ldp_vpll2_supplies,
341};
342
241static struct twl4030_platform_data ldp_twldata = { 343static struct twl4030_platform_data ldp_twldata = {
242 /* platform_data for children goes here */ 344 /* platform_data for children goes here */
243 .vmmc1 = &ldp_vmmc1, 345 .vmmc1 = &ldp_vmmc1,
244 .vaux1 = &ldp_vaux1, 346 .vaux1 = &ldp_vaux1,
347 .vpll2 = &ldp_vpll2,
245 .gpio = &ldp_gpio_data, 348 .gpio = &ldp_gpio_data,
246 .keypad = &ldp_kp_twl4030_data, 349 .keypad = &ldp_kp_twl4030_data,
247}; 350};
@@ -267,7 +370,6 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
267}; 370};
268 371
269static struct platform_device *ldp_devices[] __initdata = { 372static struct platform_device *ldp_devices[] __initdata = {
270 &ldp_lcd_device,
271 &ldp_gpio_keys_device, 373 &ldp_gpio_keys_device,
272}; 374};
273 375
@@ -312,8 +414,6 @@ static struct mtd_partition ldp_nand_partitions[] = {
312static void __init omap_ldp_init(void) 414static void __init omap_ldp_init(void)
313{ 415{
314 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 416 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
315 omap_board_config = ldp_config;
316 omap_board_config_size = ARRAY_SIZE(ldp_config);
317 ldp_init_smsc911x(); 417 ldp_init_smsc911x();
318 omap_i2c_init(); 418 omap_i2c_init();
319 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); 419 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
@@ -325,6 +425,7 @@ static void __init omap_ldp_init(void)
325 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); 425 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
326 426
327 omap2_hsmmc_init(mmc); 427 omap2_hsmmc_init(mmc);
428 ldp_display_init();
328} 429}
329 430
330MACHINE_START(OMAP_LDP, "OMAP LDP board") 431MACHINE_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 3826493d1b2b..474a7e2cb638 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 aa6a9351ce48..2d24e287e8c1 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 fed2f7dfdf8b..f7811f4cfc3d 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 170e1ebd6e62..ddb7d6663c6d 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 c2d5348f5422..a2d0d1971e27 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 },
@@ -327,7 +312,6 @@ static struct omap_board_mux board_mux[] __initdata = {
327#endif 312#endif
328 313
329static struct platform_device *omap3_touchbook_devices[] __initdata = { 314static struct platform_device *omap3_touchbook_devices[] __initdata = {
330 &omap3_touchbook_lcd_device,
331 &leds_gpio, 315 &leds_gpio,
332 &keys_gpio, 316 &keys_gpio,
333}; 317};
@@ -364,8 +348,6 @@ early_param("tbr", early_touchbook_revision);
364static void __init omap3_touchbook_init(void) 348static void __init omap3_touchbook_init(void)
365{ 349{
366 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 350 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
367 omap_board_config = omap3_touchbook_config;
368 omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
369 351
370 pm_power_off = omap3_touchbook_poweroff; 352 pm_power_off = omap3_touchbook_poweroff;
371 353
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 2141894eb9f3..a8c2c4263e38 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"
@@ -449,16 +449,16 @@ static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
449} 449}
450 450
451/* Using generic display panel */ 451/* Using generic display panel */
452static struct panel_generic_dpi_data omap4_dvi_panel = { 452static struct panel_dvi_platform_data omap4_dvi_panel = {
453 .name = "generic",
454 .platform_enable = omap4_panda_enable_dvi, 453 .platform_enable = omap4_panda_enable_dvi,
455 .platform_disable = omap4_panda_disable_dvi, 454 .platform_disable = omap4_panda_disable_dvi,
455 .i2c_bus_num = 3,
456}; 456};
457 457
458struct omap_dss_device omap4_panda_dvi_device = { 458struct omap_dss_device omap4_panda_dvi_device = {
459 .type = OMAP_DISPLAY_TYPE_DPI, 459 .type = OMAP_DISPLAY_TYPE_DPI,
460 .name = "dvi", 460 .name = "dvi",
461 .driver_name = "generic_dpi_panel", 461 .driver_name = "dvi",
462 .data = &omap4_dvi_panel, 462 .data = &omap4_dvi_panel,
463 .phy.dpi.data_lines = 24, 463 .phy.dpi.data_lines = 24,
464 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 464 .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 9f13dc22df77..4cf7aeabab86 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 74c8aadc0a19..4af7c4b2881a 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
105extern void __init rx51_peripherals_init(void); 82extern void __init rx51_peripherals_init(void);
106 83
107#ifdef CONFIG_OMAP_MUX 84#ifdef CONFIG_OMAP_MUX
@@ -121,8 +98,6 @@ static void __init rx51_init(void)
121 struct omap_sdrc_params *sdrc_params; 98 struct omap_sdrc_params *sdrc_params;
122 99
123 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 100 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
124 omap_board_config = rx51_config;
125 omap_board_config_size = ARRAY_SIZE(rx51_config);
126 omap3_pm_init_cpuidle(rx51_cpuidle_params); 101 omap3_pm_init_cpuidle(rx51_cpuidle_params);
127 omap_serial_init(); 102 omap_serial_init();
128 103
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 18693f6de041..836f0f7d8c00 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 = {