From 53a1b338395e8eb928f4d7150d57b3b55bc747df Mon Sep 17 00:00:00 2001 From: Sumit Semwal Date: Tue, 6 Aug 2019 19:48:09 +0530 Subject: drm: panel: Add tianma nt36672a panel driver Some Poco F1 phones have an LCD panel from Tianma, model nt36672a, with a resolution of 1080x2246. Add the drm panel driver for it. These use the qcom wled backlight. During testing, Benni Steini helped us fix the reset sequence timing (from 10ms to 20ms), to get the bootanimation to work. -- updated for lab and ibb name change. Signed-off-by: Sumit Semwal Change-Id: I8578fc2b5d13968647b9e28373f9a629985d39bf --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 980 ++++++++++++++++++++++++++ 3 files changed, 993 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c (limited to 'drivers/gpu/drm') diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 39055c1f0e2f..cb1a2f30081b 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -437,6 +437,18 @@ config DRM_PANEL_TPO_TD043MTEA1 Say Y here if you want to enable support for TPO TD043MTEA1 800x480 4.3" panel (found on the OMAP3 Pandora board). +config DRM_PANEL_TIANMA_FHD_NT36672A + tristate "TIANMA NT36672A panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Tianma NT36672A + panel. It is seen mostly in Xiaomi Poco F1 mobile phone. + The panel has a 1080x2246 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host and has a built-in LED backlight. + config DRM_PANEL_TPO_TPG110 tristate "TPO TPG 800x400 panel" depends on OF && SPI && GPIOLIB diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index de74f282c433..303e44eb50fa 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o +obj-$(CONFIG_DRM_PANEL_TIANMA_FHD_NT36672A) += panel-tianma-nt36672a.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o diff --git a/drivers/gpu/drm/panel/panel-tianma-nt36672a.c b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c new file mode 100644 index 000000000000..ac378eaaed6e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c @@ -0,0 +1,980 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Linaro Ltd + * Author: Sumit Semwal + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include