blob: c04fccba163dac5ad9388659a5ffb7cf7e4219a1 [file] [log] [blame]
Shivaraj Shettyd62f43f2014-11-21 14:50:15 +05301/* Copyright (c) 2014-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_HX8394D_QHD_VIDEO_H_
31
32#define _PANEL_HX8394D_QHD_VIDEO_H_
33/*---------------------------------------------------------------------------*/
34/* HEADER files */
35/*---------------------------------------------------------------------------*/
36#include "panel.h"
37
38/*---------------------------------------------------------------------------*/
39/* Panel configuration */
40/*---------------------------------------------------------------------------*/
41
42static struct panel_config hx8394d_qhd_video_panel_data = {
43 "qcom,mdss_dsi_hx8394d_qhd_video", "dsi:0:", "qcom,mdss-dsi-panel",
44 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
45};
46
47/*---------------------------------------------------------------------------*/
48/* Panel resolution */
49/*---------------------------------------------------------------------------*/
50static struct panel_resolution hx8394d_qhd_video_panel_res = {
51 540, 960, 52, 100, 24, 0, 8, 20, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
52};
53
54/*---------------------------------------------------------------------------*/
55/* Panel Color Information */
56/*---------------------------------------------------------------------------*/
57static struct color_info hx8394d_qhd_video_color = {
58 24, 0, 0xff, 0, 0, 0
59};
60
61/*---------------------------------------------------------------------------*/
62/* Panel Command information */
63/*---------------------------------------------------------------------------*/
64static char hx8394d_qhd_video_on_cmd0[] = {
65 0x04, 0x00, 0x39, 0xC0,
66 0xb9, 0xff, 0x83, 0x94,
67};
68
69
70static char hx8394d_qhd_video_on_cmd1[] = {
71 0x03, 0x00, 0x39, 0xC0,
72 0xba, 0x33, 0x83, 0xFF,
73};
74
75static char hx8394d_qhd_video_on_cmd2[] = {
76 0x10, 0x00, 0x39, 0xC0,
77 0xb1, 0x6c, 0x12, 0x12,
78 0x37, 0x04, 0x11, 0xf1,
79 0x80, 0xec, 0x94, 0x23,
80 0x80, 0xc0, 0xd2, 0x18,
81};
82
83
84static char hx8394d_qhd_video_on_cmd3[] = {
85 0x0c, 0x00, 0x39, 0xC0,
86 0xb2, 0x00, 0x64, 0x0e,
87 0x0d, 0x32, 0x23, 0x08,
88 0x08, 0x1c, 0x4d, 0x00,
89};
90
91
92static char hx8394d_qhd_video_on_cmd4[] = {
93 0x0d, 0x00, 0x39, 0xC0,
94 0xb4, 0x00, 0xff, 0x03,
95 0x50, 0x03, 0x50, 0x03,
96 0x50, 0x01, 0x6a, 0x01,
97 0x6a, 0xFF, 0xFF, 0xFF,
98};
99
100
101static char hx8394d_qhd_video_on_cmd5[] = {
102 0x02, 0x00, 0x39, 0xC0,
103 0xbc, 0x07, 0xFF, 0xFF,
104};
105
106
107static char hx8394d_qhd_video_on_cmd6[] = {
108 0x04, 0x00, 0x39, 0xC0,
109 0xbf, 0x41, 0x0e, 0x01,
110};
111
112
113static char hx8394d_qhd_video_on_cmd7[] = {
114 0x1f, 0x00, 0x39, 0xC0,
115 0xd3, 0x00, 0x07, 0x00,
116 0x00, 0x00, 0x10, 0x00,
117 0x32, 0x10, 0x05, 0x00,
118 0x00, 0x32, 0x10, 0x00,
119 0x00, 0x00, 0x32, 0x10,
120 0x00, 0x00, 0x00, 0x36,
121 0x03, 0x09, 0x09, 0x37,
122 0x00, 0x00, 0x37, 0xFF,
123};
124
125
126static char hx8394d_qhd_video_on_cmd8[] = {
127 0x2d, 0x00, 0x39, 0xC0,
128 0xd5, 0x02, 0x03, 0x00,
129 0x01, 0x06, 0x07, 0x04,
130 0x05, 0x20, 0x21, 0x22,
131 0x23, 0x18, 0x18, 0x18,
132 0x18, 0x18, 0x18, 0x18,
133 0x18, 0x18, 0x18, 0x18,
134 0x18, 0x18, 0x18, 0x18,
135 0x18, 0x18, 0x18, 0x18,
136 0x18, 0x18, 0x18, 0x18,
137 0x18, 0x18, 0x18, 0x24,
138 0x25, 0x18, 0x18, 0x19,
139 0x19, 0xFF, 0xFF, 0xFF,
140};
141
142
143static char hx8394d_qhd_video_on_cmd9[] = {
144 0x2d, 0x00, 0x39, 0xC0,
145 0xd6, 0x05, 0x04, 0x07,
146 0x06, 0x01, 0x00, 0x03,
147 0x02, 0x23, 0x22, 0x21,
148 0x20, 0x18, 0x18, 0x18,
149 0x18, 0x18, 0x18, 0x58,
150 0x58, 0x18, 0x18, 0x18,
151 0x18, 0x18, 0x18, 0x18,
152 0x18, 0x18, 0x18, 0x18,
153 0x18, 0x18, 0x18, 0x18,
154 0x18, 0x18, 0x18, 0x25,
155 0x24, 0x19, 0x19, 0x18,
156 0x18, 0xFF, 0xFF, 0xFF,
157};
158
159
160static char hx8394d_qhd_video_on_cmd10[] = {
161 0x02, 0x00, 0x39, 0xC0,
162 0xcc, 0x09, 0xFF, 0xFF,
163};
164
165
166static char hx8394d_qhd_video_on_cmd11[] = {
167 0x03, 0x00, 0x39, 0xC0,
168 0xc0, 0x30, 0x14, 0xFF,
169};
170
171static char hx8394d_qhd_video_on_cmd12[] = {
172 0x05, 0x00, 0x39, 0xC0,
173 0xc7, 0x00, 0xc0, 0x40,
174 0xc0, 0xFF, 0xFF, 0xFF,
175};
176
177static char hx8394d_qhd_video_on_cmd13[] = {
178 0x03, 0x00, 0x39, 0xC0,
179 0xb6, 0x43, 0x43, 0xFF,
180};
181
182static char hx8394d_qhd_video_on_cmd14[] = {
183 0x11, 0x00, 0x05, 0x80
184};
185
186static char hx8394d_qhd_video_on_cmd15[] = {
187 0x29, 0x00, 0x05, 0x80
188};
189
190static struct mipi_dsi_cmd hx8394d_qhd_video_on_command[] = {
191 { 0x8 , hx8394d_qhd_video_on_cmd0, 0x00},
192 { 0x8 , hx8394d_qhd_video_on_cmd1, 0x00},
193 { 0x14 , hx8394d_qhd_video_on_cmd2, 0x00},
194 { 0x10 , hx8394d_qhd_video_on_cmd3, 0x00},
195 { 0x14 , hx8394d_qhd_video_on_cmd4, 0x00},
196 { 0x8 , hx8394d_qhd_video_on_cmd5, 0x00},
197 { 0x8 , hx8394d_qhd_video_on_cmd6, 0x00},
198 { 0x24 , hx8394d_qhd_video_on_cmd7, 0x00},
199 { 0x34 , hx8394d_qhd_video_on_cmd8, 0x00},
200 { 0x34 , hx8394d_qhd_video_on_cmd9, 0x00},
201 { 0x8 , hx8394d_qhd_video_on_cmd10, 0x00},
202 { 0x8 , hx8394d_qhd_video_on_cmd11, 0x00},
203 { 0xc , hx8394d_qhd_video_on_cmd12, 0x00},
204 { 0x8 , hx8394d_qhd_video_on_cmd13, 0x00},
205 { 0x4 , hx8394d_qhd_video_on_cmd14, 0xc8},
206 { 0x4 , hx8394d_qhd_video_on_cmd15, 0x0a}
207};
208#define HX8394D_QHD_VIDEO_ON_COMMAND 16
209
Shivaraj Shetty2d08e262015-02-18 12:32:22 +0530210static char hx8394d_qhd_video_off_cmd0[] = {
211 0x28, 0x00, 0x05, 0x80
212};
213
214static char hx8394d_qhd_video_off_cmd1[] = {
215 0x10, 0x00, 0x05, 0x80
216};
217
218static struct mipi_dsi_cmd hx8394d_qhd_video_off_command[] = {
219 {0x4, hx8394d_qhd_video_off_cmd0, 0x32},
220 {0x4, hx8394d_qhd_video_off_cmd1, 0x78}
221};
222
223#define HX8394D_QHD_VIDEO_OFF_COMMAND 2
224
Shivaraj Shettyd62f43f2014-11-21 14:50:15 +0530225static struct command_state hx8394d_qhd_video_state = {
226 0, 1
227};
228
229/*---------------------------------------------------------------------------*/
230/* Command mode panel information */
231/*---------------------------------------------------------------------------*/
232
233static struct commandpanel_info hx8394d_qhd_video_command_panel = {
234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
235};
236
237/*---------------------------------------------------------------------------*/
238/* Video mode panel information */
239/*---------------------------------------------------------------------------*/
240
241static struct videopanel_info hx8394d_qhd_video_video_panel = {
242 1, 0, 0, 0, 1, 1, 2, 0, 0x9
243};
244
245/*---------------------------------------------------------------------------*/
246/* Lane Configuration */
247/*---------------------------------------------------------------------------*/
248
249static struct lane_configuration hx8394d_qhd_video_lane_config = {
250 4, 0, 1, 1, 1, 1
251};
252
253/*---------------------------------------------------------------------------*/
254/* Panel Timing */
255/*---------------------------------------------------------------------------*/
256const uint32_t hx8394d_qhd_video_timings[] = {
257 0x79, 0x1a, 0x12, 0x00, 0x3e, 0x42, 0x16, 0x1e, 0x15, 0x03, 0x04, 0x00
258};
259
260static struct mipi_dsi_cmd hx8394d_qhd_video_rotation[] = {
261
262};
263#define HX8394D_QHD_VIDEO_ROTATION 0
264
265
266static struct panel_timing hx8394d_qhd_video_timing_info = {
267 0, 4, 0x04, 0x1b
268};
269
270static struct panel_reset_sequence hx8394d_qhd_video_panel_reset_seq = {
271{
272 1, 0, 1, }, { 20, 20, 20, }, 2
273};
274
275/*---------------------------------------------------------------------------*/
276/* Backlight Settings */
277/*---------------------------------------------------------------------------*/
278
279static struct backlight hx8394d_qhd_video_backlight = {
280 1, 1, 4095, 100, 1, "PMIC_8941"
281};
282
283#define HX8394D_QHD_VIDEO_SIGNATURE 0xFFFF
284
285#endif /*_HX8394D_QHD_VIDEO_H_*/