From: Alex Galakhov <agalakhov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] Enable display for MINI2440 board.
Date: Tue, 17 May 2011 22:44:01 +0600 [thread overview]
Message-ID: <1305650641-15125-2-git-send-email-agalakhov@gmail.com> (raw)
In-Reply-To: <1305650641-15125-1-git-send-email-agalakhov@gmail.com>
Also add display modes for usual MINI2440 displays.
Signed-off-by: Alex Galakhov <agalakhov@gmail.com>
---
arch/arm/boards/mini2440/Kconfig | 28 +++++++++++++
arch/arm/boards/mini2440/mini2440.c | 74 +++++++++++++++++++++++++++++++++++
arch/arm/mach-s3c24xx/Kconfig | 2 +
3 files changed, 104 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boards/mini2440/Kconfig
diff --git a/arch/arm/boards/mini2440/Kconfig b/arch/arm/boards/mini2440/Kconfig
new file mode 100644
index 0000000..f719181
--- /dev/null
+++ b/arch/arm/boards/mini2440/Kconfig
@@ -0,0 +1,28 @@
+
+if MACH_MINI2440
+
+config MINI2440_VIDEO
+ bool
+ select VIDEO
+ select DRIVER_VIDEO_S3C
+
+config MINI2440_VIDEO_N35
+ bool "Support N35 display (240x320)"
+ select MINI2440_VIDEO
+ help
+ This adds support for NEC 3.5 inch TFT display,
+ the most common one used with MINI2440 board.
+
+config MINI2440_VIDEO_A70
+ bool "Support A70 display (800x480)"
+ select MINI2440_VIDEO
+ help
+ This adds support for Innolux 7.0 inch TFT display.
+
+config MINI2440_VIDEO_SVGA
+ bool "Support SVGA video adapter"
+ select MINI2440_VIDEO
+ help
+ This adds support for MINI2440 SVGA (1280x1024) video output adapter.
+
+endif
diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c
index 448aa40..c96d177 100644
--- a/arch/arm/boards/mini2440/mini2440.c
+++ b/arch/arm/boards/mini2440/mini2440.c
@@ -34,6 +34,7 @@
#include <dm9000.h>
#include <nand.h>
#include <mci.h>
+#include <fb.h>
#include <asm/armlinux.h>
#include <asm/io.h>
#include <mach/gpio.h>
@@ -41,6 +42,7 @@
#include <mach/s3c24x0-nand.h>
#include <mach/s3c24xx-generic.h>
#include <mach/mci.h>
+#include <mach/fb.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
@@ -99,6 +101,77 @@ static struct device_d mci_dev = {
.platform_data = &mci_data,
};
+static struct fb_videomode s3c24x0_fb_modes[] = {
+#ifdef CONFIG_MINI2440_VIDEO_N35
+ {
+ .name = "N35",
+ .refresh = 60,
+ .xres = 240,
+ .left_margin = 21,
+ .right_margin = 38,
+ .hsync_len = 6,
+ .yres = 320,
+ .upper_margin = 4,
+ .lower_margin = 4,
+ .vsync_len = 2,
+ .pixclock = 115913,
+ .sync = FB_SYNC_USE_PWREN,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+ },
+#endif
+#ifdef CONFIG_MINI2440_VIDEO_A70
+ {
+ .name = "A70",
+ .refresh = 50,
+ .xres = 800,
+ .left_margin = 40,
+ .right_margin = 40,
+ .hsync_len = 48,
+ .yres = 480,
+ .upper_margin = 29,
+ .lower_margin = 3,
+ .vsync_len = 3,
+ .pixclock = 41848,
+ .sync = FB_SYNC_USE_PWREN | FB_SYNC_DE_HIGH_ACT,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+ },
+#endif
+#ifdef CONFIG_MINI2440_VIDEO_SVGA
+ {
+ .name = "SVGA",
+ .refresh = 24,
+ .xres = 1024,
+ .left_margin = 1,
+ .right_margin = 2,
+ .hsync_len = 2,
+ .yres = 768,
+ .upper_margin = 200,
+ .lower_margin = 16,
+ .vsync_len = 16,
+ .pixclock = 40492,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT | FB_SYNC_DE_HIGH_ACT
+ /* | FB_SYNC_SWAP_HW */ /* FIXME maybe */ ,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+ },
+#endif
+};
+
+static struct s3c_fb_platform_data s3c24x0_fb_data = {
+ .mode_list = s3c24x0_fb_modes,
+ .mode_cnt = sizeof(s3c24x0_fb_modes) / sizeof(struct fb_videomode),
+ .bits_per_pixel = 16,
+ .passive_display = 0,
+};
+
+static struct device_d s3cfb_dev = {
+ .name = "s3c_fb",
+ .map_base = S3C2410_LCD_BASE,
+ .platform_data = &s3c24x0_fb_data,
+};
+
static const unsigned pin_usage[] = {
/* address bus, used by NOR, SDRAM */
GPA1_ADDR16,
@@ -269,6 +342,7 @@ static int mini2440_devices_init(void)
dev_add_bb_dev("env_raw", "env0");
#endif
register_device(&mci_dev);
+ register_device(&s3cfb_dev);
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
armlinux_set_architecture(MACH_TYPE_MINI2440);
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 33d230c..80b65fb 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -67,6 +67,8 @@ config MACH_A9M2410DEV
endchoice
+source arch/arm/boards/mini2440/Kconfig
+
endmenu
menu "S3C24X0 Features "
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-05-17 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 16:44 [PATCH 1/2] Add support for Samsung S3C24x0 framebuffer Alex Galakhov
2011-05-17 16:44 ` Alex Galakhov [this message]
2011-05-17 18:37 ` [PATCH 2/2] Enable display for MINI2440 board Alexey Galakhov
2011-05-18 9:40 ` [PATCH v2 " Alexey Galakhov
2011-05-17 18:03 ` [PATCH 1/2] Add support for Samsung S3C24x0 framebuffer Sascha Hauer
2011-05-18 8:12 ` Juergen Beisert
2011-05-18 9:39 ` [PATCH v2 " Alexey Galakhov
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=1305650641-15125-2-git-send-email-agalakhov@gmail.com \
--to=agalakhov@gmail.com \
--cc=barebox@lists.infradead.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