From patchwork Wed Jul 22 05:58:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 246945 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp247377ilg; Tue, 21 Jul 2020 22:58:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWf78D+AOYGyZfC3gsLLr6b1+LHt7aBkBIiekwTg9+GHw8+V7iYuZiD+rnnCAC6i1gDAVd X-Received: by 2002:a17:902:322:: with SMTP id 31mr25086860pld.33.1595397517856; Tue, 21 Jul 2020 22:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595397517; cv=none; d=google.com; s=arc-20160816; b=XSzG6lxGg14LiHqMWWAfuCUzR9/u/fFwy0Abiq3BY3rADyyam9LffmjpezkHJzjHZw KE87f95kxiGd8mqpqdz/rUSGsLzWejeq0BD56CWLbt/LIs1io5A2rJHWoTWuDAeKUdkb BeipzgPRzlLPY4egUT83YCh27nvvIY2XxOrQ8VrbHaHh1UlVPGHKjzvyHG0/m6KLP5y8 9zzW1ts0TcL1ntKOVOZ4kxqsnUlsUXHzyKStCNxPWMTkYEU2HPG1hMxoaPlabFBCySus RuwU0uabQgM/5zlfk8F6b5Sxl8LwFnWedaaRkQZL4sDKqxVi0shbEYMbaOt0D4SW44DZ QZKQ== 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=rztMf4LpiOW/XTCabDiga4IwRXSkyY2m0CYoK83im9w=; b=ywQemu5iqPNxmcvt9JIcCdaRmQGT/zfY2b+yRJ5GcnVWx7EQSQAhJN9pIVlYtI6+jh nxyfJ0ipf7Finjo4WKWogIV2lDYTY6MzFxDamOz7kquYyBptgYi0PZ9yjFMbBH+GXFD2 L9CFANtzZk/NraHqXGrWHaW/x5ZECdGiZUJaS4NSmX0b1jEopymme6SLx59jP4L9J+8/ aR1A5eoyfiOKdilhpqItk7WgkppnEuqCCDT6oN6PdSOdImfWOdFiTOVwFviQql2Zwxn4 vPebRa0c2hCQSmvoXj6c6yAEnBCxefOl3tPifLLSfMkNTD00pnlqKEOkDQH/sSnEPNjA eORg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=nVxRHz0Y; 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 m65si14574525pfd.317.2020.07.21.22.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 22:58:37 -0700 (PDT) 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=nVxRHz0Y; 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 E66F889B30; Wed, 22 Jul 2020 05:58:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8FEEB89B30 for ; Wed, 22 Jul 2020 05:58:35 +0000 (UTC) Received: by mail-pf1-x441.google.com with SMTP id a14so617800pfi.2 for ; Tue, 21 Jul 2020 22:58:35 -0700 (PDT) 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=aFWJMahmFGP6ghcHwePgHtxNBd4G899f/GVNoXHgHzU=; b=nVxRHz0YeYGTwuoMla2lP2xJRKv5kgsC8Oay+cx+5dRsJ7mzELpda61AMIHTjR1RFn /Ni0FiHKSQP9gS8B9+ypvGz3xbaz1FaUnttRYjgwRgh7md0bvjcq3DM7M5pAUbucjqqI zX9+ef4QU/2JfnJKqeKQ8+oL0Cj1TRdJkj/dxDlsDOFg8ws/kNlHGFkWdA6BG0buyyoX KozyC2B8QGWpC7RnwZ8infnQUSPuQSybziUZcexjPhlAZh8QyHR/sNvFHH3uGCLtPBnb y8JDKO6jQTgaXMEnSNGH35Oz/WSr+Y7KfHxxIzwPpcysHxLWnq5DNgbMHvTyUIIduOLq AcUw== 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=aFWJMahmFGP6ghcHwePgHtxNBd4G899f/GVNoXHgHzU=; b=C0ovxLWKdKrZn/QR2VGtIylXJ5hbXcAkWhIgt+wTzV1YnOhnID5TLkpeG8MDHgNOla WOe2ctqi3Yd4dfiAvxNSFIhrQFF55EwjXQKbsY/ceaFOn214PdYUmtM0554DPIHJluP7 99JqVlftAj4jdBN+ICapuB/IUWGkkdHZeiCbFWYgrNG2QpWaykvUsMYj4ZUCxi7n1vEc xzPIxL4MUqZk92RwmZJbTDT0W9uxvvfKBcgrLCkwEqvrf4/Gv1H0Qq3N/RNONAcg061a +xCdTZ8ZclyPvFbOUkfjfNTaBR9WwsqdZpUqnM9Q5Q/6lvoT5vTyYygEmgoiVkgjlBaL Gh1w== X-Gm-Message-State: AOAM533nab0Y0Ldg3WsomY/wImNKfm4mdlYIQ7QlvIG23g+tqMILUt07 XN2XqdwthnLkgXpIBX8bBaSwDw== X-Received: by 2002:a62:79cd:: with SMTP id u196mr26442904pfc.152.1595397514829; Tue, 21 Jul 2020 22:58:34 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id e191sm22144010pfh.42.2020.07.21.22.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 22:58:33 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg , Rob Herring Subject: [PATCH v2 2/2] drm: panel: Add tianma nt36672a panel driver Date: Wed, 22 Jul 2020 11:28:16 +0530 Message-Id: <20200722055816.20768-3-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200722055816.20768-1-sumit.semwal@linaro.org> References: <20200722055816.20768-1-sumit.semwal@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: devicetree@vger.kernel.org, David Airlie , Benni Steini , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , Mauro Carvalho Chehab , "David S . Miller" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Some Poco F1 phones have an LCD panel from Tianma, model nt36672a, with a resolution of 1080x2246 that operates in DSI video mode. Add the drm panel driver for it. During testing, Benni Steini helped us fix the reset sequence timing (from 10ms to 20ms), to get the bootanimation to work on Android. With current AOSP, we need to increase it to 200ms - this seems to be a safe high value to avoid a white screen occassionally. Signed-off-by: Sumit Semwal Cc: Benni Steini Change-Id: Ib822ef12464abcb50d2e539d11b8983be87c31f2 --- v2: increase reset sequence timing to a safe 200ms --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 859 ++++++++++++++++++ 4 files changed, 878 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c -- 2.27.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 b4a43a9e7fbc..2d384e51353b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5544,6 +5544,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.txt F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR TIANMA NT36672A PANELS +M: Sumit Semwal +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/panel/tianma,nt36672a-panel.yaml +F: drivers/gpu/drm/panel/panel-tianma-nt36672a.c + DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 39055c1f0e2f..da9d74c1ec91 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -437,6 +437,17 @@ 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. + 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..0af3a6ff5d55 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c @@ -0,0 +1,859 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Linaro Ltd + * Author: Sumit Semwal + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include