From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: linux-omap@vger.kernel.org
Subject: [REVIEW PATCH 8/9] DSS: support for Beagle Board
Date: Tue, 04 Nov 2008 18:10:38 +0200 [thread overview]
Message-ID: <20081104161038.19071.98198.stgit@tubuntu> (raw)
In-Reply-To: <20081104160946.19071.44903.stgit@tubuntu>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 121 ++++++++++++++++++++++++++++---
1 files changed, 108 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index ce6c7b4..a6fe63d 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -42,6 +42,8 @@
#include <mach/gpmc.h>
#include <mach/nand.h>
#include <mach/mux.h>
+#include <mach/omapfb.h>
+#include <mach/display.h>
#include "twl4030-generic-scripts.h"
@@ -186,15 +188,6 @@ static void __init omap3_beagle_init_irq(void)
omap_gpio_init();
}
-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 gpio_led gpio_leds[] = {
{
.name = "beagleboard::usr0",
@@ -248,13 +241,114 @@ static struct platform_device keys_gpio = {
},
};
+/* DSS */
+
+static int beagle_enable_dvi(struct omap_display *display)
+{
+ if (display->hw_config.panel_reset_gpio != -1)
+ gpio_direction_output(display->hw_config.panel_reset_gpio, 1);
+
+ return 0;
+}
+
+static void beagle_disable_dvi(struct omap_display *display)
+{
+ if (display->hw_config.panel_reset_gpio != -1)
+ gpio_direction_output(display->hw_config.panel_reset_gpio, 0);
+}
+
+static struct omap_display_data beagle_display_data_dvi = {
+ .type = OMAP_DISPLAY_TYPE_DPI,
+ .name = "dvi",
+ .panel_name = "panel-dvi",
+ .u.dpi.data_lines = 24,
+ .panel_reset_gpio = 170,
+ .panel_enable = beagle_enable_dvi,
+ .panel_disable = beagle_disable_dvi,
+};
+
+
+static int panel_enable_tv(struct omap_display *display)
+{
+#define ENABLE_VDAC_DEDICATED 0x03
+#define ENABLE_VDAC_DEV_GRP 0x20
+
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+ ENABLE_VDAC_DEDICATED,
+ TWL4030_VDAC_DEDICATED);
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
+
+ return 0;
+}
+
+static void panel_disable_tv(struct omap_display *display)
+{
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
+ TWL4030_VDAC_DEDICATED);
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
+ TWL4030_VDAC_DEV_GRP);
+}
+
+static struct omap_display_data beagle_display_data_tv = {
+ .type = OMAP_DISPLAY_TYPE_VENC,
+ .name = "tv",
+ .u.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+ .panel_enable = panel_enable_tv,
+ .panel_disable = panel_disable_tv,
+};
+
+static struct omap_dss_platform_data beagle_dss_data = {
+ .num_displays = 2,
+ .displays = {
+ &beagle_display_data_dvi,
+ &beagle_display_data_tv,
+ }
+};
+
+static struct platform_device beagle_dss_device = {
+ .name = "omap-dss",
+ .id = -1,
+ .dev = {
+ .platform_data = &beagle_dss_data,
+ },
+};
+
+static void __init beagle_display_init(void)
+{
+ int r;
+
+ r = gpio_request(beagle_display_data_dvi.panel_reset_gpio, "DVI reset GPIO");
+ if(r < 0) {
+ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
+ }
+}
+
+static struct omap_fbmem_config beagle_fbmem0_config = {
+ .size = 1024*768*4,
+ .start = OMAPFB_MEMTYPE_SDRAM,
+};
+
+static struct omap_fbmem_config beagle_fbmem1_config = {
+ .size = 1024*768*4,
+ .start = OMAPFB_MEMTYPE_SDRAM,
+};
+
+static struct omap_fbmem_config beagle_fbmem2_config = {
+ .size = 1024*768*4,
+ .start = OMAPFB_MEMTYPE_SDRAM,
+};
+
+
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
{ OMAP_TAG_UART, &omap3_beagle_uart_config },
- { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
+ { OMAP_TAG_FBMEM, &beagle_fbmem0_config },
+ { OMAP_TAG_FBMEM, &beagle_fbmem1_config },
+ { OMAP_TAG_FBMEM, &beagle_fbmem2_config },
};
static struct platform_device *omap3_beagle_devices[] __initdata = {
- &omap3_beagle_lcd_device,
+ &beagle_dss_device,
&leds_gpio,
&keys_gpio,
};
@@ -302,8 +396,6 @@ static void __init omap3_beagle_init(void)
omap3_beagle_i2c_init();
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));
- omap_board_config = omap3_beagle_config;
- omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
omap_cfg_reg(AH8_34XX_GPIO29);
@@ -319,10 +411,13 @@ static void __init omap3_beagle_init(void)
usb_musb_init();
usb_ehci_init();
omap3beagle_flash_init();
+ beagle_display_init();
}
static void __init omap3_beagle_map_io(void)
{
+ omap_board_config = omap3_beagle_config;
+ omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap2_set_globals_343x();
omap2_map_common_io();
}
next prev parent reply other threads:[~2008-11-04 16:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-04 16:09 [REVIEW PATCH 0/9] DSS: Series description Tomi Valkeinen
2008-11-04 16:09 ` [REVIEW PATCH 1/9] DSS: Documentation for OMAP2/3 display subsystem Tomi Valkeinen
2008-11-05 7:56 ` [Linux-fbdev-devel] " Geert Uytterhoeven
2008-11-05 10:12 ` Tomi Valkeinen
2008-11-04 16:09 ` [REVIEW PATCH 2/9] DSS: New display subsystem driver for OMAP2/3 Tomi Valkeinen
2008-11-04 16:10 ` [REVIEW PATCH 3/9] DSS: RFBI support for OMAP2/3 DSS Tomi Valkeinen
2008-11-04 16:10 ` [REVIEW PATCH 4/9] DSS: TV-out " Tomi Valkeinen
2008-11-05 10:27 ` Jarkko Nikula
2008-11-04 16:10 ` [REVIEW PATCH 5/9] DSS: DSI " Tomi Valkeinen
2008-11-04 16:10 ` [REVIEW PATCH 6/9] DSS: OMAPFB: fb driver for new display subsystem Tomi Valkeinen
2008-11-04 16:10 ` [REVIEW PATCH 7/9] DSS: Add generic DVI panel Tomi Valkeinen
2008-11-04 16:10 ` Tomi Valkeinen [this message]
2008-11-04 17:28 ` [REVIEW PATCH 8/9] DSS: support for Beagle Board Koen Kooi
2008-11-05 10:05 ` Tomi Valkeinen
2008-11-05 21:15 ` Koen Kooi
2008-11-04 18:24 ` [Linux-fbdev-devel] " Tony Lindgren
2008-11-05 10:09 ` Tomi Valkeinen
2008-11-05 10:27 ` Jarkko Nikula
2008-11-05 23:21 ` David Brownell
2008-11-06 8:23 ` Tomi Valkeinen
2008-11-06 8:30 ` Koen Kooi
2008-11-04 16:10 ` [REVIEW PATCH 9/9] DSS: support for OMAP3 SDP board Tomi Valkeinen
2008-11-05 10:54 ` Jarkko Nikula
2008-11-10 4:03 ` [Linux-fbdev-devel] [REVIEW PATCH 0/9] DSS: Series description Shah, Hardik
2008-11-10 11:31 ` Tomi Valkeinen
2008-11-10 12:03 ` Shah, Hardik
2008-11-18 6:40 ` Shah, Hardik
2008-11-18 12:06 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081104161038.19071.98198.stgit@tubuntu \
--to=tomi.valkeinen@nokia.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).