new add LCD driver for factorytool
authorywj <ywj@rockchip.com>
Thu, 16 Aug 2012 06:31:09 +0000 (14:31 +0800)
committerywj <ywj@rockchip.com>
Thu, 16 Aug 2012 06:31:09 +0000 (14:31 +0800)
drivers/video/display/screen/Kconfig
drivers/video/display/screen/Makefile
drivers/video/display/screen/lcd_common.c [new file with mode: 0644]

index 850ba6518c8dd4d186e669481b5da8e1c500432d..0b62f51a534b2f218fbf1dbe5b47cb3e5ba4115a 100644 (file)
@@ -90,6 +90,8 @@ config LCD_HDMI_800x480
        if support RK610, this setting can support dual screen output
 config LCD_HV070WSA100
        bool "HV070WSA-100 1024X600"
+config LCD_COMMON
+       bool "LCD COMMON"
 endchoice
 
 
index 93aff20cc013116652ea3cc4021dec22ee00d34d..08f3f71b6d8b07e1056e281baefa77cb141840bd 100644 (file)
@@ -41,3 +41,4 @@ obj-$(CONFIG_LCD_B101EW05)    += lcd_b101ew05.o
 obj-$(CONFIG_LCD_HJ050NA_06A)    += lcd_hj050na_06a.o
 obj-$(CONFIG_LCD_HSD100PXN_FOR_TDW851) += lcd_hsd100pxn_for_tdw851.o
 obj-$(CONFIG_LCD_HV070WSA100)    += lcd_hv070wsa.o
+obj-$(CONFIG_LCD_COMMON)    += lcd_common.o
diff --git a/drivers/video/display/screen/lcd_common.c b/drivers/video/display/screen/lcd_common.c
new file mode 100644 (file)
index 0000000..4d18e7b
--- /dev/null
@@ -0,0 +1,79 @@
+#include <linux/fb.h>
+#include <linux/delay.h>
+#include "../../rk29_fb.h"
+#include <mach/gpio.h>
+#include <mach/iomux.h>
+#include <mach/board.h>
+#include "screen.h"
+
+/* Base */
+#define OUT_TYPE           SCREEN_RGB
+
+#define OUT_FACE           OUT_D888_P666
+
+
+#define OUT_CLK                  71000000
+#define LCDC_ACLK        300000000           //29 lcdc axi DMA ÆµÂÊ
+
+/* Timing */
+#define H_PW                   10
+#define H_BP                   100
+#define H_VD                   1280
+#define H_FP                   18
+
+#define V_PW                   2
+#define V_BP                   8
+#define V_VD                   800
+#define V_FP                   6
+
+#define LCD_WIDTH          216
+#define LCD_HEIGHT         135
+/* Other */
+#define DCLK_POL               0
+#define SWAP_RB                0
+
+
+u32 lcdpamara[]={0x4B434F52,0x64636C5F,0x61746164,SCREEN_RGB,OUT_D888_P666,71000000,300000000,10,100,1280,18,2,8,800,6,216,135,0,0};
+
+void set_lcd_info(struct rk29fb_screen *screen,  struct rk29lcd_info *lcd_info )
+{
+   /* screen type & face */
+    screen->type = lcdpamara[3];
+    screen->face = lcdpamara[4];
+
+    /* Screen size */
+    screen->x_res =  lcdpamara[9];
+    screen->y_res =  lcdpamara[13];
+
+    screen->width =  lcdpamara[15];
+    screen->height = lcdpamara[16];
+
+    /* Timing */
+    screen->lcdc_aclk =  lcdpamara[6];
+    screen->pixclock =  lcdpamara[5];
+       screen->left_margin = lcdpamara[8];
+       screen->right_margin =  lcdpamara[10];
+       screen->hsync_len =  lcdpamara[7];
+       screen->upper_margin =  lcdpamara[12];
+       screen->lower_margin = lcdpamara[14];
+       screen->vsync_len =  lcdpamara[11];
+
+       /* Pin polarity */
+       screen->pin_hsync = 0;
+       screen->pin_vsync = 0;
+       screen->pin_den = 0;
+       screen->pin_dclk =  lcdpamara[17];
+
+       /* Swap rule */
+    screen->swap_rb =  lcdpamara[18];
+    screen->swap_rg = 0;
+    screen->swap_gb = 0;
+    screen->swap_delta = 0;
+    screen->swap_dumy = 0;
+
+    /* Operation function*/
+    screen->init = NULL;
+    screen->standby = NULL;
+}
+