tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / drivers / video / sprdfb / lcd / lcd_ili6150_lvds.c
1 /*
2  * drivers/video/sprdfb/lcd/lcd_ili6150_lvds.c
3  *
4  * Copyright (C) 2014 Spreadtrum Communications Inc.
5  *
6  * Author: Haibing.Yang <haibing.yang@spreadtrum.com>
7  */
8
9
10 #include <common.h>
11
12 #include <asm/arch/sprd_lcd.h>
13 #include <asm/arch/dispc_reg.h>
14
15 #include "../sprdfb.h"
16
17 static uint32_t ili6150_lvds_readid(struct panel_spec *self)
18 {
19         return 0x1806;
20 }
21
22 static struct panel_operations ili6150_lvds_ops = {
23         .panel_init = sprdchip_lvds_init,
24         .panel_readid = ili6150_lvds_readid,
25 };
26
27 static struct timing_rgb ili6150_lvds_timing = {
28         .hfp = 150,  /* unit: pixel */
29         .hbp = 150,
30         .hsync = 1,//4
31         .vfp = 16, /*unit: line*/
32         .vbp = 16,
33         .vsync = 1,
34 };
35
36 static struct info_rgb ili6150_lvds_info = {
37         .cmd_bus_mode  = SPRDFB_RGB_BUS_TYPE_LVDS,
38         .video_bus_width = 24, /*18,16*/
39 #if 0
40         .h_sync_pol = SPRDFB_POLARITY_NEG,
41         .v_sync_pol = SPRDFB_POLARITY_NEG,
42         .de_pol = SPRDFB_POLARITY_POS,
43 #endif
44         .timing = &ili6150_lvds_timing,
45         .bus_info = {
46                 .spi = NULL,
47         }
48 };
49
50 struct panel_spec ili6150_lvds_spec = {
51         .width = 1024,
52         .height = 600,
53         .fps = 60,
54         .type = SPRDFB_PANEL_TYPE_LVDS,
55         .direction = LCD_DIRECT_NORMAL,
56         .info = {
57                 .rgb = &ili6150_lvds_info
58         },
59         .ops = &ili6150_lvds_ops,
60 };
61