aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-15 06:44:45 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:08 -0400
commit9db973a59b73fb5baf69f8b5d005daccec6d997e (patch)
treef2f93be36930511ec642104e3bb43f154c10bf1a /arch/arm/mach-mx2
parentc0b90a31efe30987ab4bb21298b410913779e62f (diff)
[ARM] pcm038: Add framebuffer support
Add framebuffer support for PCM038 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx2')
-rw-r--r--arch/arm/mach-mx2/pcm970-baseboard.c70
1 files changed, 69 insertions, 1 deletions
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c
index a560cd6ad23d..232e0416f15b 100644
--- a/arch/arm/mach-mx2/pcm970-baseboard.c
+++ b/arch/arm/mach-mx2/pcm970-baseboard.c
@@ -17,9 +17,76 @@
17 */ 17 */
18 18
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <mach/hardware.h> 20
21#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
22 22
23#include <mach/hardware.h>
24#include <mach/common.h>
25#include <mach/imxfb.h>
26#include <mach/iomux.h>
27
28#include "devices.h"
29
30static int mxc_fb_pins[] = {
31 PA5_PF_LSCLK, PA6_PF_LD0, PA7_PF_LD1, PA8_PF_LD2,
32 PA9_PF_LD3, PA10_PF_LD4, PA11_PF_LD5, PA12_PF_LD6,
33 PA13_PF_LD7, PA14_PF_LD8, PA15_PF_LD9, PA16_PF_LD10,
34 PA17_PF_LD11, PA18_PF_LD12, PA19_PF_LD13, PA20_PF_LD14,
35 PA21_PF_LD15, PA22_PF_LD16, PA23_PF_LD17, PA24_PF_REV,
36 PA25_PF_CLS, PA26_PF_PS, PA27_PF_SPL_SPR, PA28_PF_HSYNC,
37 PA29_PF_VSYNC, PA30_PF_CONTRAST, PA31_PF_OE_ACD
38};
39
40static int pcm038_fb_init(struct platform_device *pdev)
41{
42 return mxc_gpio_setup_multiple_pins(mxc_fb_pins,
43 ARRAY_SIZE(mxc_fb_pins), "FB");
44}
45
46static int pcm038_fb_exit(struct platform_device *pdev)
47{
48 mxc_gpio_release_multiple_pins(mxc_fb_pins, ARRAY_SIZE(mxc_fb_pins));
49
50 return 0;
51}
52
53/*
54 * Connected is a portrait Sharp-QVGA display
55 * of type: LQ035Q7DH06
56 */
57static struct imx_fb_platform_data pcm038_fb_data = {
58 .pixclock = 188679, /* in ps (5.3MHz) */
59 .xres = 240,
60 .yres = 320,
61
62 .bpp = 16,
63 .hsync_len = 7,
64 .left_margin = 5,
65 .right_margin = 16,
66
67 .vsync_len = 1,
68 .upper_margin = 7,
69 .lower_margin = 9,
70 .fixed_screen_cpu = 0,
71
72 /*
73 * - HSYNC active high
74 * - VSYNC active high
75 * - clk notenabled while idle
76 * - clock not inverted
77 * - data not inverted
78 * - data enable low active
79 * - enable sharp mode
80 */
81 .pcr = 0xFA0080C0,
82 .pwmr = 0x00A903FF,
83 .lscr1 = 0x00120300,
84 .dmacr = 0x00020010,
85
86 .init = pcm038_fb_init,
87 .exit = pcm038_fb_exit,
88};
89
23/* 90/*
24 * system init for baseboard usage. Will be called by pcm038 init. 91 * system init for baseboard usage. Will be called by pcm038 init.
25 * 92 *
@@ -28,4 +95,5 @@
28 */ 95 */
29void __init pcm970_baseboard_init(void) 96void __init pcm970_baseboard_init(void)
30{ 97{
98 mxc_register_device(&mxc_fb_device, &pcm038_fb_data);
31} 99}