From patchwork Wed Aug 26 16:03:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 248411 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp4460434ils; Wed, 26 Aug 2020 09:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9WRjchxDQSZx/kiUjUcoMzqkzk2M3apG3SwyUwBkI5WFxev96hinDYDlecU9Lzybr0/tK X-Received: by 2002:a17:90a:b00e:: with SMTP id x14mr6376826pjq.203.1598457808904; Wed, 26 Aug 2020 09:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598457808; cv=none; d=google.com; s=arc-20160816; b=hHrFIBRgu0rbJme41MnsFfPAuUS4vcTRf708KKqHkKF7ReKrRhLWMKYF5vEFwJ2W80 NaEqLOufpDajRSqtCgRXE9cGhqqUS+S6fiswNFQVTlJrwZCxc4hHqN6+XRHeoABNY1cy 3Y8D7k8dJurKoEi2oOrXOZTvt3+LA2eP1n7l6c6qqQIGUl6XJjiU+RFkxjZ6mlLpxEjL M/qE8Rv8BTTTKSugsu3YSBzP6x/dLfMQcOzKPiYQ/zJgZ3uI9xQMmygJG54QuDJeoWCR zcLXENKbd2hyto2DSv+OBfCAf5pVUg/gH8ywr1wJZR9GdRqr/JiArk1CI2yD6n7S2HBT Rkjw== 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=0YnqgsCDA/sl+lb181qZ5vtmabhalz6eXyRf5GSjdIQ=; b=hbLSJkDvCTsqGm+AChJ6rWsPN5CYzk6Wfcajp9ucIC1oeHNbI3cFU/UpjsX7XQrlow dGD7DkrKmGyVj1B0+gFmdKCTll4bnadIkKtW9IbJPrBYK0JEVv7yHj6e6zx5xZZFG/OJ I9pgPL/q0TpfGreT11eGUNQVx+SjhgYd3wOBzKSkhPyUYcw2X7i8pKPQreHtPkSJXGHS 2jzpgQeIhd9y/EdRcztjpWUMCcVPA/dewjtzZcZl0DP3TM5U+tPg6v+w6zky56M5Ltuz h7jpOYtvjdTXgh3apDRMnNintsmHSmODUpDEAoZXR2QQfuAYItW0h/e97g0TzA7qmAqV Hp4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=u7y2Uh5Y; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id gv6si2009652pjb.103.2020.08.26.09.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:03:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=u7y2Uh5Y; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 042266E210; Wed, 26 Aug 2020 16:03:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64EF36E187 for ; Wed, 26 Aug 2020 16:03:25 +0000 (UTC) Received: by mail-pl1-x643.google.com with SMTP id b11so1101020pld.7 for ; Wed, 26 Aug 2020 09:03: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=gOJ2wsgRzvVRKckZeydkoWsG77ZYsewrKloG8nTk710=; b=u7y2Uh5YZGN9nMLWxRDS6HRYwt2+2SPr2lWkM/5QvASQ4iAGJGcyoH52Lk9ebk3I+y bdVfivs0fxD5OXqsIM6hrs3bJI7GwUZYkIhIjYiMyEuoeY4U05vxbNTksNII0z5OTYuY tf2e9jPijn6R05nDnaYRtFNpfbiR/AWVfHhuzWC3uIwrmAh9IbCQd8Uob3kzQXPPrwlS gRKbt1MxjyUapwHaVxWAFjs1jgyPR6fNXwKcZXOk2UmRu3giyuL0pYlRJX/ZAmlOoaQp LgfjX8V83K66sgRxj8e/y24yYopZI7D874u7TmcD34ygtW34au7bsh3NEbTWUMWMFg1g csUg== 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=gOJ2wsgRzvVRKckZeydkoWsG77ZYsewrKloG8nTk710=; b=HQnInauUO3lCb3Oo08QBD8P66oFa6iEnNULW7Zj1YSSiRZMO89i9ZRShhEqO8B+vhv 9uTsLBmPMdXxvnwj/qVXDMJ3Ane/o91YkYtozwHHsq7Ecy3vCoPg2FD94L+C6iv00g+f qSe5zTCEQ0oa3BEXzQsbwghbo/3MZXXeYi66kdJE+FzpCG5bM7ilW+trzRc3ntu5GXvp e3QiF3xJslZV6DEXXhFn5wguwn/4bxiZA92RkFRVwOBmdkKegehSTQr+9UA1R07u14S0 Yy+oLDQsexZgflHMcl1SQAgzituIH13phDMqGHLG3aadgNqpj2ioCwFsWrFPp5HwD5ws x7fw== X-Gm-Message-State: AOAM530/XfuotjV6mA+6KDd2ee+P9mrfQ8aPIzfSn6qfhlEDte8hEOw7 buM9xdj2Ebre957S+MGhNYw9jg== X-Received: by 2002:a17:902:aa41:: with SMTP id c1mr12271225plr.224.1598457804850; Wed, 26 Aug 2020 09:03:24 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id u3sm2487555pjn.29.2020.08.26.09.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:03:23 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg , Rob Herring Subject: [PATCH v5 1/2] dt-bindings: display: panel: Add bindings for Novatek nt36672a Date: Wed, 26 Aug 2020 21:33:07 +0530 Message-Id: <20200826160308.18911-2-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826160308.18911-1-sumit.semwal@linaro.org> References: <20200826160308.18911-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 , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mauro Carvalho Chehab , "David S . Miller" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Novatek nt36672a is a display driver IC that can drive DSI panel. It is also present in the Tianma video mode panel, which is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones. This patch adds the display driver for the IC, with support added for this tianma fhd video mode panel. 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'. v5: renamed to novatek,nt36672a, since the binding is for the IC and not the panel. --- .../display/panel/novatek,nt36672a.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml -- 2.28.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml new file mode 100644 index 000000000000..7f8d1097bee0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/novatek,nt36672a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Novatek NT36672A based DSI display Panels + +maintainers: + - Sumit Semwal + +description: | + The nt36672a IC from Novatek is a generic DSI Panel IC used to drive dsi + panels. + Right now, support is added only for a Tianma FHD+ LCD display panel with a + resolution of 1080x2246. It is a video mode DSI panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - const: tianma,fhd-video + - const: novatek,nt36672a + description: This indicates the panel manufacturer of the panel that is + in turn using the NT36672A panel driver. This compatible string + determines how the NT36672A panel driver is configured for the indicated + panel. The novatek,nt36672a compatible shall always be provided as a fallback. + + reg: true + 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 + port: true + +required: + - compatible + - reg + - vddi0-supply + - vddpos-supply + - vddneg-supply + - reset-gpios + - port + +unevaluatedProperties: false + +examples: + - |+ + #include + dsi0 { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "tianma,fhd-video", "novatek,nt36672a"; + reg = <0>; + vddi0-supply = <&vreg_l14a_1p88>; + vddpos-supply = <&lab>; + vddneg-supply = <&ibb>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + + #address-cells = <1>; + #size-cells = <0>; + port { + tianma_nt36672a_in_0: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + }; + +... From patchwork Wed Aug 26 16:03:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 248412 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp4460482ils; Wed, 26 Aug 2020 09:03:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvFNBvn+HOwna+/2M1hXWRkWq2AZg1+86LNbdz5kET+waomjvCmNUgCWr0CDre7oRwH3qm X-Received: by 2002:a65:6545:: with SMTP id a5mr11361736pgw.43.1598457812676; Wed, 26 Aug 2020 09:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598457812; cv=none; d=google.com; s=arc-20160816; b=KwZGxssW1OrPcjWTJUdW9sjg9B3g+rK+OkqCxv13blqLvsoQdCUhjC7NQ9sgotPzP7 bIT1uCynzfKEn3zwa8mQoR1JP8HOiDOMLFseNvVr2n2JGXQ62TPjaJjZQGj5Mw1d3A3h FkYTN3P7LIevpcGGU+qniIWf88bv2m2n8awK2nAIZRSrdv756mN1IacupHPLaFr9Kvwi ujO+/7wxDdR2Yrpii5IlA/RDBO9+g8ur4GsIiV8KU4IgIhd9ngb/k2z3eFxqmls0ajnj cuGrwBl35OBpBO/wgs+hQsZEEDkMZJv7AVUYNo5otjgiSAelE75VH+zG5pmwHLPDUDT8 FkxQ== 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=Lp36yVcLDuk/V0nmLcqnu62/ubVVLR4NIQwDpl9Dbds=; b=yjU56RLrFeuDWGnTaZ8CCCXzmsvFiZOs9H+CCnw0j5rKJsJW4rjtTfRVTko3aacWqp D2INaJ0I827p0aWPKUbkxBBaLx9Yx6zEBGyzOdX6OsFgVE8x8PUVDB7UepAeKd97/sII RbOYI/7AT+t2XV45QVwGeluLXnigg55V9jGhg+25SNFHfEa2h9OaswACFsky8/fWw8O4 26c2+9SWgJ0plV+avQqMU6moWeHSagDU4+pnsHAgxRuc0BSuov0BY3fJk+kyaVqhUJXy OwmQkUGHih5zNs0sn2L4SdZHRO35CCCW1bS+veEwMCSS6TLnYmgL9Qmu3ltTtbhzn8DG 3zCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mnj3bGV4; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id j19si2229142pfr.242.2020.08.26.09.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:03:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mnj3bGV4; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 97A3F6E211; Wed, 26 Aug 2020 16:03:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4209D6E211 for ; Wed, 26 Aug 2020 16:03:30 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id 31so1234094pgy.13 for ; Wed, 26 Aug 2020 09:03: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=mDvqA9e7YqPVVUpVK+0rldhqRRsbzhwmsYKe/Rz7kas=; b=mnj3bGV40uTj3hbXN+wSBNEwkhRxr3rXQtrJYm6XMTVY8t69dbYpBMYpFwLk8AfrJa 3WGDur0G6wub47174wr38ZKU0Xs8KHBP7zK/HrEDFCsNDpUIO/a9rtF7IOjo+xEjnj81 GFKiaKLCeoA0LmYdG00kOUyISgiLHgABRgaZcZH1wi/sXaiIwk5VipD0qYFx7N7t0B4I YlvRI+uVp+1zQBs3VUzLxhmIFAb0IVNPTHBnmv1suLigv6/ewXDW6ZdIflqcMZiWpxry BIyx1nIIJ+90YV1HPMymxybFQuu73+O/0O3qdjLSM6wGTmJ3zydQWKeKAdceLLy/DGtJ L/Yg== 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=mDvqA9e7YqPVVUpVK+0rldhqRRsbzhwmsYKe/Rz7kas=; b=ebK0RMQlaGas5B8r+CTd7NKmuX7z/t4J94bbeHKeZacx+bLiNan3OwnN7e3Uem0P8h subkPWJLo2PzseIPaL6vABz8gddKi73Qy7dRNb/XZhtqK0duLh7UDAenKX1ZaR5SMcHI HBN4rzBA+S+jgT0FQsOCdePcrsd2q0bNBAByl+9+bV2BVJwwOyyZMmoHL70yobsGXWXS CKzj99orZQlkP8O6cr2OUDQ4IlLzFFLTJNJhNCOBwT9O6diHNXiNSW6/a2e9a3AAMgie WAGQv5ifZ64Pe/GseoPfD4Bvd0e9Ay73Li6A7BB8Oy0P1EPFybQmgOsjPYCQlr7HwF4U RXzQ== X-Gm-Message-State: AOAM533Oz1wByHeYcsEuBMTgru6XJi2QUt+mrzp6OGI6M+dqjIaOI+FI KCRr/wXv9XFKt7/na5qRETRyuA== X-Received: by 2002:a62:8f51:: with SMTP id n78mr12806308pfd.74.1598457809263; Wed, 26 Aug 2020 09:03:29 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id u3sm2487555pjn.29.2020.08.26.09.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:03:28 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg , Rob Herring Subject: [PATCH v5 2/2] drm: panel: Add novatek nt36672a panel driver Date: Wed, 26 Aug 2020 21:33:08 +0530 Message-Id: <20200826160308.18911-3-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826160308.18911-1-sumit.semwal@linaro.org> References: <20200826160308.18911-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, Mauro Carvalho Chehab , "David S . Miller" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Novatek NT36672a is a generic DSI IC that drives command and video mode panels. Add the driver for it. Right now adding support for some Poco F1 phones that have an LCD panel from Tianma connected with this IC, with a resolution of 1080x2246 that operates in DSI video mode. 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 v4: Since "0425662fdf05: drm: Nuke mode->vrefresh", we have to calculate vrefresh on demand. Update for it. v5: Fixed review comments from Sam: - rebased on top of drm-misc-next remove return of drm_panel_add() remove drm_panel_detach() - renamed the panel driver file to reflect that this is a novatek nt36672a display driver and not only for tianma panels. Adjusted some internal names also to reflect the same. - corrected changelog to add info about the generic Novatek DSI IC - corrected compatible string accordingly - removed pinctrl - used drm_panel* API for prepare/unprepare/disable/remove --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt36672a.c | 767 ++++++++++++++++++ 4 files changed, 785 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36672a.c -- 2.28.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 01fb9ee6b951..aeecade2d65f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5619,6 +5619,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 8d97d07c5871..02600f12a063 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -208,6 +208,16 @@ config DRM_PANEL_NOVATEK_NT35510 around the Novatek NT35510 display controller, such as some Hydis panels. +config DRM_PANEL_NOVATEK_NT36672A + tristate "Novatek NT36672A DSI 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 panels built + around the Novatek NT36672A display controller, such as some + Tianma panels used in a few Xiaomi Poco F1 mobile phone. + 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 15a4e7752951..4a36eb45f670 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -19,6 +19,7 @@ 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_NT36672A) += panel-novatek-nt36672a.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.o obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c new file mode 100644 index 000000000000..3f0c18e46818 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c @@ -0,0 +1,767 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Linaro Ltd + * Author: Sumit Semwal + * + * This driver is for the DSI interface to panels using the NT36672A display driver IC + * from Novatek. + * Currently supported are the Tianma FHD+ panels found in some Xiaomi phones, including + * some variants of the Poco F1 phone. + * + * Panels using the Novatek NT37762A IC should add appropriate configuration per-panel and + * use this driver. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include