mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: [PATCH 4/6] eukrea_cpuimx27: add fb support
Date: Tue, 25 May 2010 10:37:35 +0200	[thread overview]
Message-ID: <1274776657-6117-4-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1274776657-6117-3-git-send-email-eric@eukrea.com>

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 board/eukrea_cpuimx27/eukrea_cpuimx27.c |   67 ++++++++++++++++++++++++++++++-
 1 files changed, 66 insertions(+), 1 deletions(-)

diff --git a/board/eukrea_cpuimx27/eukrea_cpuimx27.c b/board/eukrea_cpuimx27/eukrea_cpuimx27.c
index ef57a96..e40c260 100644
--- a/board/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/board/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -40,6 +40,7 @@
 #include <asm/io.h>
 #include <mach/imx-nand.h>
 #include <mach/imx-pll.h>
+#include <mach/imxfb.h>
 #include <ns16550.h>
 #include <asm/mmu.h>
 #include <i2c/i2c.h>
@@ -176,6 +177,39 @@ static void eukrea_cpuimx27_mmu_init(void)
 }
 #endif
 
+#ifdef CONFIG_DRIVER_VIDEO_IMX
+static struct imx_fb_videomode imxfb_mode = {
+	.mode = {
+		.name		= "CMO-QVGA",
+		.refresh	= 60,
+		.xres		= 320,
+		.yres		= 240,
+		.pixclock	= 156000,
+		.hsync_len	= 30,
+		.left_margin	= 38,
+		.right_margin	= 20,
+		.vsync_len	= 3,
+		.upper_margin	= 15,
+		.lower_margin	= 4,
+	},
+	.pcr		= 0xFAD08B80,
+	.bpp		= 16,};
+
+static struct imx_fb_platform_data eukrea_cpuimx27_fb_data = {
+	.mode	= &imxfb_mode,
+	.pwmr	= 0x00A903FF,
+	.lscr1	= 0x00120300,
+	.dmacr	= 0x00020010,
+};
+
+static struct device_d imxfb_dev = {
+	.name		= "imxfb",
+	.map_base	= 0x10021000,
+	.size		= 0x1000,
+	.platform_data	= &eukrea_cpuimx27_fb_data,
+};
+#endif
+
 static int eukrea_cpuimx27_devices_init(void)
 {
 	char *envdev = "no";
@@ -208,6 +242,31 @@ static int eukrea_cpuimx27_devices_init(void)
 		PE14_PF_UART1_CTS,
 		PE15_PF_UART1_RTS,
 #endif
+#ifdef CONFIG_DRIVER_VIDEO_IMX
+		PA5_PF_LSCLK,
+		PA6_PF_LD0,
+		PA7_PF_LD1,
+		PA8_PF_LD2,
+		PA9_PF_LD3,
+		PA10_PF_LD4,
+		PA11_PF_LD5,
+		PA12_PF_LD6,
+		PA13_PF_LD7,
+		PA14_PF_LD8,
+		PA15_PF_LD9,
+		PA16_PF_LD10,
+		PA17_PF_LD11,
+		PA18_PF_LD12,
+		PA19_PF_LD13,
+		PA20_PF_LD14,
+		PA21_PF_LD15,
+		PA22_PF_LD16,
+		PA23_PF_LD17,
+		PA28_PF_HSYNC,
+		PA29_PF_VSYNC,
+		PA31_PF_OE_ACD,
+		GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT,
+#endif
 	};
 
 	eukrea_cpuimx27_mmu_init();
@@ -217,7 +276,7 @@ static int eukrea_cpuimx27_devices_init(void)
 	CS0L = 0xA0330D01;
 	CS0A = 0x002208C0;
 
-	/* initizalize gpios */
+	/* initialize gpios */
 	for (i = 0; i < ARRAY_SIZE(mode); i++)
 		imx_gpio_mode(mode[i]);
 
@@ -239,6 +298,12 @@ static int eukrea_cpuimx27_devices_init(void)
 
 	printf("Using environment in %s Flash\n", envdev);
 
+#ifdef CONFIG_DRIVER_VIDEO_IMX
+	register_device(&imxfb_dev);
+	gpio_direction_output(GPIO_PORTE | 5, 0);
+	gpio_set_value(GPIO_PORTE | 5, 1);
+#endif
+
 	armlinux_add_dram(&sdram_dev);
 	armlinux_set_bootparams((void *)0xa0000100);
 	armlinux_set_architecture(MACH_TYPE_CPUIMX27);
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-05-25  8:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  8:37 [PATCH 1/6] i2c-imx: change log level for No ACK Eric Bénard
2010-05-25  8:37 ` [PATCH v2 2/6] i2c: implement i2c_get_adapter() Eric Bénard
2010-05-25  8:37   ` [PATCH v4 3/6] commands: add i2c commands Eric Bénard
2010-05-25  8:37     ` Eric Bénard [this message]
2010-05-25  8:37       ` [PATCH 5/6] eukrea_cpuimx27: update env Eric Bénard
2010-05-25  8:37         ` [PATCH 6/6] eukrea_cpuimx27: update defconfig Eric Bénard
2010-05-25  9:02     ` [PATCH v4 3/6] commands: add i2c commands Marc Kleine-Budde
2010-05-25  9:17       ` Eric Bénard
2010-05-25  9:32         ` Marc Kleine-Budde
2010-05-25  9:43           ` Eric Bénard
2010-05-25  9:47             ` Marc Kleine-Budde
2010-05-25  9:57               ` Eric Bénard
2010-05-25  9:25       ` [PATCH v5] " Eric Bénard
2010-05-25 10:01 [PATCH 1/6] i2c-imx: change log level for No ACK Eric Bénard
2010-05-25 10:01 ` [PATCH v2 2/6] i2c: implement i2c_get_adapter() Eric Bénard
2010-05-25 10:01   ` [PATCH v6 3/6] commands: add i2c commands Eric Bénard
2010-05-25 10:01     ` [PATCH 4/6] eukrea_cpuimx27: add fb support Eric Bénard

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=1274776657-6117-4-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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