summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/sama5d3xek
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-01-31 12:55:02 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-31 19:07:46 +0100
commit7e30422d72897f524194570544c65306e3a58279 (patch)
treea6c0fff77ed3635e7ed89d6d5b3bd9a28007513b /arch/arm/boards/sama5d3xek
parent3a934cedd25918c7882cfccdea5dac1660abd45c (diff)
downloadbarebox-7e30422d72897f524194570544c65306e3a58279.tar.gz
barebox-7e30422d72897f524194570544c65306e3a58279.tar.xz
sama5d3xek: add lcd support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/sama5d3xek')
-rw-r--r--arch/arm/boards/sama5d3xek/env/bin/init_board15
-rw-r--r--arch/arm/boards/sama5d3xek/init.c45
2 files changed, 60 insertions, 0 deletions
diff --git a/arch/arm/boards/sama5d3xek/env/bin/init_board b/arch/arm/boards/sama5d3xek/env/bin/init_board
new file mode 100644
index 0000000000..f3d417e356
--- /dev/null
+++ b/arch/arm/boards/sama5d3xek/env/bin/init_board
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+PATH=/env/bin
+export PATH
+
+. /env/config
+
+splash=/env/splash.png
+
+if [ -f ${splash} -a -e /dev/fb0 ]; then
+ splash -o ${splash}
+ fb0.enable=1
+fi
+
+exit 1
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index ae23a310f4..d58bf4434a 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -153,6 +153,50 @@ static void ek_add_device_eth(void)
static void ek_add_device_eth(void) {}
#endif
+#if defined(CONFIG_DRIVER_VIDEO_ATMEL_HLCD)
+/*
+ * LCD Controller
+ */
+static struct fb_videomode at91_tft_vga_modes[] = {
+ {
+ .name = "LG",
+ .refresh = 60,
+ .xres = 800, .yres = 480,
+ .pixclock = KHZ2PICOS(33260),
+
+ .left_margin = 88, .right_margin = 168,
+ .upper_margin = 8, .lower_margin = 37,
+ .hsync_len = 128, .vsync_len = 2,
+
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+ },
+};
+
+/* Default output mode is TFT 24 bit */
+#define BPP_OUT_DEFAULT_LCDCFG5 (LCDC_LCDCFG5_MODE_OUTPUT_24BPP)
+
+/* Driver datas */
+static struct atmel_lcdfb_platform_data ek_lcdc_data = {
+ .lcdcon_is_backlight = true,
+ .default_bpp = 16,
+ .default_dmacon = ATMEL_LCDC_DMAEN,
+ .default_lcdcon2 = BPP_OUT_DEFAULT_LCDCFG5,
+ .guard_time = 9,
+ .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
+ .mode_list = at91_tft_vga_modes,
+ .num_modes = ARRAY_SIZE(at91_tft_vga_modes),
+};
+
+static void ek_add_device_lcdc(void)
+{
+ at91_add_device_lcdc(&ek_lcdc_data);
+}
+
+#else
+static void ek_add_device_lcdc(void) {}
+#endif
+
#if defined(CONFIG_MCI_ATMEL)
/*
* MCI (SD/MMC)
@@ -333,6 +377,7 @@ static int at91sama5d3xek_devices_init(void)
ek_add_device_eth();
ek_add_device_spi();
ek_add_device_mci();
+ ek_add_device_lcdc();
armlinux_set_bootparams((void *)(SAMA5_DDRCS + 0x100));