From: root Date: Thu, 24 Mar 2011 11:53:55 +0000 (+0800) Subject: xxm FIH miss lcd_AT070TNA2.c X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4018cc017ef1157a542e2a7ba1aa7adfd5c17af2;p=firefly-linux-kernel-4.4.55.git xxm FIH miss lcd_AT070TNA2.c --- diff --git a/drivers/video/display/screen/lcd_AT070TNA2.c b/drivers/video/display/screen/lcd_AT070TNA2.c new file mode 100644 index 000000000000..e970453a2aa2 --- /dev/null +++ b/drivers/video/display/screen/lcd_AT070TNA2.c @@ -0,0 +1,84 @@ +#include +#include +#include "../../rk29_fb.h" +#include +#include +#include +#include "screen.h" + + +/* Base */ +#define OUT_TYPE SCREEN_RGB + +#if defined(CONFIG_MACH_RK29SDK)||defined(CONFIG_MACH_RK29FIH) +#define OUT_FACE OUT_D888_P666 +#else +#define OUT_FACE OUT_D888_P666 +#endif +#define OUT_CLK 58500000 // 65000000 +#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA ƵÂÊ + +/* Timing */ +#define H_PW 10 +#define H_BP 100 +#define H_VD 1024 +#define H_FP 210 + +#define V_PW 10 +#define V_BP 10 +#define V_VD 600 +#define V_FP 18 + +#define LCD_WIDTH 202 +#define LCD_HEIGHT 152 +/* Other */ +#define DCLK_POL 0 +#if defined(CONFIG_MACH_RK29SDK)||defined(CONFIG_MACH_RK29FIH) +#define SWAP_RB 0 +#else +#define SWAP_RB 0 +#endif + +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; +} + + +