From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 10/10] ARM Chumby-Falconwing: Add a user for video graphics support on i.MX23
Date: Mon, 20 Dec 2010 16:05:09 +0100 [thread overview]
Message-ID: <1292857509-13881-11-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1292857509-13881-1-git-send-email-jbe@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 4039 bytes --]
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
arch/arm/boards/chumby_falconwing/falconwing.c | 88 +++++++++++++++++------
arch/arm/configs/chumbyone_defconfig | 3 +
2 files changed, 68 insertions(+), 23 deletions(-)
diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 93ce7e2..f5ed133 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -28,6 +28,7 @@
#include <mach/imx-regs.h>
#include <mach/clock.h>
#include <mach/mci.h>
+#include <mach/fb.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
@@ -53,6 +54,45 @@ static struct device_d mci_dev = {
.platform_data = &mci_pdata,
};
+static struct fb_videomode falconwing_vmode = {
+ /*
+ * Nanovision NMA35QV65-B2-K01 (directly connected)
+ * Clock: 6.25 MHz
+ * Syncs: high active, DE low active
+ * Display area: 70.08 mm x 52.56 mm
+ */
+ .name = "NMA35",
+ .refresh = 60,
+ .xres = 320,
+ .yres = 240,
+ .pixclock = KHZ2PICOS(6250), /* max. 10 MHz */
+ /* line lenght should be 64 �s */
+ .left_margin = 28,
+ .hsync_len = 24,
+ .right_margin = 28,
+ /* frame rate should be 60 Hz */
+ .upper_margin = 8,
+ .vsync_len = 4,
+ .lower_margin = 8,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+};
+
+static struct imx_fb_videomode fb_mode = {
+ .mode_list = &falconwing_vmode,
+ .mode_cnt = 1,
+ /* the NMA35 is a 24 bit display, but only 18 bits are connected */
+ .ld_intf_width = STMLCDIF_18BIT,
+};
+
+static struct device_d ldcif_dev = {
+ .name = "stmfb",
+ .map_base = IMX_FB_BASE,
+ .size = 4096,
+ .platform_data = &fb_mode,
+};
+
static const uint32_t pad_setup[] = {
/* may be not required as already done by the bootlet code */
#if 0
@@ -113,33 +153,34 @@ static const uint32_t pad_setup[] = {
PWM0_DUART_RX | STRENGTH(S4MA), /* strength is TBD */
/* lcd */
- LCD_VSYNC, /* kernel tries with 12 mA for all LCD related pins */
- LCD_HSYNC,
- LCD_ENABE,
- LCD_DOTCLOCK,
- LCD_D17,
- LCD_D16,
- LCD_D15,
- LCD_D14,
- LCD_D13,
- LCD_D12,
- LCD_D11,
- LCD_D10,
- LCD_D9,
- LCD_D8,
- LCD_D7,
- LCD_D6,
- LCD_D5,
- LCD_D4,
- LCD_D3,
- LCD_D2,
- LCD_D1,
- LCD_D0,
+ LCD_VSYNC | STRENGTH(S12MA),
+ LCD_HSYNC | STRENGTH(S12MA),
+ LCD_ENABE | STRENGTH(S12MA),
+ LCD_DOTCLOCK | STRENGTH(S12MA),
+ LCD_D17 | STRENGTH(S12MA),
+ LCD_D16 | STRENGTH(S12MA),
+ LCD_D15 | STRENGTH(S12MA),
+ LCD_D14 | STRENGTH(S12MA),
+ LCD_D13 | STRENGTH(S12MA),
+ LCD_D12 | STRENGTH(S12MA),
+ LCD_D11 | STRENGTH(S12MA),
+ LCD_D10 | STRENGTH(S12MA),
+ LCD_D9 | STRENGTH(S12MA),
+ LCD_D8 | STRENGTH(S12MA),
+ LCD_D7 | STRENGTH(S12MA),
+ LCD_D6 | STRENGTH(S12MA),
+ LCD_D5 | STRENGTH(S12MA),
+ LCD_D4 | STRENGTH(S12MA),
+ LCD_D3 | STRENGTH(S12MA),
+ LCD_D2 | STRENGTH(S12MA),
+ LCD_D1 | STRENGTH(S12MA),
+ LCD_D0 | STRENGTH(S12MA),
/* LCD usage currently unknown */
LCD_CS, /* used as SPI SS */
LCD_RS, /* used as SPI CLK */
- LCD_RESET,
+ /* keep the display in reset state */
+ LCD_RESET_GPIO | STRENGTH(S4MA) | GPIO_OUT | GPIO_VALUE(0),
LCD_WR, /* used as SPI MOSI */
/* I2C to the MMA7455L, KXTE9, AT24C08 (DCID), AT24C128B (ID EEPROM) and QN8005B */
@@ -270,6 +311,7 @@ static int falconwing_devices_init(void)
/* run the SSP unit clock at 100,000 kHz */
imx_set_sspclk(0, 100000000, 1);
register_device(&mci_dev);
+ register_device(&ldcif_dev);
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void*)(sdram_dev.map_base + 0x100));
diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index 595b6a9..6e6623a 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -23,7 +23,10 @@ CONFIG_CMD_MTEST_ALTERNATIVE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_PARTITION=y
+CONFIG_CMD_BMP=y
# CONFIG_SPI is not set
+CONFIG_VIDEO=y
+CONFIG_DRIVER_VIDEO_STM=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
CONFIG_MCI_STM378X=y
--
1.7.2.3
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2010-12-20 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 15:04 [PATCH] Add support for runtime selection of video mode in barebox Juergen Beisert
2010-12-20 15:05 ` [PATCH 01/10] Add more useful generic macros Juergen Beisert
2010-12-20 15:05 ` [PATCH 02/10] ARM Chumby: Fix memory index Juergen Beisert
2010-12-20 15:05 ` [PATCH 03/10] ARM Chumby: Fix unit of the clocks after the change to Hz Juergen Beisert
2010-12-20 15:05 ` [PATCH 04/10] ARM Chumby: Just fix some typos Juergen Beisert
2010-12-20 15:05 ` [PATCH 05/10] Fix default framebuffer 'enable' set Juergen Beisert
2010-12-20 15:05 ` [PATCH 06/10] Add the feature to change the video mode at runtime Juergen Beisert
2010-12-20 15:05 ` [PATCH 07/10] ARM STM/i.MX: Add a pixel clock calculation routine for i.MX23/i.MX28 Juergen Beisert
2010-12-20 15:05 ` [PATCH 08/10] ARM STM/i.MX: Add video driver " Juergen Beisert
2010-12-29 14:55 ` Gregory CLEMENT
2010-12-20 15:05 ` [PATCH 09/10] ARM KARO-TX28-STK5: Add a user for video graphics support on i.MX28 Juergen Beisert
2010-12-20 15:05 ` Juergen Beisert [this message]
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=1292857509-13881-11-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--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