blob: db6bfa04b7791de43907b28b580cdc40ac2c5911 [file] [log] [blame]
Ray Zhang0d303af2015-01-21 10:17:02 +08001/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
shuoyfc53d432013-10-22 09:34:50 +08002 *
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/*---------------------------------------------------------------------------
31 * This file is autogenerated file using gcdb parser. Please do not edit it.
32 * Update input XML file to add a new entry or update variable in this file
33 * VERSION = "1.0"
34 *---------------------------------------------------------------------------*/
35
36#ifndef _PANEL_HX8389B_QHD_VIDEO_H_
shuoyfc53d432013-10-22 09:34:50 +080037#define _PANEL_HX8389B_QHD_VIDEO_H_
38/*---------------------------------------------------------------------------*/
39/* HEADER files */
40/*---------------------------------------------------------------------------*/
41#include "panel.h"
42
43/*---------------------------------------------------------------------------*/
44/* Panel configuration */
45/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +080046static struct panel_config hx8389b_qhd_video_panel_data = {
Shuo Yana5541eb2013-11-28 15:13:29 +080047 "qcom,mdss_dsi_hx8389b_qhd_video", "dsi:0:", "qcom,mdss-dsi-panel",
48 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
shuoyfc53d432013-10-22 09:34:50 +080049};
50
51/*---------------------------------------------------------------------------*/
52/* Panel resolution */
53/*---------------------------------------------------------------------------*/
54static struct panel_resolution hx8389b_qhd_video_panel_res = {
Shuo Yand149fb62013-12-04 14:19:48 +080055 540, 960, 60, 39, 39, 0, 9, 13, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0
shuoyfc53d432013-10-22 09:34:50 +080056};
57
58/*---------------------------------------------------------------------------*/
Shuo Yana5541eb2013-11-28 15:13:29 +080059/* Panel color information */
shuoyfc53d432013-10-22 09:34:50 +080060/*---------------------------------------------------------------------------*/
61static struct color_info hx8389b_qhd_video_color = {
Shuo Yana5541eb2013-11-28 15:13:29 +080062 24, 0, 0xff, 0, 0, 0
shuoyfc53d432013-10-22 09:34:50 +080063};
64
65/*---------------------------------------------------------------------------*/
Shuo Yana5541eb2013-11-28 15:13:29 +080066/* Panel on/off command information */
shuoyfc53d432013-10-22 09:34:50 +080067/*---------------------------------------------------------------------------*/
68static char hx8389b_qhd_video_on_cmd0[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080069 0x04, 0x00, 0x39, 0xC0,
70 0xB9, 0xFF, 0x83, 0x89,
71};
shuoyfc53d432013-10-22 09:34:50 +080072
73static char hx8389b_qhd_video_on_cmd1[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080074 0xCC, 0x02, 0x15, 0x80
75};
shuoyfc53d432013-10-22 09:34:50 +080076
77static char hx8389b_qhd_video_on_cmd2[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080078 0x03, 0x00, 0x39, 0xC0,
79 0xC0, 0x43, 0x17, 0xFF,
80};
shuoyfc53d432013-10-22 09:34:50 +080081
82static char hx8389b_qhd_video_on_cmd3[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080083 0x08, 0x00, 0x39, 0xC0,
84 0xBA, 0x41, 0x93, 0x00,
85 0x16, 0xA4, 0x10, 0x18,
86};
shuoyfc53d432013-10-22 09:34:50 +080087
88static char hx8389b_qhd_video_on_cmd4[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080089 0x14, 0x00, 0x39, 0xC0,
90 0xB1, 0x00, 0x00, 0x06,
91 0xEB, 0x59, 0x10, 0x11,
92 0xEE, 0xEE, 0x3A, 0x42,
93 0x3F, 0x3F, 0x43, 0x01,
94 0x5A, 0xF6, 0x00, 0xE6,
95};
shuoyfc53d432013-10-22 09:34:50 +080096
97static char hx8389b_qhd_video_on_cmd5[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +080098 0x08, 0x00, 0x39, 0xC0,
99 0xB2, 0x00, 0x00, 0x78,
100 0x0C, 0x07, 0x3F, 0x80,
101};
shuoyfc53d432013-10-22 09:34:50 +0800102
103static char hx8389b_qhd_video_on_cmd6[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800104 0x04, 0x00, 0x39, 0xC0,
105 0xb7, 0x00, 0x00, 0x50,
106};
shuoyfc53d432013-10-22 09:34:50 +0800107
108static char hx8389b_qhd_video_on_cmd7[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800109 0x18, 0x00, 0x39, 0xC0,
110 0xB4, 0x80, 0x08, 0x00,
111 0x32, 0x10, 0x04, 0x32,
112 0x10, 0x00, 0x32, 0x10,
113 0x00, 0x37, 0x0a, 0x40,
114 0x08, 0x37, 0x00, 0x46,
115 0x02, 0x58, 0x58, 0x02,
116};
shuoyfc53d432013-10-22 09:34:50 +0800117
118static char hx8389b_qhd_video_on_cmd8[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800119 0x39, 0x00, 0x39, 0xC0,
120 0xD5, 0x00, 0x00, 0x00,
121 0x00, 0x01, 0x00, 0x00,
122 0x00, 0x60, 0x00, 0x99,
123 0x88, 0xAA, 0xBB, 0x88,
124 0x23, 0x88, 0x01, 0x88,
125 0x67, 0x88, 0x45, 0x01,
126 0x23, 0x88, 0x88, 0x88,
127 0x88, 0x88, 0x88, 0x99,
128 0xBB, 0xAA, 0x88, 0x54,
129 0x88, 0x76, 0x88, 0x10,
130 0x88, 0x32, 0x32, 0x10,
131 0x88, 0x88, 0x88, 0x88,
132 0x88, 0x3C, 0x04, 0x00,
133 0x00, 0x00, 0x00, 0x00,
134 0x00, 0xFF, 0xFF, 0xFF,
135};
shuoyfc53d432013-10-22 09:34:50 +0800136
137static char hx8389b_qhd_video_on_cmd9[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800138 0x23, 0x00, 0x39, 0xC0,
139 0xE0, 0x05, 0x11, 0x16,
140 0x35, 0x3F, 0x3F, 0x21,
141 0x43, 0x07, 0x0C, 0x0F,
142 0x11, 0x12, 0x10, 0x10,
143 0x1D, 0x18, 0x05, 0x11,
144 0x16, 0x35, 0x3F, 0x3F,
145 0x21, 0x43, 0x07, 0x0C,
146 0x0F, 0x11, 0x12, 0x10,
147 0x10, 0x1D, 0x18, 0xFF,
shuoyfc53d432013-10-22 09:34:50 +0800148};
149
shuoyfc53d432013-10-22 09:34:50 +0800150static char hx8389b_qhd_video_on_cmd10[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800151 0x80, 0x00, 0x39, 0xC0,
152 0xC1, 0x01, 0x00, 0x07,
153 0x13, 0x21, 0x29, 0x2F,
154 0x34, 0x3B, 0x42, 0x48,
155 0x50, 0x58, 0x61, 0x69,
156 0x71, 0x79, 0x81, 0x88,
157 0x90, 0x98, 0xA0, 0xA9,
158 0xB1, 0xB9, 0xC1, 0xC8,
159 0xCE, 0xD6, 0xDF, 0xE6,
160 0xEF, 0xF7, 0xFF, 0x0E,
161 0x5A, 0x73, 0x69, 0x36,
162 0x8E, 0x69, 0x5F, 0xC0,
163 0x00, 0x07, 0x13, 0x21,
164 0x29, 0x2F, 0x34, 0x3B,
165 0x42, 0x48, 0x50, 0x58,
166 0x61, 0x69, 0x71, 0x79,
167 0x81, 0x88, 0x90, 0x98,
168 0xA0, 0xA9, 0xB1, 0xB9,
169 0xC1, 0xC8, 0xCE, 0xD6,
170 0xDF, 0xE6, 0xEF, 0xF7,
171 0xFF, 0x0E, 0x5A, 0x73,
172 0x69, 0x36, 0x8E, 0x69,
173 0x5F, 0xC0, 0x00, 0x07,
174 0x13, 0x21, 0x29, 0x2F,
175 0x34, 0x3B, 0x42, 0x48,
176 0x50, 0x58, 0x61, 0x69,
177 0x71, 0x79, 0x81, 0x88,
178 0x90, 0x98, 0xA0, 0xA9,
179 0xB1, 0xB9, 0xC1, 0xC8,
180 0xCE, 0xD6, 0xDF, 0xE6,
181 0xEF, 0xF7, 0xFF, 0x0E,
182 0x5A, 0x73, 0x69, 0x36,
183 0x8E, 0x69, 0x5F, 0xC0,
shuoyfc53d432013-10-22 09:34:50 +0800184};
185
shuoyfc53d432013-10-22 09:34:50 +0800186static char hx8389b_qhd_video_on_cmd11[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800187 0x05, 0x00, 0x39, 0xC0,
188 0xB6, 0x00, 0x88, 0x00,
189 0x88, 0xFF, 0xFF, 0xFF,
190};
shuoyfc53d432013-10-22 09:34:50 +0800191
192static char hx8389b_qhd_video_on_cmd12[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800193 0x11, 0x00, 0x05, 0x80
shuoyfc53d432013-10-22 09:34:50 +0800194};
195
shuoyfc53d432013-10-22 09:34:50 +0800196static char hx8389b_qhd_video_on_cmd13[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800197 0x29, 0x00, 0x05, 0x80
198};
shuoyfc53d432013-10-22 09:34:50 +0800199
200static struct mipi_dsi_cmd hx8389b_qhd_video_on_command[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800201 {0x8, hx8389b_qhd_video_on_cmd0, 0x0A},
202 {0x4, hx8389b_qhd_video_on_cmd1, 0x01},
203 {0x8, hx8389b_qhd_video_on_cmd2, 0x01},
204 {0xc, hx8389b_qhd_video_on_cmd3, 0x01},
205 {0x18, hx8389b_qhd_video_on_cmd4, 0x01},
206 {0xc, hx8389b_qhd_video_on_cmd5, 0x01},
207 {0x8, hx8389b_qhd_video_on_cmd6, 0x01},
208 {0x1c, hx8389b_qhd_video_on_cmd7, 0x01},
209 {0x40, hx8389b_qhd_video_on_cmd8, 0x01},
210 {0x28, hx8389b_qhd_video_on_cmd9, 0x01},
211 {0x84, hx8389b_qhd_video_on_cmd10, 0x05},
212 {0xc, hx8389b_qhd_video_on_cmd11, 0x01},
213 {0x4, hx8389b_qhd_video_on_cmd12, 0x78},
214 {0x4, hx8389b_qhd_video_on_cmd13, 0x32}
shuoyfc53d432013-10-22 09:34:50 +0800215};
Shuo Yana5541eb2013-11-28 15:13:29 +0800216
217#define HX8389B_QHD_VIDEO_ON_COMMAND 14
shuoyfc53d432013-10-22 09:34:50 +0800218
219
220static char hx8389b_qhd_videooff_cmd0[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800221 0x28, 0x00, 0x05, 0x80
222};
shuoyfc53d432013-10-22 09:34:50 +0800223
224static char hx8389b_qhd_videooff_cmd1[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800225 0x10, 0x00, 0x05, 0x80
226};
shuoyfc53d432013-10-22 09:34:50 +0800227
228static struct mipi_dsi_cmd hx8389b_qhd_video_off_command[] = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800229 {0x4, hx8389b_qhd_videooff_cmd0, 0x32},
230 {0x4, hx8389b_qhd_videooff_cmd1, 0x78}
shuoyfc53d432013-10-22 09:34:50 +0800231};
Shuo Yana5541eb2013-11-28 15:13:29 +0800232
shuoyfc53d432013-10-22 09:34:50 +0800233#define HX8389B_QHD_VIDEO_OFF_COMMAND 2
234
235
236static struct command_state hx8389b_qhd_video_state = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800237 0, 0
shuoyfc53d432013-10-22 09:34:50 +0800238};
239
240/*---------------------------------------------------------------------------*/
241/* Command mode panel information */
242/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +0800243static struct commandpanel_info hx8389b_qhd_video_command_panel = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800244 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
shuoyfc53d432013-10-22 09:34:50 +0800245};
246
247/*---------------------------------------------------------------------------*/
248/* Video mode panel information */
249/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +0800250static struct videopanel_info hx8389b_qhd_video_video_panel = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800251 1, 0, 0, 0, 1, 1, 2, 0, 0x9
shuoyfc53d432013-10-22 09:34:50 +0800252};
253
254/*---------------------------------------------------------------------------*/
Shuo Yana5541eb2013-11-28 15:13:29 +0800255/* Lane configuration */
shuoyfc53d432013-10-22 09:34:50 +0800256/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +0800257static struct lane_configuration hx8389b_qhd_video_lane_config = {
Ray Zhang0d303af2015-01-21 10:17:02 +0800258 2, 1, 1, 1, 0, 0, 0
shuoyfc53d432013-10-22 09:34:50 +0800259};
260
shuoyfc53d432013-10-22 09:34:50 +0800261/*---------------------------------------------------------------------------*/
Shuo Yana5541eb2013-11-28 15:13:29 +0800262/* Panel timing */
shuoyfc53d432013-10-22 09:34:50 +0800263/*---------------------------------------------------------------------------*/
264static const uint32_t hx8389b_qhd_video_timings[] = {
Shuo Yand149fb62013-12-04 14:19:48 +0800265 0x87, 0x1E, 0x14, 0x00, 0x44, 0x4B, 0x19, 0x21, 0x22, 0x03, 0x04, 0x00
shuoyfc53d432013-10-22 09:34:50 +0800266};
267
268static struct panel_timing hx8389b_qhd_video_timing_info = {
Shuo Yana5541eb2013-11-28 15:13:29 +0800269 0, 4, 0x04, 0x1b
shuoyfc53d432013-10-22 09:34:50 +0800270};
Shuo Yana5541eb2013-11-28 15:13:29 +0800271
272/*---------------------------------------------------------------------------*/
273/* Panel reset sequence */
274/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +0800275static struct panel_reset_sequence hx8389b_qhd_video_reset_seq = {
276 { 2, 0, 2, }, { 20, 2, 20, }, 2
277};
278
279/*---------------------------------------------------------------------------*/
Shuo Yana5541eb2013-11-28 15:13:29 +0800280/* Backlight setting */
shuoyfc53d432013-10-22 09:34:50 +0800281/*---------------------------------------------------------------------------*/
shuoyfc53d432013-10-22 09:34:50 +0800282static struct backlight hx8389b_qhd_video_backlight = {
283 0, 1, 255, 0, 1, 0
284};
285
shuoyfc53d432013-10-22 09:34:50 +0800286#endif /*_PANEL_HX8389B_QHD_VIDEO_H_*/