From patchwork Wed Dec 25 11:56:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 182442 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp524144ild; Wed, 25 Dec 2019 03:56:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzql6zFi8fdivAB5rj9dcY9Hojmw/kn6u0BVsLKdckGt7yeyLqJtMmQA+Rn5z1F7Yt5+eV7 X-Received: by 2002:a17:902:d70a:: with SMTP id w10mr16877323ply.125.1577274989331; Wed, 25 Dec 2019 03:56:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577274989; cv=none; d=google.com; s=arc-20160816; b=aHOJW/MahaCeeKLd3PmAqF/dkpBkHmDWeMU0sCMQfP3rxzGCt+kzrtx/TT1L3Dp5Is ltDiNn134SW6QUqDoVtmpU13OOQrXsUK9/Su0Sl61QvC28qJcnxYvaVGhdMcUP2V/mtk dgq5Lj/xIU/PueCwvEuQ1x6a19ETVzqYM1OrE0ABPP+LEnj7a0sekzEn7ZJqkASodPrU ILC72gufPGP68ko4O8leVYgr/GKxkHo877zJzYXlHSirwRCtqKx0r4wWt/7SQFtcIVuH Hq7UhfWg6UdaTOxa3KXcosHNfjuqSw9IW4n0AHcMBz6ae6EHxn6pprlFp02s5KY23YmU LmIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=LLADvUOWILd4dXKqbJdgoS41mzTW0zipnP713PrQ6BE=; b=IF/ZDaRMSuHIyybT3Sh7xCyC4Ed2zYZWbqTI+U00Nz5jSqlGHOB+Twa7hXvo21Ny95 8vJFbDtxqi7DK8ubwPb/5DnjnwWDviNrittEp5HtAVz24/hft2tzDrOADh1PEwjNqeh9 sfwDmrc5yy82GVlt0FKTc9WDIEc619MFGRboZH9xAyUbR3A2fTlRiBm9JnL/cSvQV7QQ 1SXXp0G5SWoWTncifvDdLVqpWI/Ls1MjA7e7wBv95yGVsqZREQB/xxiqh781K58gbGsq pzLQ3ZO/amuKHAHjU/PkpdFqxhxpk+q4PaonTJbBEVcN1QxTOBQ2OTeYiaTIziXu2Pts oDZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ProZdKCO; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id a23si5644432pjv.5.2019.12.25.03.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Dec 2019 03:56:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ProZdKCO; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16C6A6E210; Wed, 25 Dec 2019 11:56:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C34576E210 for ; Wed, 25 Dec 2019 11:56:25 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id y4so8362627ljj.9 for ; Wed, 25 Dec 2019 03:56:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bNjs2HUU56KM7kmDPHbEdYcY20eoRdyRKYasVNZVZnw=; b=ProZdKCOjcKF3AeEbOFac2t6MgYi4BZxyeoiOYK5HugVrtdd+T3IL/s4bZV+D2h7tC +/hpAZbw+N/QJVjy0dZfVMGtAWKsKJg6+VczEJpFzuBRqxdbui1vKuRuid2/Gh44Tn/Z oLGP7SHgFYZX+E9M33giS7ivyh+Kw09NYsPz9GBV1u2vOmMcgsNwTGHli4zuCPRjr3+6 064Q4Tir4hAd+eS31Twa/pFYvywkHYc1l86FS1x1/qPSmoRx5fac7yMuVQhrImE95wSq rV30hyfsvvAjg+A/EHA3H7Nw3WYo7HXyrcj8jdPgcCtwpsvIraUscOS3KCjxgAKCEE1c cHEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bNjs2HUU56KM7kmDPHbEdYcY20eoRdyRKYasVNZVZnw=; b=Hn+c7HB0YSBZ+0FYHj0kAx2NQRyzx02bxeLSnJu72+m52OQ/iI6qsWLjTb50UJZQsN /9I/MTnTItiCVXR+KyrIJyS8F07DV+o57Ml8lsZyn87o5nmSUvJFV7X+pyLr2JZ7aYq6 u9RagRY/8+4aKxKKRBF4Gb5JNwQNhNZ3PJQhovCECqldn2Sjtyo9jzJGdRJjQP3gdRdu /K4W5tbMs0APCNgHNpxCG8mWj9uVve+TZdRFernkNQFSfM+IUkDXkkLtyE5LxsSRpgJp 52ojJFUFh56M47/LEFHTlwRzFOQZZQerSsHW3TlyjXA+j4dHlh0W9/b0jqRSqzU0h6Y4 LD8g== X-Gm-Message-State: APjAAAXFDHD95DP417cL0rrrawSkxPQTzYsSjOohxY/WCGpEChhqhZuu 1xt3G2jJX/VA7dP8+GT7KE45gqtiR2Y= X-Received: by 2002:a2e:8544:: with SMTP id u4mr21457150ljj.70.1577274983013; Wed, 25 Dec 2019 03:56:23 -0800 (PST) Received: from localhost.bredbandsbolaget (c-21cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.33]) by smtp.gmail.com with ESMTPSA id o19sm13544465lji.54.2019.12.25.03.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Dec 2019 03:56:21 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 2/2] drm/panel: Add driver for Novatek NT35510-based panels Date: Wed, 25 Dec 2019 12:56:10 +0100 Message-Id: <20191225115610.14518-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191225115610.14518-1-linus.walleij@linaro.org> References: <20191225115610.14518-1-linus.walleij@linaro.org> MIME-Version: 1.0 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: Stephan Gerhold , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-novatek-nt35510.c | 1126 +++++++++++++++++ 4 files changed, 1145 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt35510.c -- 2.21.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/MAINTAINERS b/MAINTAINERS index e6db3889cb19..1372b4139ebd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5244,6 +5244,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* +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 46e3c931e5d9..620a0fd1e816 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -127,6 +127,17 @@ 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 + select VIDEOMODE_HELPERS + 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 0e5bd44601c7..304261196eab 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.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..b312a8848c25 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -0,0 +1,1126 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Novatek NT35510 panel driver + * Copyright (C) 2019 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 I + * this panel driver should be refactored to also support that use + * case. + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include