1 --- a/arch/arm/mach-omap2/board-omap3beagle.c
2 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
4 #include <linux/gpio.h>
5 #include <linux/input.h>
6 #include <linux/gpio_keys.h>
7 +#include <linux/omapfb.h>
9 #include <linux/mtd/mtd.h>
10 #include <linux/mtd/partitions.h>
14 #include <mach/timer-gp.h>
15 +#include <mach/display.h>
17 #include "mmc-twl4030.h"
19 @@ -106,6 +108,92 @@ static struct platform_device omap3beagl
20 .resource = &omap3beagle_nand_resource,
25 +static int beagle_enable_dvi(struct omap_dss_device *dssdev)
27 + if (dssdev->reset_gpio != -1)
28 + gpio_set_value(dssdev->reset_gpio, 1);
33 +static void beagle_disable_dvi(struct omap_dss_device *dssdev)
35 + if (dssdev->reset_gpio != -1)
36 + gpio_set_value(dssdev->reset_gpio, 0);
39 +static struct omap_dss_device beagle_dvi_device = {
40 + .type = OMAP_DISPLAY_TYPE_DPI,
42 + .driver_name = "generic_panel",
43 + .phy.dpi.data_lines = 24,
45 + .platform_enable = beagle_enable_dvi,
46 + .platform_disable = beagle_disable_dvi,
49 +static int beagle_panel_enable_tv(struct omap_dss_device *dssdev)
54 +static void beagle_panel_disable_tv(struct omap_dss_device *dssdev)
58 +static struct omap_dss_device beagle_tv_device = {
60 + .driver_name = "venc",
61 + .type = OMAP_DISPLAY_TYPE_VENC,
62 + .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
63 + .platform_enable = beagle_panel_enable_tv,
64 + .platform_disable = beagle_panel_disable_tv,
67 +static struct omap_dss_device *beagle_dss_devices[] = {
72 +static struct omap_dss_board_info beagle_dss_data = {
73 + .num_devices = ARRAY_SIZE(beagle_dss_devices),
74 + .devices = beagle_dss_devices,
75 + .default_device = &beagle_dvi_device,
78 +static struct platform_device beagle_dss_device = {
82 + .platform_data = &beagle_dss_data,
86 +static struct regulator_consumer_supply beagle_vdda_dac_supply = {
87 + .supply = "vdda_dac",
88 + .dev = &beagle_dss_device.dev,
91 +static struct regulator_consumer_supply beagle_vdds_dsi_supply = {
92 + .supply = "vdds_dsi",
93 + .dev = &beagle_dss_device.dev,
96 +static void __init beagle_display_init(void)
100 + r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
102 + printk(KERN_ERR "Unable to get DVI reset GPIO\n");
106 + gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
109 #include "sdram-micron-mt46h32m32lf-6.h"
111 static struct twl4030_hsmmc_info mmc[] = {
112 @@ -117,15 +205,6 @@ static struct twl4030_hsmmc_info mmc[] =
116 -static struct platform_device omap3_beagle_lcd_device = {
117 - .name = "omap3beagle_lcd",
121 -static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
122 - .ctrl_name = "internal",
125 static struct regulator_consumer_supply beagle_vmmc1_supply = {
128 @@ -181,15 +260,6 @@ static struct twl4030_gpio_platform_data
129 .setup = beagle_twl_gpio_setup,
132 -static struct regulator_consumer_supply beagle_vdac_supply = {
134 - .dev = &omap3_beagle_lcd_device.dev,
137 -static struct regulator_consumer_supply beagle_vdvi_supply = {
139 - .dev = &omap3_beagle_lcd_device.dev,
142 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
143 static struct regulator_init_data beagle_vmmc1 = {
144 @@ -226,13 +296,14 @@ static struct regulator_init_data beagle
149 .valid_modes_mask = REGULATOR_MODE_NORMAL
150 | REGULATOR_MODE_STANDBY,
151 .valid_ops_mask = REGULATOR_CHANGE_MODE
152 | REGULATOR_CHANGE_STATUS,
154 .num_consumer_supplies = 1,
155 - .consumer_supplies = &beagle_vdac_supply,
156 + .consumer_supplies = &beagle_vdda_dac_supply,
159 /* VPLL2 for digital video outputs */
160 @@ -247,7 +318,7 @@ static struct regulator_init_data beagle
161 | REGULATOR_CHANGE_STATUS,
163 .num_consumer_supplies = 1,
164 - .consumer_supplies = &beagle_vdvi_supply,
165 + .consumer_supplies = &beagle_vdds_dsi_supply,
168 static struct twl4030_usb_data beagle_usb_data = {
169 @@ -340,7 +411,6 @@ static struct platform_device keys_gpio
172 static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
173 - { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
176 static void __init omap3_beagle_init_irq(void)
177 @@ -357,7 +427,7 @@ static void __init omap3_beagle_init_irq
180 static struct platform_device *omap3_beagle_devices[] __initdata = {
181 - &omap3_beagle_lcd_device,
182 + &beagle_dss_device,
186 @@ -420,9 +490,6 @@ static void __init omap3_beagle_init(voi
189 omap_cfg_reg(J25_34XX_GPIO170);
190 - gpio_request(170, "DVI_nPD");
191 - /* REVISIT leave DVI powered down until it's needed ... */
192 - gpio_direction_output(170, true);
195 usb_ehci_init(&ehci_pdata);