From patchwork Tue Aug 11 11:40:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 247610 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp498159ilo; Tue, 11 Aug 2020 04:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDo8SwhM521nc9kuYDGdY67bn+G7P5oTiMAEN9Yr0G1o0lQyK2fiGmlfVmVIQEZUfjAuxI X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr25908133edb.217.1597146027018; Tue, 11 Aug 2020 04:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597146027; cv=none; d=google.com; s=arc-20160816; b=zUWlel/QXpZ+fKECPqHbHipno8vqbJ8rMfMAppvRet9BsLbVwZK660d3DseDcUxyAH bEbrk77lfDTeOVf4qZW+z6Bf/kq+Ko+hywNCRuhhXkfzu53YL1XjC12M6XfcQnXyk5ig Ua2uJkw4NxN/iGM6/EGa9n4dTuBehlu+AeZwUNDas5mjI7Pr2C0GBuLTA30sK50qCfre s7lcEVaoVE4cLpptzhmCsSzMo6gaRn3S+TQQEKT6l/NA3ZtTOcHKdXl2cRu5YVr8lPgO h/m9WrO+Zgu/qYFkNFCUBEPl753NDoRN6QgAE0zJGzGU/TkDn7rlc1KffEyaJmtqODrO BYFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=02zVwfMx3c82dMESmN/3uMBsnfv+t0nf9lm5grlg/ao=; b=FL8rAJNSVD4iWlOchtkdMdu2G+OTGooq6uqnOfyDxK+THVo3tVb5jfDLIDR63XJq/Z EjV73C5ctiN1MfWU+1WGHYPnzpAuzlCdvEhRhHDiWhK6lcldB0gIDVcgyliOIjDqVgJN i8YNcOB0z8FBz/IbK8D3Ub8YrMdUQOZVqu4UyDIslEubf71IMfnCY97VCLto6URXaFj8 PSBNJiDbIJrwtSknqnklQUTiQ1YP0IRzyfpsy3zO9BPht+htMspm2fPz587TG9y5S9QI wq9xJM9YyYsHSJU1FeifhUn6/6+5LBaVy/nXivisXIGXT7phY6aApgZuidsROxtOIwBo 4Gow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=brmRzebW; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si12221350eds.144.2020.08.11.04.40.26; Tue, 11 Aug 2020 04:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=brmRzebW; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgHKLk0 (ORCPT + 6 others); Tue, 11 Aug 2020 07:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728723AbgHKLkZ (ORCPT ); Tue, 11 Aug 2020 07:40:25 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF6CC06174A for ; Tue, 11 Aug 2020 04:40:25 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id m71so7073005pfd.1 for ; Tue, 11 Aug 2020 04:40:25 -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=02zVwfMx3c82dMESmN/3uMBsnfv+t0nf9lm5grlg/ao=; b=brmRzebWF+qxRm2xbkZxf1t508yAsFnpHm48CjrF+vPSTGi2fU4tEaqzodQ8YvHZwF kvj3w15iqwZqsIAiXsalZQYYruC1JappHCUXk/e9WJrI0noqBb6nEhi1hGNsthPZf/ZW ZcttNh9PCGRKkY8i6bhtxdAJQt3J2/Y4kot3s3V7yRliiOcXU8oaGMzHNUqKfjh/rB0P 0ScHvjum8xzTQoTIywdCN/eIiRFCUHaCD8Jn+kgx87HXj+LxsVZ8MNg3+ZWhdeX4pK4I 8SIWEbBSkfhXpGwkHVqlS8XzFGV46ql5t7ZZQA5OitY3xEQpLZZVUZlDorWq3xcj24hd HUaw== 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=02zVwfMx3c82dMESmN/3uMBsnfv+t0nf9lm5grlg/ao=; b=prF8+q6h4U5SFbommBQxJpB1ZvU18sYqC0KNzTEn+dYcAbQyfv5nA+HH9k6oXXktNS gI9E9eQBDbOHlId8UppZNkvf/yx9Ona38DFAAdg6RlXgL3UYLgT+FgEl0bS+YktUfXTm GZmE8xu+b4owp0M/YKr0JpsRGluFZteG7aKuBURt/8+KDPmYCS9BZn5CIWaujskgEdOT S8VYmLRqzwRRXXjtYpkw2uKMi/SEE/T/WuKb9lNPTIvTZfqzrZ50/Kn3KDCpxS7cKh7g 0ObGCyJbobybmyndfeizTBBtjoZe+6nqBmYZdIVCfWshomRBHYkHrqD5RHKm0fhrpBdX eIsQ== X-Gm-Message-State: AOAM532y8/dND0wH7pW0vt2JuLu1aiJdisXh4EBCiHRCpq/3K2S7lgXo AOsxhyLQy8e+S3nu0sGMXJ8PMC1U1zQAuA== X-Received: by 2002:a63:7704:: with SMTP id s4mr472831pgc.78.1597146025062; Tue, 11 Aug 2020 04:40:25 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id gj2sm2600448pjb.21.2020.08.11.04.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 04:40:24 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg Cc: David Airlie , Daniel Vetter , Mauro Carvalho Chehab , "David S . Miller" , Rob Herring , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Bjorn Andersson , Sumit Semwal Subject: [RESEND PATCH v3 1/2] dt-bindings: display: panel: Add bindings for Tianma nt36672a panel Date: Tue, 11 Aug 2020 17:10:09 +0530 Message-Id: <20200811114010.17807-2-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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The nt36672a panel from Tianma is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones. Signed-off-by: Sumit Semwal Reviewed-by: Rob Herring --- v2: remove ports node, making port@0 directly under panel@0 node. v3: updated to replace port@0 to just 'port'. --- .../display/panel/tianma,nt36672a.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml -- 2.27.0 diff --git a/Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml b/Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml new file mode 100644 index 000000000000..03dc323332a5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/tianma,nt36672a.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tianma,nt36672a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Tianma model NT36672A DSI Panel display driver + +maintainers: + - Sumit Semwal + +description: | + The nt36672a panel from Tianma is a FHD+ LCD display panel with a resolution + of 1080x2246. It is a video mode DSI panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: tianma,nt36672a + + reg: + description: DSI virtual channel of the peripheral + + reset-gpios: + description: phandle of gpio for reset line - This should be 8mA, gpio + can be configured using mux, pinctrl, pinctrl-names (active high) + + vddio-supply: + description: phandle of the regulator that provides the supply voltage + Power IC supply + + vddpos-supply: + description: phandle of the positive boost supply regulator + + vddneg-supply: + description: phandle of the negative boost supply regulator + + pinctrl-names: + description: Pinctrl for panel active and suspend + + pinctrl-0: + description: Active pinctrls + + pinctrl-1: + description: Suspend pinctrls + + port: true + +required: + - compatible + - reg + - vddi0-supply + - vddpos-supply + - vddneg-supply + - reset-gpios + - pinctrl-names + - pinctrl-0 + - pinctrl-1 + - port + +unevaluatedProperties: false + +examples: + - |+ + #include + dsi0 { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "tianma,nt36672a"; + reg = <0>; + vddi0-supply = <&vreg_l14a_1p88>; + vddpos-supply = <&lab>; + vddneg-supply = <&ibb>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "panel_active", "panel_suspend"; + pinctrl-0 = <&sde_dsi_active>; + pinctrl-1 = <&sde_dsi_suspend>; + + #address-cells = <1>; + #size-cells = <0>; + port { + tianma_nt36672a_in_0: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + +... 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: 253943 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=-18.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 AC5AAC433E1 for ; Tue, 11 Aug 2020 11:40:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78A8B2078E for ; Tue, 11 Aug 2020 11:40:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K2ByyOX/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728812AbgHKLkc (ORCPT ); Tue, 11 Aug 2020 07:40:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbgHKLka (ORCPT ); Tue, 11 Aug 2020 07:40:30 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F69DC06174A for ; Tue, 11 Aug 2020 04:40:30 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id kr4so1746753pjb.2 for ; Tue, 11 Aug 2020 04:40:30 -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=f4wZTtbIFDwFaDfWv4QUniANBHg0PHsdBJk2ieI+Ln854qfsZYqnggOvp1Nek1Zfww pjYdDxeSKkHo6ZIeZpNCjdpmKfMpXl827wTQLwZVJg8lhsu0ik3Velezj19lnbqSfuhf kIYa7I+/Cq3W2WjP0NFHhMMM8ZQClqc1xpBmgVMGImmb/LYXiA847WVaDABG0MBbw97P B6DqnqlxJtyHpFekKIdNbEOa3mAIJpKWFX/xBq5U8vRqZ6ppTTp2WmFV/15Jh7Nu/kq3 gqOQtst/RXgq6QH5h6i8P8C2QqbtDwyjk2vWjeYU05QMhW0kRyQeb8d+Vxiyph6sJRaw NzWg== X-Gm-Message-State: AOAM532ebZyf+08bCAPHQRmrvj19eMMqGlJgckYUIGmJ0/wdR0CYA0nr Ene0hSaAMD/m3vbfiDlWWdoe4g== X-Google-Smtp-Source: ABdhPJxzSLkvXgS0cb9k0Z+cyg4UEYfgWF4VtRCFGEwyPnVBNYE8lUWgNQiAFxTvfa+pTyy0zpuuxg== 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 Cc: David Airlie , Daniel Vetter , Mauro Carvalho Chehab , "David S . Miller" , Rob Herring , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Bjorn Andersson , Sumit Semwal , Benni Steini 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 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