1 Index: linux-2.6.21.7/arch/arm/mach-pxa/gumstix.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/mach-pxa/gumstix.c
4 +++ linux-2.6.21.7/arch/arm/mach-pxa/gumstix.c
6 #include <asm/arch/udc.h>
7 #include <asm/arch/mmc.h>
8 #include <asm/arch/pxa-regs.h>
9 +#include <asm/arch/pxafb.h>
10 #include <asm/arch/gumstix.h>
13 @@ -90,6 +91,89 @@ static struct platform_device gum_audio_
18 +#if defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
19 +static void gumstix_lcd_backlight(int on_or_off)
23 + pxa_gpio_mode(17 | GPIO_IN);
25 + GPCR(17) = GPIO_bit(17);
26 + pxa_gpio_mode(17 | GPIO_OUT);
27 + GPCR(17) = GPIO_bit(17);
33 +#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR
34 +static struct pxafb_mode_info gumstix_fb_mode = {
45 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
48 +static struct pxafb_mach_info gumstix_fb_info = {
49 + .modes = &gumstix_fb_mode,
51 + .lccr0 = LCCR0_Pas | LCCR0_Sngl | LCCR0_Color,
54 +#elif defined(CONFIG_FB_PXA_SHARP_LQ043_PSP)
55 +static struct pxafb_mode_info gumstix_fb_mode = {
66 + .sync = 0, // Hsync and Vsync both active low
69 +static struct pxafb_mach_info gumstix_fb_info = {
70 + .modes = &gumstix_fb_mode,
72 + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
73 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
74 + .pxafb_backlight_power = &gumstix_lcd_backlight,
76 +#elif defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
77 +static struct pxafb_mode_info gumstix_fb_mode = {
78 + .pixclock = 108696, // 9.2MHz typical DOTCLK from datasheet
80 + .hsync_len = 41, // HLW from datasheet: 41 typ
81 + .left_margin = 4, // HBP - HLW from datasheet: 45 - 41 = 4
82 + .right_margin = 8, // HFP from datasheet: 8 typ
84 + .vsync_len = 10, // VLW from datasheet: 10 typ
85 + .upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2
86 + .lower_margin = 4, // VFP from datasheet: 4 typ
88 + .sync = 0, // Hsync and Vsync both active low
91 +static struct pxafb_mach_info gumstix_fb_info = {
92 + .modes = &gumstix_fb_mode,
94 + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
95 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
96 + .pxafb_backlight_power = &gumstix_lcd_backlight,
100 static struct platform_device *devices[] __initdata = {
103 @@ -98,6 +182,9 @@ static void __init gumstix_init(void)
105 pxa_set_mci_info(&gumstix_mci_platform_data);
106 pxa_set_udc_info(&gumstix_udc_info);
107 +#if defined(CONFIG_FB_PXA_ALPS_CDOLLAR) | defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) | defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
108 + set_pxa_fb_info(&gumstix_fb_info);
110 (void) platform_add_devices(devices, ARRAY_SIZE(devices));
113 Index: linux-2.6.21.7/drivers/video/Kconfig
114 ===================================================================
115 --- linux-2.6.21.7.orig/drivers/video/Kconfig
116 +++ linux-2.6.21.7/drivers/video/Kconfig
117 @@ -1495,6 +1495,37 @@ config FB_PXA
124 + default FB_PXA_SAMSUNG_LTE430WQ_F0C
126 +config FB_PXA_ALPS_CDOLLAR
127 + boolean "Chris Dollar's ALPS screen"
129 + Enable definitions (over-ridable on the kernel command line if
130 + "PXA LCD command line parameters" is also selected) for an ALPS
131 + screen which Chris Dollar uses
133 +config FB_PXA_SHARP_LQ043_PSP
134 + boolean "SHARP LQ043... series"
136 + Enable definitions (over-ridable on the kernel command line if
137 + "PXA LCD command line parameters" is also selected) for a SHARP
138 + LQ043... screen, such as the one used by the PSP. These screens are
139 + the ones normally sold by gumstix with its boards.
141 +config FB_PXA_SAMSUNG_LTE430WQ_F0C
142 + boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)"
144 + Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold
145 + by gumstix for use with their "LCD-Ready" boards.
147 +config FB_PXA_NONEOFTHEABOVE
148 + boolean "None of the above"
152 config FB_PXA_PARAMETERS
153 bool "PXA LCD command line parameters"
155 Index: linux-2.6.21.7/drivers/video/pxafb.c
156 ===================================================================
157 --- linux-2.6.21.7.orig/drivers/video/pxafb.c
158 +++ linux-2.6.21.7/drivers/video/pxafb.c
163 +#include <linux/autoconf.h>
164 #include <linux/module.h>
165 #include <linux/moduleparam.h>
166 #include <linux/kernel.h>
167 @@ -789,7 +790,13 @@ static void pxafb_setup_gpio(struct pxaf
168 pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
169 pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
170 pxa_gpio_mode(GPIO76_LCD_PCLK_MD);
171 +#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP
172 + /* DISP must be always high while screen is on */
173 + pxa_gpio_mode(GPIO77_LCD_ACBIAS | GPIO_OUT);
174 + GPSR(GPIO77_LCD_ACBIAS) = GPIO_bit(GPIO77_LCD_ACBIAS);
176 pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD);
180 static void pxafb_enable_controller(struct pxafb_info *fbi)