aboutsummaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-pxa/pxafb.h
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2008-04-30 00:52:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:31 -0700
commit84f43c308b73a6a12128288721a1007ba4f1a8da (patch)
tree650246aced2ea56899f11099846980eeae8885e6 /include/asm-arm/arch-pxa/pxafb.h
parent2c42dd8ebdd92ad59d9a68f88f0e20ad9f45270a (diff)
pxafb: introduce register independent LCD connection type for pxafb
Reasons: 1. straight forward: the name "LCD_COLOR_DSTN_16BPP" is much better than "LCCR0_Pas | LCCR0_Color | LCCR0_Dual" 2. by defining LCD connection types as constants, it allows only valid possibilities 3. by removing the dependency of register bits definitions, those can be later moved into the body of pxafb.c, instead of having a regs-lcd.h around Currently, only lubbock, mainstone, zylonite and littleton have been modified to support these types (see coming patches after this). Other platforms are encouraged to change their way describing the LCD controller connections. Signed-off-by: eric miao <eric.miao@marvell.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-arm/arch-pxa/pxafb.h')
-rw-r--r--include/asm-arm/arch-pxa/pxafb.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h
index 5cf51a5137b..41a6c2297f9 100644
--- a/include/asm-arm/arch-pxa/pxafb.h
+++ b/include/asm-arm/arch-pxa/pxafb.h
@@ -16,6 +16,48 @@
#include <asm/arch/regs-lcd.h>
/*
+ * Supported LCD connections
+ *
+ * bits 0 - 3: for LCD panel type:
+ *
+ * STN - for passive matrix
+ * DSTN - for dual scan passive matrix
+ * TFT - for active matrix
+ *
+ * bits 4 - 9 : for bus width
+ * bits 10-17 : for AC Bias Pin Frequency
+ * bit 18 : for output enable polarity
+ * bit 19 : for pixel clock edge
+ */
+#define LCD_CONN_TYPE(_x) ((_x) & 0x0f)
+#define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f)
+
+#define LCD_TYPE_UNKNOWN 0
+#define LCD_TYPE_MONO_STN 1
+#define LCD_TYPE_MONO_DSTN 2
+#define LCD_TYPE_COLOR_STN 3
+#define LCD_TYPE_COLOR_DSTN 4
+#define LCD_TYPE_COLOR_TFT 5
+#define LCD_TYPE_SMART_PANEL 6
+#define LCD_TYPE_MAX 7
+
+#define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN)
+#define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN)
+#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
+#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
+#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
+#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
+#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
+#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
+#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
+
+#define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10)
+#define LCD_BIAS_ACTIVE_HIGH (0 << 17)
+#define LCD_BIAS_ACTIVE_LOW (1 << 17)
+#define LCD_PCLK_EDGE_RISE (0 << 18)
+#define LCD_PCLK_EDGE_FALL (1 << 18)
+
+/*
* This structure describes the machine which we are running on.
* It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
* of linux/drivers/video/pxafb.c
@@ -44,6 +86,8 @@ struct pxafb_mach_info {
struct pxafb_mode_info *modes;
unsigned int num_modes;
+ unsigned int lcd_conn;
+
u_int fixed_modes:1,
cmap_inverse:1,
cmap_static:1,