blob: d886cb22fa4aeff1e4e03873ff1bc17744b93e65 [file] [log] [blame]
Ashish Garg69e6aa02017-08-01 23:11:21 +05301/* Copyright (c) 2017, 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_AUO_390P_CMD_H_
31
32#define _PANEL_AUO_390P_CMD_H_
33/*---------------------------------------------------------------------------*/
34/* HEADER files */
35/*---------------------------------------------------------------------------*/
36#include "panel.h"
37
38/*---------------------------------------------------------------------------*/
39/* Panel configuration */
40/*---------------------------------------------------------------------------*/
41
42static struct panel_config auo_390p_cmd_panel_data = {
43 "qcom,mdss_dsi_auo_390p_cmd", "dsi:0:", "qcom,mdss-dsi-panel",
44 11, 1, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
45};
46
47/*---------------------------------------------------------------------------*/
48/* Panel resolution */
49/*---------------------------------------------------------------------------*/
50static struct panel_resolution auo_390p_cmd_panel_res = {
51 390, 390, 4, 4, 4, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0
52};
53
54/*---------------------------------------------------------------------------*/
55/* Panel Color Information */
56/*---------------------------------------------------------------------------*/
57static struct color_info auo_390p_cmd_color = {
58 24, 0, 0xff, 0, 0, 0
59};
60
61/*---------------------------------------------------------------------------*/
62/* Panel Command information */
63/*---------------------------------------------------------------------------*/
64static char auo_390p_cmd_on_cmd0[] = {
65 0xfe, 0x01, 0x015, 0x80,
66};
67
68static char auo_390p_cmd_on_cmd1[] = {
69 0x0a, 0xf0, 0x015, 0x80,
70};
71
72static char auo_390p_cmd_on_cmd2[] = {
73 0xfe, 0x00, 0x15, 0x80,
74};
75
76
77static char auo_390p_cmd_on_cmd3[] = {
78 0x35, 0x00, 0x15, 0x80,
79};
80
81
82static char auo_390p_cmd_on_cmd4[] = {
83 0x05, 0x00, 0x29, 0xC0,
84 0x2a, 0x00, 0x04, 0x01,
85 0x89, 0xFF, 0xFF, 0xFF,
86};
87
88
89static char auo_390p_cmd_on_cmd5[] = {
90 0x05, 0x00, 0x29, 0xC0,
91 0x2b, 0x00, 0x00, 0x01,
92 0x85, 0xFF, 0xFF, 0xFF,
93};
94
95
96static char auo_390p_cmd_on_cmd6[] = {
97 0x05, 0x00, 0x29, 0xC0,
98 0x30, 0x00, 0x00, 0x01,
99 0x85, 0xFF, 0xFF, 0xFF,
100};
101
102
103static char auo_390p_cmd_on_cmd7[] = {
104 0x05, 0x00, 0x29, 0xC0,
105 0x31, 0x00, 0x04, 0x01,
106 0x89, 0xFF, 0xFF, 0xFF,
107};
108
109
110static char auo_390p_cmd_on_cmd8[] = {
111 0x12, 0x00, 0x05, 0x80,
112};
113
114
115static char auo_390p_cmd_on_cmd9[] = {
116 0x53, 0x20, 0x015, 0x80,
117};
118
119
120static char auo_390p_cmd_on_cmd10[] = {
Ashish Garg69e6aa02017-08-01 23:11:21 +0530121 0x11, 0x00, 0x05, 0x80,
122};
123
124
Ashish Gargb071faa2017-08-29 11:39:01 +0530125static char auo_390p_cmd_on_cmd11[] = {
Ashish Garg69e6aa02017-08-01 23:11:21 +0530126 0x29, 0x00, 0x05, 0x80,
127};
128
129
Ashish Gargb071faa2017-08-29 11:39:01 +0530130static char auo_390p_cmd_on_cmd12[] = {
Ashish Garg69e6aa02017-08-01 23:11:21 +0530131 0x06, 0x00, 0x39, 0xC0,
132 0xf0, 0x55, 0xaa, 0x52,
133 0x08, 0x01, 0xff, 0xff,
134};
135
136
Ashish Gargb071faa2017-08-29 11:39:01 +0530137static char auo_390p_cmd_on_cmd13[] = {
Ashish Garg69e6aa02017-08-01 23:11:21 +0530138 0x07, 0x00, 0x39, 0xC0,
139 0xff, 0x00, 0x55, 0xaa,
140 0x52, 0x08, 0x01, 0xff,
141};
142
143
144static struct mipi_dsi_cmd auo_390p_cmd_on_command[] = {
145 { 0x4 , auo_390p_cmd_on_cmd0, 0x00},
146 { 0x4 , auo_390p_cmd_on_cmd1, 0x00},
147 { 0x4 , auo_390p_cmd_on_cmd2, 0x00},
148 { 0x4 , auo_390p_cmd_on_cmd3, 0x00},
149 { 0xc , auo_390p_cmd_on_cmd4, 0x00},
150 { 0xc , auo_390p_cmd_on_cmd5, 0x78},
151 { 0xc , auo_390p_cmd_on_cmd6, 0x00},
152 { 0xc , auo_390p_cmd_on_cmd7, 0x00},
153 { 0x4 , auo_390p_cmd_on_cmd8, 0x00},
154 { 0x4 , auo_390p_cmd_on_cmd9, 0x00},
155 { 0x4 , auo_390p_cmd_on_cmd10, 0x00},
156 { 0x4 , auo_390p_cmd_on_cmd11, 0x00},
Ashish Gargb071faa2017-08-29 11:39:01 +0530157 { 0xc , auo_390p_cmd_on_cmd12, 0x00},
Ashish Garg69e6aa02017-08-01 23:11:21 +0530158 { 0xc , auo_390p_cmd_on_cmd13, 0x00},
Ashish Garg69e6aa02017-08-01 23:11:21 +0530159};
160
Ashish Gargb071faa2017-08-29 11:39:01 +0530161#define AUO_390P_CMD_ON_COMMAND 14
Ashish Garg69e6aa02017-08-01 23:11:21 +0530162
163
164static char auo_390p_cmd_off_cmd0[] = {
165 0x28, 0x00, 0x05, 0x80
166};
167
168
169static char auo_390p_cmd_off_cmd1[] = {
170 0x10, 0x00, 0x05, 0x80
171};
172
173
174static struct mipi_dsi_cmd auo_390p_cmd_off_command[] = {
175 { 0x4 , auo_390p_cmd_off_cmd0, 0x0},
176 { 0x4 , auo_390p_cmd_off_cmd1, 0x0}
177};
178
179#define AUO_390P_CMD_OFF_COMMAND 2
180
181
182static struct command_state auo_390p_cmd_state = {
183 0, 1
184};
185
186/*---------------------------------------------------------------------------*/
187/* Command mode panel information */
188/*---------------------------------------------------------------------------*/
189
190static struct commandpanel_info auo_390p_cmd_command_panel = {
191 0x1, 0x1, 0x1, 0, 0, 0, 0, 0, 0, 0x1, 0, 0
192};
193
194/*---------------------------------------------------------------------------*/
195/* Video mode panel information */
196/*---------------------------------------------------------------------------*/
197
198static struct videopanel_info auo_390p_cmd_video_panel = {
199 0, 0, 0, 0, 1, 1, 1, 0, 0x9
200};
201
202/*---------------------------------------------------------------------------*/
203/* Lane Configuration */
204/*---------------------------------------------------------------------------*/
205
206static struct lane_configuration auo_390p_cmd_lane_config = {
207 1, 0, 1, 0, 0, 0, 0
208};
209
210
211/*---------------------------------------------------------------------------*/
212/* Panel Timing */
213/*---------------------------------------------------------------------------*/
214const uint32_t auo_390p_cmd_timings[] = {
215 0x5F, 0x12, 0x0A, 0x00, 0x32, 0x34, 0x10, 0x16, 0x0F, 0x03, 0x04, 0x00
216};
217
218static struct panel_timing auo_390p_cmd_timing_info = {
219 0, 4, 0x05, 0x11
220};
221
222static const uint32_t auo_390p_14nm_cmd_timings[] = {
223 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
224 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
225 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
226 0x23, 0x1e, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
227 0x23, 0x18, 0x7, 0x8, 0x5, 0x3, 0x4, 0xa0,
228};
229
230static struct panel_reset_sequence auo_390p_cmd_panel_reset_seq = {
231 { 1, 0, 1, }, { 200, 200, 200, }, 2
232};
233
234/*---------------------------------------------------------------------------*/
235/* Backlight Settings */
236/*---------------------------------------------------------------------------*/
237
238static struct backlight auo_390p_cmd_backlight = {
239 1, 1, 4095, 100, 1, "PMIC_8941"
240};
241
242#define AUO_390P_CMD_SIGNATURE 0xFFFF
243
244#endif /*_AUO_390P_CMD_H_*/