blob: b0f710953e24de1447916a8f3aa11c5e60ac5889 [file] [log] [blame]
Xipeng Gu94b23cc2019-07-17 16:53:53 +08001/* Copyright (c) 2019, 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_TRULY_RM69090_QVGA_CMD_H_
30#define _PANEL_TRULY_RM69090_QVGA_CMD_H_
31/*---------------------------------------------------------------------------*/
32/* HEADER files */
33/*---------------------------------------------------------------------------*/
34#include "panel.h"
35
36/*---------------------------------------------------------------------------*/
37/* Panel configuration */
38/*---------------------------------------------------------------------------*/
39static struct panel_config truly_rm69090_qvga_cmd_panel_data = {
40 "qcom,mdss_dsi_truly_rm69090_qvga_cmd", "dsi:0:", "qcom,mdss-dsi-panel",
41 10, 1, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
42};
43
44/*---------------------------------------------------------------------------*/
45/* Panel resolution */
46/*---------------------------------------------------------------------------*/
47static struct panel_resolution truly_rm69090_qvga_cmd_panel_res = {
48 368, 448, 40, 20, 2, 0, 6, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
49};
50
51/*---------------------------------------------------------------------------*/
52/* Panel color information */
53/*---------------------------------------------------------------------------*/
54static struct color_info truly_rm69090_qvga_cmd_color = {
55 24, 0, 0xff, 0, 0, 0
56};
57
58/*---------------------------------------------------------------------------*/
59/* Panel on/off command information */
60/*---------------------------------------------------------------------------*/
61static char truly_rm69090_qvga_cmd_on_cmd0[] = {
62 0xFE, 0x00, 0x15, 0x80
63};
64
65static char truly_rm69090_qvga_cmd_on_cmd1[] = {
66 0x35, 0x00, 0x15, 0x80
67};
68
69static char truly_rm69090_qvga_cmd_on_cmd2[] = {
70 0x51, 0x80, 0x15, 0x80
71};
72
73static char truly_rm69090_qvga_cmd_on_cmd3[] = {
74 0x05, 0x00, 0x39, 0xC0,
75 0x2A, 0x00, 0x10, 0x01,
76 0x7F, 0xFF, 0xFF, 0xFF,
77};
78
79static char truly_rm69090_qvga_cmd_on_cmd4[] = {
80 0x05, 0x00, 0x39, 0xC0,
81 0x2B, 0x00, 0x00, 0x01,
82 0xBF, 0xFF, 0xFF, 0xFF,
83};
84
85static char truly_rm69090_qvga_cmd_on_cmd5[] = {
86 0x11, 0x00, 0x05, 0x80
87};
88
89static char truly_rm69090_qvga_cmd_on_cmd6[] = {
90 0x29, 0x00, 0x05, 0x80
91};
92
93static struct mipi_dsi_cmd truly_rm69090_qvga_cmd_on_command[] = {
94 {0x4, truly_rm69090_qvga_cmd_on_cmd0, 0x00},
95 {0x4, truly_rm69090_qvga_cmd_on_cmd1, 0x00},
96 {0x4, truly_rm69090_qvga_cmd_on_cmd2, 0x00},
97 {0xc, truly_rm69090_qvga_cmd_on_cmd3, 0x00},
98 {0xc, truly_rm69090_qvga_cmd_on_cmd4, 0x00},
99 {0x4, truly_rm69090_qvga_cmd_on_cmd5, 0x78},
100 {0x4, truly_rm69090_qvga_cmd_on_cmd6, 0x40}
101};
102
103#define TRULY_RM69090_QVGA_CMD_ON_COMMAND 7
104
105
106static char truly_rm69090_qvga_cmdoff_cmd0[] = {
107 0x28, 0x00, 0x05, 0x80
108};
109
110static char truly_rm69090_qvga_cmdoff_cmd1[] = {
111 0x10, 0x00, 0x05, 0x80
112};
113
114static char truly_rm69090_qvga_cmdoff_cmd2[] = {
115 0x4F, 0x01, 0x15, 0x80
116};
117
118static struct mipi_dsi_cmd truly_rm69090_qvga_cmd_off_command[] = {
119 {0x4, truly_rm69090_qvga_cmdoff_cmd0, 0x28},
120 {0x4, truly_rm69090_qvga_cmdoff_cmd1, 0x78},
121 {0x4, truly_rm69090_qvga_cmdoff_cmd2, 0x00}
122};
123
124#define TRULY_RM69090_QVGA_CMD_OFF_COMMAND 3
125
126
127static struct command_state truly_rm69090_qvga_cmd_state = {
128 0, 1
129};
130
131/*---------------------------------------------------------------------------*/
132/* Command mode panel information */
133/*---------------------------------------------------------------------------*/
134static struct commandpanel_info truly_rm69090_qvga_cmd_command_panel = {
135 1, 1, 1, 0, 0, 0x2c, 0, 0, 0, 1, 0, 0
136};
137
138/*---------------------------------------------------------------------------*/
139/* Video mode panel information */
140/*---------------------------------------------------------------------------*/
141static struct videopanel_info truly_rm69090_qvga_cmd_video_panel = {
142 1, 0, 0, 0, 1, 1, 2, 0, 0x9
143};
144
145/*---------------------------------------------------------------------------*/
146/* Lane configuration */
147/*---------------------------------------------------------------------------*/
148static struct lane_configuration truly_rm69090_qvga_cmd_lane_config = {
149 1, 0, 1, 0, 0, 0, 0
150};
151
152/*---------------------------------------------------------------------------*/
153/* Panel timing */
154/*---------------------------------------------------------------------------*/
155static const uint32_t truly_rm69090_qvga_cmd_12nm_timings[] = {
156 0x04, 0x04, 0x01, 0x08, 0x00, 0x03, 0x01, 0x0D
157};
158
159static struct panel_timing truly_rm69090_qvga_cmd_timing_info = {
160 0, 4, 0x09, 0x2c
161};
162
163/*---------------------------------------------------------------------------*/
164/* Panel reset sequence */
165/*---------------------------------------------------------------------------*/
166static struct panel_reset_sequence truly_rm69090_qvga_cmd_reset_seq = {
167 {1, 0, 1, }, {1, 12, 12, }, 2
168};
169
170/*---------------------------------------------------------------------------*/
171/* Backlight setting */
172/*---------------------------------------------------------------------------*/
173static struct backlight truly_rm69090_qvga_cmd_backlight = {
174 2, 1, 255, 100, 2, "BL_CTL_DCS"
175};
176
177#endif /*_PANEL_TRULY_RM69090_QVGA_CMD_H_*/