From: "Eric Bénard" <eric@eukrea.com>
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: [PATCH 4/4] eukrea_cpuimx27: add fb support
Date: Mon, 24 May 2010 15:46:08 +0200 [thread overview]
Message-ID: <1274708768-20607-4-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1274708768-20607-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
next prev parent reply other threads:[~2010-05-24 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 13:46 [PATCH 1/4] i2c-imx: change log level for No ACK Eric Bénard
2010-05-24 13:46 ` [PATCH 2/4] i2c: implement i2c_get_adapter() Eric Bénard
2010-05-24 13:46 ` [PATCH 3/4] commands: add i2c commands Eric Bénard
2010-05-24 13:46 ` Eric Bénard [this message]
2010-05-24 22:12 ` Marc Kleine-Budde
2010-05-25 6:45 ` Sascha Hauer
2010-05-25 7:03 ` Sascha Hauer
2010-05-24 22:01 ` [PATCH 2/4] i2c: implement i2c_get_adapter() Marc Kleine-Budde
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=1274708768-20607-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