[PATCH 14/15] OMAP: Beagle: Enable DSS2 for Beagle board

2009-08-05 Thread Tomi Valkeinen
Signed-off-by: Tomi Valkeinen tomi.valkei...@nokia.com
---
 arch/arm/configs/omap3_beagle_defconfig |   26 ++-
 arch/arm/mach-omap2/board-omap3beagle.c |  119 ---
 2 files changed, 116 insertions(+), 29 deletions(-)

diff --git a/arch/arm/configs/omap3_beagle_defconfig 
b/arch/arm/configs/omap3_beagle_defconfig
index c4726f0..1740be3 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -792,10 +792,30 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 #
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
-CONFIG_FB_OMAP=y
-# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
 # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
-CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_VRAM_SIZE=6
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+# CONFIG_OMAP2_DSS_DSI is not set
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index b6a68d5..d27c63f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,6 +30,7 @@
 
 #include linux/regulator/machine.h
 #include linux/i2c/twl4030.h
+#include linux/omapfb.h
 
 #include mach/hardware.h
 #include asm/mach-types.h
@@ -44,6 +45,7 @@
 #include mach/mux.h
 #include mach/usb.h
 #include mach/timer-gp.h
+#include mach/display.h
 
 #include mmc-twl4030.h
 
@@ -106,6 +108,92 @@ static struct platform_device omap3beagle_nand_device = {
.resource   = omap3beagle_nand_resource,
 };
 
+/* DSS */
+
+static int beagle_enable_dvi(struct omap_dss_device *dssdev)
+{
+   if (dssdev-reset_gpio != -1)
+   gpio_set_value(dssdev-reset_gpio, 1);
+
+   return 0;
+}
+
+static void beagle_disable_dvi(struct omap_dss_device *dssdev)
+{
+   if (dssdev-reset_gpio != -1)
+   gpio_set_value(dssdev-reset_gpio, 0);
+}
+
+static struct omap_dss_device beagle_dvi_device = {
+   .type = OMAP_DISPLAY_TYPE_DPI,
+   .name = dvi,
+   .driver_name = generic_panel,
+   .phy.dpi.data_lines = 24,
+   .reset_gpio = 170,
+   .platform_enable = beagle_enable_dvi,
+   .platform_disable = beagle_disable_dvi,
+};
+
+static int beagle_panel_enable_tv(struct omap_dss_device *dssdev)
+{
+   return 0;
+}
+
+static void beagle_panel_disable_tv(struct omap_dss_device *dssdev)
+{
+}
+
+static struct omap_dss_device beagle_tv_device = {
+   .name = tv,
+   .driver_name = venc,
+   .type = OMAP_DISPLAY_TYPE_VENC,
+   .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+   .platform_enable = beagle_panel_enable_tv,
+   .platform_disable = beagle_panel_disable_tv,
+};
+
+static struct omap_dss_device *beagle_dss_devices[] = {
+   beagle_dvi_device,
+   beagle_tv_device,
+};
+
+static struct omap_dss_board_info beagle_dss_data = {
+   .num_devices = ARRAY_SIZE(beagle_dss_devices),
+   .devices = beagle_dss_devices,
+   .default_device = beagle_dvi_device,
+};
+
+static struct platform_device beagle_dss_device = {
+   .name  = omapdss,
+   .id= -1,
+   .dev= {
+   .platform_data = beagle_dss_data,
+   },
+};
+
+static struct regulator_consumer_supply beagle_vdda_dac_supply = {
+   .supply = vdda_dac,
+   .dev= beagle_dss_device.dev,
+};
+
+static struct regulator_consumer_supply beagle_vdds_dsi_supply = {
+   .supply = vdds_dsi,
+   .dev= beagle_dss_device.dev,
+};
+
+static void __init beagle_display_init(void)
+{
+   int r;
+
+   r = gpio_request(beagle_dvi_device.reset_gpio, DVI reset);
+   if (r  0) {
+   printk(KERN_ERR Unable to get DVI reset GPIO\n);
+   return;
+   }
+
+   gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
+}
+
 #include sdram-micron-mt46h32m32lf-6.h
 
 static struct omap_uart_config omap3_beagle_uart_config __initdata = {
@@ -121,15 +209,6 @@ static struct twl4030_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
-static struct platform_device omap3_beagle_lcd_device = {
-   .name   = omap3beagle_lcd,
-   .id = -1,
-};
-
-static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
-   .ctrl_name  = internal,
-};
-
 static struct regulator_consumer_supply beagle_vmmc1_supply = {
.supply = vmmc,
 };

Re: [PATCH 14/15] OMAP: Beagle: Enable DSS2 for Beagle board

2009-08-05 Thread Tony Lindgren
* Tomi Valkeinen tomi.valkei...@nokia.com [090805 17:19]:
 Signed-off-by: Tomi Valkeinen tomi.valkei...@nokia.com
 ---
  arch/arm/configs/omap3_beagle_defconfig |   26 ++-
  arch/arm/mach-omap2/board-omap3beagle.c |  119 
 ---
  2 files changed, 116 insertions(+), 29 deletions(-)
 

snip snip

 +static struct omap_dss_device beagle_dvi_device = {
 + .type = OMAP_DISPLAY_TYPE_DPI,
 + .name = dvi,
 + .driver_name = generic_panel,
 + .phy.dpi.data_lines = 24,
 + .reset_gpio = 170,
 + .platform_enable = beagle_enable_dvi,
 + .platform_disable = beagle_disable_dvi,
 +};
...

Just nitpicking about the data tabbing in general, other than that:

Acked-by: Tony Lindgren t...@atomide.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html