blob: 46417c6a6c3017fa41266e70cda41b58ed71a5e3 [file] [log] [blame]
Jayant Shekhar0e0a5772016-01-19 12:46:11 +05301/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +05302 *
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_TRULY_1080P_VIDEO_H_
31
32#define _PANEL_TRULY_1080P_VIDEO_H_
33/*---------------------------------------------------------------------------*/
34/* HEADER files */
35/*---------------------------------------------------------------------------*/
36#include "panel.h"
37
38/*---------------------------------------------------------------------------*/
39/* Panel configuration */
40/*---------------------------------------------------------------------------*/
41
42static struct panel_config truly_1080p_video_panel_data = {
43 "qcom,mdss_dsi_truly_1080p_video", "dsi:0:", "qcom,mdss-dsi-panel",
44 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL
45};
46
47/*---------------------------------------------------------------------------*/
48/* Panel resolution */
49/*---------------------------------------------------------------------------*/
50static struct panel_resolution truly_1080p_video_panel_res = {
51 1080, 1920, 96, 64, 16, 0, 4, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
52};
53
54/*---------------------------------------------------------------------------*/
55/* Panel Color Information */
56/*---------------------------------------------------------------------------*/
57static struct color_info truly_1080p_video_color = {
58 24, 0, 0xff, 0, 0, 0
59};
60
61/*---------------------------------------------------------------------------*/
62/* Panel Command information */
63/*---------------------------------------------------------------------------*/
64static char truly_1080p_video_on_cmd0[] = {
650x35, 0x00, 0x015, 0x80, };
66
67
68static char truly_1080p_video_on_cmd1[] = {
690x51, 0xff, 0x15, 0x80, };
70
71
72static char truly_1080p_video_on_cmd2[] = {
730x53, 0x2c, 0x15, 0x80, };
74
75
76static char truly_1080p_video_on_cmd3[] = {
Sandeep Panda9c9fc312015-06-30 16:20:30 +0530770x55, 0x00, 0x15, 0x80, };
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +053078
79
80static char truly_1080p_video_on_cmd4[] = {
Sandeep Panda9c9fc312015-06-30 16:20:30 +0530810x11, 0x00, 0x05, 0x80, };
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +053082
83
84static char truly_1080p_video_on_cmd5[] = {
850xb0, 0x00, 0x23, 0x80, };
86
87
88static char truly_1080p_video_on_cmd6[] = {
890x07, 0x00, 0x29, 0xC0,
900xb3, 0x14, 0x00, 0x00,
910x00, 0x00, 0x00, 0xFF, };
92
93
94static char truly_1080p_video_on_cmd7[] = {
950x03, 0x00, 0x29, 0xC0,
960xb6, 0x3a, 0xd3, 0xFF, };
97
98
99static char truly_1080p_video_on_cmd8[] = {
1000x03, 0x00, 0x29, 0xc0,
1010xc0, 0x00, 0x00, 0xff, };
102
103
104static char truly_1080p_video_on_cmd9[] = {
1050x23, 0x00, 0x29, 0xC0,
1060xc1, 0x84, 0x60, 0x10,
1070xeb, 0xff, 0x6f, 0xce,
1080xff, 0xff, 0x17, 0x02,
1090x58, 0x73, 0xae, 0xb1,
1100x20, 0xc6, 0xff, 0xff,
1110x1f, 0xf3, 0xff, 0x5f,
1120x10, 0x10, 0x10, 0x10,
1130x00, 0x02, 0x01, 0x22,
1140x22, 0x00, 0x01, 0xff, };
115
116
117static char truly_1080p_video_on_cmd10[] = {
1180x08, 0x00, 0x29, 0xC0,
1190xc2, 0x31, 0xf7, 0x80,
1200x06, 0x08, 0x00, 0x00, };
121
122
123static char truly_1080p_video_on_cmd11[] = {
1240x17, 0x00, 0x29, 0xC0,
1250xc4, 0x70, 0x00, 0x00,
1260x00, 0x00, 0x04, 0x00,
1270x00, 0x00, 0x0c, 0x06,
1280x00, 0x00, 0x00, 0x00,
1290x00, 0x04, 0x00, 0x00,
1300x00, 0x0c, 0x06, 0xff, };
131
132
133static char truly_1080p_video_on_cmd12[] = {
1340x29, 0x00, 0x29, 0xC0,
1350xc6, 0x00, 0x69, 0x00,
1360x69, 0x00, 0x69, 0x00,
1370x00, 0x00, 0x00, 0x00,
1380x69, 0x00, 0x69, 0x00,
1390x69, 0x10, 0x19, 0x07,
1400x00, 0x01, 0x00, 0x69,
1410x00, 0x69, 0x00, 0x69,
1420x00, 0x00, 0x00, 0x00,
1430x00, 0x69, 0x00, 0x69,
1440x00, 0x69, 0x10, 0x19,
1450x07, 0xff, 0xff, 0xff, };
146
147
148static char truly_1080p_video_on_cmd13[] = {
1490x0a, 0x00, 0x29, 0xC0,
1500xcb, 0x31, 0xfc, 0x3f,
1510x8c, 0x00, 0x00, 0x00,
1520x00, 0xc0, 0xff, 0xff, };
153
154
155static char truly_1080p_video_on_cmd14[] = {
1560xcc, 0x0b, 0x23, 0x80, };
157
158
159static char truly_1080p_video_on_cmd15[] = {
1600x0b, 0x00, 0x29, 0xc0,
1610xd0, 0x11, 0x81, 0xbb,
1620x1e, 0x1e, 0x4c, 0x19,
1630x19, 0x0c, 0x00, 0xff, };
164
165
166static char truly_1080p_video_on_cmd16[] = {
1670x1a, 0x00, 0x29, 0xC0,
1680xd3, 0x1b, 0x33, 0xbb,
1690xbb, 0xb3, 0x33, 0x33,
1700x33, 0x00, 0x01, 0x00,
1710xa0, 0xd8, 0xa0, 0x0d,
1720x4e, 0x4e, 0x33, 0x3b,
1730x22, 0x72, 0x07, 0x3d,
1740xbf, 0x33, 0xff, 0xff, };
175
176
177static char truly_1080p_video_on_cmd17[] = {
1780x08, 0x00, 0x29, 0xc0,
1790xd5, 0x06, 0x00, 0x00,
1800x01, 0x51, 0x01, 0x32, };
181
182
183static char truly_1080p_video_on_cmd18[] = {
1840x1f, 0x00, 0x29, 0xC0,
1850xc7, 0x01, 0x0a, 0x11,
1860x18, 0x26, 0x33, 0x3e,
1870x50, 0x38, 0x42, 0x52,
1880x60, 0x67, 0x6e, 0x77,
1890x01, 0x0a, 0x11, 0x18,
1900x26, 0x33, 0x3e, 0x50,
1910x38, 0x42, 0x52, 0x60,
1920x67, 0x6e, 0x77, 0xff, };
193
194
195static char truly_1080p_video_on_cmd19[] = {
1960x14, 0x00, 0x29, 0xC0,
1970xc8, 0x01, 0x00, 0x00,
1980x00, 0x00, 0xfc, 0x00,
1990x00, 0x00, 0x00, 0x00,
2000xfc, 0x00, 0x00, 0x00,
2010x00, 0x00, 0xfc, 0x00, };
202
203
204static char truly_1080p_video_on_cmd20[] = {
Sandeep Panda9c9fc312015-06-30 16:20:30 +05302050x29, 0x00, 0x05, 0x80, };
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +0530206
207
208static struct mipi_dsi_cmd truly_1080p_video_on_command[] = {
209{ 0x4 , truly_1080p_video_on_cmd0, 0x00},
210{ 0x4 , truly_1080p_video_on_cmd1, 0x00},
211{ 0x4 , truly_1080p_video_on_cmd2, 0x00},
212{ 0x4 , truly_1080p_video_on_cmd3, 0x00},
213{ 0x4 , truly_1080p_video_on_cmd4, 0xc8},
214{ 0x4 , truly_1080p_video_on_cmd5, 0x00},
215{ 0xc , truly_1080p_video_on_cmd6, 0x00},
216{ 0x8 , truly_1080p_video_on_cmd7, 0x00},
217{ 0x8 , truly_1080p_video_on_cmd8, 0x00},
218{ 0x28 , truly_1080p_video_on_cmd9, 0x00},
219{ 0xc , truly_1080p_video_on_cmd10, 0x00},
220{ 0x1c , truly_1080p_video_on_cmd11, 0x00},
221{ 0x30 , truly_1080p_video_on_cmd12, 0x00},
222{ 0x10 , truly_1080p_video_on_cmd13, 0x00},
223{ 0x4 , truly_1080p_video_on_cmd14, 0x00},
224{ 0x10 , truly_1080p_video_on_cmd15, 0x00},
225{ 0x20 , truly_1080p_video_on_cmd16, 0x00},
226{ 0xc , truly_1080p_video_on_cmd17, 0x00},
227{ 0x24 , truly_1080p_video_on_cmd18, 0x00},
228{ 0x18 , truly_1080p_video_on_cmd19, 0xc8},
229{ 0x4 , truly_1080p_video_on_cmd20, 0xc8},
230};
231#define TRULY_1080P_VIDEO_ON_COMMAND 21
232
233
234static char truly_1080p_video_off_cmd0[] = {
2350x28, 0x00, 0x05, 0x80 };
236
237
238static char truly_1080p_video_off_cmd1[] = {
2390x10, 0x00, 0x05, 0x80 };
240
241
242static struct mipi_dsi_cmd truly_1080p_video_off_command[] = {
243{ 0x4 , truly_1080p_video_off_cmd0, 0x0},
244{ 0x4 , truly_1080p_video_off_cmd1, 0x0}
245};
246#define TRULY_1080P_VIDEO_OFF_COMMAND 2
247
248
249static struct command_state truly_1080p_video_state = {
250 0, 1
251};
252
253/*---------------------------------------------------------------------------*/
254/* Command mode panel information */
255/*---------------------------------------------------------------------------*/
256
257static struct commandpanel_info truly_1080p_video_command_panel = {
258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
259};
260
261/*---------------------------------------------------------------------------*/
262/* Video mode panel information */
263/*---------------------------------------------------------------------------*/
264
265static struct videopanel_info truly_1080p_video_video_panel = {
266 0, 0, 0, 0, 1, 1, 1, 0, 0x9
267};
268
269/*---------------------------------------------------------------------------*/
270/* Lane Configuration */
271/*---------------------------------------------------------------------------*/
272
273static struct lane_configuration truly_1080p_video_lane_config = {
274 4, 0, 1, 1, 1, 1, 0
275};
276
277
278/*---------------------------------------------------------------------------*/
279/* Panel Timing */
280/*---------------------------------------------------------------------------*/
281const uint32_t truly_1080p_video_timings[] = {
282 0xE6, 0x38, 0x26, 0x00, 0x68, 0x6e, 0x2A, 0x3c, 0x44, 0x03, 0x04, 0x00
283};
284
Jayant Shekhar0e0a5772016-01-19 12:46:11 +0530285static const uint32_t truly_1080p_14nm_video_timings[] = {
286 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0,
287 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0,
288 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0,
289 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0,
290 0x23, 0x1a, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0,
291};
292
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +0530293static struct panel_timing truly_1080p_video_timing_info = {
294 0, 4, 0x02, 0x2d
295};
296
297static struct panel_reset_sequence truly_1080p_video_panel_reset_seq = {
298{ 1, 0, 1, }, { 200, 200, 200, }, 2
299};
300
301/*---------------------------------------------------------------------------*/
Padmanabhan Komanduru9acf5a62016-01-22 16:34:40 +0530302/* Dynamic fps supported frequencies by panel */
303/*---------------------------------------------------------------------------*/
304static const struct dfps_panel_info truly_1080p_video_dfps = {
Padmanabhan Komandurubf4f5402016-02-11 18:59:31 +0530305 1, 10, {48, 49, 50, 51, 52, 54, 56, 57, 58, 60}
Padmanabhan Komanduru9acf5a62016-01-22 16:34:40 +0530306};
307
308/*---------------------------------------------------------------------------*/
Padmanabhan Komanduruba17e052015-02-27 18:39:18 +0530309/* Backlight Settings */
310/*---------------------------------------------------------------------------*/
311
312static struct backlight truly_1080p_video_backlight = {
313 1, 1, 4095, 100, 1, "PMIC_8941"
314};
315
316#define TRULY_1080P_VIDEO_SIGNATURE 0xFFFF
317
318#endif /*_TRULY_1080P_VIDEO_H_*/