blob: c2fc441f7913f2bac3ab0f9574086efeaab3bf13 [file] [log] [blame]
Ray Zhang99f68bb2015-09-23 17:39:15 +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 are
5 * 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
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the 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 "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef _PANEL_HX8394F_720P_VIDEO_H_
30#define _PANEL_HX8394F_720P_VIDEO_H_
31/*---------------------------------------------------------------------------*/
32/* HEADER files */
33/*---------------------------------------------------------------------------*/
34#include "panel.h"
35
36/*---------------------------------------------------------------------------*/
37/* Panel configuration */
38/*---------------------------------------------------------------------------*/
39static struct panel_config hx8394f_720p_video_panel_data = {
40 "qcom,mdss_dsi_hx8394f_720p_video", "dsi:0:", "qcom,mdss-dsi-panel",
41 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
42};
43
44/*---------------------------------------------------------------------------*/
45/* Panel resolution */
46/*---------------------------------------------------------------------------*/
47static struct panel_resolution hx8394f_720p_video_panel_res = {
48 720, 1280, 16, 16, 10, 0, 15, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
49};
50
51/*---------------------------------------------------------------------------*/
52/* Panel color information */
53/*---------------------------------------------------------------------------*/
54static struct color_info hx8394f_720p_video_color = {
55 24, 0, 0xff, 0, 0, 0
56};
57
58/*---------------------------------------------------------------------------*/
59/* Panel on/off command information */
60/*---------------------------------------------------------------------------*/
61static char hx8394f_720p_video_on_cmd0[] = {
62 0x04, 0x00, 0x29, 0xC0,
63 0xB9, 0xFF, 0x83, 0x94,
64
65};
66
67static char hx8394f_720p_video_on_cmd1[] = {
68 0x07, 0x00, 0x29, 0xC0,
69 0xBA, 0x63, 0x03, 0x68,
70 0x6b, 0xb2, 0xc0, 0xFF,
71};
72
73static char hx8394f_720p_video_on_cmd2[] = {
74 0x0B, 0x00, 0x29, 0xC0,
75 0xB1, 0x50, 0x12, 0x72,
76 0x09, 0x32, 0x34, 0x71,
77 0x31, 0x70, 0x2f, 0xFF,
78};
79
80static char hx8394f_720p_video_on_cmd3[] = {
81 0x07, 0x00, 0x29, 0xC0,
82 0xB2, 0x00, 0x80, 0x64,
83 0x0E, 0x0D, 0x2F, 0xFF,
84};
85
86static char hx8394f_720p_video_on_cmd4[] = {
87 0x16, 0x00, 0x29, 0xC0,
88 0xB4, 0x6C, 0x6D, 0x6C,
89 0x6D, 0x6C, 0x6D, 0x01,
90 0x01, 0xFF, 0x75, 0x00,
91 0x3f, 0x6C, 0x6D, 0x6C,
92 0x6D, 0x6C, 0x6D, 0x01,
93 0x01, 0xFF, 0xFF, 0xFF,
94};
95
96static char hx8394f_720p_video_on_cmd5[] = {
97 0x22, 0x00, 0x29, 0xC0,
98 0xD3, 0x00, 0x00, 0x07,
99 0x07, 0x40, 0x07, 0x10,
100 0x00, 0x08, 0x10, 0x08,
101 0x00, 0x08, 0x54, 0x15,
102 0x0E, 0x05, 0x0E, 0x02,
103 0x15, 0x06, 0x05, 0x06,
104 0x47, 0x44, 0x0A, 0x0A,
105 0x4B, 0x10, 0x07, 0x07,
106 0x0e, 0x40, 0xFF, 0xFF,
107};
108
109static char hx8394f_720p_video_on_cmd6[] = {
110 0x2d, 0x00, 0x29, 0xC0,
111 0xD5, 0x1A, 0x1A, 0x1B,
112 0x1B, 0x00, 0x01, 0x02,
113 0x03, 0x04, 0x05, 0x06,
114 0x07, 0x08, 0x09, 0x0A,
115 0x0B, 0x24, 0x25, 0x18,
116 0x18, 0x26, 0x27, 0x18,
117 0x18, 0x18, 0x18, 0x18,
118 0x18, 0x18, 0x18, 0x18,
119 0x18, 0x18, 0x18, 0x18,
120 0x18, 0x18, 0x18, 0x20,
121 0x21, 0x18, 0x18, 0x18,
122 0x18, 0xFF, 0xFF, 0xFF,
123};
124
125static char hx8394f_720p_video_on_cmd7[] = {
126 0x2d, 0x00, 0x29, 0xC0,
127 0xD6, 0x1A, 0x1A, 0x1B,
128 0x1B, 0x0B, 0x0A, 0x09,
129 0x08, 0x07, 0x06, 0x05,
130 0x04, 0x03, 0x02, 0x01,
131 0x00, 0x21, 0x20, 0x18,
132 0x18, 0x27, 0x26, 0x18,
133 0x18, 0x18, 0x18, 0x18,
134 0x18, 0x18, 0x18, 0x18,
135 0x18, 0x18, 0x18, 0x18,
136 0x18, 0x18, 0x18, 0x25,
137 0x24, 0x18, 0x18, 0x18,
138 0x18, 0xFF, 0xFF, 0xFF,
139};
140
141static char hx8394f_720p_video_on_cmd8[] = {
142 0x3B, 0x00, 0x29, 0xC0,
143 0xE0, 0x00, 0x0C, 0x19,
144 0x20, 0x23, 0x26, 0x29,
145 0x28, 0x51, 0x61, 0x70,
146 0x6F, 0x76, 0x86, 0x89,
147 0x8D, 0x99, 0x9A, 0x95,
148 0xA1, 0xB0, 0x57, 0x55,
149 0x58, 0x5C, 0x5e, 0x64,
150 0x6b, 0x7f, 0x00, 0x0C,
151 0x19, 0x20, 0x23, 0x26,
152 0x29, 0x28, 0x51, 0x61,
153 0x70, 0x6F, 0x76, 0x86,
154 0x89, 0x8D, 0x99, 0x9A,
155 0x95, 0xA1, 0xB0, 0x57,
156 0x55, 0x58, 0x5C, 0x5e,
157 0x64, 0x6b, 0x7f, 0xFF,
158};
159
160static char hx8394f_720p_video_on_cmd9[] = {
161 0x03, 0x00, 0x29, 0xC0,
162 0xC0, 0x1f, 0x73, 0xFF,
163};
164
165static char hx8394f_720p_video_on_cmd10[] = {
166 0x02, 0x00, 0x29, 0xC0,
167 0xCC, 0x0B, 0xFF, 0xFF,
168};
169
170static char hx8394f_720p_video_on_cmd11[] = {
171 0x02, 0x00, 0x29, 0xC0,
172 0xd4, 0x02, 0xFF, 0xFF,
173};
174
175static char hx8394f_720p_video_on_cmd12[] = {
176 0x03, 0x00, 0x29, 0xC0,
177 0xB6, 0x7E, 0x7E, 0xFF,
178};
179
180static char hx8394f_720p_video_on_cmd13[] = {
181 0x11, 0x00, 0x05, 0x80
182};
183
184static char hx8394f_720p_video_on_cmd14[] = {
185 0x29, 0x00, 0x05, 0x80
186};
187
188static struct mipi_dsi_cmd hx8394f_720p_video_on_command[] = {
189 {0x8, hx8394f_720p_video_on_cmd0, 0x00},
190 {0xc, hx8394f_720p_video_on_cmd1, 0x00},
191 {0x10, hx8394f_720p_video_on_cmd2, 0x00},
192 {0xc, hx8394f_720p_video_on_cmd3, 0x00},
193 {0x1c, hx8394f_720p_video_on_cmd4, 0x00},
194 {0x28, hx8394f_720p_video_on_cmd5, 0x00},
195 {0x34, hx8394f_720p_video_on_cmd6, 0x00},
196 {0x34, hx8394f_720p_video_on_cmd7, 0x00},
197 {0x40, hx8394f_720p_video_on_cmd8, 0x00},
198 {0x8, hx8394f_720p_video_on_cmd9, 0x00},
199 {0x8, hx8394f_720p_video_on_cmd10, 0x00},
200 {0x8, hx8394f_720p_video_on_cmd11, 0x00},
201 {0x8, hx8394f_720p_video_on_cmd12, 0x00},
202 {0x4, hx8394f_720p_video_on_cmd13, 0x96},
203 {0x4, hx8394f_720p_video_on_cmd14, 0x0a}
204};
205
206#define HX8394F_720P_VIDEO_ON_COMMAND 15
207
208
209static char hx8394f_720p_videooff_cmd0[] = {
210 0x28, 0x00, 0x05, 0x80
211};
212
213static char hx8394f_720p_videooff_cmd1[] = {
214 0x10, 0x00, 0x05, 0x80
215};
216
217static struct mipi_dsi_cmd hx8394f_720p_video_off_command[] = {
218 {0x4, hx8394f_720p_videooff_cmd0, 0x78},
219 {0x4, hx8394f_720p_videooff_cmd1, 0x96}
220};
221
222#define HX8394F_720P_VIDEO_OFF_COMMAND 2
223
224
225static struct command_state hx8394f_720p_video_state = {
226 0, 1
227};
228
229/*---------------------------------------------------------------------------*/
230/* Command mode panel information */
231/*---------------------------------------------------------------------------*/
232static struct commandpanel_info hx8394f_720p_video_command_panel = {
233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
234};
235
236/*---------------------------------------------------------------------------*/
237/* Video mode panel information */
238/*---------------------------------------------------------------------------*/
239static struct videopanel_info hx8394f_720p_video_video_panel = {
240 1, 0, 0, 0, 1, 1, 2, 0, 0x9
241};
242
243/*---------------------------------------------------------------------------*/
244/* Lane configuration */
245/*---------------------------------------------------------------------------*/
246
247static struct lane_configuration hx8394f_720p_video_lane_config = {
248 4, 0, 1, 1, 1, 1, 0
249};
250
251/*---------------------------------------------------------------------------*/
252/* Panel timing */
253/*---------------------------------------------------------------------------*/
254static const uint32_t hx8394f_720p_video_timings[] = {
255 0x72, 0x16, 0x0e, 0x00, 0x38, 0x3c, 0x12, 0x1a, 0x10, 0x03, 0x04, 0x00
256};
257
258static struct panel_timing hx8394f_720p_video_timing_info = {
259 0, 4, 0x04, 0x18
260};
261
262/*---------------------------------------------------------------------------*/
263/* Panel reset sequence */
264/*---------------------------------------------------------------------------*/
265static struct panel_reset_sequence hx8394f_720p_video_reset_seq = {
266 {1, 0, 1, }, {20, 2, 20, }, 2
267};
268
269/*---------------------------------------------------------------------------*/
270/* Backlight setting */
271/*---------------------------------------------------------------------------*/
272static struct backlight hx8394f_720p_video_backlight = {
273 1, 1, 4095, 100, 1, "PMIC_8941"
274};
275
276#define HX8394F_720P_VIDEO_SIGNATURE 0xFFFF
277
278#endif /*_PANEL_HX8394F_720P_VIDEO_H_*/