i2s: add support samplerate up to 192K and support S32_LE
[firefly-linux-kernel-4.4.55.git] / drivers / video / display / screen / lcd_YQ70CPT9160.c
1 /* This Lcd Driver is HSD070IDW1 write by cst 2009.10.27 */
2 #include <linux/fb.h>
3 #include <linux/delay.h>
4 #include "../../rk29_fb.h"
5 #include <mach/gpio.h>
6 #include <mach/iomux.h>
7 #include <mach/board.h>
8 #include "screen.h"
9
10
11 /* Base */
12 #define OUT_TYPE                SCREEN_RGB
13 #define OUT_FACE                OUT_P666
14 #define OUT_CLK                  33000000
15 #define LCDC_ACLK       150000000     //29 lcdc axi DMA ÆµÂÊ
16
17 /* Timing */
18 #define H_PW                    30//48 //10
19 #define H_BP                    10//40 //100
20 #define H_VD                    800 //1024
21 #define H_FP                    210// //210
22
23 #define V_PW                    13//10
24 #define V_BP                    10// //10
25 #define V_VD                    480 //768
26 #define V_FP                    22 //18
27
28 /* Other */
29 #define DCLK_POL                1
30 #define SWAP_RB                 0
31
32 #define LCD_WIDTH       154    //need modify
33 #define LCD_HEIGHT      85
34
35 static struct rk29lcd_info *gLcd_info = NULL;
36
37 void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
38 {
39     /* screen type & face */
40     screen->type = OUT_TYPE;
41     screen->face = OUT_FACE;
42
43     /* Screen size */
44     screen->x_res = H_VD;
45     screen->y_res = V_VD;
46
47     screen->width = LCD_WIDTH;
48     screen->height = LCD_HEIGHT;
49
50     /* Timing */
51     screen->lcdc_aclk = LCDC_ACLK;
52     screen->pixclock = OUT_CLK;
53         screen->left_margin = H_BP;
54         screen->right_margin = H_FP;
55         screen->hsync_len = H_PW;
56         screen->upper_margin = V_BP;
57         screen->lower_margin = V_FP;
58         screen->vsync_len = V_PW;
59
60         /* Pin polarity */
61         screen->pin_hsync = 0;
62         screen->pin_vsync = 0;
63         screen->pin_den = 0;
64         screen->pin_dclk = DCLK_POL;
65
66         /* Swap rule */
67     screen->swap_rb = SWAP_RB;
68     screen->swap_rg = 0;
69     screen->swap_gb = 0;
70     screen->swap_delta = 0;
71     screen->swap_dumy = 0;
72
73     /* Operation function*/
74     /*screen->init = init;*/
75     screen->init = NULL;
76     screen->standby = NULL;
77     if(lcd_info)
78         gLcd_info = lcd_info;
79 }
80