phone-pad:add code for boe screen
authorslg <slg@rock-chips.com>
Mon, 8 Aug 2011 03:58:24 +0000 (08:58 +0500)
committerslg <slg@rock-chips.com>
Mon, 8 Aug 2011 04:00:42 +0000 (09:00 +0500)
drivers/video/display/screen/Kconfig
drivers/video/display/screen/Makefile
drivers/video/display/screen/lcd_byd1024x600.c [new file with mode: 0644]

index 85dae4ff13f63f5535dbd25af968c0bc7d70bc63..7a6066c9072209af285d9b2f4a9e3c12ef65ba67 100755 (executable)
@@ -19,6 +19,8 @@ config LCD_HSD100PXN
          bool "RGB Hannstar HSD100PXN(1024X768)"
 config LCD_HSD07PFW1
          bool "RGB Hannstar HSD07PFW1(1024X600)"
+config LCD_BYD8688FTGF
+       bool "RGB BYD 1024X600 8688FTGF"
 config LCD_B101AW06
          bool "RGB Hannstar B101AW06(1024X600)"
 config LCD_RGB_TFT480800_25_E
index f20c2b04792da957985a96dc7b1496d5a070dd83..edcac9d998bc7d6e6e2ca459bc4dd8f40ff66b24 100755 (executable)
@@ -4,7 +4,7 @@ obj-$(CONFIG_LCD_NULL) += lcd_null.o
 obj-$(CONFIG_LCD_TD043MGEA1) += lcd_td043mgea1.o
 obj-$(CONFIG_LCD_HSD070IDW1) += lcd_hsd800x480.o
 obj-$(CONFIG_LCD_HL070VM4AU) += lcd_hl070vm4.o
-
+obj-$(CONFIG_LCD_BYD8688FTGF) += lcd_byd1024x600.o
 obj-$(CONFIG_LCD_TJ048NC01CA)          += lcd_tj048nc01ca.o
 
 obj-$(CONFIG_LCD_A060SE02) += lcd_a060se02.o
diff --git a/drivers/video/display/screen/lcd_byd1024x600.c b/drivers/video/display/screen/lcd_byd1024x600.c
new file mode 100644 (file)
index 0000000..d009018
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * This Lcd Driver is for BYD 5' LCD BM800480-8545FTGE.
+ * written by Michael Lin, 2010-06-18
+ */
+
+#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_P888
+//tcl miaozh modify
+//#define OUT_CLK                      50000000
+#define OUT_CLK                        47000000
+//#define OUT_CLK                      42000000
+#define LCDC_ACLK       150000000     //29 lcdc axi DMA ÆµÂÊ
+
+/* Timing */
+#define H_PW                   10
+#define H_BP                   160
+#define H_VD                   1024
+#define H_FP                   119
+
+#define V_PW                   3
+#define V_BP                   23
+#define V_VD                   600
+#define V_FP                   9
+
+/* Other */
+#define DCLK_POL               0
+#define SWAP_RB                        0
+
+//tcl miaozh modify
+//#define LCD_WIDTH       1024    //need modify
+//#define LCD_HEIGHT      600
+#define LCD_WIDTH       153    //need modify
+#define LCD_HEIGHT      90
+
+static struct rk29lcd_info *gLcd_info = NULL;
+
+#define DRVDelayUs(i)   udelay(i*2)
+
+static int init(void);
+static int standby(u8 enable);
+
+void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
+{
+    /* screen type & face */
+    screen->type = OUT_TYPE;
+    screen->face = OUT_FACE;
+
+    /* Screen size */
+    screen->x_res = H_VD;
+    screen->y_res = V_VD;
+    screen->width = LCD_WIDTH;
+    screen->height = LCD_HEIGHT;
+
+    /* Timing */
+    screen->lcdc_aclk = LCDC_ACLK;
+    screen->pixclock = OUT_CLK;
+       screen->left_margin = H_BP;
+       screen->right_margin = H_FP;
+       screen->hsync_len = H_PW;
+       screen->upper_margin = V_BP;
+       screen->lower_margin = V_FP;
+       screen->vsync_len = V_PW;
+
+       /* Pin polarity */
+       screen->pin_hsync = 0;
+       screen->pin_vsync = 0;
+       screen->pin_den = 0;
+       screen->pin_dclk = DCLK_POL;
+
+       /* Swap rule */
+    screen->swap_rb = SWAP_RB;
+    screen->swap_rg = 0;
+    screen->swap_gb = 0;
+    screen->swap_delta = 0;
+    screen->swap_dumy = 0;
+
+    /* Operation function*/
+    /*screen->init = init;*/
+    screen->init = NULL; 
+    screen->standby = standby;
+}
+
+
+static int standby(u8 enable)
+{
+       printk(KERN_INFO "byd1024x600 lcd standby, enable=%d\n", enable);
+       if (enable)
+       {
+               //rockchip_mux_api_set(LED_CON_IOMUX_PINNAME, LED_CON_IOMUX_PINDIR);
+               //GPIOSetPinDirection(LED_CON_IOPIN,GPIO_OUT);
+               //GPIOSetPinLevel(LED_CON_IOPIN,GPIO_HIGH);
+//             gpio_set_value(LCD_DISP_ON_IOPIN, GPIO_LOW);
+       }
+       else
+       {
+               //rockchip_mux_api_set(LED_CON_IOMUX_PINNAME, 1);
+//             gpio_set_value(LCD_DISP_ON_IOPIN, GPIO_HIGH);
+       }
+       return 0;
+}
+