From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Subject: [PATCH v2 4/4] drm/panel: Add Novatek NT35596 panel driver Date: Thu, 21 Mar 2019 19:29:55 +0530 Message-ID: <20190321135955.25661-5-jagan@amarulasolutions.com> References: <20190321135955.25661-1-jagan@amarulasolutions.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190321135955.25661-1-jagan@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org To: Thierry Reding , David Airlie , Daniel Vetter , Sam Ravnborg , Rob Herring , Mark Rutland Cc: Michael Trimarchi , Ryan Pannell , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, devicetree@vger.kernel.org, Jagan Teki List-Id: dri-devel@lists.freedesktop.org Novatek NT35596 is a single-chip IC solution for small or medium-sized LTPS TFT LCD panels. NT35596 provides several system interfaces like MIPI/SPI/I2C. Currently added support for Microtech MTF050FHDI-03 is 1080x1920, 4-lane MIPI DSI LCD panel which has inbuilt NT35596 IC chip. NT35596 support several regulators on the chip, among those only 4 regulators like VCI, VDDI/DVDD, AVDD, AVEE are used for power-on sequence. This driver added code for 3-regulator based power-on sequence as of now since MTF050FHDI-03 panel support it. This power-on sequence may be moved to panel_desc in future, if any new panel would come up with other type of sequence. Signed-off-by: Jagan Teki --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-novatek-nt35596.c | 895 ++++++++++++++++++ 4 files changed, 915 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt35596.c diff --git a/MAINTAINERS b/MAINTAINERS index a6d18acda78a..4de80222cffb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4922,6 +4922,12 @@ S: Maintained F: drivers/gpu/drm/tinydrm/hx8357d.c F: Documentation/devicetree/bindings/display/himax,hx8357d.txt +DRM DRIVER FOR NOVATEK NT35596 MIPI-DSI LCD PANELS +M: Jagan Teki +S: Maintained +F: drivers/gpu/drm/panel/panel-novatek-nt35596.c +F: Documentation/devicetree/bindings/display/panel/novatek,nt35596.txt + DRM DRIVER FOR INTEL I810 VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/i810/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 5c2c7e8e6ade..c39aaf40445c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -119,6 +119,19 @@ config DRM_PANEL_LG_LG4573 Say Y here if you want to enable support for LG4573 RGB panel. To compile this driver as a module, choose M here. +config DRM_PANEL_NOVATEK_NT35596 + tristate "Novatek NT35596 panel driver" + 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 Novatek NT35596 + panel controller driver. + + Novatek NT35596 is a single-chip IC solution for small or medium + sized LTPS TFT LCD panels. NT35596 provides several system interfaces + like MIPI/SPI/I2C. + config DRM_PANEL_OLIMEX_LCD_OLINUXINO tristate "Olimex LCD-OLinuXino panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 3a853ea5cff9..05bc93348345 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35596) += panel-novatek-nt35596.o obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35596.c b/drivers/gpu/drm/panel/panel-novatek-nt35596.c new file mode 100644 index 000000000000..433508330321 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt35596.c @@ -0,0 +1,895 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include