blob: bc14996636deb1647936dc5bcbdbdf627f6437bf [file] [log] [blame]
Vishnuvardhan Prodduturi4aa8dc42015-10-20 21:20:43 +05301/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
Dhaval Patel989d4fc2015-04-01 19:04:46 -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_DUALDSI_VIDEO_H_
31#define _PANEL_NT35597_WQXGA_DUALDSI_VIDEO_H_
32/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include "panel.h"
36
37/*---------------------------------------------------------------------------*/
38/* Panel configuration */
39/*---------------------------------------------------------------------------*/
40static struct panel_config nt35597_wqxga_dualdsi_video_panel_data = {
Aravind Venkateswaranca781c12015-05-19 16:33:36 -070041 "qcom,mdss_dsi_nt35597_wqxga_video", "dsi:0:", "qcom,mdss-dsi-panel",
Kuogee Hsieh9d7e7142015-06-16 10:36:19 -070042 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 1, 0, 0, 0, 0, 0, 11, 0, 0,
Aravind Venkateswaranca781c12015-05-19 16:33:36 -070043 "qcom,mdss_dsi_nt35597_wqxga_video"
Dhaval Patel989d4fc2015-04-01 19:04:46 -070044};
45
46/*---------------------------------------------------------------------------*/
47/* Panel resolution */
48/*---------------------------------------------------------------------------*/
49static struct panel_resolution nt35597_wqxga_dualdsi_video_panel_res = {
50 1440, 2560, 100, 32, 16, 0, 8, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
51};
52
53/*---------------------------------------------------------------------------*/
54/* Panel color information */
55/*---------------------------------------------------------------------------*/
56static struct color_info nt35597_wqxga_dualdsi_video_color = {
57 24, 0, 0xff, 0, 0, 0
58};
59
60/*---------------------------------------------------------------------------*/
61/* Panel on/off command information */
62/*---------------------------------------------------------------------------*/
63static char nt35597_wqxga_dualdsi_video_on_cmd0[] = {
64 0xff, 0x10, 0x15, 0x80
65};
66
67static char nt35597_wqxga_dualdsi_video_on_cmd1[] = {
68 0xfb, 0x01, 0x15, 0x80
69};
70
71static char nt35597_wqxga_dualdsi_video_on_cmd2[] = {
72 0xba, 0x03, 0x15, 0x80
73};
74
75static char nt35597_wqxga_dualdsi_video_on_cmd3[] = {
76 0xe5, 0x01, 0x15, 0x80
77};
78
79static char nt35597_wqxga_dualdsi_video_on_cmd4[] = {
80 0x35, 0x00, 0x15, 0x80
81};
82
83static char nt35597_wqxga_dualdsi_video_on_cmd5[] = {
84 0xbb, 0x03, 0x15, 0x80
85};
86
87static char nt35597_wqxga_dualdsi_video_on_cmd6[] = {
88 0xb0, 0x03, 0x15, 0x80
89};
90
91static char nt35597_wqxga_dualdsi_video_on_cmd7[] = {
92 0x06, 0x0, 0x39, 0xc0,
93 0x3b, 0x03, 0x08, 0x08,
94 0x64, 0x9a, 0xff, 0xff
95};
96
97static char nt35597_wqxga_dualdsi_video_on_cmd8[] = {
98 0xff, 0xe0, 0x15, 0x80
99};
100
101static char nt35597_wqxga_dualdsi_video_on_cmd9[] = {
102 0xfb, 0x01, 0x15, 0x80
103};
104
105static char nt35597_wqxga_dualdsi_video_on_cmd10[] = {
106 0x6b, 0x3d, 0x15, 0x80
107};
108
109static char nt35597_wqxga_dualdsi_video_on_cmd11[] = {
110 0x6c, 0x3d, 0x15, 0x80
111};
112
113static char nt35597_wqxga_dualdsi_video_on_cmd12[] = {
114 0x6d, 0x3d, 0x15, 0x80
115};
116
117static char nt35597_wqxga_dualdsi_video_on_cmd13[] = {
118 0x6e, 0x3d, 0x15, 0x80
119};
120
121static char nt35597_wqxga_dualdsi_video_on_cmd14[] = {
122 0x6f, 0x3d, 0x15, 0x80
123};
124
125static char nt35597_wqxga_dualdsi_video_on_cmd15[] = {
126 0x35, 0x02, 0x15, 0x80
127};
128
129static char nt35597_wqxga_dualdsi_video_on_cmd16[] = {
130 0x36, 0x72, 0x15, 0x80
131};
132
133static char nt35597_wqxga_dualdsi_video_on_cmd17[] = {
134 0x37, 0x10, 0x15, 0x80
135};
136
137static char nt35597_wqxga_dualdsi_video_on_cmd18[] = {
138 0x8, 0xc0, 0x15, 0x80
139};
140
141static char nt35597_wqxga_dualdsi_video_on_cmd19[] = {
142 0xff, 0x10, 0x15, 0x80
143};
144
145static char nt35597_wqxga_dualdsi_video_on_cmd20[] = {
146 0x11, 0x00, 0x05, 0x80
147};
148
149static char nt35597_wqxga_dualdsi_video_on_cmd21[] = {
150 0x29, 0x00, 0x05, 0x80
151};
152
153static struct mipi_dsi_cmd nt35597_wqxga_dualdsi_video_on_command[] = {
154 {0x4, nt35597_wqxga_dualdsi_video_on_cmd0, 0x10},
155 {0x4, nt35597_wqxga_dualdsi_video_on_cmd1, 0x10},
156 {0x4, nt35597_wqxga_dualdsi_video_on_cmd2, 0x10},
157 {0x4, nt35597_wqxga_dualdsi_video_on_cmd3, 0x10},
158 {0x4, nt35597_wqxga_dualdsi_video_on_cmd4, 0x10},
159 {0x4, nt35597_wqxga_dualdsi_video_on_cmd5, 0x10},
160 {0x4, nt35597_wqxga_dualdsi_video_on_cmd6, 0x10},
161 {0xc, nt35597_wqxga_dualdsi_video_on_cmd7, 0x10},
162 {0x4, nt35597_wqxga_dualdsi_video_on_cmd8, 0x10},
163 {0x4, nt35597_wqxga_dualdsi_video_on_cmd9, 0x10},
164 {0x4, nt35597_wqxga_dualdsi_video_on_cmd10, 0x10},
165 {0x4, nt35597_wqxga_dualdsi_video_on_cmd11, 0x10},
166 {0x4, nt35597_wqxga_dualdsi_video_on_cmd12, 0x10},
167 {0x4, nt35597_wqxga_dualdsi_video_on_cmd13, 0x10},
168 {0x4, nt35597_wqxga_dualdsi_video_on_cmd14, 0x10},
169 {0x4, nt35597_wqxga_dualdsi_video_on_cmd15, 0x10},
170 {0x4, nt35597_wqxga_dualdsi_video_on_cmd16, 0x10},
171 {0x4, nt35597_wqxga_dualdsi_video_on_cmd17, 0x10},
172 {0x4, nt35597_wqxga_dualdsi_video_on_cmd18, 0x10},
173 {0x4, nt35597_wqxga_dualdsi_video_on_cmd19, 0x10},
174 {0x4, nt35597_wqxga_dualdsi_video_on_cmd20, 0x78},
175 {0x4, nt35597_wqxga_dualdsi_video_on_cmd21, 0x78},
176};
177
178#define NT35597_WQXGA_DUALDSI_VIDEO_ON_COMMAND 22
179
180
181static char nt35597_wqxga_dualdsi_videooff_cmd0[] = {
182 0x28, 0x00, 0x05, 0x80
183};
184
185static char nt35597_wqxga_dualdsi_videooff_cmd1[] = {
186 0x10, 0x00, 0x05, 0x80
187};
188
189static struct mipi_dsi_cmd nt35597_wqxga_dualdsi_video_off_command[] = {
190 {0x4, nt35597_wqxga_dualdsi_videooff_cmd0, 0x32},
191 {0x4, nt35597_wqxga_dualdsi_videooff_cmd1, 0x78}
192};
193
194#define NT35597_WQXGA_DUALDSI_VIDEO_OFF_COMMAND 2
195
196static struct command_state nt35597_wqxga_dualdsi_video_state = {
197 0, 1
198};
199
200/*---------------------------------------------------------------------------*/
201/* Command mode panel information */
202/*---------------------------------------------------------------------------*/
203static struct commandpanel_info nt35597_wqxga_dualdsi_video_command_panel = {
204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
205};
206
207/*---------------------------------------------------------------------------*/
208/* Video mode panel information */
209/*---------------------------------------------------------------------------*/
210static struct videopanel_info nt35597_wqxga_dualdsi_video_video_panel = {
211 0, 0, 0, 0, 1, 1, 1, 0, 0x9
212};
213
214/*---------------------------------------------------------------------------*/
215/* Lane configuration */
216/*---------------------------------------------------------------------------*/
217static struct lane_configuration nt35597_wqxga_dualdsi_video_lane_config = {
218 4, 0, 1, 1, 1, 1, 0
219};
220
221/*---------------------------------------------------------------------------*/
222/* Panel timing */
223/*---------------------------------------------------------------------------*/
224static const uint32_t nt35597_wqxga_dualdsi_video_timings[] = {
Padmanabhan Komandurud9068fb2015-06-08 17:44:12 +0530225 0xd5, 0x32, 0x22, 0x00, 0x60, 0x64, 0x26, 0x36, 0x29, 0x03, 0x04, 0x00
Dhaval Patel989d4fc2015-04-01 19:04:46 -0700226};
227
228static const uint32_t nt35597_wqxga_dualdsi_thulium_video_timings[] = {
Kuogee Hsieh9d7e7142015-06-16 10:36:19 -0700229 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
230 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
231 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
232 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
233 0x23, 0x18, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
Dhaval Patel989d4fc2015-04-01 19:04:46 -0700234};
235
236static struct panel_timing nt35597_wqxga_dualdsi_video_timing_info = {
Kuogee Hsieh9d7e7142015-06-16 10:36:19 -0700237 0x0, 0x04, 0x0d, 0x2d
Dhaval Patel989d4fc2015-04-01 19:04:46 -0700238};
239
240/*---------------------------------------------------------------------------*/
241/* Panel reset sequence */
242/*---------------------------------------------------------------------------*/
243static struct panel_reset_sequence nt35597_wqxga_dualdsi_video_reset_seq = {
244 {1, 0, 1, }, {20, 20, 50, }, 2
245};
246
247/*---------------------------------------------------------------------------*/
248/* Backlight setting */
249/*---------------------------------------------------------------------------*/
250static struct backlight nt35597_wqxga_dualdsi_video_backlight = {
251 1, 1, 4095, 100, 1, "PMIC_8941" /* BL_WLED */
252};
253
254static struct labibb_desc nt35597_wqxga_dualdsi_video_labibb = {
Vishnuvardhan Prodduturi4aa8dc42015-10-20 21:20:43 +0530255 0, 1, 5500000, 5500000, 5500000, 5500000, 3, 3, 1, 0
Dhaval Patel989d4fc2015-04-01 19:04:46 -0700256};
257
258/*---------------------------------------------------------------------------*/
259/* Dynamic fps supported frequencies by panel */
260/*---------------------------------------------------------------------------*/
261static const struct dfps_panel_info nt35597_wqxga_dualdsi_video_dfps = {
262 1, 8, {53, 54, 55, 56, 57, 58, 59, 60}
263};
264
Ujwal Patelcf584102015-08-12 14:48:02 -0700265/* 2LM + 2CTL */
266struct topology_config nt35597_wqxga_dualdsi_video_config0 = {
267 "config0", {720, 720}, 0, NULL, false
268};
269
270/* 1LM + 1CTL + PP_SPLIT */
271struct topology_config nt35597_wqxga_dualdsi_video_config1 = {
272 "config1", {-1, -1}, 0, NULL, true
273};
274
Dhaval Patel989d4fc2015-04-01 19:04:46 -0700275#endif