1 --- a/arch/arm/mach-pxa/gumstix.c
2 +++ b/arch/arm/mach-pxa/gumstix.c
4 #include <asm/arch/udc.h>
5 #include <asm/arch/mmc.h>
6 #include <asm/arch/pxa-regs.h>
7 +#include <asm/arch/pxafb.h>
8 #include <asm/arch/gumstix.h>
11 @@ -90,6 +91,89 @@ static struct platform_device gum_audio_
16 +#if defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
17 +static void gumstix_lcd_backlight(int on_or_off)
21 + pxa_gpio_mode(17 | GPIO_IN);
23 + GPCR(17) = GPIO_bit(17);
24 + pxa_gpio_mode(17 | GPIO_OUT);
25 + GPCR(17) = GPIO_bit(17);
31 +#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR
32 +static struct pxafb_mode_info gumstix_fb_mode = {
43 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
46 +static struct pxafb_mach_info gumstix_fb_info = {
47 + .modes = &gumstix_fb_mode,
49 + .lccr0 = LCCR0_Pas | LCCR0_Sngl | LCCR0_Color,
52 +#elif defined(CONFIG_FB_PXA_SHARP_LQ043_PSP)
53 +static struct pxafb_mode_info gumstix_fb_mode = {
64 + .sync = 0, // Hsync and Vsync both active low
67 +static struct pxafb_mach_info gumstix_fb_info = {
68 + .modes = &gumstix_fb_mode,
70 + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
71 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
72 + .pxafb_backlight_power = &gumstix_lcd_backlight,
74 +#elif defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
75 +static struct pxafb_mode_info gumstix_fb_mode = {
76 + .pixclock = 108696, // 9.2MHz typical DOTCLK from datasheet
78 + .hsync_len = 41, // HLW from datasheet: 41 typ
79 + .left_margin = 4, // HBP - HLW from datasheet: 45 - 41 = 4
80 + .right_margin = 8, // HFP from datasheet: 8 typ
82 + .vsync_len = 10, // VLW from datasheet: 10 typ
83 + .upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2
84 + .lower_margin = 4, // VFP from datasheet: 4 typ
86 + .sync = 0, // Hsync and Vsync both active low
89 +static struct pxafb_mach_info gumstix_fb_info = {
90 + .modes = &gumstix_fb_mode,
92 + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
93 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
94 + .pxafb_backlight_power = &gumstix_lcd_backlight,
98 static struct platform_device *devices[] __initdata = {
101 @@ -98,6 +182,9 @@ static void __init gumstix_init(void)
103 pxa_set_mci_info(&gumstix_mci_platform_data);
104 pxa_set_udc_info(&gumstix_udc_info);
105 +#if defined(CONFIG_FB_PXA_ALPS_CDOLLAR) | defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) | defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
106 + set_pxa_fb_info(&gumstix_fb_info);
108 (void) platform_add_devices(devices, ARRAY_SIZE(devices));
111 --- a/drivers/video/Kconfig
112 +++ b/drivers/video/Kconfig
113 @@ -1495,6 +1495,37 @@ config FB_PXA
120 + default FB_PXA_SAMSUNG_LTE430WQ_F0C
122 +config FB_PXA_ALPS_CDOLLAR
123 + boolean "Chris Dollar's ALPS screen"
125 + Enable definitions (over-ridable on the kernel command line if
126 + "PXA LCD command line parameters" is also selected) for an ALPS
127 + screen which Chris Dollar uses
129 +config FB_PXA_SHARP_LQ043_PSP
130 + boolean "SHARP LQ043... series"
132 + Enable definitions (over-ridable on the kernel command line if
133 + "PXA LCD command line parameters" is also selected) for a SHARP
134 + LQ043... screen, such as the one used by the PSP. These screens are
135 + the ones normally sold by gumstix with its boards.
137 +config FB_PXA_SAMSUNG_LTE430WQ_F0C
138 + boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)"
140 + Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold
141 + by gumstix for use with their "LCD-Ready" boards.
143 +config FB_PXA_NONEOFTHEABOVE
144 + boolean "None of the above"
148 config FB_PXA_PARAMETERS
149 bool "PXA LCD command line parameters"
151 --- a/drivers/video/pxafb.c
152 +++ b/drivers/video/pxafb.c
157 +#include <linux/autoconf.h>
158 #include <linux/module.h>
159 #include <linux/moduleparam.h>
160 #include <linux/kernel.h>
161 @@ -789,7 +790,13 @@ static void pxafb_setup_gpio(struct pxaf
162 pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
163 pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
164 pxa_gpio_mode(GPIO76_LCD_PCLK_MD);
165 +#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP
166 + /* DISP must be always high while screen is on */
167 + pxa_gpio_mode(GPIO77_LCD_ACBIAS | GPIO_OUT);
168 + GPSR(GPIO77_LCD_ACBIAS) = GPIO_bit(GPIO77_LCD_ACBIAS);
170 pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD);
174 static void pxafb_enable_controller(struct pxafb_info *fbi)