[Armadeus-commitlog] SF.net SVN: armadeus: [751] trunk/buildroot/target/device/armadeus/linux/ kern
Brought to you by:
sszy
|
From: <th...@us...> - 2008-01-17 09:37:11
|
Revision: 751
http://armadeus.svn.sourceforge.net/armadeus/?rev=751&view=rev
Author: thom25
Date: 2008-01-17 01:37:02 -0800 (Thu, 17 Jan 2008)
Log Message:
-----------
[LINUX] add sharp LQ043 TFT
[LINUX] cleanup apf9328_lcd_config.h
[LINUX] merge of different patches related to the imxfb/TFT
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/013-linux-2.6.23.1-framebuff.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/023-linux-2.6.23.1-fblcd-kconfig.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/013-linux-2.6.23.1-framebuff.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/013-linux-2.6.23.1-framebuff.diff 2007-12-28 18:56:18 UTC (rev 750)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/013-linux-2.6.23.1-framebuff.diff 2008-01-17 09:37:02 UTC (rev 751)
@@ -1,6 +1,172 @@
--- linux-2.6.23/drivers/video/imxfb.c 2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.23-imx/drivers/video/imxfb.c 2006-10-01 14:22:39.000000000 +0200
-@@ -392,7 +392,26 @@
+18:43:44.000000000 +0200
++++ imxfb.c 2008-01-15 01:50:45.000000000 +0100
+@@ -42,22 +42,48 @@
+ */
+ #define DEBUG_VAR 1
+
+-#include "imxfb.h"
++struct imxfb_info {
++ struct device *dev;
+
+-static struct imxfb_rgb def_rgb_16 = {
+- .red = { .offset = 8, .length = 4, },
+- .green = { .offset = 4, .length = 4, },
+- .blue = { .offset = 0, .length = 4, },
+- .transp = { .offset = 0, .length = 0, },
+-};
++ u_int max_bpp;
++ u_int max_xres;
++ u_int max_yres;
++
++ /*
++ * These are the addresses we mapped
++ * the framebuffer memory region to.
++ */
++ dma_addr_t map_dma;
++ u_char * map_cpu;
++ u_int map_size;
++
++ u_char * screen_cpu;
++ dma_addr_t screen_dma;
++ u_int palette_size;
++
++ dma_addr_t dbar1;
++ dma_addr_t dbar2;
++
++ u_int pcr;
++ u_int pwmr;
++ u_int lscr1;
++ u_int dmacr;
++ u_int cmap_inverse:1,
++ cmap_static:1,
++ unused:30;
+
+-static struct imxfb_rgb def_rgb_8 = {
+- .red = { .offset = 0, .length = 8, },
+- .green = { .offset = 0, .length = 8, },
+- .blue = { .offset = 0, .length = 8, },
+- .transp = { .offset = 0, .length = 0, },
++ void (*lcd_power)(int);
++ void (*backlight_power)(int);
+ };
+
++#define IMX_NAME "IMX"
++
++/*
++ * Minimum X and Y resolutions
++ */
++#define MIN_XRES 64
++#define MIN_YRES 64
++
+ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info);
+
+ static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
+@@ -152,7 +178,6 @@ static int
+ imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ {
+ struct imxfb_info *fbi = info->par;
+- int rgbidx;
+
+ if (var->xres < MIN_XRES)
+ var->xres = MIN_XRES;
+@@ -165,27 +190,39 @@ imxfb_check_var(struct fb_var_screeninfo
+ var->xres_virtual = max(var->xres_virtual, var->xres);
+ var->yres_virtual = max(var->yres_virtual, var->yres);
+
++ memset(&var->transp, 0, sizeof(var->transp));
++
+ pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel);
+ switch (var->bits_per_pixel) {
+- case 16:
+- rgbidx = RGB_16;
+- break;
+ case 8:
+- rgbidx = RGB_8;
++ var->red.length = var->bits_per_pixel;
++ var->red.offset = 0;
++ var->green.length = var->bits_per_pixel;
++ var->green.offset = 0;
++ var->blue.length = var->bits_per_pixel;
++ var->blue.offset = 0;
++ break;
++ case 16:
++ if (fbi->pcr & PCR_TFT) {
++ var->red.length = 5;
++ var->red.offset = 11;
++ var->green.length = 6;
++ var->green.offset = 5;
++ var->blue.length = 5;
++ var->blue.offset = 0;
++ } else {
++ var->red.length = 4;
++ var->red.offset = 8;
++ var->green.length = 4;
++ var->green.offset = 4;
++ var->blue.length = 4;
++ var->blue.offset = 0;
++ }
+ break;
+ default:
+- rgbidx = RGB_16;
++ return -EINVAL;
+ }
+
+- /*
+- * Copy the RGB parameters for this display
+- * from the machine specific parameters.
+- */
+- var->red = fbi->rgb[rgbidx]->red;
+- var->green = fbi->rgb[rgbidx]->green;
+- var->blue = fbi->rgb[rgbidx]->blue;
+- var->transp = fbi->rgb[rgbidx]->transp;
+-
+ pr_debug("RGBT length = %d:%d:%d:%d\n",
+ var->red.length, var->green.length, var->blue.length,
+ var->transp.length);
+@@ -248,10 +285,11 @@ static void imxfb_enable_controller(stru
+
+ LCDC_RMCR = RMCR_LCDC_EN;
+
+- if(fbi->backlight_power)
+- fbi->backlight_power(1);
+ if(fbi->lcd_power)
+ fbi->lcd_power(1);
++ /* enable backlight after LCD */
++ if(fbi->backlight_power)
++ fbi->backlight_power(1);
+ }
+
+ static void imxfb_disable_controller(struct imxfb_info *fbi)
+@@ -312,6 +350,7 @@ static int imxfb_activate_var(struct fb_
+ pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
+ var->yres, var->vsync_len,
+ var->upper_margin, var->lower_margin);
++ pr_debug("var: bpp=%d\n", var->bits_per_pixel);
+
+ #if DEBUG_VAR
+ if (var->xres < 16 || var->xres > 1024)
+@@ -349,7 +388,17 @@ static int imxfb_activate_var(struct fb_
+ VCR_V_WAIT_2(var->lower_margin);
+
+ LCDC_SIZE = SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres);
+- LCDC_PCR = fbi->pcr;
++ // On TFT LCD i.MXL can support 16, 12, 8, 4bpp with the same hardware interface (12 to 16 bits)
++ // So if userspace app wants a 8bpp screen switch to 8bpp (can save ressources, with SDL for ex)
++ if( (var->bits_per_pixel == 8) && (fbi->pcr & PCR_TFT) )
++ {
++ pr_debug("Switching imxfb to 8bpp\n");
++ LCDC_PCR = (fbi->pcr & (~PCR_BPIX_MASK)) | PCR_BPIX_8 | PCR_END_BYTE_SWAP;
++ }
++ else
++ LCDC_PCR = fbi->pcr;
++
++ LCDC_VPW = VPW_VPW(var->xres * var->bits_per_pixel / 8 / 4);
+ LCDC_PWMR = fbi->pwmr;
+ LCDC_LSCR1 = fbi->lscr1;
+ LCDC_DMACR = fbi->dmacr;
+@@ -391,7 +440,26 @@ static void imxfb_setup_gpio(struct imxf
case 1:
imx_gpio_mode(PD15_PF_LD0);
}
@@ -9,7 +175,7 @@
+ imx_gpio_mode(PD6_PF_LSCLK);
+ imx_gpio_mode(PD14_PF_FLM_VSYNC);
+ imx_gpio_mode(PD13_PF_LP_HSYNC);
-+ imx_gpio_mode(PD12_PF_ACD_OE);
++// imx_gpio_mode(PD12_PF_ACD_OE);
+ /* if != 0 */
+ if( fbi->pwmr ) {
@@ -26,8 +192,8 @@
+#else
/* initialize GPIOs */
imx_gpio_mode(PD6_PF_LSCLK);
- imx_gpio_mode(PD10_PF_SPL_SPR);
-@@ -414,6 +433,7 @@ A VALIDER !!! --->>>
+ imx_gpio_mode(PD11_PF_CONTRAST);
+@@ -406,6 +474,7 @@ static void imxfb_setup_gpio(struct imxf
imx_gpio_mode(PD9_PF_PS);
imx_gpio_mode(PD10_PF_SPL_SPR);
}
@@ -35,6 +201,104 @@
}
#ifdef CONFIG_PM
+@@ -469,9 +538,6 @@ static int __init imxfb_init_fbinfo(stru
+ info->fbops = &imxfb_ops;
+ info->flags = FBINFO_FLAG_DEFAULT;
+
+- fbi->rgb[RGB_16] = &def_rgb_16;
+- fbi->rgb[RGB_8] = &def_rgb_8;
+-
+ fbi->max_xres = inf->xres;
+ info->var.xres = inf->xres;
+ info->var.xres_virtual = inf->xres;
+Index: drivers/video/imxfb.h
+===================================================================
+--- a/drivers/video/imxfb.h
++++ b//dev/null
+@@ -1,73 +0,0 @@
+-/*
+- * linux/drivers/video/imxfb.h
+- *
+- * Freescale i.MX Frame Buffer device driver
+- *
+- * Copyright (C) 2004 S.Hauer, Pengutronix
+- *
+- * Copyright (C) 1999 Eric A. Thomas
+- * Based on acornfb.c Copyright (C) Russell King.
+- *
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file COPYING in the main directory of this archive
+- * for more details.
+- */
+-
+-/*
+- * These are the bitfields for each
+- * display depth that we support.
+- */
+-struct imxfb_rgb {
+- struct fb_bitfield red;
+- struct fb_bitfield green;
+- struct fb_bitfield blue;
+- struct fb_bitfield transp;
+-};
+-
+-#define RGB_16 (0)
+-#define RGB_8 (1)
+-#define NR_RGB 2
+-
+-struct imxfb_info {
+- struct device *dev;
+- struct imxfb_rgb *rgb[NR_RGB];
+-
+- u_int max_bpp;
+- u_int max_xres;
+- u_int max_yres;
+-
+- /*
+- * These are the addresses we mapped
+- * the framebuffer memory region to.
+- */
+- dma_addr_t map_dma;
+- u_char * map_cpu;
+- u_int map_size;
+-
+- u_char * screen_cpu;
+- dma_addr_t screen_dma;
+- u_int palette_size;
+-
+- dma_addr_t dbar1;
+- dma_addr_t dbar2;
+-
+- u_int pcr;
+- u_int pwmr;
+- u_int lscr1;
+- u_int dmacr;
+- u_int cmap_inverse:1,
+- cmap_static:1,
+- unused:30;
+-
+- void (*lcd_power)(int);
+- void (*backlight_power)(int);
+-};
+-
+-#define IMX_NAME "IMX"
+-
+-/*
+- * Minimum X and Y resolutions
+- */
+-#define MIN_XRES 64
+-#define MIN_YRES 64
+-
+--- linux-2.6.18.1/include/asm-arm/arch-imx/imx-regs.h 2007-04-05 22:31:12.000000000 +0200
++++ linux-2.6.18.1.fb8bits/include/asm-arm/arch-imx/imx-regs.h 2007-05-08 12:38:19.000000000 +0200
+@@ -411,6 +411,7 @@
+ #define PCR_BPIX_8 (3<<25)
+ #define PCR_BPIX_12 (4<<25)
+ #define PCR_BPIX_16 (4<<25)
++#define PCR_BPIX_MASK (7<<25)
+ #define PCR_PIXPOL (1<<24)
+ #define PCR_FLMPOL (1<<23)
+ #define PCR_LPPOL (1<<22)
--- linux-2.6.23/drivers/video/logo/Kconfig 2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.23-imx/drivers/video/logo/Kconfig 2006-10-01 14:22:39.000000000 +0200
@@ -70,5 +70,12 @@ config LOGO_M32R_CLUT224
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2007-12-28 18:56:18 UTC (rev 750)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-01-17 09:37:02 UTC (rev 751)
@@ -1344,7 +1344,7 @@
+MACHINE_END
--- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2007-01-07 21:40:59.000000000 +0100
-@@ -0,0 +1,146 @@
+@@ -0,0 +1,186 @@
+/*
+ *
+ * Armadeus LCD configuration file
@@ -1360,113 +1360,148 @@
+
+
+#ifdef CONFIG_FB_IMX
-+
+#include <asm/arch/imxfb.h>
++#include <linux/delay.h>
+
++#define LCD_PORT 3 /* Port D */
++
++#define OPTREX_F51900_POWER_DOWN 7 /* PD7_REV line */
++#define SHARP_LQ043_POWER_DOWN 12 /* PD12_ACD_OE line */
++#define CONTRAST_LINE 11 /* PD11_CONTRAST */
++
++#define BACKLIGHT_ON 0x000000ff
++#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
++
+static void apf9328_lcd_power(int on)
+{
+ pr_debug("apf9328_lcd_power: %s\n", on ? "on":"off");
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
-+ /* use Port_D REV pin to control LCD power down mode */
+ if(on)
-+ DR(3) |= 0x00000080; //rev line
++ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
+ else
-+ DR(3) &= ~0x00000080; // rev line
++ DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
+#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+ // No LCD powerdown yet
++#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
++ if(on)
++ DR(LCD_PORT) |= (1 << SHARP_LQ043_POWER_DOWN);
++ else
++ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN);
+#else
+ if(on)
-+ /* use Port_D CONTRAST pin to control LCD power down mode */
-+ DR(3) &= ~0x00000800;
++ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE);
+ else
-+ DR(3) |= 0x00000800;
++ DR(LCD_PORT) |= (1 << CONTRAST_LINE);
+#endif // CONFIG_FB_IMX_OPTREX_F51900_CSTN
+}
+
+static void apf9328_lcd_backlight_power(int on)
+{
+ if(on)
-+ LCDC_PWMR |= 0x000000ff;
++ LCDC_PWMR |= BACKLIGHT_ON;
+ else
-+ LCDC_PWMR &= 0xffffff00;
++ LCDC_PWMR &= ~BACKLIGHT_ON;
+}
+
-+#ifdef CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
++#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
-+ .bpp = 16,
-+ .xres = 320,
-+ .yres = 240,
++ .pixclock = 62500,
++ .bpp = 16,
++ .xres = 480,
++ .yres = 272,
+
-+ .hsync_len = 30,
-+ .vsync_len = 3,
-+ .left_margin = 1,
-+ .upper_margin = 20,
-+ .right_margin = 68,
-+ .lower_margin = 20,
++ .hsync_len = 10,
++ .vsync_len = 3,
++ .left_margin = 2,
++ .upper_margin = 2,
++ .right_margin = 0,
++ .lower_margin = 3,
+
-+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
-+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(7),
-+ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
-+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
-+ .backlight_power = apf9328_lcd_backlight_power,
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
++ PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(5),
++ .pwmr = 0x00000100, // Contrast with PWM @ Line_Pulse, min by default
++ .dmacr = DEFAULT_DMA_SETTINGS,
++ .backlight_power = apf9328_lcd_backlight_power,
++ .lcd_power = apf9328_lcd_power,
+};
++#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
++static struct imxfb_mach_info apf9328_fb_info __initdata = {
++ .pixclock = 62500,
++ .bpp = 16,
++ .xres = 320,
++ .yres = 240,
++
++ .hsync_len = 30,
++ .vsync_len = 3,
++ .left_margin = 1,
++ .upper_margin = 20,
++ .right_margin = 68,
++ .lower_margin = 20,
++
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
++ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(7),
++ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
++ .dmacr = DEFAULT_DMA_SETTINGS,
++ .backlight_power = apf9328_lcd_backlight_power,
++};
+#elif CONFIG_FB_IMX_SHARP_LQ057_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
-+ .bpp = 16,
-+ .xres = 320,
-+ .yres = 240,
++ .pixclock = 62500,
++ .bpp = 16,
++ .xres = 320,
++ .yres = 240,
+
-+ .hsync_len = 9,
-+ .vsync_len = 2,
-+ .left_margin = 9,
-+ .upper_margin = 0,
-+ .right_margin = 27,
-+ .lower_margin = 7,
++ .hsync_len = 9,
++ .vsync_len = 2,
++ .left_margin = 9,
++ .upper_margin = 0,
++ .right_margin = 27,
++ .lower_margin = 7,
+
-+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | /*PCR_CLKPOL |*/
-+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
-+ .pwmr = 0, // No contrast management
-+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
-+ .lcd_power = apf9328_lcd_power,
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | /*PCR_CLKPOL |*/
++ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
++ .pwmr = 0, // No contrast management
++ .dmacr = DEFAULT_DMA_SETTINGS,
++ .lcd_power = apf9328_lcd_power,
+};
+#elif CONFIG_FB_IMX_OPTREX_F51900_CSTN
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
-+ .bpp = 8,
-+ .xres = 320,
-+ .yres = 240,
++ .pixclock = 62500,
++ .bpp = 8,
++ .xres = 320,
++ .yres = 240,
+
-+ .hsync_len = 2,
-+ .vsync_len = 2,
-+ .left_margin = 2,
-+ .upper_margin = 2,
-+ .right_margin = 2,
-+ .lower_margin = 2,
++ .hsync_len = 2,
++ .vsync_len = 2,
++ .left_margin = 2,
++ .upper_margin = 2,
++ .right_margin = 2,
++ .lower_margin = 2,
+
-+ .pcr = PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_8 | PCR_ACD(5) | PCR_END_BYTE_SWAP | PCR_PCD(3),
-+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
-+ .lcd_power = apf9328_lcd_power,
++ .pcr = PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_8 | PCR_ACD(5) |
++ PCR_END_BYTE_SWAP | PCR_PCD(3),
++ .dmacr = DEFAULT_DMA_SETTINGS,
++ .lcd_power = apf9328_lcd_power,
+};
+#elif CONFIG_FB_IMX_MOTOROLA_A910_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
-+ .bpp = 16,
-+ .xres = 240,
-+ .yres = 320,
++ .pixclock = 62500,
++ .bpp = 16,
++ .xres = 240,
++ .yres = 320,
+
-+ .hsync_len = 9,
-+ .vsync_len = 2,
-+ .left_margin = 9,
-+ .upper_margin = 2,
-+ .right_margin = 27,
-+ .lower_margin = 4,
++ .hsync_len = 9,
++ .vsync_len = 2,
++ .left_margin = 9,
++ .upper_margin = 2,
++ .right_margin = 27,
++ .lower_margin = 4,
+
-+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
-+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
-+ .pwmr = 0, // No contrast management
-+ .lcd_power = apf9328_lcd_power,
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL |
++ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
++ .dmacr = DEFAULT_DMA_SETTINGS,
++ .pwmr = 0, // No contrast management
++ .lcd_power = apf9328_lcd_power,
+};
+#else
+#error Please define a imxfb_mach_info structure with your LCD parameters here
@@ -1474,19 +1509,24 @@
+
+static void imx_fb_set_gpios(void)
+{
++
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
-+ OCR1(3) = 0x0000C000;
-+ DR(3) |= 0x00000080;
-+ DDIR(3) |= 0x00000080;
-+ GIUS(3) &= ~0x00000080;
-+ GPR(3) &= ~0x00000080;
++ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN); // Initializes it High
++ imx_gpio_mode( GPIO_PORTD | OPTREX_F51900_POWER_DOWN | GPIO_OUT | GPIO_DR );
+#else
-+ OCR1(3) = 0x00C00000;
-+ DR(3) |= 0x00000800;
-+ DDIR(3) |= 0x00000800;
-+ GIUS(3) |= 0x00000800; // GPIO Function for CONTRAST pin (changed in imxfb if contrast is activated)
-+ GPR(3) &= ~0x00000800;
++ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE); // Initializes it low
++ // GPIO Function for CONTRAST pin (changed in imxfb if contrast is activated)
++ imx_gpio_mode( GPIO_PORTD | CONTRAST_LINE | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+#endif
++
++#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
++ // ACD_OE (SHARP_LQ043_POWER_DOWN) used as power down signal
++ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN); // Initializes it Low
++ imx_gpio_mode( GPIO_PORTD | SHARP_LQ043_POWER_DOWN | GPIO_OUT | GPIO_GIUS | GPIO_DR );
++#else
++ // otherwise use ACD_OE as standard LCD controller signal
++ imx_gpio_mode(PD12_PF_ACD_OE);
++#endif // CONFIG_FB_IMX_SHARP_LQ043_TFT
+}
+#endif // CONFIG_FB_IMX
+
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/023-linux-2.6.23.1-fblcd-kconfig.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/023-linux-2.6.23.1-fblcd-kconfig.diff 2007-12-28 18:56:18 UTC (rev 750)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/023-linux-2.6.23.1-fblcd-kconfig.diff 2008-01-17 09:37:02 UTC (rev 751)
@@ -1,6 +1,6 @@
--- linux-org/drivers/video/Kconfig 2006-10-14 05:34:03.000000000 +0200
+++ linux-imx/drivers/video/Kconfig 2007-01-07 22:24:25.000000000 +0100
-@@ -271,6 +271,7 @@
+@@ -342,6 +342,7 @@ config FB_SA1100
If you plan to use the LCD display with your SA-1100 system, say
Y here.
@@ -8,15 +8,21 @@
config FB_IMX
tristate "Motorola i.MX LCD support"
depends on FB && ARM && ARCH_IMX
-@@ -278,6 +279,36 @@
+@@ -349,6 +350,42 @@ config FB_IMX
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
+choice
+ depends on FB_IMX
+ prompt "LCD Panel"
-+ default FB_IMX_SHARP_LQ057_TFT
++ default FB_IMX_MICROTIPS_MTF_T035_TFT
+
++config FB_IMX_SHARP_LQ043_TFT
++ bool "Sharp LQ043"
++ help
++ Sharp LQ043, a 4.3" 24 bits color 480x272, TFT panel.
++ The native resolution is 480x272.
++
+config FB_IMX_MICROTIPS_MTF_T035_TFT
+ bool "Microtips MTF-T035"
+ help
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|