1 /* linux/drivers/video/s6e8ax0.c
3 * MIPI-DSI based s6e8ax0 AMOLED panel driver.
5 * Inki Dae, <inki.dae@samsung.com>
6 * Donghwa Lee, <dh09.lee@samsung.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <ubi_uboot.h>
17 #include <mipi_display.h>
18 #include <asm/errno.h>
19 #include <asm/arch/regs-dsim.h>
20 #include <asm/arch/mipi_dsim.h>
21 #include <asm/arch/power.h>
22 #include <asm/arch/cpu.h>
23 #include <linux/types.h>
24 #include <linux/list.h>
26 #include "s5p_mipi_dsi_lowlevel.h"
27 #include "s5p_mipi_dsi_common.h"
29 #define DSIM_PM_STABLE_TIME (10)
30 #define MIN_BRIGHTNESS (0)
31 #define MAX_BRIGHTNESS (10)
33 #define lcd_to_master(a) (a->dsim_dev->master)
34 #define lcd_to_master_ops(a) ((lcd_to_master(a))->master_ops)
37 TYPE_AMS465GS01_M3, /* U1HD */
38 TYPE_AMS465GS01_SM2, /* M0_PROXIMA */
39 TYPE_AMS465GS02, /* MIDAS */
40 TYPE_AMS480GYXX_SM2, /* M0_REAL_PROXIMA */
41 TYPE_AMS529HA01, /* Q1 */
42 TYPE_AMS767KC01, /* P8 */
47 DSIM_RESUME_COMPLETE = 1,
55 unsigned int resume_complete;
57 struct mipi_dsim_lcd_device *lcd_dev;
58 struct lcd_platform_data *ddi_pd;
61 struct s6e8ax0_device_id {
66 static struct s6e8ax0_device_id s6e8ax0_ids[] = {
68 .name = "ams465gs01-m3",
69 .type = TYPE_AMS465GS01_M3, /* U1, U1HD */
71 .name = "ams465gs01-sm2",
72 .type = TYPE_AMS465GS01_SM2, /* U1HD_5INCH, M0_PROXIMA */
75 .type = TYPE_AMS465GS02, /* MIDAS */
77 .name = "ams480gyxx-sm2",
78 .type = TYPE_AMS480GYXX_SM2, /* M0_REAL_PROXIMA */
81 .type = TYPE_AMS529HA01, /* Q1 */
84 .type = TYPE_AMS767KC01, /* P8 */
88 const enum panel_type s6e8ax0_get_device_type(const struct mipi_dsim_lcd_device *lcd_dev)
90 struct s6e8ax0_device_id *id = s6e8ax0_ids;
93 if (!strcmp(lcd_dev->panel_id, id->name))
100 static void s6e8ax0_panel_cond(struct mipi_dsim_device *dsim_dev)
102 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
103 int reverse = dsim_dev->dsim_lcd_dev->reverse;
105 const unsigned char data_to_send_ams465gs01[] = {
106 0xf8, 0x3d, 0x35, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x4c,
107 0x6e, 0x10, 0x27, 0x7d, 0x3f, 0x10, 0x00, 0x00, 0x20,
108 0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
109 0x23, 0x23, 0xc0, 0xc8, 0x08, 0x48, 0xc1, 0x00, 0xc3,
113 /* U1HD_5INCH - scan direction is reversed
114 against U1, U1HD, PROXIMA */
115 const unsigned char data_to_send_reverse_ams465gs01[] = {
116 0xf8, 0x19, 0x35, 0x00, 0x00, 0x00, 0x93, 0x00, 0x3c,
117 0x7d, 0x08, 0x27, 0x7d, 0x3f, 0x00, 0x00, 0x00, 0x20,
118 0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
119 0x23, 0x23, 0xc0, 0xc1, 0x01, 0x41, 0xc1, 0x00, 0xc1,
123 const unsigned char data_to_send_ams465gs02[] = {
124 0xf8, 0x19, 0x35, 0x00, 0x00, 0x00, 0x93, 0x00, 0x3c,
125 0x7d, 0x08, 0x27, 0x7d, 0x3f, 0x00, 0x00, 0x00, 0x20,
126 0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
127 0x23, 0x23, 0xc0, 0xc1, 0x01, 0x41, 0xc1, 0x00, 0xc1,
131 const unsigned char data_to_send_ams480gyxx[] = {
132 0xf8, 0x19, 0x35, 0x00, 0x00, 0x00, 0x93, 0x00, 0x3c,
133 0x7d, 0x08, 0x27, 0x7d, 0x3f, 0x00, 0x00, 0x00, 0x20,
134 0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
135 0x23, 0x23, 0xc0, 0xc1, 0x01, 0x41, 0xc1, 0x00, 0xc1,
139 const unsigned char data_to_send_ams529ha01[] = {
140 0xf8, 0x25, 0x34, 0x00, 0x00, 0x00, 0x95, 0x00, 0x3c,
141 0x7d, 0x08, 0x27, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20,
142 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
143 0x23, 0x63, 0xc0, 0xc1, 0x01, 0x81, 0xc1, 0x00, 0xc8,
147 const unsigned char data_to_send_ams767kc01[] = {
148 0xf8, 0x01, 0x8e, 0x00, 0x00, 0x00, 0xac, 0x00, 0x9e,
149 0x8d, 0x1f, 0x4e, 0x9c, 0x7d, 0x3f, 0x10, 0x00, 0x20,
150 0x02, 0x10, 0x7d, 0x10, 0x00, 0x00, 0x02, 0x08, 0x10,
151 0x34, 0x34, 0x34, 0xc0, 0xc1, 0x01, 0x00, 0xc1, 0x82,
152 0x00, 0xc8, 0xc1, 0xe3, 0x01
155 switch (dsim_dev->dsim_lcd_dev->panel_type) {
156 case TYPE_AMS465GS02:
157 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
158 (unsigned int)data_to_send_ams465gs02,
159 ARRAY_SIZE(data_to_send_ams465gs02));
161 case TYPE_AMS529HA01:
162 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
163 (unsigned int)data_to_send_ams529ha01,
164 ARRAY_SIZE(data_to_send_ams529ha01));
166 case TYPE_AMS767KC01:
167 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
168 (unsigned int)data_to_send_ams767kc01,
169 ARRAY_SIZE(data_to_send_ams767kc01));
171 case TYPE_AMS480GYXX_SM2:
172 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
173 (unsigned int)data_to_send_ams480gyxx,
174 ARRAY_SIZE(data_to_send_ams767kc01));
176 case TYPE_AMS465GS01_M3:
177 case TYPE_AMS465GS01_SM2:
180 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
181 (unsigned int)data_to_send_reverse_ams465gs01,
182 ARRAY_SIZE(data_to_send_reverse_ams465gs01));
184 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
185 (unsigned int)data_to_send_ams465gs01,
186 ARRAY_SIZE(data_to_send_ams465gs01));
191 static void s6e8ax0_display_cond(struct mipi_dsim_device *dsim_dev)
193 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
195 const unsigned char data_to_send_default[] = {
196 0xf2, 0x80, 0x03, 0x0d
198 const unsigned char data_to_send_ams767kc01[] = {
199 0xf2, 0xc8, 0x05, 0x0d
202 switch (dsim_dev->dsim_lcd_dev->panel_type) {
203 case TYPE_AMS767KC01:
204 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
205 (unsigned int)data_to_send_ams767kc01,
206 ARRAY_SIZE(data_to_send_ams767kc01));
208 case TYPE_AMS465GS01_M3:
209 case TYPE_AMS465GS01_SM2:
210 case TYPE_AMS465GS02:
211 case TYPE_AMS480GYXX_SM2:
212 case TYPE_AMS529HA01:
214 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
215 (unsigned int)data_to_send_default,
216 ARRAY_SIZE(data_to_send_default));
220 static void s6e8ax0_gamma_cond(struct mipi_dsim_device *dsim_dev)
222 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
224 /* 7500K 2.2 Set (M3, 300cd) */
225 const unsigned char data_to_send_default[] = {
226 0xfa, 0x01, 0x0f, 0x00, 0x0f, 0xda, 0xc0, 0xe4, 0xc8,
227 0xc8, 0xc6, 0xd3, 0xd6, 0xd0, 0xab, 0xb2, 0xa6, 0xbf,
228 0xc2, 0xb9, 0x00, 0x93, 0x00, 0x86, 0x00, 0xd1
231 /* 7500K 2.2 Set (SM2, 300cd) */
232 const unsigned char data_to_send_ams465gs01_sm2[] = {
233 0xfa, 0x01, 0x58, 0x1f, 0x63, 0xac, 0xb4, 0x99, 0xad,
234 0xba, 0xa3, 0xc0, 0xc8, 0xbb, 0x93, 0x9f, 0x8b, 0xad,
235 0xb4, 0xa7, 0x00, 0xbe, 0x00, 0xab, 0x00, 0xe7
238 const unsigned char data_to_send_ams767kc01[] = {
239 0xfa, 0x36, 0x10, 0x48, 0xb8, 0xaa, 0xa9, 0xb8, 0xc3,
240 0xb7, 0xc6, 0xd2, 0xc1, 0x9a, 0xaa, 0x91, 0xb5, 0xc0,
241 0xab, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0xc9
244 switch (dsim_dev->dsim_lcd_dev->panel_type) {
245 case TYPE_AMS465GS01_SM2:
246 case TYPE_AMS480GYXX_SM2:
247 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
248 (unsigned int)data_to_send_ams465gs01_sm2,
249 ARRAY_SIZE(data_to_send_ams465gs01_sm2));
251 case TYPE_AMS767KC01:
252 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
253 (unsigned int)data_to_send_ams767kc01,
254 ARRAY_SIZE(data_to_send_ams767kc01));
256 case TYPE_AMS465GS01_M3:
257 case TYPE_AMS465GS02:
258 case TYPE_AMS529HA01:
260 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
261 (unsigned int)data_to_send_default,
262 ARRAY_SIZE(data_to_send_default));
266 static void s6e8ax0_gamma_update(struct mipi_dsim_device *dsim_dev)
268 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
271 switch (dsim_dev->dsim_lcd_dev->panel_type) {
272 case TYPE_AMS767KC01:
275 case TYPE_AMS465GS01_M3:
276 case TYPE_AMS465GS01_SM2:
277 case TYPE_AMS465GS02:
278 case TYPE_AMS480GYXX_SM2:
279 case TYPE_AMS529HA01:
284 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0xf7, param);
287 static void s6e8ax0_etc_source_control(struct mipi_dsim_device *dsim_dev)
289 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
291 const unsigned char data_to_send_default[] = {
292 0xf6, 0x00, 0x02, 0x00
295 const unsigned char data_to_send_ams767kc01[] = {
296 0xd1, 0xfe, 0x80, 0x00, 0x01, 0x0b, 0x00, 0x00, 0x40,
300 switch (dsim_dev->dsim_lcd_dev->panel_type) {
301 case TYPE_AMS767KC01:
302 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
303 (unsigned int)data_to_send_ams767kc01,
304 ARRAY_SIZE(data_to_send_ams767kc01));
306 case TYPE_AMS465GS01_M3:
307 case TYPE_AMS465GS01_SM2:
308 case TYPE_AMS465GS02:
309 case TYPE_AMS480GYXX_SM2:
310 case TYPE_AMS529HA01:
312 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
313 (unsigned int)data_to_send_default,
314 ARRAY_SIZE(data_to_send_default));
318 static void s6e8ax0_etc_pentile_control(struct mipi_dsim_device *dsim_dev)
320 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
322 const unsigned char data_to_send_default[] = {
323 0xb6, 0x0c, 0x02, 0x03, 0x32, 0xff, 0x44, 0x44, 0xc0,
327 const unsigned char data_to_send_ams767kc01[] = {
328 0xd9, 0x14, 0x5c, 0x20, 0x0c, 0x0f, 0x41, 0x00, 0x10,
329 0x11, 0x12, 0xa8, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x80,
330 0xcb, 0xed, 0x64, 0xaf
333 switch (dsim_dev->dsim_lcd_dev->panel_type) {
334 case TYPE_AMS767KC01:
335 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
336 (unsigned int)data_to_send_ams767kc01,
337 ARRAY_SIZE(data_to_send_ams767kc01));
339 case TYPE_AMS465GS01_M3:
340 case TYPE_AMS465GS01_SM2:
341 case TYPE_AMS465GS02:
342 case TYPE_AMS480GYXX_SM2:
343 case TYPE_AMS529HA01:
345 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
346 (unsigned int)data_to_send_default,
347 ARRAY_SIZE(data_to_send_default));
351 static void s6e8ax0_etc_mipi_control1(struct mipi_dsim_device *dsim_dev)
353 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
355 const unsigned char data_to_send_default[] = {
356 0xe1, 0x10, 0x1c, 0x17, 0x08, 0x1d
359 const unsigned char data_to_send_ams767kc01[] = {
360 0xf4, 0x0b, 0x0a, 0x06, 0x0b, 0x33, 0x02
363 switch (dsim_dev->dsim_lcd_dev->panel_type) {
364 case TYPE_AMS767KC01:
365 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
366 (unsigned int)data_to_send_ams767kc01,
367 ARRAY_SIZE(data_to_send_ams767kc01));
369 case TYPE_AMS465GS01_M3:
370 case TYPE_AMS465GS01_SM2:
371 case TYPE_AMS465GS02:
372 case TYPE_AMS480GYXX_SM2:
373 case TYPE_AMS529HA01:
375 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
376 (unsigned int)data_to_send_default,
377 ARRAY_SIZE(data_to_send_default));
381 static void s6e8ax0_etc_mipi_control2(struct mipi_dsim_device *dsim_dev)
383 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
384 const unsigned char data_to_send_default[] = {
385 0xe2, 0xed, 0x07, 0xc3, 0x13, 0x0d, 0x03
388 const unsigned char data_to_send_ams767kc01[] = {
389 0xf6, 0x04, 0x00, 0x02
392 switch (dsim_dev->dsim_lcd_dev->panel_type) {
393 case TYPE_AMS767KC01:
394 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
395 (unsigned int)data_to_send_ams767kc01,
396 ARRAY_SIZE(data_to_send_ams767kc01));
398 case TYPE_AMS465GS01_M3:
399 case TYPE_AMS465GS01_SM2:
400 case TYPE_AMS465GS02:
401 case TYPE_AMS480GYXX_SM2:
402 case TYPE_AMS529HA01:
404 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
405 (unsigned int)data_to_send_default,
406 ARRAY_SIZE(data_to_send_default));
410 static void s6e8ax0_etc_power_control(struct mipi_dsim_device *dsim_dev)
412 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
413 const unsigned char data_to_send[] = {
414 0xf4, 0xcf, 0x0a, 0x12, 0x10, 0x19, 0x33, 0x02
417 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
418 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
420 static void s6e8ax0_etc_mipi_control3(struct mipi_dsim_device *dsim_dev)
422 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
423 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0xe3, 0x40);
426 static void s6e8ax0_etc_mipi_control4(struct mipi_dsim_device *dsim_dev)
428 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
429 const unsigned char data_to_send[] = {
430 0xe4, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00
433 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
434 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
437 static void s6e8ax0_elvss_set(struct mipi_dsim_device *dsim_dev)
439 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
441 const unsigned char data_to_send_default[] = {
445 const unsigned char data_to_send_ams767kc01_1[] = {
446 0xb2, 0x04, 0x04, 0x04, 0x04, 0x04
449 const unsigned char data_to_send_ams767kc01_2[] = {
454 switch (dsim_dev->dsim_lcd_dev->panel_type) {
455 case TYPE_AMS767KC01:
456 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
457 (unsigned int)data_to_send_ams767kc01_1,
458 ARRAY_SIZE(data_to_send_ams767kc01_1));
459 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
460 (unsigned int)data_to_send_ams767kc01_2,
461 ARRAY_SIZE(data_to_send_ams767kc01_2));
463 case TYPE_AMS465GS01_M3:
464 case TYPE_AMS465GS01_SM2:
465 case TYPE_AMS465GS02:
466 case TYPE_AMS480GYXX_SM2:
467 case TYPE_AMS529HA01:
469 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
470 (unsigned int)data_to_send_default,
471 ARRAY_SIZE(data_to_send_default));
475 static void s6e8ax0_display_on(struct mipi_dsim_device *dsim_dev)
477 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
478 ops->cmd_write(dsim_dev,
479 MIPI_DSI_DCS_SHORT_WRITE, 0x29, 0x00);
482 static void s6e8ax0_sleep_in(struct mipi_dsim_device *dsim_dev)
484 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
485 ops->cmd_write(dsim_dev,
486 MIPI_DSI_DCS_SHORT_WRITE, 0x10, 0x00);
489 static void s6e8ax0_sleep_out(struct mipi_dsim_device *dsim_dev)
491 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
492 ops->cmd_write(dsim_dev,
493 MIPI_DSI_DCS_SHORT_WRITE, 0x11, 0x00);
496 static void s6e8ax0_display_off(struct mipi_dsim_device *dsim_dev)
498 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
499 ops->cmd_write(dsim_dev,
500 MIPI_DSI_DCS_SHORT_WRITE, 0x28, 0x00);
503 static void s6e8ax0_apply_level1_key(struct mipi_dsim_device *dsim_dev)
505 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
506 const unsigned char data_to_send[] = {
510 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
511 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
514 static void s6e8ax0_apply_level2_key(struct mipi_dsim_device *dsim_dev)
516 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
517 const unsigned char data_to_send[] = {
521 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
522 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
525 static void s6e8ax0_apply_mtp_key(struct mipi_dsim_device *dsim_dev)
527 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
528 const unsigned char data_to_send[] = {
532 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
533 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
536 /* Full white 50% reducing setting */
537 static void s6e8ax0_acl_ctrl_set(struct mipi_dsim_device *dsim_dev)
539 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
540 const unsigned char data_to_send[] = {
541 0xc1, 0x47, 0x53, 0x13, 0x53, 0x00, 0x00, 0x03, 0x1f,
542 0x00, 0x00, 0x04, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
543 0x00, 0x01, 0x0f, 0x16, 0x1d, 0x24, 0x2a, 0x31, 0x38,
547 ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
548 (unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
551 static void s6e8ax0_acl_on(struct mipi_dsim_device *dsim_dev)
553 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
554 ops->cmd_write(dsim_dev,
555 MIPI_DSI_DCS_SHORT_WRITE, 0xc0, 0x01);
558 static void s6e8ax0_acl_off(struct mipi_dsim_device *dsim_dev)
560 struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
561 ops->cmd_write(dsim_dev,
562 MIPI_DSI_DCS_SHORT_WRITE, 0xc0, 0x00);
565 static void s6e8ax0_panel_init(struct mipi_dsim_device *dsim_dev)
567 enum panel_type panel = dsim_dev->dsim_lcd_dev->panel_type;
570 * in case of setting gamma and panel condition at first,
571 * it shuold be setting like below.
572 * set_gamma() -> set_panel_condition()
575 s6e8ax0_apply_level1_key(dsim_dev);
576 if (panel == TYPE_AMS529HA01)
577 s6e8ax0_apply_level2_key(dsim_dev);
579 s6e8ax0_apply_mtp_key(dsim_dev);
581 s6e8ax0_sleep_out(dsim_dev);
583 s6e8ax0_panel_cond(dsim_dev);
584 s6e8ax0_display_cond(dsim_dev);
585 s6e8ax0_gamma_cond(dsim_dev);
586 s6e8ax0_gamma_update(dsim_dev);
588 s6e8ax0_etc_source_control(dsim_dev);
589 s6e8ax0_elvss_set(dsim_dev);
590 s6e8ax0_etc_pentile_control(dsim_dev);
591 s6e8ax0_etc_mipi_control1(dsim_dev);
592 s6e8ax0_etc_mipi_control2(dsim_dev);
593 if (panel != TYPE_AMS767KC01) {
594 s6e8ax0_etc_power_control(dsim_dev);
595 s6e8ax0_etc_mipi_control3(dsim_dev);
596 s6e8ax0_etc_mipi_control4(dsim_dev);
600 static int s6e8ax0_panel_set(struct mipi_dsim_device *dsim_dev)
602 struct mipi_dsim_lcd_device *dsim_lcd_dev = dsim_dev->dsim_lcd_dev;
603 dsim_lcd_dev->panel_type = s6e8ax0_get_device_type(dsim_lcd_dev);
604 if (dsim_lcd_dev->panel_type == -1)
605 printf("error: can't found panel type on s6e8ax0\n");
607 s6e8ax0_panel_init(dsim_dev);
611 static void s6e8ax0_display_enable(struct mipi_dsim_device *dsim_dev)
613 s6e8ax0_display_on(dsim_dev);
616 static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = {
620 .mipi_panel_init = s6e8ax0_panel_set,
621 .mipi_display_on = s6e8ax0_display_enable,
624 void s6e8ax0_init(void)
626 s5p_mipi_dsi_register_lcd_driver(&s6e8ax0_dsim_ddi_driver);