2 * Copyright (C) 2012 Spreadtrum Communications Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef _LCD_DUMMY_H_
\r
15 #define _LCD_DUMMY_H_
\r
18 #define LCD_MODE_MCU 0
\r
19 #define LCD_MODE_RGB 1
\r
20 #define LCD_MODE_DSI 2
\r
23 #define LCD_BUS_8080 0
\r
24 #define LCD_BUS_6800 1
\r
26 /* panel property */
\r
27 /* lcdc refresh, TE on, double timing, partial update*/
\r
28 #define PANEL_CAP_NORMAL 0x0
\r
30 /* only not support partial update*/
\r
31 #define PANEL_CAP_NOT_PARTIAL_UPDATE 0x1
\r
33 /* write register, grame have the same timing */
\r
34 #define PANEL_CAP_UNIQUE_TIMING 0x2
\r
36 /* lcd not support TE */
\r
37 #define PANEL_CAP_NOT_TEAR_SYNC 0x4
\r
39 /* only do command/data register, such as some mono oled display device */
\r
40 #define PANEL_CAP_MANUAL_REFRESH 0x8
\r
43 SPRDFB_PANEL_TYPE_MCU = 0,
\r
44 SPRDFB_PANEL_TYPE_RGB,
\r
45 SPRDFB_PANEL_TYPE_MIPI,
\r
46 SPRDFB_PANEL_TYPE_LIMIT
\r
50 SPRDFB_POLARITY_POS = 0,
\r
51 SPRDFB_POLARITY_NEG,
\r
52 SPRDFB_POLARITY_LIMIT
\r
56 SPRDFB_MIPI_MODE_CMD = 0,
\r
57 SPRDFB_MIPI_MODE_VIDEO,
\r
58 SPRDFB_MIPI_MODE_LIMIT
\r
61 /* MCU LCD specific properties */
\r
63 uint16_t rcss; /*unit: ns*/
\r
71 /* RGB LCD specific properties */
\r
73 uint16_t hfp;/*unit: pixel*/
\r
76 uint16_t vfp; /*unit: line*/
\r
82 uint16_t work_mode; /*command_mode, video_mode*/
\r
83 uint16_t video_bus_width;
\r
84 uint32_t lan_number;
\r
85 uint32_t phy_feq; /*unit:Hz*/
\r
86 uint16_t h_sync_pol;
\r
87 uint16_t v_sync_pol;
\r
89 uint16_t te_pol; /*only for command_mode*/
\r
90 uint16_t color_mode_pol;
\r
91 uint16_t shut_down_pol;
\r
92 struct timing_rgb *timing;
\r
96 uint16_t video_bus_width;
\r
97 uint16_t h_sync_pol;
\r
98 uint16_t v_sync_pol;
\r
100 struct timing_rgb *timing;
\r
104 uint16_t bus_mode; /*8080, 6800*/
\r
105 uint16_t bus_width;
\r
108 uint32_t te_sync_delay;
\r
109 struct timing_mcu *timing;
\r
112 /* LCD abstraction */
\r
113 struct panel_spec {
\r
117 uint16_t type; /*mcu, rgb, mipi*/
\r
119 struct info_mcu *mcu;
\r
120 struct info_rgb *rgb;
\r
121 struct info_mipi * mipi;
\r