blob: 39f0fa6ebb93a0b43d79cd898f0f943de88dddab [file] [log] [blame]
Kinson Chike5c93432011-06-17 09:10:29 -07001/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
Chandan Uddaraju78ae6752010-10-19 12:57:10 -07002 *
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 Code Aurora Forum, Inc. 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
30#ifndef _PLATFORM_MSM_SHARED_MIPI_DSI_H_
31#define _PLATFORM_MSM_SHARED_MIPI_DSI_H_
32
33#define PASS 0
34#define FAIL 1
35
Kinson Chikfe931032011-07-21 10:01:34 -070036#define DSI_CLKOUT_TIMING_CTRL REG_DSI(0x0C0)
37#define DSI_SOFT_RESET REG_DSI(0x114)
38#define DSI_CAL_CTRL REG_DSI(0x0F4)
Chandan Uddarajufe93e822010-11-21 20:44:47 -080039
Kinson Chikfe931032011-07-21 10:01:34 -070040#define DSIPHY_SW_RESET REG_DSI(0x128)
41#define DSIPHY_PLL_RDY REG_DSI(0x280)
42#define DSIPHY_REGULATOR_CAL_PWR_CFG REG_DSI(0x518)
Chandan Uddarajufe93e822010-11-21 20:44:47 -080043
Kinson Chikfe931032011-07-21 10:01:34 -070044#define DSI_CLK_CTRL REG_DSI(0x118)
45#define DSI_TRIG_CTRL REG_DSI(0x080)
46#define DSI_CTRL REG_DSI(0x000)
47#define DSI_COMMAND_MODE_DMA_CTRL REG_DSI(0x038)
48#define DSI_COMMAND_MODE_MDP_CTRL REG_DSI(0x03C)
49#define DSI_COMMAND_MODE_MDP_DCS_CMD_CTRL REG_DSI(0x040)
50#define DSI_DMA_CMD_OFFSET REG_DSI(0x044)
51#define DSI_DMA_CMD_LENGTH REG_DSI(0x048)
52#define DSI_COMMAND_MODE_MDP_STREAM0_CTRL REG_DSI(0x054)
53#define DSI_COMMAND_MODE_MDP_STREAM0_TOTAL REG_DSI(0x058)
54#define DSI_COMMAND_MODE_MDP_STREAM1_CTRL REG_DSI(0x05C)
55#define DSI_COMMAND_MODE_MDP_STREAM1_TOTAL REG_DSI(0x060)
56#define DSI_ERR_INT_MASK0 REG_DSI(0x108)
57#define DSI_INT_CTRL REG_DSI(0x10C)
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070058
Kinson Chikfe931032011-07-21 10:01:34 -070059#define DSI_VIDEO_MODE_ACTIVE_H REG_DSI(0x020)
60#define DSI_VIDEO_MODE_ACTIVE_V REG_DSI(0x024)
61#define DSI_VIDEO_MODE_TOTAL REG_DSI(0x028)
62#define DSI_VIDEO_MODE_HSYNC REG_DSI(0x02C)
63#define DSI_VIDEO_MODE_VSYNC REG_DSI(0x030)
64#define DSI_VIDEO_MODE_VSYNC_VPOS REG_DSI(0x034)
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070065
Kinson Chikfe931032011-07-21 10:01:34 -070066#define DSI_MISR_CMD_CTRL REG_DSI(0x09C)
67#define DSI_MISR_VIDEO_CTRL REG_DSI(0x0A0)
68#define DSI_EOT_PACKET_CTRL REG_DSI(0x0C8)
69#define DSI_VIDEO_MODE_CTRL REG_DSI(0x00C)
70#define DSI_CAL_STRENGTH_CTRL REG_DSI(0x100)
71#define DSI_CMD_MODE_DMA_SW_TRIGGER REG_DSI(0x08C)
72#define DSI_CMD_MODE_MDP_SW_TRIGGER REG_DSI(0x090)
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070073
Shashank Mittalcbd271d2011-01-14 15:18:33 -080074#define MIPI_DSI_MRPS 0x04 /* Maximum Return Packet Size */
75#define MIPI_DSI_REG_LEN 16 /* 4 x 4 bytes register */
76
Kinson Chike5c93432011-06-17 09:10:29 -070077#define DTYPE_GEN_WRITE2 0x23 /* 4th Byte is 0x80 */
78#define DTYPE_GEN_LWRITE 0x29 /* 4th Byte is 0xc0 */
79#define DTYPE_DCS_WRITE1 0x15 /* 4th Byte is 0x80 */
80
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070081//BEGINNING OF Tochiba Config- video mode
82
Chandan Uddarajufe93e822010-11-21 20:44:47 -080083static const unsigned char toshiba_panel_mcap_off[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070084 0x02, 0x00, 0x29, 0xc0,
85 0xb2, 0x00, 0xff, 0xff
86};
87
Chandan Uddarajufe93e822010-11-21 20:44:47 -080088static const unsigned char toshiba_panel_ena_test_reg[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070089 0x03, 0x00, 0x29, 0xc0,
90 0xEF, 0x01, 0x01, 0xff
91};
92
Chandan Uddarajufe93e822010-11-21 20:44:47 -080093static const unsigned char toshiba_panel_ena_test_reg_wvga[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070094 0x03, 0x00, 0x29, 0xc0,
95 0xEF, 0x01, 0x01, 0xff
96};
97
Chandan Uddarajufe93e822010-11-21 20:44:47 -080098static const unsigned char toshiba_panel_num_of_2lane[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -070099 0x03, 0x00, 0x29, 0xc0, // 63:2lane
100 0xEF, 0x60, 0x63, 0xff
101};
102
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800103static const unsigned char toshiba_panel_num_of_1lane[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700104 0x03, 0x00, 0x29, 0xc0, // 62:1lane
105 0xEF, 0x60, 0x62, 0xff
106};
107
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800108static const unsigned char toshiba_panel_non_burst_sync_pulse[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700109 0x03, 0x00, 0x29, 0xc0,
110 0xef, 0x61, 0x09, 0xff
111};
112
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800113static const unsigned char toshiba_panel_set_DMODE_WQVGA[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700114 0x02, 0x00, 0x29, 0xc0,
115 0xB3, 0x01, 0xFF, 0xff
116};
117
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800118static const unsigned char toshiba_panel_set_DMODE_WVGA[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700119 0x02, 0x00, 0x29, 0xc0,
120 0xB3, 0x00, 0xFF, 0xff
121};
122
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800123static const unsigned char toshiba_panel_set_intern_WR_clk1_wvga[8]
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700124 = {
125
126 0x03, 0x00, 0x29, 0xC0, // 1 last packet
127 0xef, 0x2f, 0xcc, 0xff,
128};
129
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800130static const unsigned char toshiba_panel_set_intern_WR_clk2_wvga[8]
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700131 = {
132
133 0x03, 0x00, 0x29, 0xC0, // 1 last packet
134 0xef, 0x6e, 0xdd, 0xff,
135};
136
137static const unsigned char
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800138 toshiba_panel_set_intern_WR_clk1_wqvga[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700139
140 0x03, 0x00, 0x29, 0xC0, // 1 last packet
141 0xef, 0x2f, 0x22, 0xff,
142};
143
144static const unsigned char
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800145 toshiba_panel_set_intern_WR_clk2_wqvga[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700146
147 0x03, 0x00, 0x29, 0xC0, // 1 last packet
148 0xef, 0x6e, 0x33, 0xff,
149};
150
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800151static const unsigned char toshiba_panel_set_hor_addr_2A_wvga[12] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700152
153 0x05, 0x00, 0x39, 0xC0, // 1 last packet
154 // 0x2A, 0x00, 0x08, 0x00,//100 = 64h
155 // 0x6b, 0xFF, 0xFF, 0xFF,
156 0x2A, 0x00, 0x00, 0x01, // 0X1DF = 480-1 0X13F = 320-1
157 0xdf, 0xFF, 0xFF, 0xFF,
158};
159
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800160static const unsigned char toshiba_panel_set_hor_addr_2B_wvga[12] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700161
162 0x05, 0x00, 0x39, 0xC0, // 1 last packet
163 // 0x2B, 0x00, 0x08, 0x00,//0X355 = 854-1; 0X1DF = 480-1
164 // 0x6b, 0xFF, 0xFF, 0xFF,
165 0x2B, 0x00, 0x00, 0x03, // 0X355 = 854-1; 0X1DF = 480-1
166 0x55, 0xFF, 0xFF, 0xFF,
167};
168
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800169static const unsigned char toshiba_panel_set_hor_addr_2A_wqvga[12]
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700170 = {
171
172 0x05, 0x00, 0x39, 0xC0, // 1 last packet
173 0x2A, 0x00, 0x00, 0x00, // 0XEF = 240-1
174 0xef, 0xFF, 0xFF, 0xFF,
175};
176
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800177static const unsigned char toshiba_panel_set_hor_addr_2B_wqvga[12]
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700178 = {
179
180 0x05, 0x00, 0x39, 0xC0, // 1 last packet
181 0x2B, 0x00, 0x00, 0x01, // 0X1aa = 427-1;
182 0xaa, 0xFF, 0xFF, 0xFF,
183};
184
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800185static const unsigned char toshiba_panel_IFSEL[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700186 0x02, 0x00, 0x29, 0xc0,
187 0x53, 0x01, 0xff, 0xff
188};
189
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800190static const unsigned char toshiba_panel_IFSEL_cmd_mode[8] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700191 0x02, 0x00, 0x29, 0xc0,
192 0x53, 0x00, 0xff, 0xff
193};
194
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800195static const unsigned char toshiba_panel_exit_sleep[4] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700196 0x11, 0x00, 0x05, 0x80, // 25 Reg 0x29 < Display On>; generic write 1
197 // params
198};
199
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800200static const unsigned char toshiba_panel_display_on[4] = {
Chandan Uddaraju78ae6752010-10-19 12:57:10 -0700201 // 0x29, 0x00, 0x05, 0x80,//25 Reg 0x29 < Display On>; generic write 1
202 // params
203 0x29, 0x00, 0x05, 0x80, // 25 Reg 0x29 < Display On>; generic write 1
204 // params
205};
206
207//color mode off
208static const unsigned char dsi_display_config_color_mode_off[4] = {
209 0x00, 0x00, 0x02, 0x80,
210};
211
212//color mode on
213static const unsigned char dsi_display_config_color_mode_on[4] = {
214 0x00, 0x00, 0x12, 0x80,
215};
216
217//the end OF Tochiba Config- video mode
218
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800219/* NOVATEK BLUE panel */
220static char novatek_panel_sw_reset[4] = {0x01, 0x00, 0x05, 0x00}; /* DTYPE_DCS_WRITE */
221static char novatek_panel_enter_sleep[4] = {0x10, 0x00, 0x05, 0x80}; /* DTYPE_DCS_WRITE */
222static char novatek_panel_exit_sleep[4] = {0x11, 0x00, 0x05, 0x80}; /* DTYPE_DCS_WRITE */
223static char novatek_panel_display_off[4] = {0x28, 0x00, 0x05, 0x80}; /* DTYPE_DCS_WRITE */
224static char novatek_panel_display_on[4] = {0x29, 0x00, 0x05, 0x80}; /* DTYPE_DCS_WRITE */
Shashank Mittalcbd271d2011-01-14 15:18:33 -0800225static char novatek_panel_max_packet[4] = {0x04, 0x00, 0x37, 0x80}; /* DTYPE_SET_MAX_PACKET */
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800226
227static char novatek_panel_set_onelane[4] = {0xae, 0x01, 0x15, 0x80}; /* DTYPE_DCS_WRITE1 */
228static char novatek_panel_rgb_888[4] = {0x3A, 0x77, 0x15, 0x80}; /* DTYPE_DCS_WRITE1 */
229static char novatek_panel_set_twolane[4] = {0xae, 0x03, 0x15, 0x80}; /* DTYPE_DCS_WRITE1 */
230
Shashank Mittalcbd271d2011-01-14 15:18:33 -0800231static char novatek_panel_manufacture_id[4] = {0x04, 0x00, 0x06, 0xA0}; /* DTYPE_DCS_READ */
232
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800233/* commands by Novatke */
234static char novatek_panel_f4[4] = {0xf4, 0x55, 0x15, 0x80}; /* DTYPE_DCS_WRITE1 */
235static char novatek_panel_8c[20] = { /* DTYPE_DCS_LWRITE */
236 0x10, 0x00, 0x39, 0xC0, 0x8C, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
237 0x00, 0x08, 0x08, 0x00, 0x30, 0xC0, 0xB7, 0x37};
238static char novatek_panel_ff[4] = {0xff, 0x55, 0x15, 0x80}; /* DTYPE_DCS_WRITE1 */
239
240static char novatek_panel_set_width[12] = { /* DTYPE_DCS_LWRITE */
241 0x05, 0x00, 0x39, 0xC0,//1 last packet
242 0x2A, 0x00, 0x00, 0x02,//clmn:0 - 0x21B=539
243 0x1B, 0xFF, 0xFF, 0xFF
244}; /* 540 - 1 */
245static char novatek_panel_set_height[12] = { /* DTYPE_DCS_LWRITE */
246 0x05, 0x00, 0x39, 0xC0,//1 last packet
247 0x2B, 0x00, 0x00, 0x03,//row:0 - 0x3BF=959
248 0xBF, 0xFF, 0xFF, 0xFF,
249}; /* 960 - 1 */
Chandan Uddarajud25b3a42011-07-14 13:02:32 -0700250
251/* Commands to control Backlight */
252static char novatek_panel_set_led_pwm1[8] = { /* DTYPE_DCS_LWRITE */
253 0x02, 0x00, 0x39, 0xC0,//1 last packet
254 0x51, 0xFA, 0xFF, 0xFF, // Brightness level set to 0xFA -> 250
255};
256static char novatek_panel_set_led_pwm2[8] = { /* DTYPE_DCS_LWRITE */
257 0x02, 0x00, 0x39, 0xC0,
258 0x53, 0x24, 0xFF, 0xFF,
259};
260static char novatek_panel_set_led_pwm3[8] = { /* DTYPE_DCS_LWRITE */
261 0x02, 0x00, 0x39, 0xC0,
262 0x55, 0x00, 0xFF, 0xFF,
263};
264
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800265/* End of Novatek Blue panel commands */
266
Kinson Chike5c93432011-06-17 09:10:29 -0700267/* Toshiba mdt61 panel cmds */
268static const unsigned char toshiba_mdt61_mcap_start[4] = {
269 0xB0, 0x04, DTYPE_GEN_WRITE2, 0x80,
270};
271
272static const unsigned char toshiba_mdt61_num_out_pixelform[8] = {
273 0x03, 0x00, DTYPE_GEN_LWRITE, 0xC0,
274 0xB3, 0x00, 0x87, 0xFF
275};
276
277static const unsigned char toshiba_mdt61_dsi_ctrl[8] = {
278 0x03, 0x00, DTYPE_GEN_LWRITE, 0xC0,
279 0xB6, 0x30, 0x83, 0xFF
280};
281
282static const unsigned char toshiba_mdt61_panel_driving[12] = {
283 0x07, 0x00, DTYPE_GEN_LWRITE, 0xC0,
284 0xC0, 0x01, 0x00, 0x85,
285 0x00, 0x00, 0x00, 0xFF
286};
287
288static const unsigned char toshiba_mdt61_dispV_timing[12] = {
289 0x05, 0x00, DTYPE_GEN_LWRITE, 0xC0,
290 0xC1, 0x00, 0x10, 0x00,
291 0x01, 0xFF, 0xFF, 0xFF
292};
293
294static const unsigned char toshiba_mdt61_dispCtrl[8] = {
295 0x03, 0x00, DTYPE_GEN_LWRITE, 0xC0,
296 0xC3, 0x00, 0x19, 0xFF
297};
298
299static const unsigned char toshiba_mdt61_test_mode_c4[4] = {
300 0xC4, 0x03, DTYPE_GEN_WRITE2, 0x80,
301};
302
303static const unsigned char toshiba_mdt61_dispH_timing[20] = {
304 0x0F, 0x00, DTYPE_GEN_LWRITE, 0xC0,
305 0xC5, 0x00, 0x01, 0x05,
306 0x04, 0x5E, 0x00, 0x00,
307 0x00, 0x00, 0x0B, 0x17,
308 0x05, 0x00, 0x00, 0xFF
309};
310
311static const unsigned char toshiba_mdt61_test_mode_c6[4] = {
312 0xC6, 0x00, DTYPE_GEN_WRITE2, 0x80,
313};
314
315static const unsigned char toshiba_mdt61_gamma_setA[20] = {
316 0x0D, 0x00, DTYPE_GEN_LWRITE, 0xC0,
317 0xC8, 0x0A, 0x15, 0x18,
318 0x1B, 0x1C, 0x0D, 0x00,
319 0x00, 0x00, 0x00, 0x00,
320 0x00, 0xFF, 0xFF, 0xFF
321};
322
323static const unsigned char toshiba_mdt61_gamma_setB[20] = {
324 0x0D, 0x00, DTYPE_GEN_LWRITE, 0xC0,
325 0xC9, 0x0D, 0x1D, 0x1F,
326 0x1F, 0x1F, 0x10, 0x00,
327 0x00, 0x00, 0x00, 0x00,
328 0x00, 0xFF, 0xFF, 0xFF
329};
330
331static const unsigned char toshiba_mdt61_gamma_setC[20] = {
332 0x0D, 0x00, DTYPE_GEN_LWRITE, 0xC0,
333 0xCA, 0x1E, 0x1F, 0x1E,
334 0x1D, 0x1D, 0x10, 0x00,
335 0x00, 0x00, 0x00, 0x00,
336 0x00, 0xFF, 0xFF, 0xFF
337};
338
339static const unsigned char toshiba_mdt61_powerSet_ChrgPmp[12] = {
340 0x05, 0x00, DTYPE_GEN_LWRITE, 0xC0,
341 0xD0, 0x02, 0x00, 0xA3,
342 0xB8, 0xFF, 0xFF, 0xFF
343};
344
345static const unsigned char toshiba_mdt61_testMode_d1[12] = {
346 0x06, 0x00, DTYPE_GEN_LWRITE, 0xC0,
347 0xD1, 0x10, 0x14, 0x53,
348 0x64, 0x00, 0xFF, 0xFF
349};
350
351static const unsigned char toshiba_mdt61_powerSet_SrcAmp[8] = {
352 0x03, 0x00, DTYPE_GEN_LWRITE, 0xC0,
353 0xD2, 0xB3, 0x00, 0xFF
354};
355
356static const unsigned char toshiba_mdt61_powerInt_PS[8] = {
357 0x03, 0x00, DTYPE_GEN_LWRITE, 0xC0,
358 0xD3, 0x33, 0x03, 0xFF
359};
360
361static const unsigned char toshiba_mdt61_vreg[4] = {
362 0xD5, 0x00, DTYPE_GEN_WRITE2, 0x80,
363};
364
365static const unsigned char toshiba_mdt61_test_mode_d6[4] = {
366 0xD6, 0x01, DTYPE_GEN_WRITE2, 0x80,
367};
368
369static const unsigned char toshiba_mdt61_timingCtrl_d7[16] = {
370 0x09, 0x00, DTYPE_GEN_LWRITE, 0xC0,
371 0xD7, 0x09, 0x00, 0x84,
372 0x81, 0x61, 0xBC, 0xB5,
373 0x05, 0xFF, 0xFF, 0xFF
374};
375
376static const unsigned char toshiba_mdt61_timingCtrl_d8[12] = {
377 0x07, 0x00, DTYPE_GEN_LWRITE, 0xC0,
378 0xD8, 0x04, 0x25, 0x90,
379 0x4C, 0x92, 0x00, 0xFF
380};
381
382static const unsigned char toshiba_mdt61_timingCtrl_d9[8] = {
383 0x04, 0x00, DTYPE_GEN_LWRITE, 0xC0,
384 0xD9, 0x5B, 0x7F, 0x05
385};
386
387static const unsigned char toshiba_mdt61_white_balance[12] = {
388 0x06, 0x00, DTYPE_GEN_LWRITE, 0xC0,
389 0xCB, 0x00, 0x00, 0x00,
390 0x1C, 0x00, 0xFF, 0xFF
391};
392
393static const unsigned char toshiba_mdt61_vcs_settings[4] = {
394 0xDD, 0x53, DTYPE_GEN_WRITE2, 0x80,
395};
396
397static const unsigned char toshiba_mdt61_vcom_dc_settings[4] = {
398 0xDE, 0x43, DTYPE_GEN_WRITE2, 0x80,
399};
400
401static const unsigned char toshiba_mdt61_testMode_e3[12] = {
402 0x05, 0x00, DTYPE_GEN_LWRITE, 0xC0,
403 0xE3, 0x00, 0x00, 0x00,
404 0x00, 0xFF, 0xFF, 0xFF
405};
406
407static const unsigned char toshiba_mdt61_testMode_e4[12] = {
408 0x06, 0x00, DTYPE_GEN_LWRITE, 0xC0,
409 0xE4, 0x00, 0x00, 0x22,
410 0xAA, 0x00, 0xFF, 0xFF
411};
412
413static const unsigned char toshiba_mdt61_testMode_e5[4] = {
414 0xE5, 0x00, DTYPE_GEN_WRITE2, 0x80,
415};
416
417static const unsigned char toshiba_mdt61_testMode_fa[8] = {
418 0x04, 0x00, DTYPE_GEN_LWRITE, 0xC0,
419 0xFA, 0x00, 0x00, 0x00
420};
421
422
423static const unsigned char toshiba_mdt61_testMode_fd[12] = {
424 0x05, 0x00, DTYPE_GEN_LWRITE, 0xC0,
425 0xFD, 0x00, 0x00, 0x00,
426 0x00, 0xFF, 0xFF, 0xFF
427};
428
429
430static const unsigned char toshiba_mdt61_testMode_fe[12] = {
431 0x05, 0x00, DTYPE_GEN_LWRITE, 0xC0,
432 0xFE, 0x00, 0x00, 0x00,
433 0x00, 0xFF, 0xFF, 0xFF
434};
435
436static const unsigned char toshiba_mdt61_mcap_end[4] = {
437 0xB0, 0x03, DTYPE_GEN_WRITE2, 0x80,
438};
439
440static const unsigned char toshiba_mdt61_set_add_mode[4] = {
441 0x36, 0x00, DTYPE_DCS_WRITE1, 0x80,
442};
443
444static const unsigned char toshiba_mdt61_set_pixel_format[4] = {
445 0x3A, 0x70, DTYPE_DCS_WRITE1, 0x80,
446};
447
448/* Done Toshiba MDT61 Panel Commands */
449/* Toshiba MDT61 (R69320) End */
450
451static const unsigned char dsi_display_exit_sleep[4] =
452{
4530x11, 0x00, 0x15, 0x80,
454};
455
456static const unsigned char dsi_display_display_on[4] =
457{
4580x29, 0x00, 0x15, 0x80,
459};
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800460
461#define MIPI_VIDEO_MODE 1
462#define MIPI_CMD_MODE 2
463
464struct mipi_dsi_phy_ctrl {
Kinson Chike5c93432011-06-17 09:10:29 -0700465 uint32_t regulator[5];
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800466 uint32_t timing[12];
467 uint32_t ctrl[4];
468 uint32_t strength[4];
469 uint32_t pll[21];
470};
471
472struct mipi_dsi_cmd {
473 int size;
474 char *payload;
475};
476
477struct mipi_dsi_panel_config {
478 char mode;
479 char num_of_lanes;
480 struct mipi_dsi_phy_ctrl *dsi_phy_config;
481 struct mipi_dsi_cmd *panel_cmds;
482 int num_of_panel_cmds;
Aparna Mallavarapuf712f5e2011-08-04 21:11:00 +0530483 int lane_swap;
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800484};
485
486static struct mipi_dsi_cmd toshiba_panel_video_mode_cmds[] = {
Greg Grisco1073a5e2011-07-28 18:59:18 -0700487 {sizeof(toshiba_panel_mcap_off), (char *) toshiba_panel_mcap_off},
488 {sizeof(toshiba_panel_ena_test_reg), (char *) toshiba_panel_ena_test_reg},
489 {sizeof(toshiba_panel_num_of_1lane), (char *) toshiba_panel_num_of_1lane},
490 {sizeof(toshiba_panel_non_burst_sync_pulse), (char *) toshiba_panel_non_burst_sync_pulse},
491 {sizeof(toshiba_panel_set_DMODE_WVGA), (char *) toshiba_panel_set_DMODE_WVGA},
492 {sizeof(toshiba_panel_set_intern_WR_clk1_wvga), (char *) toshiba_panel_set_intern_WR_clk1_wvga},
493 {sizeof(toshiba_panel_set_intern_WR_clk2_wvga), (char *) toshiba_panel_set_intern_WR_clk2_wvga},
494 {sizeof(toshiba_panel_set_hor_addr_2A_wvga), (char *) toshiba_panel_set_hor_addr_2A_wvga},
495 {sizeof(toshiba_panel_set_hor_addr_2B_wvga), (char *) toshiba_panel_set_hor_addr_2B_wvga},
496 {sizeof(toshiba_panel_IFSEL), (char *) toshiba_panel_IFSEL},
497 {sizeof(toshiba_panel_exit_sleep), (char *) toshiba_panel_exit_sleep},
498 {sizeof(toshiba_panel_display_on), (char *) toshiba_panel_display_on},
499 {sizeof(dsi_display_config_color_mode_on), (char *) dsi_display_config_color_mode_on},
500 {sizeof(dsi_display_config_color_mode_off), (char *) dsi_display_config_color_mode_off},
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800501};
502
503static struct mipi_dsi_phy_ctrl mipi_dsi_toshiba_panel_phy_ctrl = {
504 /* 480*854, RGB888, 1 Lane 60 fps video mode */
505 {0x03, 0x01, 0x01, 0x00}, /* regulator */
506 /* timing */
507 {0x50, 0x0f, 0x14, 0x19, 0x23, 0x0e, 0x12, 0x16,
508 0x1b, 0x1c, 0x04},
509 {0x7f, 0x00, 0x00, 0x00}, /* phy ctrl */
510 {0xee, 0x03, 0x86, 0x03}, /* strength */
511 /* pll control */
512
513#if defined(DSI_BIT_CLK_366MHZ)
514 {0x41, 0xdb, 0xb2, 0xf5, 0x00, 0x50, 0x48, 0x63,
515 0x31, 0x0f, 0x07,
516 0x05, 0x14, 0x03, 0x03, 0x03, 0x54, 0x06, 0x10, 0x04, 0x03 },
517#elif defined(DSI_BIT_CLK_380MHZ)
518 {0x41, 0xf7, 0xb2, 0xf5, 0x00, 0x50, 0x48, 0x63,
519 0x31, 0x0f, 0x07,
520 0x05, 0x14, 0x03, 0x03, 0x03, 0x54, 0x06, 0x10, 0x04, 0x03 },
521#elif defined(DSI_BIT_CLK_400MHZ)
522 {0x41, 0x8f, 0xb1, 0xda, 0x00, 0x50, 0x48, 0x63,
523 0x31, 0x0f, 0x07,
524 0x05, 0x14, 0x03, 0x03, 0x03, 0x54, 0x06, 0x10, 0x04, 0x03 },
525#else /* 200 mhz */
526 {0x41, 0x8f, 0xb1, 0xda, 0x00, 0x50, 0x48, 0x63,
527 0x33, 0x1f, 0x1f /* for 1 lane ; 0x0f for 2 lanes*/,
528 0x05, 0x14, 0x03, 0x03, 0x03, 0x54, 0x06, 0x10, 0x04, 0x03 },
529#endif
530};
531
Kinson Chike5c93432011-06-17 09:10:29 -0700532
533static struct mipi_dsi_cmd toshiba_mdt61_video_mode_cmds[] = {
Greg Grisco1073a5e2011-07-28 18:59:18 -0700534 {sizeof(toshiba_mdt61_mcap_start), (char *) toshiba_mdt61_mcap_start},
535 {sizeof(toshiba_mdt61_num_out_pixelform), (char *) toshiba_mdt61_num_out_pixelform},
536 {sizeof(toshiba_mdt61_dsi_ctrl), (char *) toshiba_mdt61_dsi_ctrl},
537 {sizeof(toshiba_mdt61_panel_driving), (char *) toshiba_mdt61_panel_driving},
538 {sizeof(toshiba_mdt61_dispV_timing), (char *) toshiba_mdt61_dispV_timing},
539 {sizeof(toshiba_mdt61_dispCtrl), (char *) toshiba_mdt61_dispCtrl},
540 {sizeof(toshiba_mdt61_test_mode_c4), (char *) toshiba_mdt61_test_mode_c4},
541 {sizeof(toshiba_mdt61_dispH_timing), (char *) toshiba_mdt61_dispH_timing},
542 {sizeof(toshiba_mdt61_test_mode_c6), (char *) toshiba_mdt61_test_mode_c6},
543 {sizeof(toshiba_mdt61_gamma_setA), (char *) toshiba_mdt61_gamma_setA},
544 {sizeof(toshiba_mdt61_gamma_setB), (char *) toshiba_mdt61_gamma_setB},
545 {sizeof(toshiba_mdt61_gamma_setC), (char *) toshiba_mdt61_gamma_setC},
546 {sizeof(toshiba_mdt61_powerSet_ChrgPmp), (char *) toshiba_mdt61_powerSet_ChrgPmp},
547 {sizeof(toshiba_mdt61_testMode_d1), (char *) toshiba_mdt61_testMode_d1},
548 {sizeof(toshiba_mdt61_powerSet_SrcAmp), (char * )toshiba_mdt61_powerSet_SrcAmp},
549 {sizeof(toshiba_mdt61_powerInt_PS), (char *) toshiba_mdt61_powerInt_PS},
550 {sizeof(toshiba_mdt61_vreg), (char *) toshiba_mdt61_vreg},
551 {sizeof(toshiba_mdt61_test_mode_d6), (char *) toshiba_mdt61_test_mode_d6},
552 {sizeof(toshiba_mdt61_timingCtrl_d7), (char *) toshiba_mdt61_timingCtrl_d7},
553 {sizeof(toshiba_mdt61_timingCtrl_d8), (char *) toshiba_mdt61_timingCtrl_d8},
554 {sizeof(toshiba_mdt61_timingCtrl_d9), (char *) toshiba_mdt61_timingCtrl_d9},
555 {sizeof(toshiba_mdt61_white_balance), (char *) toshiba_mdt61_white_balance},
556 {sizeof(toshiba_mdt61_vcs_settings), (char *) toshiba_mdt61_vcs_settings},
557 {sizeof(toshiba_mdt61_vcom_dc_settings), (char *) toshiba_mdt61_vcom_dc_settings},
558 {sizeof(toshiba_mdt61_testMode_e3), (char *) toshiba_mdt61_testMode_e3},
559 {sizeof(toshiba_mdt61_testMode_e4), (char *) toshiba_mdt61_testMode_e4},
560 {sizeof(toshiba_mdt61_testMode_e5), (char *) toshiba_mdt61_testMode_e5},
561 {sizeof(toshiba_mdt61_testMode_fa), (char *) toshiba_mdt61_testMode_fa},
562 {sizeof(toshiba_mdt61_testMode_fd), (char *) toshiba_mdt61_testMode_fd},
563 {sizeof(toshiba_mdt61_testMode_fe), (char *) toshiba_mdt61_testMode_fe},
564 {sizeof(toshiba_mdt61_mcap_end), (char *) toshiba_mdt61_mcap_end},
565 {sizeof(toshiba_mdt61_set_add_mode), (char *) toshiba_mdt61_set_add_mode},
566 {sizeof(toshiba_mdt61_set_pixel_format), (char *) toshiba_mdt61_set_pixel_format},
567 {sizeof(dsi_display_exit_sleep), (char *) dsi_display_exit_sleep},
568 {sizeof(dsi_display_display_on), (char *) dsi_display_display_on},
Kinson Chike5c93432011-06-17 09:10:29 -0700569};
570
571static struct mipi_dsi_phy_ctrl mipi_dsi_toshiba_mdt61_panel_phy_ctrl = {
572 /* 600*1024, RGB888, 3 Lane 55 fps video mode */
573 {0x03, 0x0a, 0x04, 0x00, 0x20},
574 /* timing */
575 {0xab, 0x8a, 0x18, 0x00, 0x92, 0x97, 0x1b, 0x8c,
576 0x0c, 0x03, 0x04, 0xa0},
577 {0x5f, 0x00, 0x00, 0x10}, /* phy ctrl */
578 {0xff, 0x00, 0x06, 0x00}, /* strength */
579
580 /* pll control 1- 19 */
581 {0x01, 0x7f, 0x31, 0xda, 0x00, 0x40, 0x03, 0x62,
582 0x41, 0x0f, 0x01,
583 0x00, 0x1a, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x01, 0x00 },
584};
585
Shashank Mittalcbd271d2011-01-14 15:18:33 -0800586static struct mipi_dsi_cmd novatek_panel_manufacture_id_cmd =
587 {sizeof(novatek_panel_manufacture_id), novatek_panel_manufacture_id};
588
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800589static struct mipi_dsi_cmd novatek_panel_cmd_mode_cmds[] = {
590 {sizeof(novatek_panel_sw_reset), novatek_panel_sw_reset},
591 {sizeof(novatek_panel_exit_sleep), novatek_panel_exit_sleep},
592 {sizeof(novatek_panel_display_on), novatek_panel_display_on},
Shashank Mittalcbd271d2011-01-14 15:18:33 -0800593 {sizeof(novatek_panel_max_packet), novatek_panel_max_packet},
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800594 {sizeof(novatek_panel_f4), novatek_panel_f4},
595 {sizeof(novatek_panel_8c), novatek_panel_8c},
596 {sizeof(novatek_panel_ff), novatek_panel_ff},
597 {sizeof(novatek_panel_set_twolane), novatek_panel_set_twolane},
598 {sizeof(novatek_panel_set_width), novatek_panel_set_width},
599 {sizeof(novatek_panel_set_height), novatek_panel_set_height},
Chandan Uddarajud25b3a42011-07-14 13:02:32 -0700600 {sizeof(novatek_panel_rgb_888), novatek_panel_rgb_888},
601 {sizeof(novatek_panel_set_led_pwm1), novatek_panel_set_led_pwm1},
602 {sizeof(novatek_panel_set_led_pwm2), novatek_panel_set_led_pwm2},
603 {sizeof(novatek_panel_set_led_pwm3), novatek_panel_set_led_pwm3}
Chandan Uddarajufe93e822010-11-21 20:44:47 -0800604};
605
606static struct mipi_dsi_phy_ctrl mipi_dsi_novatek_panel_phy_ctrl = {
607 /* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
608 {0x03, 0x01, 0x01, 0x00}, /* regulator */
609 /* timing */
610 {0x96, 0x26, 0x23, 0x00, 0x50, 0x4B, 0x1e,
611 0x28, 0x28, 0x03, 0x04},
612 {0x7f, 0x00, 0x00, 0x00}, /* phy ctrl */
613 {0xee, 0x02, 0x86, 0x00}, /* strength */
614 /* pll control */
615 {0x40, 0xf9, 0xb0, 0xda, 0x00, 0x50, 0x48, 0x63,
616 /* 0x30, 0x07, 0x07, --> One lane configuration */
617 0x30, 0x07, 0x03, /* --> Two lane configuration */
618 0x05, 0x14, 0x03, 0x0, 0x0, 0x54, 0x06, 0x10, 0x04, 0x0},
619};
620
Aparna Mallavarapuf712f5e2011-08-04 21:11:00 +0530621/* Renesas Tremelo-M panel: List of commands */
622
623static char config_sleep_out[4] = {0x11, 0x00, 0x05, 0x80};
624static char config_CMD_MODE[4] = {0x40, 0x01, 0x15, 0x80};
625static char config_WRTXHT[12] = {0x07, 0x00, 0x39, 0xC0, 0x92, 0x16, 0x08, 0x08, 0x00, 0x01, 0xe0, 0xff};
626static char config_WRTXVT[12] = {0x07, 0x00, 0x39, 0xC0, 0x8b, 0x02, 0x02, 0x02, 0x00, 0x03, 0x60, 0xff};
627static char config_PLL2NR[4] = {0xa0, 0x24, 0x15, 0x80};
628static char config_PLL2NF1[4] = {0xa2, 0xd0, 0x15, 0x80};
629static char config_PLL2NF2[4] = {0xa4, 0x00, 0x15, 0x80};
630static char config_PLL2BWADJ1[4] = {0xa6, 0xd0, 0x15, 0x80};
631static char config_PLL2BWADJ2[4] = {0xa8, 0x00, 0x15, 0x80};
632static char config_PLL2CTL[4] = {0xaa, 0x00, 0x15, 0x80};
633static char config_DBICBR[4] = {0x48, 0x03, 0x15, 0x80};
634static char config_DBICTYPE[4] = {0x49, 0x00, 0x15, 0x80};
635static char config_DBICSET1[4] = {0x4a, 0x1c, 0x15, 0x80};
636static char config_DBICADD[4] = {0x4b, 0x00, 0x15, 0x80};
637static char config_DBICCTL[4] = {0x4e, 0x01, 0x15, 0x80};
638/* static char config_COLMOD_565[4] = {0x3a, 0x05, 0x15, 0x80}; */
639/* static char config_COLMOD_666PACK[4] = {0x3a, 0x06, 0x15, 0x80}; */
640static char config_COLMOD_888[4] = {0x3a, 0x07, 0x15, 0x80};
641static char config_MADCTL[4] = {0x36, 0x00, 0x15, 0x80};
642static char config_DBIOC[4] = {0x82, 0x40, 0x15, 0x80};
643static char config_CASET[12] = {0x07, 0x00, 0x39, 0xC0, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xdf , 0xff};
644static char config_PASET[12] = {0x07, 0x00, 0x39, 0xC0, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5f , 0xff};
645static char config_TXON[4] = {0x81, 0x00, 0x05, 0x80};
646static char config_BLSET_TM[4] = {0xff, 0x6c, 0x15, 0x80};
647
648static char config_AGCPSCTL_TM[4] = {0x56, 0x08, 0x15, 0x80};
649
650static char config_DBICADD70[4] = {0x4b, 0x70, 0x15, 0x80};
651static char config_DBICSET_15[4] = {0x4a, 0x15, 0x15, 0x80};
652static char config_DBICADD72[4] = {0x4b, 0x72, 0x15, 0x80};
653
654static char config_Power_Ctrl_2a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff};
655static char config_Auto_Sequencer_Setting_a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
656static char Driver_Output_Ctrl_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff};
657static char Driver_Output_Ctrl_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff};
658static char config_LCD_drive_AC_Ctrl_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff};
659static char config_LCD_drive_AC_Ctrl_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff};
660static char config_Entry_Mode_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff};
661static char config_Entry_Mode_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
662static char config_Display_Ctrl_1_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x07, 0xff};
663static char config_Display_Ctrl_1_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
664static char config_Display_Ctrl_2_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x08, 0xff};
665static char config_Display_Ctrl_2_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x04, 0xff};
666static char config_Display_Ctrl_3_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x09, 0xff};
667static char config_Display_Ctrl_3_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff};
668static char config_Display_IF_Ctrl_1_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff};
669static char config_Display_IF_Ctrl_1_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff};
670static char config_Display_IF_Ctrl_2_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0e, 0xff};
671static char config_Display_IF_Ctrl_2_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
672
673static char config_Panel_IF_Ctrl_1_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x20, 0xff};
674static char config_Panel_IF_Ctrl_1_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x3f, 0xff};
675static char config_Panel_IF_Ctrl_3_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x22, 0xff};
676static char config_Panel_IF_Ctrl_3_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x00, 0xff};
677static char config_Panel_IF_Ctrl_4_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x23, 0xff};
678static char config_Panel_IF_Ctrl_4_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x0a, 0xff};
679static char config_Panel_IF_Ctrl_5_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x24, 0xff};
680static char config_Panel_IF_Ctrl_5_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x2c, 0xff};
681static char config_Panel_IF_Ctrl_6_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x25, 0xff};
682static char config_Panel_IF_Ctrl_6_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x4e, 0xff};
683static char config_Panel_IF_Ctrl_8_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x27, 0xff};
684static char config_Panel_IF_Ctrl_8_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
685static char config_Panel_IF_Ctrl_9_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x28, 0xff};
686static char config_Panel_IF_Ctrl_9_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x0c, 0xff};
687
688static char config_gam_adjust_00_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff};
689static char config_gam_adjust_00_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
690static char config_gam_adjust_01_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x01, 0xff};
691static char config_gam_adjust_01_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x02, 0xff};
692static char config_gam_adjust_02_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x02, 0xff};
693static char config_gam_adjust_02_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x05, 0xff};
694static char config_gam_adjust_03_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x03, 0xff};
695static char config_gam_adjust_03_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
696static char config_gam_adjust_04_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff};
697static char config_gam_adjust_04_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x00, 0xff};
698static char config_gam_adjust_05_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff};
699static char config_gam_adjust_05_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff};
700static char config_gam_adjust_06_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x06, 0xff};
701static char config_gam_adjust_06_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff};
702static char config_gam_adjust_07_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x07, 0xff};
703static char config_gam_adjust_07_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x02, 0xff};
704static char config_gam_adjust_08_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x08, 0xff};
705static char config_gam_adjust_08_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x04, 0xff};
706static char config_gam_adjust_09_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x09, 0xff};
707static char config_gam_adjust_09_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff};
708static char config_gam_adjust_0A_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0a, 0xff};
709static char config_gam_adjust_0A_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
710static char config_gam_adjust_0B_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0b, 0xff};
711static char config_gam_adjust_0B_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff};
712static char config_gam_adjust_0C_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0c, 0xff};
713static char config_gam_adjust_0C_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff};
714static char config_gam_adjust_0D_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0d, 0xff};
715static char config_gam_adjust_0D_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff};
716static char config_gam_adjust_10_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff};
717static char config_gam_adjust_10_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x04, 0xff};
718static char config_gam_adjust_11_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x11, 0xff};
719static char config_gam_adjust_11_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x03, 0xff};
720static char config_gam_adjust_12_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x12, 0xff};
721static char config_gam_adjust_12_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff};
722static char config_gam_adjust_15_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x15, 0xff};
723static char config_gam_adjust_15_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff};
724static char config_gam_adjust_16_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x16, 0xff};
725static char config_gam_adjust_16_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff};
726static char config_gam_adjust_17_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x17, 0xff};
727static char config_gam_adjust_17_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x04, 0xff};
728static char config_gam_adjust_18_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x18, 0xff};
729static char config_gam_adjust_18_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x02, 0xff};
730static char config_gam_adjust_19_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x19, 0xff};
731static char config_gam_adjust_19_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff};
732static char config_gam_adjust_1C_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff};
733static char config_gam_adjust_1C_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff};
734static char config_gam_adjust_1D_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1D, 0xff};
735static char config_gam_adjust_1D_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x1f, 0xff};
736static char config_gam_adjust_20_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x20, 0xff};
737static char config_gam_adjust_20_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x07, 0xff};
738static char config_gam_adjust_21_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x21, 0xff};
739static char config_gam_adjust_21_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x06, 0x04, 0xff};
740static char config_gam_adjust_22_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x22, 0xff};
741static char config_gam_adjust_22_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x05, 0xff};
742static char config_gam_adjust_27_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x27, 0xff};
743static char config_gam_adjust_27_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x03, 0xff};
744static char config_gam_adjust_28_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x28, 0xff};
745static char config_gam_adjust_28_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff};
746static char config_gam_adjust_29_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x29, 0xff};
747static char config_gam_adjust_29_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff};
748
749static char config_Power_Ctrl_1_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff};
750static char config_Power_Ctrl_1b_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x36, 0x3c, 0xff};
751static char config_Power_Ctrl_2_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x01, 0xff};
752static char config_Power_Ctrl_2b_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x03, 0xff};
753static char config_Power_Ctrl_3_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x02, 0xff};
754static char config_Power_Ctrl_3a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff};
755static char config_Power_Ctrl_4_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x03, 0xff};
756static char config_Power_Ctrl_4a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x3c, 0x58, 0xff};
757static char config_Power_Ctrl_6_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x0c, 0xff};
758static char config_Power_Ctrl_6a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x35, 0xff};
759
760static char config_Auto_Sequencer_Setting_b_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff};
761
762static char config_Panel_IF_Ctrl_10_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x29, 0xff};
763static char config_Panel_IF_Ctrl_10a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0xbf, 0xff};
764static char config_Auto_Sequencer_Setting_indx[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x06, 0xff};
765static char config_Auto_Sequencer_Setting_c_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff};
766static char config_Power_Ctrl_2c_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff};
767
768static char config_VIDEO[4] = {0x40, 0x00, 0x15, 0x80};
769
770static char config_Panel_IF_Ctrl_10_indx_off[8] = {0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x29, 0xff};
771
772static char config_Panel_IF_Ctrl_10b_cmd_off[8] = {0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x02, 0xff};
773
774static char config_Power_Ctrl_1a_cmd[8] = {0x03, 0x00, 0x39, 0xC0, 0x4C, 0x30, 0x00, 0xff};
775
776
777static struct mipi_dsi_cmd renesas_panel_video_mode_cmds[] = {
778 {sizeof(config_sleep_out), config_sleep_out},
779 {sizeof(config_CMD_MODE), config_CMD_MODE},
780 {sizeof(config_WRTXHT), config_WRTXHT},
781 {sizeof(config_WRTXVT), config_WRTXVT},
782 {sizeof(config_PLL2NR), config_PLL2NR },
783 {sizeof(config_PLL2NF1), config_PLL2NF1 },
784 {sizeof(config_PLL2NF2), config_PLL2NF2 },
785 {sizeof(config_PLL2BWADJ1), config_PLL2BWADJ1},
786 {sizeof(config_PLL2BWADJ2), config_PLL2BWADJ2},
787 {sizeof(config_PLL2CTL), config_PLL2CTL},
788 {sizeof(config_DBICBR), config_DBICBR},
789 {sizeof(config_DBICTYPE), config_DBICTYPE},
790 {sizeof(config_DBICSET1), config_DBICSET1},
791 {sizeof(config_DBICADD), config_DBICADD},
792 {sizeof(config_DBICCTL), config_DBICCTL},
793 {sizeof(config_COLMOD_888), config_COLMOD_888},
794 /* Choose config_COLMOD_565 or config_COLMOD_666PACK for other modes */
795 {sizeof(config_MADCTL), config_MADCTL},
796 {sizeof(config_DBIOC), config_DBIOC},
797 {sizeof(config_CASET), config_CASET},
798 {sizeof(config_PASET), config_PASET},
799 {sizeof(config_TXON), config_TXON},
800 {sizeof(config_BLSET_TM), config_BLSET_TM},
801 {sizeof(config_AGCPSCTL_TM), config_AGCPSCTL_TM},
802 {sizeof(config_DBICADD70), config_DBICADD70},
803 {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx },
804 {sizeof(config_DBICSET_15), config_DBICSET_15},
805 {sizeof(config_DBICADD72), config_DBICADD72},
806 {sizeof(config_Power_Ctrl_1a_cmd), config_Power_Ctrl_1a_cmd},
807 {sizeof(config_DBICSET_15), config_DBICSET_15},
808 {sizeof(config_DBICADD70), config_DBICADD70},
809 {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx },
810 {sizeof(config_DBICSET_15), config_DBICSET_15},
811 {sizeof(config_DBICADD72), config_DBICADD72},
812 {sizeof(config_Power_Ctrl_2a_cmd), config_Power_Ctrl_2a_cmd},
813 {sizeof(config_DBICSET_15), config_DBICSET_15},
814 {sizeof(config_DBICADD70), config_DBICADD70},
815 {sizeof(config_Auto_Sequencer_Setting_indx),
816 config_Auto_Sequencer_Setting_indx },
817 {sizeof(config_DBICSET_15), config_DBICSET_15},
818 {sizeof(config_DBICADD72), config_DBICADD72},
819 {sizeof(config_Auto_Sequencer_Setting_a_cmd),
820 config_Auto_Sequencer_Setting_a_cmd },
821 {sizeof(config_DBICSET_15), config_DBICSET_15},
822
823 {sizeof(config_DBICADD70), config_DBICADD70},
824 {sizeof(Driver_Output_Ctrl_indx), Driver_Output_Ctrl_indx},
825 {sizeof(config_DBICSET_15), config_DBICSET_15},
826 {sizeof(config_DBICADD72), config_DBICADD72},
827 {sizeof(Driver_Output_Ctrl_cmd),
828 Driver_Output_Ctrl_cmd},
829 {sizeof(config_DBICSET_15), config_DBICSET_15},
830
831 {sizeof(config_DBICADD70), config_DBICADD70},
832 {sizeof(config_LCD_drive_AC_Ctrl_indx),
833 config_LCD_drive_AC_Ctrl_indx},
834 {sizeof(config_DBICSET_15), config_DBICSET_15},
835 {sizeof(config_DBICADD72), config_DBICADD72},
836 {sizeof(config_LCD_drive_AC_Ctrl_cmd),
837 config_LCD_drive_AC_Ctrl_cmd },
838 {sizeof(config_DBICSET_15), config_DBICSET_15},
839
840 {sizeof(config_DBICADD70), config_DBICADD70},
841 {sizeof(config_Entry_Mode_indx),
842 config_Entry_Mode_indx},
843 {sizeof(config_DBICSET_15), config_DBICSET_15},
844 {sizeof(config_DBICADD72), config_DBICADD72},
845 {sizeof(config_Entry_Mode_cmd),
846 config_Entry_Mode_cmd},
847 {sizeof(config_DBICSET_15), config_DBICSET_15},
848
849 {sizeof(config_DBICADD70), config_DBICADD70},
850 {sizeof(config_Display_Ctrl_1_indx),
851 config_Display_Ctrl_1_indx},
852 {sizeof(config_DBICSET_15), config_DBICSET_15},
853 {sizeof(config_DBICADD72), config_DBICADD72},
854 {sizeof(config_Display_Ctrl_1_cmd),
855 config_Display_Ctrl_1_cmd},
856 {sizeof(config_DBICSET_15), config_DBICSET_15},
857
858 {sizeof(config_DBICADD70), config_DBICADD70},
859 {sizeof(config_Display_Ctrl_2_indx),
860 config_Display_Ctrl_2_indx},
861 {sizeof(config_DBICSET_15), config_DBICSET_15},
862 {sizeof(config_DBICADD72), config_DBICADD72},
863 {sizeof(config_Display_Ctrl_2_cmd),
864 config_Display_Ctrl_2_cmd},
865 {sizeof(config_DBICSET_15), config_DBICSET_15},
866
867 {sizeof(config_DBICADD70), config_DBICADD70},
868 {sizeof(config_Display_Ctrl_3_indx),
869 config_Display_Ctrl_3_indx},
870 {sizeof(config_DBICSET_15), config_DBICSET_15},
871 {sizeof(config_DBICADD72), config_DBICADD72},
872 {sizeof(config_Display_Ctrl_3_cmd),
873 config_Display_Ctrl_3_cmd},
874 {sizeof(config_DBICSET_15), config_DBICSET_15},
875
876 {sizeof(config_DBICADD70), config_DBICADD70},
877 {sizeof(config_Display_IF_Ctrl_1_indx),
878 config_Display_IF_Ctrl_1_indx },
879 {sizeof(config_DBICSET_15), config_DBICSET_15},
880 {sizeof(config_DBICADD72), config_DBICADD72},
881 {sizeof(config_Display_IF_Ctrl_1_cmd),
882 config_Display_IF_Ctrl_1_cmd},
883 {sizeof(config_DBICSET_15), config_DBICSET_15},
884
885 {sizeof(config_DBICADD70), config_DBICADD70},
886 {sizeof(config_Display_IF_Ctrl_2_indx),
887 config_Display_IF_Ctrl_2_indx},
888 {sizeof(config_DBICSET_15), config_DBICSET_15},
889 {sizeof(config_DBICADD72), config_DBICADD72},
890 {sizeof(config_Display_IF_Ctrl_2_cmd),
891 config_Display_IF_Ctrl_2_cmd},
892 {sizeof(config_DBICSET_15), config_DBICSET_15},
893
894 {sizeof(config_DBICADD70), config_DBICADD70},
895 {sizeof(config_Panel_IF_Ctrl_1_indx),
896 config_Panel_IF_Ctrl_1_indx },
897 {sizeof(config_DBICSET_15), config_DBICSET_15},
898 {sizeof(config_DBICADD72), config_DBICADD72},
899 {sizeof(config_Panel_IF_Ctrl_1_cmd),
900 config_Panel_IF_Ctrl_1_cmd},
901 {sizeof(config_DBICSET_15), config_DBICSET_15},
902
903 {sizeof(config_DBICADD70), config_DBICADD70},
904 {sizeof(config_Panel_IF_Ctrl_3_indx),
905 config_Panel_IF_Ctrl_3_indx },
906 {sizeof(config_DBICSET_15), config_DBICSET_15},
907 {sizeof(config_DBICADD72), config_DBICADD72},
908 {sizeof(config_Panel_IF_Ctrl_3_cmd),
909 config_Panel_IF_Ctrl_3_cmd},
910 {sizeof(config_DBICSET_15), config_DBICSET_15},
911
912 {sizeof(config_DBICADD70), config_DBICADD70},
913 {sizeof(config_Panel_IF_Ctrl_4_indx),
914 config_Panel_IF_Ctrl_4_indx },
915 {sizeof(config_DBICSET_15), config_DBICSET_15},
916 {sizeof(config_DBICADD72), config_DBICADD72},
917 {sizeof(config_Panel_IF_Ctrl_4_cmd),
918 config_Panel_IF_Ctrl_4_cmd },
919 {sizeof(config_DBICSET_15), config_DBICSET_15},
920
921 {sizeof(config_DBICADD70), config_DBICADD70},
922 {sizeof(config_Panel_IF_Ctrl_5_indx),
923 config_Panel_IF_Ctrl_5_indx },
924 {sizeof(config_DBICSET_15), config_DBICSET_15},
925 {sizeof(config_DBICADD72), config_DBICADD72},
926 {sizeof(config_Panel_IF_Ctrl_5_cmd),
927 config_Panel_IF_Ctrl_5_cmd},
928 {sizeof(config_DBICSET_15), config_DBICSET_15},
929
930 {sizeof(config_DBICADD70), config_DBICADD70},
931 {sizeof(config_Panel_IF_Ctrl_6_indx),
932 config_Panel_IF_Ctrl_6_indx },
933 {sizeof(config_DBICSET_15), config_DBICSET_15},
934 {sizeof(config_DBICADD72), config_DBICADD72},
935 {sizeof(config_Panel_IF_Ctrl_6_cmd),
936 config_Panel_IF_Ctrl_6_cmd },
937 {sizeof(config_DBICSET_15), config_DBICSET_15},
938
939 {sizeof(config_DBICADD70), config_DBICADD70},
940 {sizeof(config_Panel_IF_Ctrl_8_indx),
941 config_Panel_IF_Ctrl_8_indx },
942 {sizeof(config_DBICSET_15), config_DBICSET_15},
943 {sizeof(config_DBICADD72), config_DBICADD72},
944 {sizeof(config_Panel_IF_Ctrl_8_cmd),
945 config_Panel_IF_Ctrl_8_cmd },
946 {sizeof(config_DBICSET_15), config_DBICSET_15},
947
948 {sizeof(config_DBICADD70), config_DBICADD70},
949 {sizeof(config_Panel_IF_Ctrl_9_indx),
950 config_Panel_IF_Ctrl_9_indx },
951 {sizeof(config_DBICSET_15), config_DBICSET_15},
952 {sizeof(config_DBICADD72), config_DBICADD72},
953 {sizeof(config_Panel_IF_Ctrl_9_cmd),
954 config_Panel_IF_Ctrl_9_cmd},
955 {sizeof(config_DBICSET_15), config_DBICSET_15},
956
957 {sizeof(config_DBICADD70), config_DBICADD70},
958 {sizeof(config_gam_adjust_00_indx),
959 config_gam_adjust_00_indx},
960 {sizeof(config_DBICSET_15), config_DBICSET_15},
961 {sizeof(config_DBICADD72), config_DBICADD72},
962 {sizeof(config_gam_adjust_00_cmd),
963 config_gam_adjust_00_cmd},
964 {sizeof(config_DBICSET_15), config_DBICSET_15},
965
966 {sizeof(config_DBICADD70), config_DBICADD70},
967 {sizeof(config_gam_adjust_01_indx),
968 config_gam_adjust_01_indx},
969 {sizeof(config_DBICSET_15), config_DBICSET_15},
970 {sizeof(config_DBICADD72), config_DBICADD72},
971 {sizeof(config_gam_adjust_01_cmd),
972 config_gam_adjust_01_cmd},
973 {sizeof(config_DBICSET_15), config_DBICSET_15},
974
975 {sizeof(config_DBICADD70), config_DBICADD70},
976 {sizeof(config_gam_adjust_02_indx),
977 config_gam_adjust_02_indx},
978 {sizeof(config_DBICSET_15), config_DBICSET_15},
979 {sizeof(config_DBICADD72), config_DBICADD72},
980 {sizeof(config_gam_adjust_02_cmd),
981 config_gam_adjust_02_cmd},
982 {sizeof(config_DBICSET_15), config_DBICSET_15},
983
984 {sizeof(config_DBICADD70), config_DBICADD70},
985 {sizeof(config_gam_adjust_03_indx),
986 config_gam_adjust_03_indx},
987 {sizeof(config_DBICSET_15), config_DBICSET_15},
988 {sizeof(config_DBICADD72), config_DBICADD72},
989 {sizeof(config_gam_adjust_03_cmd),
990 config_gam_adjust_03_cmd},
991 {sizeof(config_DBICSET_15), config_DBICSET_15},
992
993 {sizeof(config_DBICADD70), config_DBICADD70},
994 {sizeof(config_gam_adjust_04_indx), config_gam_adjust_04_indx},
995 {sizeof(config_DBICSET_15), config_DBICSET_15},
996 {sizeof(config_DBICADD72), config_DBICADD72},
997 {sizeof(config_gam_adjust_04_cmd), config_gam_adjust_04_cmd},
998 {sizeof(config_DBICSET_15), config_DBICSET_15},
999
1000
1001 {sizeof(config_DBICADD70), config_DBICADD70},
1002 {sizeof(config_gam_adjust_05_indx), config_gam_adjust_05_indx},
1003 {sizeof(config_DBICSET_15), config_DBICSET_15},
1004 {sizeof(config_DBICADD72), config_DBICADD72},
1005 {sizeof(config_gam_adjust_05_cmd), config_gam_adjust_05_cmd},
1006 {sizeof(config_DBICSET_15), config_DBICSET_15},
1007
1008 {sizeof(config_DBICADD70), config_DBICADD70},
1009 {sizeof(config_gam_adjust_06_indx), config_gam_adjust_06_indx},
1010 {sizeof(config_DBICSET_15), config_DBICSET_15},
1011 {sizeof(config_DBICADD72), config_DBICADD72},
1012 {sizeof(config_gam_adjust_06_cmd), config_gam_adjust_06_cmd},
1013 {sizeof(config_DBICSET_15), config_DBICSET_15},
1014
1015 {sizeof(config_DBICADD70), config_DBICADD70},
1016 {sizeof(config_gam_adjust_07_indx), config_gam_adjust_07_indx},
1017 {sizeof(config_DBICSET_15), config_DBICSET_15},
1018 {sizeof(config_DBICADD72), config_DBICADD72},
1019 {sizeof(config_gam_adjust_07_cmd), config_gam_adjust_07_cmd},
1020 {sizeof(config_DBICSET_15), config_DBICSET_15},
1021
1022 {sizeof(config_DBICADD70), config_DBICADD70},
1023 {sizeof(config_gam_adjust_08_indx), config_gam_adjust_08_indx},
1024 {sizeof(config_DBICSET_15), config_DBICSET_15},
1025 {sizeof(config_DBICADD72), config_DBICADD72},
1026 {sizeof(config_gam_adjust_08_cmd), config_gam_adjust_08_cmd},
1027 {sizeof(config_DBICSET_15), config_DBICSET_15},
1028
1029 {sizeof(config_DBICADD70), config_DBICADD70},
1030 {sizeof(config_gam_adjust_09_indx), config_gam_adjust_09_indx},
1031 {sizeof(config_DBICSET_15), config_DBICSET_15},
1032 {sizeof(config_DBICADD72), config_DBICADD72},
1033 {sizeof(config_gam_adjust_09_cmd), config_gam_adjust_09_cmd},
1034 {sizeof(config_DBICSET_15), config_DBICSET_15},
1035
1036 {sizeof(config_DBICADD70), config_DBICADD70},
1037 {sizeof(config_gam_adjust_0A_indx), config_gam_adjust_0A_indx},
1038 {sizeof(config_DBICSET_15), config_DBICSET_15},
1039 {sizeof(config_DBICADD72), config_DBICADD72},
1040 {sizeof(config_gam_adjust_0A_cmd), config_gam_adjust_0A_cmd},
1041 {sizeof(config_DBICSET_15), config_DBICSET_15},
1042
1043 {sizeof(config_DBICADD70), config_DBICADD70},
1044 {sizeof(config_gam_adjust_0B_indx), config_gam_adjust_0B_indx},
1045 {sizeof(config_DBICSET_15), config_DBICSET_15},
1046 {sizeof(config_DBICADD72), config_DBICADD72},
1047 {sizeof(config_gam_adjust_0B_cmd), config_gam_adjust_0B_cmd},
1048 {sizeof(config_DBICSET_15), config_DBICSET_15},
1049
1050 {sizeof(config_DBICADD70), config_DBICADD70},
1051 {sizeof(config_gam_adjust_0C_indx), config_gam_adjust_0C_indx},
1052 {sizeof(config_DBICSET_15), config_DBICSET_15},
1053 {sizeof(config_DBICADD72), config_DBICADD72},
1054 {sizeof(config_gam_adjust_0C_cmd), config_gam_adjust_0C_cmd},
1055 {sizeof(config_DBICSET_15), config_DBICSET_15},
1056
1057 {sizeof(config_DBICADD70), config_DBICADD70},
1058 {sizeof(config_gam_adjust_0D_indx), config_gam_adjust_0D_indx},
1059 {sizeof(config_DBICSET_15), config_DBICSET_15},
1060 {sizeof(config_DBICADD72), config_DBICADD72},
1061 {sizeof(config_gam_adjust_0D_cmd), config_gam_adjust_0D_cmd},
1062 {sizeof(config_DBICSET_15), config_DBICSET_15},
1063
1064 {sizeof(config_DBICADD70), config_DBICADD70},
1065 {sizeof(config_gam_adjust_10_indx), config_gam_adjust_10_indx},
1066 {sizeof(config_DBICSET_15), config_DBICSET_15},
1067 {sizeof(config_DBICADD72), config_DBICADD72},
1068 {sizeof(config_gam_adjust_10_cmd), config_gam_adjust_10_cmd},
1069 {sizeof(config_DBICSET_15), config_DBICSET_15},
1070
1071 {sizeof(config_DBICADD70), config_DBICADD70},
1072 {sizeof(config_gam_adjust_11_indx), config_gam_adjust_11_indx},
1073 {sizeof(config_DBICSET_15), config_DBICSET_15},
1074 {sizeof(config_DBICADD72), config_DBICADD72},
1075 {sizeof(config_gam_adjust_11_cmd), config_gam_adjust_11_cmd},
1076 {sizeof(config_DBICSET_15), config_DBICSET_15},
1077
1078 {sizeof(config_DBICADD70), config_DBICADD70},
1079 {sizeof(config_gam_adjust_12_indx), config_gam_adjust_12_indx},
1080 {sizeof(config_DBICSET_15), config_DBICSET_15},
1081 {sizeof(config_DBICADD72), config_DBICADD72},
1082 {sizeof(config_gam_adjust_12_cmd), config_gam_adjust_12_cmd},
1083 {sizeof(config_DBICSET_15), config_DBICSET_15},
1084
1085 {sizeof(config_DBICADD70), config_DBICADD70},
1086 {sizeof(config_gam_adjust_15_indx), config_gam_adjust_15_indx},
1087 {sizeof(config_DBICSET_15), config_DBICSET_15},
1088 {sizeof(config_DBICADD72), config_DBICADD72},
1089 {sizeof(config_gam_adjust_15_cmd), config_gam_adjust_15_cmd},
1090 {sizeof(config_DBICSET_15), config_DBICSET_15},
1091
1092 {sizeof(config_DBICADD70), config_DBICADD70},
1093 {sizeof(config_gam_adjust_16_indx), config_gam_adjust_16_indx},
1094 {sizeof(config_DBICSET_15), config_DBICSET_15},
1095 {sizeof(config_DBICADD72), config_DBICADD72},
1096 {sizeof(config_gam_adjust_16_cmd), config_gam_adjust_16_cmd},
1097 {sizeof(config_DBICSET_15), config_DBICSET_15},
1098
1099 {sizeof(config_DBICADD70), config_DBICADD70},
1100 {sizeof(config_gam_adjust_17_indx), config_gam_adjust_17_indx},
1101 {sizeof(config_DBICSET_15), config_DBICSET_15},
1102 {sizeof(config_DBICADD72), config_DBICADD72},
1103 {sizeof(config_gam_adjust_17_cmd), config_gam_adjust_17_cmd},
1104 {sizeof(config_DBICSET_15), config_DBICSET_15},
1105
1106 {sizeof(config_DBICADD70), config_DBICADD70},
1107 {sizeof(config_gam_adjust_18_indx), config_gam_adjust_18_indx},
1108 {sizeof(config_DBICSET_15), config_DBICSET_15},
1109 {sizeof(config_DBICADD72), config_DBICADD72},
1110 {sizeof(config_gam_adjust_18_cmd), config_gam_adjust_18_cmd},
1111 {sizeof(config_DBICSET_15), config_DBICSET_15},
1112
1113 {sizeof(config_DBICADD70), config_DBICADD70},
1114 {sizeof(config_gam_adjust_19_indx), config_gam_adjust_19_indx},
1115 {sizeof(config_DBICSET_15), config_DBICSET_15},
1116 {sizeof(config_DBICADD72), config_DBICADD72},
1117 {sizeof(config_gam_adjust_19_cmd), config_gam_adjust_19_cmd},
1118 {sizeof(config_DBICSET_15), config_DBICSET_15},
1119
1120 {sizeof(config_DBICADD70), config_DBICADD70},
1121 {sizeof(config_gam_adjust_1C_indx), config_gam_adjust_1C_indx},
1122 {sizeof(config_DBICSET_15), config_DBICSET_15},
1123 {sizeof(config_DBICADD72), config_DBICADD72},
1124 {sizeof(config_gam_adjust_1C_cmd), config_gam_adjust_1C_cmd},
1125 {sizeof(config_DBICSET_15), config_DBICSET_15},
1126
1127 {sizeof(config_DBICADD70), config_DBICADD70},
1128 {sizeof(config_gam_adjust_1D_indx), config_gam_adjust_1D_indx},
1129 {sizeof(config_DBICSET_15), config_DBICSET_15},
1130 {sizeof(config_DBICADD72), config_DBICADD72},
1131 {sizeof(config_gam_adjust_1D_cmd), config_gam_adjust_1D_cmd},
1132 {sizeof(config_DBICSET_15), config_DBICSET_15},
1133
1134 {sizeof(config_DBICADD70), config_DBICADD70},
1135 {sizeof(config_gam_adjust_20_indx), config_gam_adjust_20_indx},
1136 {sizeof(config_DBICSET_15), config_DBICSET_15},
1137 {sizeof(config_DBICADD72), config_DBICADD72},
1138 {sizeof(config_gam_adjust_20_cmd), config_gam_adjust_20_cmd},
1139 {sizeof(config_DBICSET_15), config_DBICSET_15},
1140
1141 {sizeof(config_DBICADD70), config_DBICADD70},
1142 {sizeof(config_gam_adjust_21_indx), config_gam_adjust_21_indx},
1143 {sizeof(config_DBICSET_15), config_DBICSET_15},
1144 {sizeof(config_DBICADD72), config_DBICADD72},
1145 {sizeof(config_gam_adjust_21_cmd), config_gam_adjust_21_cmd},
1146 {sizeof(config_DBICSET_15), config_DBICSET_15},
1147
1148
1149 {sizeof(config_DBICADD70), config_DBICADD70},
1150 {sizeof(config_gam_adjust_22_indx), config_gam_adjust_22_indx},
1151 {sizeof(config_DBICSET_15), config_DBICSET_15},
1152 {sizeof(config_DBICADD72), config_DBICADD72},
1153 {sizeof(config_gam_adjust_22_cmd), config_gam_adjust_22_cmd},
1154 {sizeof(config_DBICSET_15), config_DBICSET_15},
1155
1156 {sizeof(config_DBICADD70), config_DBICADD70},
1157 {sizeof(config_gam_adjust_27_indx), config_gam_adjust_27_indx},
1158 {sizeof(config_DBICSET_15), config_DBICSET_15},
1159 {sizeof(config_DBICADD72), config_DBICADD72},
1160 {sizeof(config_gam_adjust_27_cmd), config_gam_adjust_27_cmd},
1161 {sizeof(config_DBICSET_15), config_DBICSET_15},
1162
1163 {sizeof(config_DBICADD70), config_DBICADD70},
1164 {sizeof(config_gam_adjust_28_indx), config_gam_adjust_28_indx},
1165 {sizeof(config_DBICSET_15), config_DBICSET_15},
1166 {sizeof(config_DBICADD72), config_DBICADD72},
1167 {sizeof(config_gam_adjust_28_cmd), config_gam_adjust_28_cmd},
1168 {sizeof(config_DBICSET_15), config_DBICSET_15},
1169
1170 {sizeof(config_DBICADD70), config_DBICADD70},
1171 {sizeof(config_gam_adjust_29_indx), config_gam_adjust_29_indx},
1172 {sizeof(config_DBICSET_15), config_DBICSET_15},
1173 {sizeof(config_DBICADD72), config_DBICADD72},
1174 {sizeof(config_gam_adjust_29_cmd), config_gam_adjust_29_cmd},
1175 {sizeof(config_DBICSET_15), config_DBICSET_15},
1176
1177 {sizeof(config_DBICADD70), config_DBICADD70},
1178 {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx},
1179 {sizeof(config_DBICSET_15), config_DBICSET_15},
1180 {sizeof(config_DBICADD72), config_DBICADD72},
1181 {sizeof(config_Power_Ctrl_1b_cmd), config_Power_Ctrl_1b_cmd},
1182 {sizeof(config_DBICSET_15), config_DBICSET_15},
1183
1184 {sizeof(config_DBICADD70), config_DBICADD70},
1185 {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx},
1186 {sizeof(config_DBICSET_15), config_DBICSET_15},
1187 {sizeof(config_DBICADD72), config_DBICADD72},
1188 {sizeof(config_Power_Ctrl_2b_cmd), config_Power_Ctrl_2b_cmd},
1189 {sizeof(config_DBICSET_15), config_DBICSET_15},
1190
1191 {sizeof(config_DBICADD70), config_DBICADD70},
1192 {sizeof(config_Power_Ctrl_3_indx), config_Power_Ctrl_3_indx},
1193 {sizeof(config_DBICSET_15), config_DBICSET_15},
1194 {sizeof(config_DBICADD72), config_DBICADD72},
1195 {sizeof(config_Power_Ctrl_3a_cmd), config_Power_Ctrl_3a_cmd},
1196 {sizeof(config_DBICSET_15), config_DBICSET_15},
1197
1198 {sizeof(config_DBICADD70), config_DBICADD70},
1199 {sizeof(config_Power_Ctrl_4_indx), config_Power_Ctrl_4_indx},
1200 {sizeof(config_DBICSET_15), config_DBICSET_15},
1201 {sizeof(config_DBICADD72), config_DBICADD72},
1202 {sizeof(config_Power_Ctrl_4a_cmd), config_Power_Ctrl_4a_cmd},
1203 {sizeof(config_DBICSET_15), config_DBICSET_15},
1204
1205 {sizeof(config_DBICADD70), config_DBICADD70},
1206 {sizeof(config_Power_Ctrl_6_indx), config_Power_Ctrl_6_indx},
1207 {sizeof(config_DBICSET_15), config_DBICSET_15},
1208 {sizeof(config_DBICADD72), config_DBICADD72},
1209 {sizeof(config_Power_Ctrl_6a_cmd), config_Power_Ctrl_6a_cmd},
1210 {sizeof(config_DBICSET_15), config_DBICSET_15},
1211
1212 {sizeof(config_DBICADD70), config_DBICADD70},
1213 {sizeof(config_Auto_Sequencer_Setting_indx),
1214 config_Auto_Sequencer_Setting_indx},
1215 {sizeof(config_DBICSET_15), config_DBICSET_15},
1216 {sizeof(config_DBICADD72), config_DBICADD72},
1217 {sizeof(config_Auto_Sequencer_Setting_b_cmd),
1218 config_Auto_Sequencer_Setting_b_cmd},
1219 {sizeof(config_DBICSET_15), config_DBICSET_15},
1220
1221 {sizeof(config_DBICADD70), config_DBICADD70},
1222 {sizeof(config_Panel_IF_Ctrl_10_indx),
1223 config_Panel_IF_Ctrl_10_indx},
1224 {sizeof(config_DBICSET_15), config_DBICSET_15},
1225 {sizeof(config_DBICADD72), config_DBICADD72},
1226 {sizeof(config_Panel_IF_Ctrl_10a_cmd),
1227 config_Panel_IF_Ctrl_10a_cmd},
1228 {sizeof(config_DBICSET_15), config_DBICSET_15},
1229
1230 {sizeof(config_DBICADD70), config_DBICADD70},
1231 {sizeof(config_Auto_Sequencer_Setting_indx),
1232 config_Auto_Sequencer_Setting_indx},
1233 {sizeof(config_DBICSET_15), config_DBICSET_15},
1234 {sizeof(config_DBICADD72), config_DBICADD72},
1235 {sizeof(config_Auto_Sequencer_Setting_c_cmd),
1236 config_Auto_Sequencer_Setting_c_cmd},
1237 {sizeof(config_DBICSET_15), config_DBICSET_15},
1238
1239 {sizeof(config_DBICADD70), config_DBICADD70},
1240 {sizeof(config_Power_Ctrl_2_indx),
1241 config_Power_Ctrl_2_indx},
1242 {sizeof(config_DBICSET_15), config_DBICSET_15},
1243 {sizeof(config_DBICADD72), config_DBICADD72},
1244 {sizeof(config_Power_Ctrl_2c_cmd),
1245 config_Power_Ctrl_2c_cmd},
1246
1247 {sizeof(config_DBICSET_15), config_DBICSET_15},
1248 {sizeof(config_VIDEO), config_VIDEO}
1249
1250};
1251
1252static struct mipi_dsi_phy_ctrl mipi_dsi_renesas_panel_phy_ctrl = {
1253 /* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
1254 {0x03, 0x01, 0x01, 0x00}, /* regulator */
1255 /* timing */
1256 {0xb9, 0x8e, 0x1f, 0x00, 0x98, 0x9c, 0x22,
1257 0x90, 0x18, 0x03, 0x04},
1258 {0x7f, 0x00, 0x00, 0x00}, /* phy ctrl */
1259 {0xbb, 0x02, 0x06, 0x00}, /* strength */
1260 /* pll control */
1261 {0x00, 0xec, 0x31, 0xd2, 0x00, 0x40, 0x37, 0x62,
1262 0x01, 0x0f, 0x07, /* --> Two lane configuration */
1263 0x05, 0x14, 0x03, 0x0, 0x0, 0x0, 0x20, 0x0, 0x02, 0x0},
1264};
1265
1266
1267
Chandan Uddaraju78ae6752010-10-19 12:57:10 -07001268#endif