aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2/mach-pca100.c
diff options
context:
space:
mode:
authorLuotao Fu <l.fu@pengutronix.de>2010-06-18 03:23:18 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-07-26 08:18:25 -0400
commit42216fc59db7dada1d622dfed36e7e56b1b68b04 (patch)
tree6f26e61376f9331959b47ca552e3274c242215d5 /arch/arm/mach-mx2/mach-pca100.c
parent426ab49b3361474622e492cff949853584e3451f (diff)
pca100: add framebuffer device support and TFT
this one adds the frambuffer device and a TFT panel to the PhyCard-S (pca100) board. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx2/mach-pca100.c')
-rw-r--r--arch/arm/mach-mx2/mach-pca100.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index 7651d0ef4666..a94343663997 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -49,6 +49,7 @@
49#include <mach/mmc.h> 49#include <mach/mmc.h>
50#include <mach/mxc_ehci.h> 50#include <mach/mxc_ehci.h>
51#include <mach/ulpi.h> 51#include <mach/ulpi.h>
52#include <mach/imxfb.h>
52 53
53#include "devices.h" 54#include "devices.h"
54 55
@@ -131,6 +132,30 @@ static int pca100_pins[] = {
131 PD23_AF_USBH2_DATA2, 132 PD23_AF_USBH2_DATA2,
132 PD24_AF_USBH2_DATA1, 133 PD24_AF_USBH2_DATA1,
133 PD26_AF_USBH2_DATA5, 134 PD26_AF_USBH2_DATA5,
135 /* display */
136 PA5_PF_LSCLK,
137 PA6_PF_LD0,
138 PA7_PF_LD1,
139 PA8_PF_LD2,
140 PA9_PF_LD3,
141 PA10_PF_LD4,
142 PA11_PF_LD5,
143 PA12_PF_LD6,
144 PA13_PF_LD7,
145 PA14_PF_LD8,
146 PA15_PF_LD9,
147 PA16_PF_LD10,
148 PA17_PF_LD11,
149 PA18_PF_LD12,
150 PA19_PF_LD13,
151 PA20_PF_LD14,
152 PA21_PF_LD15,
153 PA22_PF_LD16,
154 PA23_PF_LD17,
155 PA26_PF_PS,
156 PA28_PF_HSYNC,
157 PA29_PF_VSYNC,
158 PA31_PF_OE_ACD,
134}; 159};
135 160
136static struct imxuart_platform_data uart_pdata = { 161static struct imxuart_platform_data uart_pdata = {
@@ -299,6 +324,45 @@ static int __init pca100_otg_mode(char *options)
299} 324}
300__setup("otg_mode=", pca100_otg_mode); 325__setup("otg_mode=", pca100_otg_mode);
301 326
327/* framebuffer info */
328static struct imx_fb_videomode pca100_fb_modes[] = {
329 {
330 .mode = {
331 .name = "EMERGING-ETV570G0DHU",
332 .refresh = 60,
333 .xres = 640,
334 .yres = 480,
335 .pixclock = 39722, /* in ps (25.175 MHz) */
336 .hsync_len = 30,
337 .left_margin = 114,
338 .right_margin = 16,
339 .vsync_len = 3,
340 .upper_margin = 32,
341 .lower_margin = 0,
342 },
343 /*
344 * TFT
345 * Pixel pol active high
346 * HSYNC active low
347 * VSYNC active low
348 * use HSYNC for ACD count
349 * line clock disable while idle
350 * always enable line clock even if no data
351 */
352 .pcr = 0xf0c08080,
353 .bpp = 16,
354 },
355};
356
357static struct imx_fb_platform_data pca100_fb_data = {
358 .mode = pca100_fb_modes,
359 .num_modes = ARRAY_SIZE(pca100_fb_modes),
360
361 .pwmr = 0x00A903FF,
362 .lscr1 = 0x00120300,
363 .dmacr = 0x00020010,
364};
365
302static void __init pca100_init(void) 366static void __init pca100_init(void)
303{ 367{
304 int ret; 368 int ret;
@@ -374,6 +438,8 @@ static void __init pca100_init(void)
374 mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); 438 mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
375 } 439 }
376 440
441 mxc_register_device(&mxc_fb_device, &pca100_fb_data);
442
377 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 443 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
378} 444}
379 445