blob: 6320c60bc142257c68bc6b61de98f0aeca0f8289 [file] [log] [blame]
Vishnuvardhan Prodduturi4aa8dc42015-10-20 21:20:43 +05301/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
Kuogee Hsiehea3bed32015-07-07 13:33:15 -07002 *
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_NT35597_WQXGA_DSC_CMD_H_
31#define _PANEL_NT35597_WQXGA_DSC_CMD_H_
32/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include "panel.h"
36
37/*---------------------------------------------------------------------------*/
38/* Panel configuration */
39/*---------------------------------------------------------------------------*/
40static struct panel_config nt35597_wqxga_dsc_cmd_panel_data = {
41 "qcom,mdss_dsi_nt35597_dsc_wqxga_cmd", "dsi:1:", "qcom,mdss-dsi-panel",
42 10, 1, "DISPLAY_2", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0
43};
44
45/*---------------------------------------------------------------------------*/
46/* Panel resolution */
47/*---------------------------------------------------------------------------*/
48static struct panel_resolution nt35597_wqxga_dsc_cmd_panel_res = {
49 1440, 2560, 100, 32, 16, 0, 8, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
50};
51
52/*---------------------------------------------------------------------------*/
53/* Panel color information */
54/*---------------------------------------------------------------------------*/
55static struct color_info nt35597_wqxga_dsc_cmd_color = {
56 24, 0, 0xff, 0, 0, 0
57};
58
59/*---------------------------------------------------------------------------*/
60/* Panel on/off command information */
61/*---------------------------------------------------------------------------*/
62static char nt35597_wqxga_dsc_cmd_on_cmd0[] = {
63 0xff, 0x10, 0x15, 0x80
64};
65
66static char nt35597_wqxga_dsc_cmd_on_cmd1[] = {
67 0xfb, 0x01, 0x15, 0x80
68};
69
70static char nt35597_wqxga_dsc_cmd_on_cmd2[] = {
71 0xba, 0x03, 0x15, 0x80
72};
73
74static char nt35597_wqxga_dsc_cmd_on_cmd3[] = {
75 0xe5, 0x01, 0x15, 0x80
76};
77
78static char nt35597_wqxga_dsc_cmd_on_cmd4[] = {
79 0xb0, 0x03, 0x15, 0x80
80};
81
82static char nt35597_wqxga_dsc_cmd_on_cmd5[] = {
83 0xff, 0x28, 0x15, 0x80
84};
85
86static char nt35597_wqxga_dsc_cmd_on_cmd6[] = {
87 0x7a, 0x02, 0x15, 0x80
88};
89
90static char nt35597_wqxga_dsc_cmd_on_cmd7[] = {
91 0xfb, 0x01, 0x15, 0x80
92};
93
94static char nt35597_wqxga_dsc_cmd_on_cmd8[] = {
95 0xff, 0x10, 0x15, 0x80
96};
97
98#ifdef USE_MANUFACTUR_DSC_CMD
99static char nt35597_wqxga_dsc_cmd_on_cmd9[] = {
100 0x11, 0x00, 0x39, 0xC0,
101 0xC1, 0x09, 0x20, 0x00,
102 0x10, 0x02, 0x00, 0x02,
103 0x68, 0x01, 0xBB, 0x00,
104 0x0A, 0x06, 0x67, 0x04,
105 0xC5, 0xff, 0xff, 0xff,
106};
107
108static char nt35597_wqxga_dsc_cmd_on_cmd10[] = {
109 0x03, 0x00, 0x39, 0xC0,
110 0xc2, 0x10, 0xf0, 0xff,
111};
112#endif
113
114
115static char nt35597_wqxga_dsc_cmd_on_cmd11[] = {
116 0xfb, 0x01, 0x15, 0x80
117};
118
119static char nt35597_wqxga_dsc_cmd_on_cmd12[] = {
120 0xc0, 0x03, 0x15, 0x80
121};
122
123static char nt35597_wqxga_dsc_cmd_on_cmd13[] = {
124 0xbb, 0x10, 0x15, 0x80
125};
126
127static char nt35597_wqxga_dsc_cmd_on_cmd14[] = {
128 0x35, 0x00, 0x15, 0x80
129};
130
131static char nt35597_wqxga_dsc_cmd_on_cmd15[] = {
132 0xff, 0xe0, 0x15, 0x80
133};
134
135static char nt35597_wqxga_dsc_cmd_on_cmd16[] = {
136 0xfb, 0x01, 0x15, 0x80
137};
138
139static char nt35597_wqxga_dsc_cmd_on_cmd17[] = {
140 0x6b, 0x3d, 0x15, 0x80
141};
142
143static char nt35597_wqxga_dsc_cmd_on_cmd18[] = {
144 0x6c, 0x3d, 0x15, 0x80
145};
146
147static char nt35597_wqxga_dsc_cmd_on_cmd19[] = {
148 0x6d, 0x3d, 0x15, 0x80
149};
150
151static char nt35597_wqxga_dsc_cmd_on_cmd20[] = {
152 0x6e, 0x3d, 0x15, 0x80
153};
154
155static char nt35597_wqxga_dsc_cmd_on_cmd21[] = {
156 0x6f, 0x3d, 0x15, 0x80
157};
158
159static char nt35597_wqxga_dsc_cmd_on_cmd22[] = {
160 0x35, 0x02, 0x15, 0x80
161};
162
163static char nt35597_wqxga_dsc_cmd_on_cmd23[] = {
164 0x36, 0x72, 0x15, 0x80
165};
166
167static char nt35597_wqxga_dsc_cmd_on_cmd24[] = {
168 0x37, 0x10, 0x15, 0x80
169};
170
171static char nt35597_wqxga_dsc_cmd_on_cmd25[] = {
172 0x08, 0xc0, 0x15, 0x80
173};
174
175static char nt35597_wqxga_dsc_cmd_on_cmd26[] = {
176 0xff, 0x24, 0x15, 0x80
177};
178
179static char nt35597_wqxga_dsc_cmd_on_cmd27[] = {
180 0xfb, 0x01, 0x15, 0x80
181};
182
183static char nt35597_wqxga_dsc_cmd_on_cmd28[] = {
184 0xc6, 0x06, 0x15, 0x80
185};
186
187static char nt35597_wqxga_dsc_cmd_on_cmd29[] = {
188 0xff, 0x10, 0x15, 0x80
189};
190
191static char nt35597_wqxga_dsc_cmd_on_cmd30[] = {
192 0x11, 0x00, 0x05, 0x80
193};
194
195static char nt35597_wqxga_dsc_cmd_on_cmd31[] = {
196 0x29, 0x00, 0x05, 0x80
197};
198
199static char nt35597_wqxga_dsc_cmd_on_cmd32[] = {
200 0x01, 0x00, 0x07, 0x80
201};
202
203static struct mipi_dsi_cmd nt35597_wqxga_dsc_cmd_on_command[] = {
204 {0x4, nt35597_wqxga_dsc_cmd_on_cmd0, 0x10},
205 {0x4, nt35597_wqxga_dsc_cmd_on_cmd1, 0x10},
206 {0x4, nt35597_wqxga_dsc_cmd_on_cmd2, 0x10},
207 {0x4, nt35597_wqxga_dsc_cmd_on_cmd3, 0x10},
208 {0x4, nt35597_wqxga_dsc_cmd_on_cmd4, 0x10},
209 {0x4, nt35597_wqxga_dsc_cmd_on_cmd5, 0x10},
210 {0x4, nt35597_wqxga_dsc_cmd_on_cmd6, 0x10},
211 {0x4, nt35597_wqxga_dsc_cmd_on_cmd7, 0x10},
212 {0x4, nt35597_wqxga_dsc_cmd_on_cmd8, 0x10},
213#ifdef USE_MANUFACTUR_DSC_CMD
214 {0x18, nt35597_wqxga_dsc_cmd_on_cmd9, 0x10},
215 {0x8, nt35597_wqxga_dsc_cmd_on_cmd10, 0x10},
216#endif
217 {0x4, nt35597_wqxga_dsc_cmd_on_cmd11, 0x10},
218 {0x4, nt35597_wqxga_dsc_cmd_on_cmd12, 0x10},
219 {0x4, nt35597_wqxga_dsc_cmd_on_cmd13, 0x10},
220 {0x4, nt35597_wqxga_dsc_cmd_on_cmd14, 0x10},
221 {0x4, nt35597_wqxga_dsc_cmd_on_cmd15, 0x10},
222 {0x4, nt35597_wqxga_dsc_cmd_on_cmd16, 0x10},
223 {0x4, nt35597_wqxga_dsc_cmd_on_cmd17, 0x10},
224 {0x4, nt35597_wqxga_dsc_cmd_on_cmd18, 0x10},
225 {0x4, nt35597_wqxga_dsc_cmd_on_cmd19, 0x10},
226 {0x4, nt35597_wqxga_dsc_cmd_on_cmd20, 0x10},
227 {0x4, nt35597_wqxga_dsc_cmd_on_cmd21, 0x10},
228 {0x4, nt35597_wqxga_dsc_cmd_on_cmd22, 0x10},
229 {0x4, nt35597_wqxga_dsc_cmd_on_cmd23, 0x10},
230 {0x4, nt35597_wqxga_dsc_cmd_on_cmd24, 0x10},
231 {0x4, nt35597_wqxga_dsc_cmd_on_cmd25, 0x10},
232 {0x4, nt35597_wqxga_dsc_cmd_on_cmd26, 0x10},
233 {0x4, nt35597_wqxga_dsc_cmd_on_cmd27, 0x10},
234 {0x4, nt35597_wqxga_dsc_cmd_on_cmd28, 0x10},
235 {0x4, nt35597_wqxga_dsc_cmd_on_cmd29, 0x10},
236 {0x4, nt35597_wqxga_dsc_cmd_on_cmd30, 0x78},
237 {0x4, nt35597_wqxga_dsc_cmd_on_cmd31, 0x78},
238 {0x4, nt35597_wqxga_dsc_cmd_on_cmd32, 0x10},
239};
240
241#ifdef USE_MANUFACTUR_DSC_CMD
242#define NT35597_WQXGA_DSC_CMD_ON_COMMAND 33
243#else
244#define NT35597_WQXGA_DSC_CMD_ON_COMMAND 31
245#endif
246
247
248static char nt35597_wqxga_dsc_cmd_off_cmd0[] = {
249 0x28, 0x00, 0x05, 0x80
250};
251
252static char nt35597_wqxga_dsc_cmd_off_cmd1[] = {
253 0x10, 0x00, 0x05, 0x80
254};
255
256static struct mipi_dsi_cmd nt35597_wqxga_dsc_cmd_off_command[] = {
257 {0x4, nt35597_wqxga_dsc_cmd_off_cmd0, 0x32},
258 {0x4, nt35597_wqxga_dsc_cmd_off_cmd1, 0x78}
259};
260
261#define NT35597_WQXGA_DSC_CMD_OFF_COMMAND 2
262
263static struct command_state nt35597_wqxga_dsc_cmd_state = {
264 0, 1
265};
266
267/*---------------------------------------------------------------------------*/
268/* Command mode panel information */
269/*---------------------------------------------------------------------------*/
270static struct commandpanel_info nt35597_wqxga_dsc_cmd_command_panel = {
271 1, 1, 1, 0, 0, 0x2c, 0, 0, 0, 1, 0, 0
272};
273
274/*---------------------------------------------------------------------------*/
275/* Video mode panel information */
276/*---------------------------------------------------------------------------*/
277static struct videopanel_info nt35597_wqxga_dsc_cmd_video_panel = {
278 0, 0, 0, 0, 1, 1, 1, 0, 0
279};
280
281/*---------------------------------------------------------------------------*/
282/* Lane configuration */
283/*---------------------------------------------------------------------------*/
284static struct lane_configuration nt35597_wqxga_dsc_cmd_lane_config = {
285 4, 0, 1, 1, 1, 1, 0
286};
287
288/*---------------------------------------------------------------------------*/
289/* Panel timing */
290/*---------------------------------------------------------------------------*/
291static const uint32_t nt35597_wqxga_dsc_cmd_timings[] = {
Sandeep Panda8c2e36b2015-08-03 12:12:46 +0530292 0xa4, 0x24, 0x18, 0x00, 0x4c, 0x50, 0x1c, 0x28, 0x1c, 0x03, 0x04, 0x00,
Kuogee Hsiehea3bed32015-07-07 13:33:15 -0700293};
294
295static const uint32_t nt35597_wqxga_dsc_thulium_cmd_timings[] = {
296 0x20, 0x1d, 0x05, 0x07, 0x03, 0x03, 0x4, 0xa0,
297 0x20, 0x1d, 0x05, 0x07, 0x03, 0x03, 0x4, 0xa0,
298 0x20, 0x1d, 0x05, 0x07, 0x03, 0x03, 0x4, 0xa0,
299 0x20, 0x1d, 0x05, 0x07, 0x03, 0x03, 0x4, 0xa0,
300 0x20, 0x12, 0x05, 0x06, 0x03, 0x13, 0x4, 0xa0,
301};
302
303static struct panel_timing nt35597_wqxga_dsc_cmd_timing_info = {
304 0x0, 0x04, 0x0b, 0x24
305};
306
307/*---------------------------------------------------------------------------*/
308/* Panel reset sequence */
309/*---------------------------------------------------------------------------*/
310static struct panel_reset_sequence nt35597_wqxga_dsc_cmd_reset_seq = {
311 {1, 0, 1, }, {20, 20, 50, }, 2
312};
313
314/*---------------------------------------------------------------------------*/
315/* Backlight setting */
316/*---------------------------------------------------------------------------*/
317static struct backlight nt35597_wqxga_dsc_cmd_backlight = {
318 1, 1, 4095, 100, 1, "PMIC_8941" /* BL_WLED */
319};
320
321static struct labibb_desc nt35597_wqxga_dsc_cmd_labibb = {
Vishnuvardhan Prodduturi4aa8dc42015-10-20 21:20:43 +0530322 0, 1, 5500000, 5500000, 5500000, 5500000, 3, 3, 1, 0
Kuogee Hsiehea3bed32015-07-07 13:33:15 -0700323};
324
325/*---------------------------------------------------------------------------*/
326/* Dynamic fps supported frequencies by panel */
327/*---------------------------------------------------------------------------*/
328static const struct dfps_panel_info nt35597_wqxga_dsc_cmd_dfps = {
329 1, 8, {53, 54, 55, 56, 57, 58, 59, 60}
330};
331
332/*---------------------------------------------------------------------------*/
333/* DSC */
334/*---------------------------------------------------------------------------*/
Ujwal Patel41a665a2015-07-17 13:51:30 -0700335struct dsc_parameters nt35597_wqxga_dsc_cmd_params0 = {
Dhaval Patele20f0502016-03-30 17:41:09 -0700336 1, 1, 0, 16, 720, 8, 8, 2, 1, 0
Ujwal Patel41a665a2015-07-17 13:51:30 -0700337};
338
339/* 1LM + 1 DSC_ENC */
340struct topology_config nt35597_wqxga_dsc_cmd_config0 = {
Ujwal Patel5c3227b2015-08-12 14:48:02 -0700341 "config0", {-1, -1}, 1, &nt35597_wqxga_dsc_cmd_params0, false
Ujwal Patel41a665a2015-07-17 13:51:30 -0700342};
343
344/* 2LM + 3D Mux + 1 DSC_ENC */
345struct topology_config nt35597_wqxga_dsc_cmd_config1 = {
Ujwal Patel5c3227b2015-08-12 14:48:02 -0700346 "config1", {720, 720}, 1, &nt35597_wqxga_dsc_cmd_params0, false
Ujwal Patel41a665a2015-07-17 13:51:30 -0700347};
348
349/* 2LM + 2 DSC_ENC + DSC_MERGE */
350struct topology_config nt35597_wqxga_dsc_cmd_config2 = {
Ujwal Patel5c3227b2015-08-12 14:48:02 -0700351 "config2", {720, 720}, 2, &nt35597_wqxga_dsc_cmd_params0, false
Kuogee Hsiehea3bed32015-07-07 13:33:15 -0700352};
353
354#endif