From 40e661fa1835bc0a62952ea432d3730e83b4e7a1 Mon Sep 17 00:00:00 2001 From: hwangjae lee Date: Tue, 15 May 2018 17:28:11 +0900 Subject: [PATCH] [9610] fbdev: dpu: panels: 3fa0 panel file is added Change-Id: I4f700695031d126220c4e0eea7531e84ba240bdf Signed-off-by: hwangjae lee --- .../video/fbdev/exynos/dpu20/panels/Kconfig | 5 + .../video/fbdev/exynos/dpu20/panels/Makefile | 1 + .../fbdev/exynos/dpu20/panels/s6e3fa0_gamma.h | 270 ++++++++++++++++++ .../exynos/dpu20/panels/s6e3fa0_lcd_ctrl.c | 210 ++++++++++++++ .../exynos/dpu20/panels/s6e3fa0_mipi_lcd.c | 248 ++++++++++++++++ .../fbdev/exynos/dpu20/panels/s6e3fa0_param.h | 188 ++++++++++++ 6 files changed, 922 insertions(+) create mode 100644 drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_gamma.h create mode 100644 drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_lcd_ctrl.c create mode 100644 drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c create mode 100644 drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_param.h diff --git a/drivers/video/fbdev/exynos/dpu20/panels/Kconfig b/drivers/video/fbdev/exynos/dpu20/panels/Kconfig index 9bc0a5a3d6e1..c083ae5576cf 100644 --- a/drivers/video/fbdev/exynos/dpu20/panels/Kconfig +++ b/drivers/video/fbdev/exynos/dpu20/panels/Kconfig @@ -26,6 +26,11 @@ config EXYNOS_DECON_LCD_S6E3AA2 tristate "S6E3AA2 AMOLED HD LCD driver(720 x 1280)" default n +config EXYNOS_DECON_LCD_S6E3FA0 + depends on EXYNOS_DECON_LCD && EXYNOS_MIPI_DSIM + tristate "S6E3FA0 AMOLED HD LCD driver(1080 x 1920)" + default n + config EXYNOS_DECON_LCD_EMUL_DISP depends on EXYNOS_DECON_LCD && EXYNOS_MIPI_DSIM tristate "Virtual LCD driver for emulator(800 x 1280)" diff --git a/drivers/video/fbdev/exynos/dpu20/panels/Makefile b/drivers/video/fbdev/exynos/dpu20/panels/Makefile index 54d67306af53..d22f4b052ec0 100644 --- a/drivers/video/fbdev/exynos/dpu20/panels/Makefile +++ b/drivers/video/fbdev/exynos/dpu20/panels/Makefile @@ -3,4 +3,5 @@ obj-$(CONFIG_EXYNOS_DECON_LCD_S6E3HF4) += s6e3hf4_mipi_lcd.o s6e3hf4_lcd_ctrl.o obj-$(CONFIG_EXYNOS_DECON_LCD_S6E3HA6) += s6e3ha6_mipi_lcd.o s6e3ha6_lcd_ctrl.o obj-$(CONFIG_EXYNOS_DECON_LCD_S6E3HA8) += s6e3ha8_mipi_lcd.o s6e3ha8_lcd_ctrl.o obj-$(CONFIG_EXYNOS_DECON_LCD_S6E3AA2) += s6e3aa2_mipi_lcd.o s6e3aa2_lcd_ctrl.o +obj-$(CONFIG_EXYNOS_DECON_LCD_S6E3FA0) += s6e3fa0_mipi_lcd.o s6e3fa0_lcd_ctrl.o obj-$(CONFIG_EXYNOS_DECON_LCD_EMUL_DISP) += emul_disp_mipi_lcd.o emul_disp_lcd_ctrl.o diff --git a/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_gamma.h b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_gamma.h new file mode 100644 index 000000000000..64661706c0d5 --- /dev/null +++ b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_gamma.h @@ -0,0 +1,270 @@ +/* linux/drivers/video/decon_display/s6e3fa0_gamma.h + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * + * Haowe Li + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#ifndef __S6E3FA0_GAMMA_H__ +#define __S6E3FA0_GAMMA_H__ + +static const unsigned char gamma22_30[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xDF, 0x86, 0xF5, + 0xD5, 0xC7, 0xCF, 0xDF, 0xE0, 0xE0, + 0xC9, 0xC9, 0xCC, 0xD7, 0xD6, 0xD5, + 0x00, 0x68, 0x00, 0x68, 0x00, 0x75, +}; + +static const unsigned char gamma22_40[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xE5, 0xAA, 0xF2, + 0xD6, 0xCC, 0xCF, 0xE0, 0xE2, 0xE2, + 0xC8, 0xC9, 0xCA, 0xD2, 0xD2, 0xCF, + 0x00, 0x71, 0x00, 0x70, 0x00, 0x80, +}; + +static const unsigned char gamma22_50[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xE7, 0xBB, 0xEE, + 0xD6, 0xCE, 0xD0, 0xE0, 0xE3, 0xE4, + 0xC5, 0xC4, 0xC5, 0xD2, 0xD2, 0xCF, + 0x00, 0x78, 0x00, 0x78, 0x00, 0x88, +}; + +static const unsigned char gamma22_60[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xE9, 0xC4, 0xEB, + 0xD6, 0xD0, 0xD1, 0xE0, 0xE3, 0xE4, + 0xC3, 0xC2, 0xC2, 0xD2, 0xD1, 0xCF, + 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x8F, +}; + +static const unsigned char gamma22_70[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEA, 0xC9, 0xEA, + 0xD6, 0xD2, 0xD2, 0xDF, 0xE1, 0xE3, + 0xC2, 0xC1, 0xC0, 0xD1, 0xD0, 0xCE, + 0x00, 0x84, 0x00, 0x84, 0x00, 0x96, +}; + +static const unsigned char gamma22_80[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEB, 0xCC, 0xE9, + 0xD5, 0xD4, 0xD3, 0xDE, 0xE1, 0xE2, + 0xC2, 0xBF, 0xBF, 0xCF, 0xCF, 0xCC, + 0x00, 0x89, 0x00, 0x89, 0x00, 0x9C, +}; + +static const unsigned char gamma22_90[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEB, 0xD0, 0xE9, + 0xD4, 0xD5, 0xD4, 0xDF, 0xE0, 0xE1, + 0xC1, 0xBE, 0xBD, 0xCD, 0xCD, 0xCA, + 0x00, 0x8E, 0x00, 0x8F, 0x00, 0xA2, +}; + +static const unsigned char gamma22_100[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEA, 0xD2, 0xE7, + 0xD7, 0xD6, 0xD6, 0xDF, 0xDF, 0xE2, + 0xBF, 0xBD, 0xBC, 0xCD, 0xCD, 0xC9, + 0x00, 0x92, 0x00, 0x93, 0x00, 0xA7, +}; + +static const unsigned char gamma22_110[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEB, 0xD4, 0xE5, + 0xD6, 0xD6, 0xD7, 0xDE, 0xDF, 0xE0, + 0xBE, 0xBC, 0xBB, 0xCE, 0xCC, 0xC9, + 0x00, 0x96, 0x00, 0x97, 0x00, 0xAC, +}; + +static const unsigned char gamma22_120[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xD6, 0xE6, + 0xD6, 0xD7, 0xD8, 0xDE, 0xDE, 0xE0, + 0xBC, 0xBC, 0xB9, 0xCD, 0xCA, 0xC8, + 0x00, 0x9A, 0x00, 0x9C, 0x00, 0xB1, +}; + +static const unsigned char gamma22_130[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xD7, 0xE6, + 0xD3, 0xD8, 0xD7, 0xDE, 0xDD, 0xDF, + 0xBD, 0xBB, 0xB8, 0xCA, 0xC9, 0xC6, + 0x00, 0x9F, 0x00, 0xA0, 0x00, 0xB7, +}; + +static const unsigned char gamma22_140[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xD9, 0xE5, + 0xD4, 0xD8, 0xD9, 0xDE, 0xDD, 0xDF, + 0xBB, 0xB9, 0xB7, 0xCA, 0xC9, 0xC5, + 0x00, 0xA3, 0x00, 0xA4, 0x00, 0xBB, +}; + +static const unsigned char gamma22_150[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xDA, 0xE5, + 0xD4, 0xD8, 0xD9, 0xDD, 0xDD, 0xDD, + 0xBB, 0xB9, 0xB6, 0xC9, 0xC7, 0xC5, + 0x00, 0xA6, 0x00, 0xA8, 0x00, 0xBF, +}; + +static const unsigned char gamma22_160[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xDB, 0xE6, + 0xD4, 0xD7, 0xD9, 0xDC, 0xDD, 0xDD, + 0xB9, 0xB8, 0xB4, 0xC9, 0xC6, 0xC4, + 0x00, 0xAA, 0x00, 0xAC, 0x00, 0xC4, +}; + +static const unsigned char gamma22_170[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xDC, 0xE5, + 0xD5, 0xD8, 0xD9, 0xDD, 0xDC, 0xDD, + 0xBA, 0xB7, 0xB5, 0xC7, 0xC6, 0xC3, + 0x00, 0xAD, 0x00, 0xAF, 0x00, 0xC7, +}; + +static const unsigned char gamma22_180[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEE, 0xDD, 0xE6, + 0xD4, 0xD7, 0xD9, 0xDB, 0xDC, 0xDB, + 0xB9, 0xB7, 0xB4, 0xC6, 0xC4, 0xC2, + 0x00, 0xB1, 0x00, 0xB3, 0x00, 0xCC, +}; + +static const unsigned char gamma22_190[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xDE, 0xE6, + 0xD3, 0xD8, 0xD8, 0xDD, 0xDB, 0xDC, + 0xB9, 0xB6, 0xB4, 0xC5, 0xC4, 0xC0, + 0x00, 0xB4, 0x00, 0xB6, 0x00, 0xD0, +}; + +static const unsigned char gamma22_200[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xDF, 0xE6, + 0xD3, 0xD7, 0xD8, 0xDB, 0xDB, 0xDA, + 0xB8, 0xB6, 0xB3, 0xC4, 0xC3, 0xC0, + 0x00, 0xB8, 0x00, 0xB9, 0x00, 0xD4, +}; + +static const unsigned char gamma22_210[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xE0, 0xE5, + 0xD5, 0xD7, 0xD9, 0xDB, 0xDA, 0xDA, + 0xB7, 0xB5, 0xB1, 0xC4, 0xC2, 0xC0, + 0x00, 0xBA, 0x00, 0xBD, 0x00, 0xD7, +}; + +static const unsigned char gamma22_220[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE0, 0xE6, + 0xD4, 0xD7, 0xD9, 0xDA, 0xDA, 0xD9, + 0xB7, 0xB4, 0xB1, 0xC2, 0xC2, 0xBE, + 0x00, 0xBE, 0x00, 0xC0, 0x00, 0xDC, +}; + +static const unsigned char gamma22_230[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xE2, 0xE6, + 0xD3, 0xD6, 0xD8, 0xDC, 0xD9, 0xD9, + 0xB6, 0xB4, 0xB1, 0xC1, 0xC1, 0xBD, + 0x00, 0xC1, 0x00, 0xC3, 0x00, 0xDF, +}; + +static const unsigned char gamma22_240[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE2, 0xE6, + 0xD4, 0xD6, 0xD8, 0xDA, 0xDA, 0xDA, + 0xB6, 0xB3, 0xB0, 0xC1, 0xBF, 0xBC, + 0x00, 0xC4, 0x00, 0xC7, 0x00, 0xE3, +}; + +static const unsigned char gamma22_250[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE3, 0xE7, + 0xD4, 0xD6, 0xD8, 0xDB, 0xD9, 0xD9, + 0xB3, 0xB2, 0xAE, 0xC1, 0xC0, 0xBC, + 0x00, 0xC7, 0x00, 0xC9, 0x00, 0xE7, +}; + +static const unsigned char gamma22_260[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE4, 0xE7, + 0xD4, 0xD5, 0xD7, 0xDA, 0xD9, 0xD9, + 0xB3, 0xB2, 0xAD, 0xC1, 0xBE, 0xBC, + 0x00, 0xC9, 0x00, 0xCD, 0x00, 0xEA, +}; + +static const unsigned char gamma22_270[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE5, 0xE8, + 0xD3, 0xD5, 0xD5, 0xDB, 0xD9, 0xD9, + 0xB3, 0xB1, 0xAE, 0xBF, 0xBE, 0xBA, + 0x00, 0xCC, 0x00, 0xD0, 0x00, 0xEE, +}; + +static const unsigned char gamma22_280[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xE5, 0xE6, + 0xD2, 0xD4, 0xD6, 0xDA, 0xD9, 0xD8, + 0xB3, 0xB1, 0xAD, 0xBF, 0xBD, 0xBA, + 0x00, 0xCF, 0x00, 0xD3, 0x00, 0xF1, +}; + +static const unsigned char gamma22_290[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xEC, 0xE6, 0xE7, + 0xD2, 0xD4, 0xD5, 0xDB, 0xD8, 0xD8, + 0xB1, 0xB0, 0xAC, 0xBE, 0xBD, 0xB9, + 0x00, 0xD3, 0x00, 0xD6, 0x00, 0xF5, +}; + +static const unsigned char gamma22_300[] = { + 0xFA, 0x01, + 0x1F, 0x1F, 0x1F, 0xED, 0xE6, 0xE7, + 0xD1, 0xD3, 0xD4, 0xDA, 0xD8, 0xD7, + 0xB1, 0xAF, 0xAB, 0xBD, 0xBB, 0xB8, + 0x00, 0xD6, 0x00, 0xDA, 0x00, 0xFA, +}; + + +static const unsigned char *gamma22_table[] = { + gamma22_30, + gamma22_40, + gamma22_50, + gamma22_60, + gamma22_70, + gamma22_80, + gamma22_90, + gamma22_100, + gamma22_110, + gamma22_120, + gamma22_130, + gamma22_140, + gamma22_150, + gamma22_160, + gamma22_170, + gamma22_180, + gamma22_190, + gamma22_200, + gamma22_210, + gamma22_220, + gamma22_230, + gamma22_240, + gamma22_250, + gamma22_260, + gamma22_270, + gamma22_280, + gamma22_290, +}; + +#endif /* __S6E3FA0_GAMMA_H__ */ diff --git a/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_lcd_ctrl.c b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_lcd_ctrl.c new file mode 100644 index 000000000000..3bb2a7afc778 --- /dev/null +++ b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_lcd_ctrl.c @@ -0,0 +1,210 @@ +/* drivers/video/exynos/panels/s6e3fa0_lcd_ctrl.c + * + * Samsung SoC MIPI LCD CONTROL functions + * + * Copyright (c) 2014 Samsung Electronics + * + * Jiun Yu, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ +#include "s6e3fa0_gamma.h" +#include "s6e3fa0_param.h" +#include "lcd_ctrl.h" + +/* use FW_TEST definition when you test CAL on firmware */ +/* #define FW_TEST */ +#ifdef FW_TEST +#include "../dsim_fw.h" +#include "mipi_display.h" +#else +#include "../dsim.h" +#include