aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/colibri-pxa3xx.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-03-22 21:04:19 -0400
committerEric Miao <eric.miao@marvell.com>2009-03-22 21:59:55 -0400
commit91fcfb908d62038c3c2cdecb7fb8aa2c98cb70a2 (patch)
treedf6bae91c0dfac50540532ab4ffc495a3378c83b /arch/arm/mach-pxa/colibri-pxa3xx.c
parentbac07ecd6c9b16656aced6dc4f9f070120153046 (diff)
[ARM] pxa: Add Colibri LCD functions
This adds LCD functions for Colibri PXA300 and Colibri PXA320 and configures a LQ043T3DX02 panel. Original-code-by: Matthias Meier <matthias.j.meier@gmx.net> Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/colibri-pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/colibri-pxa3xx.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index cbaa8424fc86..12d0afc54aa5 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -23,6 +23,7 @@
23#include <mach/mfp-pxa300.h> 23#include <mach/mfp-pxa300.h>
24#include <mach/colibri.h> 24#include <mach/colibri.h>
25#include <mach/mmc.h> 25#include <mach/mmc.h>
26#include <mach/pxafb.h>
26 27
27#include "generic.h" 28#include "generic.h"
28#include "devices.h" 29#include "devices.h"
@@ -73,3 +74,48 @@ void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
73} 74}
74#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */ 75#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */
75 76
77#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
78static int lcd_bl_pin;
79
80/*
81 * LCD panel (Sharp LQ043T3DX02)
82 */
83static void colibri_lcd_backlight(int on)
84{
85 gpio_set_value(lcd_bl_pin, !!on);
86}
87
88static struct pxafb_mode_info sharp_lq43_mode = {
89 .pixclock = 101936,
90 .xres = 480,
91 .yres = 272,
92 .bpp = 32,
93 .depth = 18,
94 .hsync_len = 41,
95 .left_margin = 2,
96 .right_margin = 2,
97 .vsync_len = 10,
98 .upper_margin = 2,
99 .lower_margin = 2,
100 .sync = 0,
101 .cmap_greyscale = 0,
102};
103
104static struct pxafb_mach_info sharp_lq43_info = {
105 .modes = &sharp_lq43_mode,
106 .num_modes = 1,
107 .cmap_inverse = 0,
108 .cmap_static = 0,
109 .lcd_conn = LCD_COLOR_TFT_18BPP,
110 .pxafb_backlight_power = colibri_lcd_backlight,
111};
112
113void __init colibri_pxa3xx_init_lcd(int bl_pin)
114{
115 lcd_bl_pin = bl_pin;
116 gpio_request(bl_pin, "lcd backlight");
117 gpio_direction_output(bl_pin, 0);
118 set_pxa_fb_info(&sharp_lq43_info);
119}
120#endif
121