From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD1FC3F2CE for ; Sat, 29 Feb 2020 13:08:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FF33246A2 for ; Sat, 29 Feb 2020 13:08:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FF33246A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 763D66E32F; Sat, 29 Feb 2020 13:08:32 +0000 (UTC) Received: from asavdk3.altibox.net (asavdk3.altibox.net [109.247.116.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id E05416E32D for ; Sat, 29 Feb 2020 13:08:30 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 0905520023; Sat, 29 Feb 2020 14:08:28 +0100 (CET) Date: Sat, 29 Feb 2020 14:08:27 +0100 From: Sam Ravnborg To: Linus Walleij Subject: Re: [PATCH 3/3 v2] drm/panel: Add driver for Novatek NT35510-based panels Message-ID: <20200229130827.GF5447@ravnborg.org> References: <20200223121841.26836-1-linus.walleij@linaro.org> <20200223121841.26836-3-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200223121841.26836-3-linus.walleij@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=j8Cu_9a8AAAA:8 a=KKAkSRfTAAAA:8 a=e5mUnYsNAAAA:8 a=20KFwNOVAAAA:8 a=RnR8ka6u8HtuHkyZE-AA:9 a=aUlUDrlPlDVlAJUE:21 a=zIP4ynFXaAxP20xz:21 a=CjuIK1q_8ugA:10 a=A2jcf3dkIZPIRbEE90CI:22 a=cvBusfyB2V15izCimMoJ:22 a=Vxmtnl_E_bksehYqCbjh:22 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Reding , Stephan Gerhold , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sun, Feb 23, 2020 at 01:18:41PM +0100, Linus Walleij wrote: > This adds a driver for panels based on the Novatek NT35510 > display driver IC, such as the Hydis HVA40WV1 panel found > in the Samsung GT-S7710. > > The NT35510 can be used with both internal and external > backlight (such as GPIO backlight) so we support both: > if no external backlight is found, we register a subdriver > for the internal backlight. > > Cc: Stephan Gerhold > Signed-off-by: Linus Walleij Applied to drm-misc-next. Sam > --- > ChangeLog v1->v2: > - Rebase onto v5.6-rc1 > - Account for changes in the panel struct and get_modes() > passing the connector as argument. > - Use specific full filename for the panel driver. > - Update to match rename of DT binding file. > - Drop select VIDEO_MODE_HELPERS > - Fix spelling errors and stray characters, call 4bit groups > nibbles rather than nybbles > - Alphabetize includes and order them as requested by Sam > - Drop the surplus videomode includes > - Drop any backlight handling from .enable() and .disable() > callbacks and rely on the backlight handling in the DRM > panel core, but still assign a backlight from within the > driver if we don't find one in the device tree. > --- > MAINTAINERS | 7 + > drivers/gpu/drm/panel/Kconfig | 10 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-novatek-nt35510.c | 1098 +++++++++++++++++ > 4 files changed, 1116 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt35510.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 17f502467c8a..8e7433d74530 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -5322,6 +5322,13 @@ F: drivers/gpu/drm/msm/ > F: include/uapi/drm/msm_drm.h > F: Documentation/devicetree/bindings/display/msm/ > > +DRM DRIVER FOR NOVATEK NT35510 PANELS > +M: Linus Walleij > +T: git git://anongit.freedesktop.org/drm/drm-misc > +S: Maintained > +F: drivers/gpu/drm/panel/panel-novatek-nt35510.c > +F: Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml > + > DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS > M: Ben Skeggs > L: dri-devel@lists.freedesktop.org > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 19eac3d799a7..b37495a5acce 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -149,6 +149,16 @@ config DRM_PANEL_NEC_NL8048HL11 > panel (found on the Zoom2/3/3630 SDP boards). To compile this driver > as a module, choose M here. > > +config DRM_PANEL_NOVATEK_NT35510 > + tristate "Novatek NT35510 RGB 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 panels built > + around the Novatek NT35510 display controller, such as some > + Hydis panels. > + > config DRM_PANEL_NOVATEK_NT39016 > tristate "Novatek NT39016 RGB/SPI panel" > depends on OF && SPI > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index c4ca0e3b9b3c..7bc8a57ede2b 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o > obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o > obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o > obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o > +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o > obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o > obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o > obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c > new file mode 100644 > index 000000000000..b4c014126781 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c > @@ -0,0 +1,1098 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Novatek NT35510 panel driver > + * Copyright (C) 2020 Linus Walleij > + * Based on code by Robert Teather (C) 2012 Samsung > + * > + * This display driver (and I refer to the physical component NT35510, > + * not this Linux kernel software driver) can handle: > + * 480x864, 480x854, 480x800, 480x720 and 480x640 pixel displays. > + * It has 480x840x24bit SRAM embedded for storing a frame. > + * When powered on the display is by default in 480x800 mode. > + * > + * The actual panels using this component have different names, but > + * the code needed to set up and configure the panel will be similar, > + * so they should all use the NT35510 driver with appropriate configuration > + * per-panel, e.g. for physical size. > + * > + * This driver is for the DSI interface to panels using the NT35510. > + * > + * The NT35510 can also use an RGB (DPI) interface combined with an > + * I2C or SPI interface for setting up the NT35510. If this is needed > + * this panel driver should be refactored to also support that use > + * case. > + */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include