From cae2ccf51892d6594046b5fbe79945f4bd82bc95 Mon Sep 17 00:00:00 2001 From: lw Date: Wed, 12 Sep 2012 11:54:15 +0800 Subject: [PATCH] phonepad:add lcd_hj080na driver --- drivers/video/display/screen/Kconfig | 2 + drivers/video/display/screen/Makefile | 1 + drivers/video/display/screen/lcd_hj080na.c | 76 ++++++++++++++++++++++ 3 files changed, 79 insertions(+) mode change 100644 => 100755 drivers/video/display/screen/Kconfig mode change 100644 => 100755 drivers/video/display/screen/Makefile create mode 100755 drivers/video/display/screen/lcd_hj080na.c diff --git a/drivers/video/display/screen/Kconfig b/drivers/video/display/screen/Kconfig old mode 100644 new mode 100755 index 7f075480c6d7..616e5290dec5 --- a/drivers/video/display/screen/Kconfig +++ b/drivers/video/display/screen/Kconfig @@ -94,6 +94,8 @@ config LCD_COMMON bool "LCD COMMON" config LCD_RK2928_A720 bool "RK2928 A720 panel 800x480" +config LCD_HJ080NA + bool "HJ080NA_4J 1024X768" endchoice diff --git a/drivers/video/display/screen/Makefile b/drivers/video/display/screen/Makefile old mode 100644 new mode 100755 index d9f0b5c890ba..57f551d2bbe0 --- a/drivers/video/display/screen/Makefile +++ b/drivers/video/display/screen/Makefile @@ -43,3 +43,4 @@ 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 obj-$(CONFIG_LCD_RK2928_A720) += lcd_rk2928_a720.o +obj-$(CONFIG_LCD_HJ080NA) += lcd_hj080na.o \ No newline at end of file diff --git a/drivers/video/display/screen/lcd_hj080na.c b/drivers/video/display/screen/lcd_hj080na.c new file mode 100755 index 000000000000..103f5ffcf2bd --- /dev/null +++ b/drivers/video/display/screen/lcd_hj080na.c @@ -0,0 +1,76 @@ +#include +#include +#include "../../rk29_fb.h" +#include +#include +#include +#include "screen.h" + + +/* Base */ +#define OUT_TYPE SCREEN_RGB + +#define OUT_FACE OUT_P888 +#define OUT_CLK 65000000 +#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA ƵÂÊ + +/* Timing */ +#define H_PW 100 +#define H_BP 100 +#define H_VD 1024 +#define H_FP 120 + +#define V_PW 10 +#define V_BP 10 +#define V_VD 768 +#define V_FP 15 + +#define LCD_WIDTH 216 +#define LCD_HEIGHT 162 +/* Other */ +#define DCLK_POL 0 +#define SWAP_RB 0 + +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 = NULL; + screen->standby = NULL; +} + + + -- 2.34.1