blob: 80c64bda368e2ddb29d8f26fb8e8231fbf84aa92 [file] [log] [blame]
Yang6bd18532015-06-04 13:41:10 +08001/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in
10 * the documentation and/or other materials provided with the
11 * distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef _PANEL_FL10802_FWVGA_VIDEO_H_
31#define _PANEL_FL10802_FWVGA_VIDEO_H_
32/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include "panel.h"
36
37/*---------------------------------------------------------------------------*/
38/* Panel configuration */
39/*---------------------------------------------------------------------------*/
40static struct panel_config fl10802_fwvga_video_panel_data = {
41 "qcom,mdss_dsi_fl10802_fwvga_video", "dsi:0:", "qcom,mdss-dsi-panel",
42 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 1, 7000, 0, 0, 0, 0, 0
43};
44
45/*---------------------------------------------------------------------------*/
46/* Panel resolution */
47/*---------------------------------------------------------------------------*/
48static struct panel_resolution fl10802_fwvga_video_panel_res = {
49 480, 854, 79, 69, 59, 0, 18, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
50};
51
52/*---------------------------------------------------------------------------*/
53/* Panel color information */
54/*---------------------------------------------------------------------------*/
55static struct color_info fl10802_fwvga_video_color = {
56 24, 0, 0xff, 0, 0, 0
57};
58
59/*---------------------------------------------------------------------------*/
60/* Panel on/off command information */
61/*---------------------------------------------------------------------------*/
62static char fl10802_fwvga_video_on_cmd0[] = {
63 0x04, 0x00, 0x39, 0xC0,
64 0xB9, 0xF1, 0x08, 0x01,
65};
66
67static char fl10802_fwvga_video_on_cmd1[] = {
68 0x05, 0x00, 0x39, 0xC0,
69 0xB1, 0x22, 0x1A, 0x1A,
70 0x87, 0xFF, 0xFF, 0xFF,
71};
72
73static char fl10802_fwvga_video_on_cmd2[] = {
74 0x02, 0x00, 0x39, 0xC0,
75 0xB2, 0x22, 0xFF, 0xFF,
76};
77
78static char fl10802_fwvga_video_on_cmd3[] = {
79 0x09, 0x00, 0x39, 0xC0,
80 0xB3, 0x01, 0x00, 0x06,
81 0x06, 0x18, 0x13, 0x39,
82 0x35, 0xFF, 0xFF, 0xFF,
83};
84
85static char fl10802_fwvga_video_on_cmd4[] = {
86 0x12, 0x00, 0x39, 0xC0,
87 0xBA, 0x31, 0x00, 0x44,
88 0x25, 0x91, 0x0A, 0x00,
89 0x00, 0xC1, 0x00, 0x00,
90 0x00, 0x0D, 0x02, 0x4F,
91 0xB9, 0xEE, 0xFF, 0xFF,
92};
93
94static char fl10802_fwvga_video_on_cmd5[] = {
95 0x06, 0x00, 0x39, 0xC0,
96 0xE3, 0x09, 0x09, 0x03,
97 0x03, 0x00, 0xFF, 0xFF,
98};
99
100static char fl10802_fwvga_video_on_cmd6[] = {
101 0x03, 0x00, 0x39, 0xC0,
102 0xB5, 0x07, 0x07, 0xFF,
103};
104
105static char fl10802_fwvga_video_on_cmd7[] = {
106 0x03, 0x00, 0x39, 0xC0,
107 0xB6, 0x3F, 0x3F, 0xFF,
108};
109
110static char fl10802_fwvga_video_on_cmd8[] = {
111 0x03, 0x00, 0x39, 0xC0,
112 0xB8, 0x64, 0x28, 0xFF,
113};
114
115static char fl10802_fwvga_video_on_cmd9[] = {
116 0x02, 0x00, 0x39, 0xC0,
117 0xB4, 0x02, 0xFF, 0xFF,
118};
119
120static char fl10802_fwvga_video_on_cmd10[] = {
121 0x02, 0x00, 0x39, 0xC0,
122 0xCC, 0x00, 0xFF, 0xFF,
123};
124
125static char fl10802_fwvga_video_on_cmd11[] = {
126 0x02, 0x00, 0x39, 0xC0,
127 0xBC, 0x47, 0xFF, 0xFF,
128};
129
130static char fl10802_fwvga_video_on_cmd12[] = {
131 0x34, 0x00, 0x39, 0xC0,
132 0xE9, 0x00, 0x00, 0x09,
133 0x03, 0x65, 0x0A, 0x8A,
134 0x10, 0x01, 0x00, 0x37,
135 0x0D, 0x0A, 0x8A, 0x37,
136 0x00, 0x00, 0x18, 0x00,
137 0x00, 0x00, 0x25, 0x09,
138 0x80, 0x40, 0x00, 0x42,
139 0x60, 0x00, 0x00, 0x00,
140 0x09, 0x81, 0x50, 0x01,
141 0x53, 0x70, 0x00, 0x00,
142 0x00, 0x00, 0x00, 0x00,
143 0x00, 0x00, 0x00, 0x00,
144 0x00, 0x00, 0x00, 0x00,
145};
146
147static char fl10802_fwvga_video_on_cmd13[] = {
148 0x17, 0x00, 0x39, 0xC0,
149 0xEA, 0x94, 0x00, 0x00,
150 0x00, 0x08, 0x95, 0x10,
151 0x07, 0x35, 0x10, 0x00,
152 0x00, 0x00, 0x08, 0x94,
153 0x00, 0x06, 0x24, 0x00,
154 0x00, 0x00, 0x00, 0xFF,
155};
156
157static char fl10802_fwvga_video_on_cmd14[] = {
158 0x23, 0x00, 0x39, 0xC0,
159 0xE0, 0x00, 0x00, 0x11,
160 0x0F, 0x10, 0x2A, 0x26,
161 0x34, 0x0C, 0x0F, 0x10,
162 0x14, 0x17, 0x14, 0x16,
163 0x13, 0x17, 0x00, 0x00,
164 0x11, 0x0F, 0x10, 0x2A,
165 0x26, 0x34, 0x0C, 0x0F,
166 0x10, 0x14, 0x17, 0x14,
167 0x16, 0x13, 0x17, 0xFF,
168};
169
170static char fl10802_fwvga_video_on_cmd15[] = {
Yang Xud53c4c22015-07-29 10:39:05 +0800171 0x80, 0x00, 0x39, 0xC0,
172 0xC1, 0x01, 0x00, 0x0C,
173 0x17, 0x20, 0x29, 0x31,
174 0x39, 0x42, 0x4B, 0x53,
175 0x5B, 0x63, 0x6B, 0x74,
176 0x7C, 0x85, 0x8E, 0x97,
177 0xA0, 0xA8, 0xAF, 0xB7,
178 0xBE, 0xC6, 0xCD, 0xD4,
179 0xDB, 0xE2, 0xE9, 0xEF,
180 0xF6, 0xFB, 0xFF, 0x3C,
181 0x4B, 0x1C, 0x27, 0x26,
182 0x2F, 0x1D, 0x08, 0x03,
183 0x00, 0x0A, 0x13, 0x1B,
184 0x24, 0x2B, 0x32, 0x3A,
185 0x42, 0x4A, 0x51, 0x59,
186 0x61, 0x69, 0x71, 0x79,
187 0x81, 0x8A, 0x93, 0x9C,
188 0xA4, 0xAC, 0xB4, 0xBC,
189 0xC4, 0xCB, 0xD3, 0xDB,
190 0xE2, 0xEA, 0xF2, 0xF9,
191 0xFF, 0x2C, 0x34, 0x4F,
192 0x49, 0x3F, 0x23, 0x14,
193 0x3F, 0x03, 0x00, 0x10,
194 0x18, 0x1E, 0x25, 0x2C,
195 0x32, 0x37, 0x3E, 0x45,
196 0x4C, 0x52, 0x59, 0x60,
197 0x65, 0x6D, 0x74, 0x7B,
198 0x82, 0x89, 0x92, 0x9A,
199 0xA2, 0xAA, 0xB2, 0xB9,
200 0xC1, 0xCA, 0xD2, 0xDB,
201 0xE6, 0xF1, 0xFF, 0x20,
202 0x26, 0x1F, 0x19, 0x4E,
203 0x45, 0x24, 0x42, 0x03,
Yang6bd18532015-06-04 13:41:10 +0800204};
205
206static char fl10802_fwvga_video_on_cmd16[] = {
207 0x02, 0x00, 0x39, 0xC0,
Yang Xud53c4c22015-07-29 10:39:05 +0800208 0xC7, 0xA0, 0xFF, 0xFF,
Yang6bd18532015-06-04 13:41:10 +0800209};
210
211static char fl10802_fwvga_video_on_cmd17[] = {
Yang Xud53c4c22015-07-29 10:39:05 +0800212 0x02, 0x00, 0x39, 0xC0,
Yang Xufbca05e2015-08-04 16:19:51 +0800213 0x53, 0x24, 0xFF, 0xFF,
Yang Xud53c4c22015-07-29 10:39:05 +0800214};
215
216static char fl10802_fwvga_video_on_cmd18[] = {
Yang6bd18532015-06-04 13:41:10 +0800217 0x03, 0x00, 0x39, 0xC0,
218 0xC8, 0x10, 0x10, 0xFF,
219};
220
Yang Xud53c4c22015-07-29 10:39:05 +0800221static char fl10802_fwvga_video_on_cmd19[] = {
Yang6bd18532015-06-04 13:41:10 +0800222 0x02, 0x00, 0x39, 0xC0,
Yang Xufbca05e2015-08-04 16:19:51 +0800223 0x51, 0x00, 0xFF, 0xFF,
Yang6bd18532015-06-04 13:41:10 +0800224};
225
Yang Xud53c4c22015-07-29 10:39:05 +0800226static char fl10802_fwvga_video_on_cmd20[] = {
Yang6bd18532015-06-04 13:41:10 +0800227 0x11, 0x00, 0x05, 0x80
228};
229
Yang Xud53c4c22015-07-29 10:39:05 +0800230static char fl10802_fwvga_video_on_cmd21[] = {
Yang6bd18532015-06-04 13:41:10 +0800231 0x29, 0x00, 0x05, 0x80
232};
233
Yang Xufbca05e2015-08-04 16:19:51 +0800234static char fl10802_fwvga_video_on_cmd22[] = {
235 0x02, 0x00, 0x39, 0xC0,
236 0x51, 0xFF, 0xFF, 0xFF,
237};
238
Yang6bd18532015-06-04 13:41:10 +0800239static struct mipi_dsi_cmd fl10802_fwvga_video_on_command[] = {
240 {0x8, fl10802_fwvga_video_on_cmd0, 0x00},
241 {0xc, fl10802_fwvga_video_on_cmd1, 0x00},
242 {0x8, fl10802_fwvga_video_on_cmd2, 0x00},
243 {0x10, fl10802_fwvga_video_on_cmd3, 0x00},
244 {0x18, fl10802_fwvga_video_on_cmd4, 0x00},
245 {0xc, fl10802_fwvga_video_on_cmd5, 0x00},
246 {0x8, fl10802_fwvga_video_on_cmd6, 0x00},
247 {0x8, fl10802_fwvga_video_on_cmd7, 0x00},
248 {0x8, fl10802_fwvga_video_on_cmd8, 0x00},
249 {0x8, fl10802_fwvga_video_on_cmd9, 0x00},
250 {0x8, fl10802_fwvga_video_on_cmd10, 0x00},
251 {0x8, fl10802_fwvga_video_on_cmd11, 0x00},
252 {0x38, fl10802_fwvga_video_on_cmd12, 0x00},
253 {0x1c, fl10802_fwvga_video_on_cmd13, 0x00},
254 {0x28, fl10802_fwvga_video_on_cmd14, 0x00},
Yang Xud53c4c22015-07-29 10:39:05 +0800255 {0x84, fl10802_fwvga_video_on_cmd15, 0x00},
Yang6bd18532015-06-04 13:41:10 +0800256 {0x8, fl10802_fwvga_video_on_cmd16, 0x00},
257 {0x8, fl10802_fwvga_video_on_cmd17, 0x00},
258 {0x8, fl10802_fwvga_video_on_cmd18, 0x00},
Yang Xud53c4c22015-07-29 10:39:05 +0800259 {0x8, fl10802_fwvga_video_on_cmd19, 0x00},
260 {0x4, fl10802_fwvga_video_on_cmd20, 0x78},
Yang Xufbca05e2015-08-04 16:19:51 +0800261 {0x4, fl10802_fwvga_video_on_cmd21, 0x78},
262 {0x8, fl10802_fwvga_video_on_cmd22, 0x00}
Yang6bd18532015-06-04 13:41:10 +0800263};
264
Yang Xufbca05e2015-08-04 16:19:51 +0800265#define FL10802_FWVGA_VIDEO_ON_COMMAND 23
Yang6bd18532015-06-04 13:41:10 +0800266
267
268static char fl10802_fwvga_videooff_cmd0[] = {
269 0x28, 0x00, 0x05, 0x80
270};
271
272static char fl10802_fwvga_videooff_cmd1[] = {
273 0x10, 0x00, 0x05, 0x80
274};
275
276static struct mipi_dsi_cmd fl10802_fwvga_video_off_command[] = {
277 {0x4, fl10802_fwvga_videooff_cmd0, 0x32},
278 {0x4, fl10802_fwvga_videooff_cmd1, 0x78}
279};
280
281#define FL10802_FWVGA_VIDEO_OFF_COMMAND 2
282
283
284static struct command_state fl10802_fwvga_video_state = {
285 0, 1
286};
287
288/*---------------------------------------------------------------------------*/
289/* Command mode panel information */
290/*---------------------------------------------------------------------------*/
291static struct commandpanel_info fl10802_fwvga_video_command_panel = {
292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
293};
294
295/*---------------------------------------------------------------------------*/
296/* Video mode panel information */
297/*---------------------------------------------------------------------------*/
298static struct videopanel_info fl10802_fwvga_video_video_panel = {
299 1, 0, 0, 0, 1, 1, 2, 0, 0x9
300};
301
302/*---------------------------------------------------------------------------*/
303/* Lane configuration */
304/*---------------------------------------------------------------------------*/
305static struct lane_configuration fl10802_fwvga_video_lane_config = {
306 2, 0, 1, 1, 0, 0
307};
308
309/*---------------------------------------------------------------------------*/
310/* Panel timing */
311/*---------------------------------------------------------------------------*/
312static const uint32_t fl10802_fwvga_video_timings[] = {
313 0xaf, 0x23, 0x1c, 0x00, 0x36, 0x33, 0x1d, 0x25, 0x2d, 0x03, 0x04, 0x00
314};
315
316static struct panel_timing fl10802_fwvga_video_timing_info = {
317 0, 4, 0x1f, 0x30
318};
319
320/*---------------------------------------------------------------------------*/
321/* Panel reset sequence */
322/*---------------------------------------------------------------------------*/
323static struct panel_reset_sequence fl10802_fwvga_video_reset_seq = {
324 {1, 0, 1, }, {20, 2, 20, }, 2
325};
326
327/*---------------------------------------------------------------------------*/
328/* Backlight setting */
329/*---------------------------------------------------------------------------*/
330static struct backlight fl10802_fwvga_video_backlight = {
331 1, 1, 255, 100, 2, "PMIC_8941"
332};
333
334#define FL10802_FWVGA_VIDEO_SIGNATURE 0xFFFF
335
336#endif /*_PANEL_FL10802_FWVGA_VIDEO_H_*/