public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj-list@mimc.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add LCD support to MIMC200 board
Date: Tue, 21 Jul 2009 11:35:22 +0100	[thread overview]
Message-ID: <4A6599EA.40705@mimc.co.uk> (raw)

This patch updates the MIMC200 files to enable the LCD.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
---
 board/mimc/mimc200/mimc200.c |   34 ++++++++++++++++++++++++++++++++++
 include/configs/mimc200.h    |   16 ++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/board/mimc/mimc200/mimc200.c b/board/mimc/mimc200/mimc200.c
index 6df741e..78441c3 100644
--- a/board/mimc/mimc200/mimc200.c
+++ b/board/mimc/mimc200/mimc200.c
@@ -28,10 +28,40 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/hmatrix.h>
 #include <asm/arch/portmux.h>
+#include <atmel_lcdc.h>
 #include <lcd.h>
 
 #include "../../../cpu/at32ap/hsmc3.h"
 
+#if defined(CONFIG_LCD)
+/* 480x272x16 @ 72 Hz */
+vidinfo_t panel_info = {
+	.vl_col			= 480,			/* Number of columns */
+	.vl_row			= 272,			/* Number of rows */
+	.vl_clk			= 10000000,		/* pixel clock in ps */
+	.vl_sync		= ATMEL_LCDC_INVCLK_INVERTED |
+				  ATMEL_LCDC_INVLINE_INVERTED |
+				  ATMEL_LCDC_INVFRAME_INVERTED,
+	.vl_bpix		= LCD_COLOR16,		/* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
+	.vl_tft			= 1,			/* 0 = passive, 1 = TFT */
+	.vl_hsync_len		= 42,			/* Length of horizontal sync */
+	.vl_left_margin		= 1,			/* Time from sync to picture */
+	.vl_right_margin	= 1,			/* Time from picture to sync */
+	.vl_vsync_len		= 1,			/* Length of vertical sync */
+	.vl_upper_margin	= 12,			/* Time from sync to picture */
+	.vl_lower_margin	= 1,			/* Time from picture to sync */
+	.mmio			= LCDC_BASE,		/* Memory mapped registers */
+};
+
+void lcd_enable(void)
+{
+}
+
+void lcd_disable(void)
+{
+}
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static const struct sdram_config sdram_config = {
@@ -110,6 +140,10 @@ int board_early_init_f(void)
 	portmux_enable_mmci(0, PORTMUX_MMCI_4BIT, PORTMUX_DRIVE_LOW);
 #endif
 
+#if defined(CONFIG_LCD)
+	portmux_enable_lcdc(1);
+#endif
+
 	return 0;
 }
 
diff --git a/include/configs/mimc200.h b/include/configs/mimc200.h
index 8ff2f8a..8f71664 100644
--- a/include/configs/mimc200.h
+++ b/include/configs/mimc200.h
@@ -82,6 +82,8 @@
 #define CONFIG_DISABLE_CONSOLE		1	/* disable console */
 #define CONFIG_SYS_DEVICE_NULLDEV		1	/* include nulldev device */
 
+#define CONFIG_LCD			1
+
 /*
  * Only interrupt autoboot if <space> is pressed. Otherwise, garbage
  * data on the serial line may interrupt the boot sequence.
@@ -127,6 +129,20 @@
 #define CONFIG_MMC			1
 #define CONFIG_ATMEL_MCI		1
 
+#if defined(CONFIG_LCD)
+#define CONFIG_CMD_BMP
+#define CONFIG_ATMEL_LCD		1
+#define LCD_BPP				LCD_COLOR16
+#define CONFIG_BMP_16BPP		1
+#define CONFIG_FB_ADDR			0x10600000
+#define CONFIG_WHITE_ON_BLACK		1
+#define CONFIG_VIDEO_BMP_GZIP 		1
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE		262144
+#define CONFIG_ATMEL_LCD_BGR555		1
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV	1
+#define CONFIG_SPLASH_SCREEN		1
+#endif
+
 #define CONFIG_SYS_DCACHE_LINESZ		32
 #define CONFIG_SYS_ICACHE_LINESZ		32
 

             reply	other threads:[~2009-07-21 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 10:35 Mark Jackson [this message]
2009-07-26 11:37 ` [U-Boot] [PATCH] Add LCD support to MIMC200 board Anatolij Gustschin

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=4A6599EA.40705@mimc.co.uk \
    --to=mpfj-list@mimc.co.uk \
    --cc=u-boot@lists.denx.de \
    /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