blob: ae73869096bcf06e00b388d508bdffdea48fc9d4 [file] [log] [blame]
Kuogee Hsieh0a490eb2015-08-31 12:57:14 -07001/* 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
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_JDI_4K_DUALDSI_VIDEO_NOFBC__H_
31#define _PANEL_JDI_4K_DUALDSI_VIDEO_NOFBC__H_
32/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include "panel.h"
36
37/*---------------------------------------------------------------------------*/
38/* Panel configuration */
39/*---------------------------------------------------------------------------*/
40static struct panel_config jdi_4k_dualdsi_video_nofbc_panel_data = {
41 "qcom,dsi_jdi_4k_nofbc_video", "dsi:0:", "qcom,mdss-dsi-panel",
42 10, 0, "DISPLAY_1", 0, 0, 40, 0, 0, 1, 0, 0, 0, 0, 0, 11, 0, 0,
43 "qcom,dsi_jdi_4k_nofbc_video",
44};
45
46/*---------------------------------------------------------------------------*/
47/* Panel resolution */
48/*---------------------------------------------------------------------------*/
49static struct panel_resolution jdi_4k_dualdsi_video_nofbc_panel_res = {
50 3840, 2160, 100, 80, 12, 0, 16, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
51};
52
53/*---------------------------------------------------------------------------*/
54/* Panel color information */
55/*---------------------------------------------------------------------------*/
56static struct color_info jdi_4k_dualdsi_video_nofbc_color = {
57 24, 0, 0xff, 0, 0, 0
58};
59
60/*---------------------------------------------------------------------------*/
61/* Panel on/off command information */
62/*---------------------------------------------------------------------------*/
63static char jdi_4k_dualdsi_video_on_cmd0[] = {
64 0x51, 0xff, 0x15, 0x80,
65};
66
67static char jdi_4k_dualdsi_video_on_cmd1[] = {
68 0x53, 0x24, 0x15, 0x80,
69};
70
71static char jdi_4k_dualdsi_video_on_cmd2[] = {
72 0x11, 0x00, 0x05, 0x80
73};
74
75static char jdi_4k_dualdsi_video_on_cmd3[] = {
76 0x29, 0x00, 0x05, 0x80
77};
78
79static char jdi_4k_dualdsi_video_on_cmd_ip_0[] = {
80 0xb0, 0x04, 0x23, 0x80
81};
82
83static char jdi_4k_dualdsi_video_on_cmd_ip_1[] = {
84 0x08, 0x00, 0x29, 0xC0,
85 0xb3, 0x14, 0x08, 0x00,
86 0x00, 0x00, 0x00, 0x00
87};
88
89static char jdi_4k_dualdsi_video_on_cmd_ip_2[] = {
90 0xd6, 0x01, 0x23, 0x80
91};
92
93static struct mipi_dsi_cmd jdi_4k_dualdsi_video_nofbc_on_command[] = {
94 {0x4, jdi_4k_dualdsi_video_on_cmd0, 0x0a},
95 {0x4, jdi_4k_dualdsi_video_on_cmd1, 0x0a},
96 {0x4, jdi_4k_dualdsi_video_on_cmd2, 0xc9},
97 {0x4, jdi_4k_dualdsi_video_on_cmd_ip_0, 0x0a},
98 {0xc, jdi_4k_dualdsi_video_on_cmd_ip_1, 0x0a},
99 {0x4, jdi_4k_dualdsi_video_on_cmd_ip_2, 0x0a},
100 {0x4, jdi_4k_dualdsi_video_on_cmd3, 0x78}
101};
102
103#define JDI_4K_DUALDSI_VIDEO_NOFBC_ON_COMMAND 7
104
105static char jdi_4k_dualdsi_videooff_cmd0[] = {
106 0x28, 0x00, 0x05, 0x80
107};
108
109static char jdi_4k_dualdsi_videooff_cmd1[] = {
110 0x10, 0x00, 0x05, 0x80
111};
112
113static struct mipi_dsi_cmd jdi_4k_dualdsi_video_nofbc_off_command[] = {
114 {0x4, jdi_4k_dualdsi_videooff_cmd0, 0x32},
115 {0x4, jdi_4k_dualdsi_videooff_cmd1, 0x78}
116};
117
118#define JDI_4K_DUALDSI_VIDEO_NOFBC_OFF_COMMAND 2
119
120
121static struct command_state jdi_4k_dualdsi_video_nofbc_state = {
122 0, 1
123};
124
125/*---------------------------------------------------------------------------*/
126/* Command mode panel information */
127/*---------------------------------------------------------------------------*/
128static struct commandpanel_info jdi_4k_dualdsi_video_nofbc_command_panel = {
129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
130};
131
132/*---------------------------------------------------------------------------*/
133/* Video mode panel information */
134/*---------------------------------------------------------------------------*/
135static struct videopanel_info jdi_4k_dualdsi_video_nofbc_video_panel = {
136 0, 0, 0, 0, 1, 1, 1, 0, 0x9
137};
138
139/*---------------------------------------------------------------------------*/
140/* Lane configuration */
141/*---------------------------------------------------------------------------*/
142static struct lane_configuration jdi_4k_dualdsi_video_nofbc_lane_config = {
143 4, 0, 1, 1, 1, 1, 0
144};
145
146/*---------------------------------------------------------------------------*/
147/* Panel timing */
148/*---------------------------------------------------------------------------*/
149static const uint32_t jdi_4k_dualdsi_video_nofbc_timings[] = {
150 0x3e, 0x38, 0x26, 0x00, 0x68, 0x6e, 0x2a, 0x3c, 0x2c, 0x03, 0x04, 0x00
151};
152
153
154static const uint32_t jdi_4k_dualdsi_thulium_video_nofbc_timings[] = {
155 0x2c, 0x27, 0x0e, 0x10, 0x0a, 0x03, 0x04, 0xa0,
156 0x2c, 0x27, 0x0e, 0x10, 0x0a, 0x03, 0x04, 0xa0,
157 0x2c, 0x27, 0x0e, 0x10, 0x0a, 0x03, 0x04, 0xa0,
158 0x2c, 0x27, 0x0e, 0x10, 0x0a, 0x03, 0x04, 0xa0,
159 0x2c, 0x32, 0x0e, 0x0f, 0x0a, 0x03, 0x04, 0xa0,
160};
161
162static struct panel_timing jdi_4k_dualdsi_video_nofbc_timing_info = {
163 0x0, 0x04, 0x0d, 0x3e
164};
165
166/*---------------------------------------------------------------------------*/
167/* Panel reset sequence */
168/*---------------------------------------------------------------------------*/
169static struct panel_reset_sequence jdi_4k_dualdsi_video_nofbc_reset_seq = {
170 {0, 0, 1, }, {200, 200, 200, }, 2
171};
172
173/*---------------------------------------------------------------------------*/
174/* Backlight setting */
175/*---------------------------------------------------------------------------*/
176static struct backlight jdi_4k_dualdsi_video_nofbc_backlight = {
177 0, 1, 4095, 100, 1, "PMIC_8941"
178};
179
180static struct labibb_desc jdi_4k_dualdsi_video_nofbc_labibb = {
181 0, 1, 5500000, 5500000, 5500000, 5500000, 3, 3, 1
182};
183
184#endif /*_PANEL_JDI_4K_DUALDSI_VIDEO_NOFBC__H_*/