From patchwork Tue Aug 11 11:40:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 247611 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp498237ilo; Tue, 11 Aug 2020 04:40:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxWgsW/ly22r6AkNxXrrs20SJZSgHZwD8lzw4BYKKQpBrPnMTRk0PbyOxJggGxD8VdeODd X-Received: by 2002:a17:90b:796:: with SMTP id l22mr666569pjz.46.1597146032927; Tue, 11 Aug 2020 04:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597146032; cv=none; d=google.com; s=arc-20160816; b=K3gvFGyfKZAbNn4Df3Bn07Xye3OcuaiTbHPW6BiZZXHTLzjeoT8Tji2GTJaBuCa4io nTqFzlUaU8MPUCPYCxS9/r/1ra9W7+EE+kQ9ID+hL1AdYikwkz4e4Ys3181PQuPsXgXO lv06ZRP5te82G/+tXXH+BVOCOOM8ATelWR6hAoMgeu/tZhpIroayj/iH6tJinxnZfe+F O7KTLlK7Z7D90EmGIqg7fj4qiTV9tESkpigfvhQUpFePcQCMs71NhrhrrSXZZHiquWE9 dNebpx0OT2JDH9S0S+yUAwirF/VHeqAI8oJgG9865lz5GKzpj2rwZpKe8b8khEACsTxg 0MjA== 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=BFf84OjRG01T5282sXXCN4GZwVtGgZljjA7t2z3LjhE=; b=vp6eVcl2AYblVI5waw/wS+rMBleCxycmuTJd9Q/jU/qq1/aGxl9D6HE4uvW5piDjWf ++uIiho8Yq4WnoMLcajpntiFqgP8YnthW+rd0gZbbqHWQyhUynQmLelRLgOGOSEMmCv6 wKPqCZJ/qbIiNauvNDewisUryvX+92yGB6qbbebWlx9/alugxsJsZgWT+rYFlAIHaTGP 7Fq94pD2S/Oy4QAZg3mrCPSNu9MSx/M10uXWWFGIdBlaDIgj0oiohnwPADJLCGXPuv2C fhM0GNwMO2mnnmr3g4MQrHR0knyx7FtY8jn7QuocPezOTh2I0r80BIXYySyPXNl/vyE2 GVmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="K2ByyOX/"; 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 r8si10580323pgn.371.2020.08.11.04.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 04:40:32 -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="K2ByyOX/"; 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 4631B6E507; Tue, 11 Aug 2020 11:40:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2DC36E507 for ; Tue, 11 Aug 2020 11:40:29 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id r4so6694406pls.2 for ; Tue, 11 Aug 2020 04:40:29 -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=P0AUpy2ZdCxQk1OnnLHB9v9HjjMoSPNb/b3Tq/gh12k=; b=K2ByyOX/cpOp3cFkiWVa/t8jKdDhZfFBA/cQqXo+vsFTXp8XSTI6/6J3CML2ZZ5StM GDS/zoVnoqJzWIfz0VLhn0EqUGP2WZDYoPVokHd5B+N1m9ONO16n6WLuLWQpnx2EXkpu 2sdY+mGbVD2YZPO+cHQpZOu7pKjorCuFmKcVzitusXOsDkW1YG4P/KYQkVi6vPyUQw6U lYvoBgwhht9maNCPC79r75z8pea7PW3blDtWHVqfNrsIt5gdY0BtQrQ+9reLjGIhePjQ XLMYVNx02OhZU8xXK8PK68JHAebeJqofIAaVH0P01RvMvGuV8WTXogtvUKfs0O6lNr5f w/Ag== 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=P0AUpy2ZdCxQk1OnnLHB9v9HjjMoSPNb/b3Tq/gh12k=; b=hhNz3G4q7XpR+97RD6s126aNF0XbfubBhQsivn174iBuzRx2/FNmY+MTy+SWUH+v3V nDnOJ4KtYs4RQzCqjwuY0/s13REJcXob3AUDq0hhxQIzOktoSvteJo9cA8ja3326Jrcp l0ZiGbCxtVd4huCxgIaneR5id2BVHpkWLYdiw5cfpNfAX6iT1hStrCD1t+vPubR1U1Tq EJPeEXPgxWf8T7Q1qi/MRnHkxEiQ2iJDwU4crBzwPC2Qd34g5p4dhH/cadFG2ydrVE5P aicvfPREn5h71evIBm5cW4V2Ml6ZNB66OLfpbPgCqLKAX+UHtq3HbHbMC5EE1TNtltUc N8JQ== X-Gm-Message-State: AOAM531oLEY0nWNNP2Kry3DuGV8EpHZDc2vmmoOJg5WaBbprJlP5V4aU 3GJTi6Mdhx5r0rlvRv90Wv7lRA== X-Received: by 2002:a17:90a:1749:: with SMTP id 9mr643034pjm.127.1597146029288; Tue, 11 Aug 2020 04:40:29 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id gj2sm2600448pjb.21.2020.08.11.04.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 04:40:28 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg Subject: [RESEND PATCH v3 2/2] drm: panel: Add tianma nt36672a panel driver Date: Tue, 11 Aug 2020 17:10:10 +0530 Message-Id: <20200811114010.17807-3-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200811114010.17807-1-sumit.semwal@linaro.org> References: <20200811114010.17807-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 occasionally. Signed-off-by: Sumit Semwal Cc: Benni Steini --- 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..07e8461b8893 --- /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