blob: f823834143709851b945a9f922d18512c9764d35 [file] [log] [blame]
Ray Zhang37ffcd82015-02-05 19:28:08 +08001/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
Ray Zhangf1ff55c2014-11-18 15:50:44 +08002*
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_HX8379C_FWVGA_VIDEO_H_
30#define _PANEL_HX8379C_FWVGA_VIDEO_H_
31/*---------------------------------------------------------------------------*/
32/* HEADER files */
33/*---------------------------------------------------------------------------*/
34#include "panel.h"
35
36/*---------------------------------------------------------------------------*/
37/* Panel configuration */
38/*---------------------------------------------------------------------------*/
39static struct panel_config hx8379c_fwvga_video_panel_data = {
40 "qcom,mdss_dsi_hx8379c_fwvga_video", "dsi:0:", "qcom,mdss-dsi-panel",
Ray Zhang37ffcd82015-02-05 19:28:08 +080041 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 1, 7000, 0, 0, 0, 0, 0
Ray Zhangf1ff55c2014-11-18 15:50:44 +080042};
43
44/*---------------------------------------------------------------------------*/
45/* Panel resolution */
46/*---------------------------------------------------------------------------*/
47static struct panel_resolution hx8379c_fwvga_video_panel_res = {
48 480, 854, 60, 60, 60, 0, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0
49};
50
51/*---------------------------------------------------------------------------*/
52/* Panel color information */
53/*---------------------------------------------------------------------------*/
54static struct color_info hx8379c_fwvga_video_color = {
55 24, 0, 0xff, 0, 0, 0
56};
57
58/*---------------------------------------------------------------------------*/
59/* Panel on/off command information */
60/*---------------------------------------------------------------------------*/
61static char hx8379c_fwvga_video_on_cmd0[] = {
62 0x04, 0x00, 0x39, 0xC0,
63 0xB9, 0xFF, 0x83, 0x79,
64};
65
66static char hx8379c_fwvga_video_on_cmd1[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +080067 0x11, 0x00, 0x39, 0xC0,
Ray Zhangf1ff55c2014-11-18 15:50:44 +080068 0xB1, 0x44, 0x1C, 0x1C,
69 0x31, 0x31, 0x50, 0xD0,
70 0xEE, 0x54, 0x80, 0x38,
71 0x38, 0xF8, 0x32, 0x22,
Ray Zhang37ffcd82015-02-05 19:28:08 +080072 0x22, 0xFF, 0xFF, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +080073};
74
75static char hx8379c_fwvga_video_on_cmd2[] = {
76 0x0A, 0x00, 0x39, 0xC0,
77 0xB2, 0x80, 0xFE, 0x0B,
78 0x04, 0x00, 0x50, 0x11,
Ray Zhang629831b2015-03-30 14:18:06 +080079 0x42, 0x15, 0xFF, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +080080};
81
82static char hx8379c_fwvga_video_on_cmd3[] = {
83 0x0B, 0x00, 0x39, 0xC0,
84 0xB4, 0x69, 0x6A, 0x69,
85 0x6A, 0x69, 0x6A, 0x22,
86 0x70, 0x23, 0x70, 0xFF,
87};
88
89static char hx8379c_fwvga_video_on_cmd4[] = {
Ray Zhang629831b2015-03-30 14:18:06 +080090 0x0B, 0x00, 0x39, 0xC0,
91 0xBA, 0x41, 0x83, 0xA8,
92 0x4D, 0xB2, 0x24, 0x00,
93 0x00, 0x50, 0x90, 0xFF,
94};
95
96static char hx8379c_fwvga_video_on_cmd5[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +080097 0x05, 0x00, 0x39, 0xC0,
98 0xC7, 0x00, 0x00, 0x00,
99 0xC0, 0xFF, 0xFF, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800100};
101
Ray Zhang629831b2015-03-30 14:18:06 +0800102static char hx8379c_fwvga_video_on_cmd6[] = {
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800103 0x02, 0x00, 0x39, 0xC0,
Ray Zhang37ffcd82015-02-05 19:28:08 +0800104 0xCC, 0x02, 0xFF, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800105};
106
Ray Zhang629831b2015-03-30 14:18:06 +0800107static char hx8379c_fwvga_video_on_cmd7[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800108 0x02, 0x00, 0x39, 0xC0,
109 0xD2, 0x77, 0xFF, 0xFF,
110};
111
Ray Zhang629831b2015-03-30 14:18:06 +0800112static char hx8379c_fwvga_video_on_cmd8[] = {
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800113 0x1E, 0x00, 0x39, 0xC0,
114 0xD3, 0x00, 0x07, 0x00,
115 0x00, 0x00, 0x00, 0x00,
116 0x32, 0x10, 0x03, 0x00,
117 0x03, 0x03, 0x60, 0x03,
118 0x60, 0x00, 0x08, 0x00,
119 0x08, 0x45, 0x44, 0x08,
120 0x08, 0x37, 0x08, 0x08,
121 0x37, 0x09, 0xFF, 0xFF,
122};
123
Ray Zhang629831b2015-03-30 14:18:06 +0800124static char hx8379c_fwvga_video_on_cmd9[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800125 0x23, 0x00, 0x39, 0xC0,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800126 0xD5, 0x18, 0x18, 0x19,
127 0x19, 0x18, 0x18, 0x20,
128 0x21, 0x24, 0x25, 0x18,
129 0x18, 0x18, 0x18, 0x00,
130 0x01, 0x04, 0x05, 0x02,
131 0x03, 0x06, 0x07, 0x18,
132 0x18, 0x18, 0x18, 0x18,
133 0x18, 0x18, 0x18, 0x18,
Ray Zhang37ffcd82015-02-05 19:28:08 +0800134 0x18, 0x00, 0x00, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800135};
136
Ray Zhang629831b2015-03-30 14:18:06 +0800137static char hx8379c_fwvga_video_on_cmd10[] = {
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800138 0x21, 0x00, 0x39, 0xC0,
139 0xD6, 0x18, 0x18, 0x18,
140 0x18, 0x19, 0x19, 0x25,
141 0x24, 0x21, 0x20, 0x18,
142 0x18, 0x18, 0x18, 0x05,
143 0x04, 0x01, 0x00, 0x03,
144 0x02, 0x07, 0x06, 0x18,
145 0x18, 0x18, 0x18, 0x18,
146 0x18, 0x18, 0x18, 0x18,
147 0x18, 0xFF, 0xFF, 0xFF,
148};
149
Ray Zhang629831b2015-03-30 14:18:06 +0800150static char hx8379c_fwvga_video_on_cmd11[] = {
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800151 0x2B, 0x00, 0x39, 0xC0,
Ray Zhang37ffcd82015-02-05 19:28:08 +0800152 0xE0, 0x00, 0x04, 0x0B,
153 0x2F, 0x39, 0x3F, 0x21,
154 0x46, 0x07, 0x0A, 0x0C,
155 0x17, 0x0F, 0x13, 0x16,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800156 0x14, 0x15, 0x07, 0x11,
Ray Zhang37ffcd82015-02-05 19:28:08 +0800157 0x13, 0x30, 0x00, 0x04,
158 0x0B, 0x2F, 0x3A, 0x3F,
159 0x21, 0x46, 0x07, 0x0A,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800160 0x0C, 0x17, 0x0F, 0x14,
161 0x16, 0x14, 0x15, 0x07,
162 0x11, 0x13, 0x16, 0xFF,
163};
164
Ray Zhang629831b2015-03-30 14:18:06 +0800165static char hx8379c_fwvga_video_on_cmd12[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800166 0x03, 0x00, 0x39, 0xC0,
167 0xB6, 0x4E, 0x4E, 0xFF,
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800168};
169
Ray Zhang629831b2015-03-30 14:18:06 +0800170static char hx8379c_fwvga_video_on_cmd13[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800171 0x11, 0x00, 0x05, 0x80
172};
173
Ray Zhang629831b2015-03-30 14:18:06 +0800174static char hx8379c_fwvga_video_on_cmd14[] = {
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800175 0x29, 0x00, 0x05, 0x80
176};
177
178static struct mipi_dsi_cmd hx8379c_fwvga_video_on_command[] = {
179 {0x8, hx8379c_fwvga_video_on_cmd0, 0x00},
Ray Zhang37ffcd82015-02-05 19:28:08 +0800180 {0x18, hx8379c_fwvga_video_on_cmd1, 0x00},
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800181 {0x10, hx8379c_fwvga_video_on_cmd2, 0x00},
182 {0x10, hx8379c_fwvga_video_on_cmd3, 0x00},
Ray Zhang629831b2015-03-30 14:18:06 +0800183 {0x10, hx8379c_fwvga_video_on_cmd4, 0x00},
184 {0xc, hx8379c_fwvga_video_on_cmd5, 0x00},
Ray Zhang37ffcd82015-02-05 19:28:08 +0800185 {0x8, hx8379c_fwvga_video_on_cmd6, 0x00},
Ray Zhang629831b2015-03-30 14:18:06 +0800186 {0x8, hx8379c_fwvga_video_on_cmd7, 0x00},
187 {0x24, hx8379c_fwvga_video_on_cmd8, 0x00},
Ray Zhang37ffcd82015-02-05 19:28:08 +0800188 {0x28, hx8379c_fwvga_video_on_cmd9, 0x00},
Ray Zhang629831b2015-03-30 14:18:06 +0800189 {0x28, hx8379c_fwvga_video_on_cmd10, 0x00},
190 {0x30, hx8379c_fwvga_video_on_cmd11, 0x00},
191 {0x8, hx8379c_fwvga_video_on_cmd12, 0x00},
192 {0x4, hx8379c_fwvga_video_on_cmd13, 0x78},
193 {0x4, hx8379c_fwvga_video_on_cmd14, 0x14}
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800194};
195
Ray Zhang629831b2015-03-30 14:18:06 +0800196#define HX8379C_FWVGA_VIDEO_ON_COMMAND 15
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800197
198
199static char hx8379c_fwvga_videooff_cmd0[] = {
200 0x28, 0x00, 0x05, 0x80
201};
202
203static char hx8379c_fwvga_videooff_cmd1[] = {
204 0x10, 0x00, 0x05, 0x80
205};
206
207static struct mipi_dsi_cmd hx8379c_fwvga_video_off_command[] = {
208 {0x4, hx8379c_fwvga_videooff_cmd0, 0x32},
209 {0x4, hx8379c_fwvga_videooff_cmd1, 0x78}
210};
211
212#define HX8379C_FWVGA_VIDEO_OFF_COMMAND 2
213
214
215static struct command_state hx8379c_fwvga_video_state = {
216 0, 0
217};
218
219/*---------------------------------------------------------------------------*/
220/* Command mode panel information */
221/*---------------------------------------------------------------------------*/
222static struct commandpanel_info hx8379c_fwvga_video_command_panel = {
223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
224};
225
226/*---------------------------------------------------------------------------*/
227/* Video mode panel information */
228/*---------------------------------------------------------------------------*/
229static struct videopanel_info hx8379c_fwvga_video_video_panel = {
230 1, 0, 0, 0, 1, 1, 2, 0, 0x9
231};
232
233/*---------------------------------------------------------------------------*/
234/* Lane configuration */
235/*---------------------------------------------------------------------------*/
236static struct lane_configuration hx8379c_fwvga_video_lane_config = {
Ray Zhang0d303af2015-01-21 10:17:02 +0800237 2, 0, 1, 1, 0, 0, 0
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800238};
239
240/*---------------------------------------------------------------------------*/
241/* Panel timing */
242/*---------------------------------------------------------------------------*/
243static const uint32_t hx8379c_fwvga_video_timings[] = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800244 0x7B, 0x21, 0x1A, 0x00, 0x31, 0x2D, 0x1E, 0x23, 0x2B, 0x03, 0x04, 0x00
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800245};
246
247static struct panel_timing hx8379c_fwvga_video_timing_info = {
248 0, 4, 0x20, 0x2c
249};
250
251/*---------------------------------------------------------------------------*/
252/* Panel reset sequence */
253/*---------------------------------------------------------------------------*/
254static struct panel_reset_sequence hx8379c_fwvga_video_reset_seq = {
Ray Zhang37ffcd82015-02-05 19:28:08 +0800255 {1, 0, 1, }, {20, 2, 20, }, 2
Ray Zhangf1ff55c2014-11-18 15:50:44 +0800256};
257
258/*---------------------------------------------------------------------------*/
259/* Backlight setting */
260/*---------------------------------------------------------------------------*/
261static struct backlight hx8379c_fwvga_video_backlight = {
262 1, 1, 4095, 100, 1, "PMIC_8941"
263};
264
265#define HX8379C_FWVGA_VIDEO_SIGNATURE 0xFFFF
266
267#endif /*_PANEL_HX8379A_FWVGA_SKUA_VIDEO_H_*/