summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.21/pxafb-definition.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-08-21 16:36:38 +0000
committerKoen Kooi <koen@openembedded.org>2007-08-21 16:36:38 +0000
commitea6d83f002e29a33dfb8c5ff07bfd1f5312893a0 (patch)
tree366808c4a94ac279260e8fe301acddd4fe04f078 /packages/linux/linux-2.6.21/pxafb-definition.patch
parent3786a532d9a55b93434bef6d8e20f26f45e30140 (diff)
linux 2.6.21: add gumstix support
Diffstat (limited to 'packages/linux/linux-2.6.21/pxafb-definition.patch')
-rw-r--r--packages/linux/linux-2.6.21/pxafb-definition.patch183
1 files changed, 183 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.21/pxafb-definition.patch b/packages/linux/linux-2.6.21/pxafb-definition.patch
new file mode 100644
index 0000000000..100fccb65b
--- /dev/null
+++ b/packages/linux/linux-2.6.21/pxafb-definition.patch
@@ -0,0 +1,183 @@
+Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+===================================================================
+--- linux-2.6.21gum.orig/arch/arm/mach-pxa/gumstix.c
++++ linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+@@ -25,6 +25,7 @@
+ #include <asm/arch/udc.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxafb.h>
+ #include <asm/arch/gumstix.h>
+
+ #include "generic.h"
+@@ -86,6 +87,95 @@ static struct platform_device gum_audio_
+ .id = -1,
+ };
+
++#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR
++static struct pxafb_mode_info gumstix_fb_mode = {
++ .pixclock = 300000,
++ .xres = 240,
++ .yres = 320,
++ .bpp = 16,
++ .hsync_len = 2,
++ .left_margin = 1,
++ .right_margin = 1,
++ .vsync_len = 3,
++ .upper_margin = 0,
++ .lower_margin = 0,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++};
++
++static struct pxafb_mach_info gumstix_fb_info = {
++ .modes = &gumstix_fb_mode,
++ .num_modes = 1,
++ .lccr0 = LCCR0_Pas | LCCR0_Sngl | LCCR0_Color,
++ .lccr3 = 0,
++};
++#elif defined(CONFIG_FB_PXA_SHARP_LQ043_PSP)
++static struct pxafb_mode_info gumstix_fb_mode = {
++ .pixclock = 110000,
++ .xres = 480,
++ .yres = 272,
++ .bpp = 16,
++ .hsync_len = 41,
++ .left_margin = 2,
++ .right_margin = 2,
++ .vsync_len = 10,
++ .upper_margin = 2,
++ .lower_margin = 2,
++ .sync = 0, // Hsync and Vsync both active low
++};
++
++static void gumstix_lcd_backlight(int on_or_off)
++{
++ pxa_gpio_mode(17 | GPIO_OUT);
++ if(on_or_off)
++ {
++ GPSR(17) = GPIO_bit(17);
++ } else {
++ GPCR(17) = GPIO_bit(17);
++ }
++}
++
++static struct pxafb_mach_info gumstix_fb_info = {
++ .modes = &gumstix_fb_mode,
++ .num_modes = 1,
++ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
++ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
++ .pxafb_backlight_power = &gumstix_lcd_backlight,
++};
++#elif defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
++static struct pxafb_mode_info gumstix_fb_mode = {
++ .pixclock = 108696, // 9.2MHz typical DOTCLK from datasheet
++ .xres = 480,
++ .hsync_len = 41, // HLW from datasheet: 41 typ
++ .left_margin = 4, // HBP - HLW from datasheet: 45 - 41 = 4
++ .right_margin = 8, // HFP from datasheet: 8 typ
++ .yres = 272,
++ .vsync_len = 10, // VLW from datasheet: 10 typ
++ .upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2
++ .lower_margin = 4, // VFP from datasheet: 4 typ
++ .bpp = 16,
++ .sync = 0, // Hsync and Vsync both active low
++};
++
++static void gumstix_lcd_backlight(int on_or_off)
++{
++ pxa_gpio_mode(17 | GPIO_OUT);
++ if(on_or_off)
++ {
++ GPSR(17) = GPIO_bit(17);
++ } else {
++ GPCR(17) = GPIO_bit(17);
++ }
++}
++
++static struct pxafb_mach_info gumstix_fb_info = {
++ .modes = &gumstix_fb_mode,
++ .num_modes = 1,
++ .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
++ .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | (3 << 30),
++ .pxafb_backlight_power = &gumstix_lcd_backlight,
++};
++#endif
++
+ static struct platform_device *devices[] __initdata = {
+ &gum_audio_device,
+ };
+@@ -94,6 +184,9 @@ static void __init gumstix_init(void)
+ {
+ pxa_set_mci_info(&gumstix_mci_platform_data);
+ pxa_set_udc_info(&gumstix_udc_info);
++#if defined(CONFIG_FB_PXA_ALPS_CDOLLAR) | defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) | defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
++ set_pxa_fb_info(&gumstix_fb_info);
++#endif
+ (void) platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+
+Index: linux-2.6.21gum/drivers/video/Kconfig
+===================================================================
+--- linux-2.6.21gum.orig/drivers/video/Kconfig
++++ linux-2.6.21gum/drivers/video/Kconfig
+@@ -1495,6 +1495,34 @@ config FB_PXA
+
+ If unsure, say N.
+
++choice
++ depends on FB_PXA
++ prompt "LCD Panel"
++ default FB_PXA_SAMSUNG_LTE430WQ_F0C
++
++config FB_PXA_ALPS_CDOLLAR
++ boolean "Chris Dollar's ALPS screen"
++ ---help---
++ Enable definitions (over-ridable on the kernel command line if
++ "PXA LCD command line parameters" is also selected) for an ALPS
++ screen which Chris Dollar uses
++
++config FB_PXA_SHARP_LQ043_PSP
++ boolean "SHARP LQ043... series"
++ ---help---
++ Enable definitions (over-ridable on the kernel command line if
++ "PXA LCD command line parameters" is also selected) for a SHARP
++ LQ043... screen, such as the one used by the PSP. These screens are
++ the ones normally sold by gumstix with its boards.
++
++config FB_PXA_SAMSUNG_LTE430WQ_F0C
++ boolean "Samsung LTE430WQ-F0C (standard gumstix LCD)"
++ ---help---
++ Enable definitions for a Samsung LTE430WQ-F0C LCD panel, such as the ones resold
++ by gumstix for use with their "LCD-Ready" boards.
++
++endchoice
++
+ config FB_PXA_PARAMETERS
+ bool "PXA LCD command line parameters"
+ default n
+Index: linux-2.6.21gum/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.21gum.orig/drivers/video/pxafb.c
++++ linux-2.6.21gum/drivers/video/pxafb.c
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include <linux/autoconf.h>
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+ #include <linux/kernel.h>
+@@ -789,7 +790,13 @@ static void pxafb_setup_gpio(struct pxaf
+ pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
+ pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
+ pxa_gpio_mode(GPIO76_LCD_PCLK_MD);
++#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP
++ /* DISP must be always high while screen is on */
++ pxa_gpio_mode(GPIO77_LCD_ACBIAS | GPIO_OUT);
++ GPSR(GPIO77_LCD_ACBIAS) = GPIO_bit(GPIO77_LCD_ACBIAS);
++#else
+ pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD);
++#endif
+ }
+
+ static void pxafb_enable_controller(struct pxafb_info *fbi)