From patchwork Wed Aug 4 08:13:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 491651 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp1404081jap; Wed, 4 Aug 2021 01:14:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylDc6H9w0wivOeX7fls8ROCC619+RNWF38qE+PdVDpJ2wGRvfbKx/ynlsSKzhmXg3rwYGK X-Received: by 2002:a05:6402:603:: with SMTP id n3mr29486106edv.61.1628064864745; Wed, 04 Aug 2021 01:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628064864; cv=none; d=google.com; s=arc-20160816; b=ktTukkMj5JkqXUJCgQquTG7F4vAwAiYdNIlLKP6QreaNPr2VYcHA5FMUod5Wp+xKiM 5hf3NwXE4TlBZOT+mgo47aAFP8XRK9tlIREgAnXXE151ae2EvDwe7XA/VINxZWbrZ8kR CRIJoFVbzDA1KxdS4BBq1V/SAkSjAR4XpSU+CReEB5Yy7euWZw7/cxoSSIGKxznNtldO aENKLUfSqhCOyUVf1+yir4SsvVJeQq6rLVlsPeDs3SNrqkX9HOw/ln4gp9OaTwn5Ffmk rCYn/e9mHzhyFn7lAdf2j5HTxHh3ElMpjwo2Q83SApuhCLSurv094MrJLa37hq6O/+wo T0AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=AiCWdYM0ZuktKgNCZC5+4qf0aE8KCLR1T4PJjAilY1k=; b=hEFYmttFg28/cPmJ5MaXbGZAh2cuxTsaP2CTGdjm2o2WhW4H1EOO/pM2h6/zwGrrNQ SCUSdTXbC0TiQtHPCeusWnQmtBmPxtuwlvMMxAhPlwFk+jZjf8HJAUK3SX/Kc4imb7n+ oP+xn51HHQEM6hYsGClODFh2SvXopbC1gSLr5BbueMLd61D3LV1Du0UPxRyA25ohrc/y h1ZddG0sTsLm68nMiq1kS13zOC9rWURqF85DqugNm2cxgyL9ODNFtThoDAKkaFl9vcs8 S4rfYvM72Tbo+JavOdvYkb5WR62iDCDearID+UoNm1jKI5KVALHd4gquQf7rIQndr6MM Swbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cOP3iuvb; 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 bt23si1320144ejb.268.2021.08.04.01.14.24; Wed, 04 Aug 2021 01:14:24 -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=cOP3iuvb; 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 S236070AbhHDIOf (ORCPT + 7 others); Wed, 4 Aug 2021 04:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236102AbhHDIOf (ORCPT ); Wed, 4 Aug 2021 04:14:35 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CC18C061798 for ; Wed, 4 Aug 2021 01:14:23 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id mt6so1878798pjb.1 for ; Wed, 04 Aug 2021 01:14:23 -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; bh=AiCWdYM0ZuktKgNCZC5+4qf0aE8KCLR1T4PJjAilY1k=; b=cOP3iuvbTuwfXPfmpYiijC+va2mAKLtqQU5xNviYSA4JVJ893FpamQG29NVjkl51JW dDeOa04GIQ/WBIxc9Yqj0tUhR5JluQMsAYiM6iAsE+SVpo59JBbpaC9MwIy0BBuXOS4a kwoKRE+ixWOb6wt6Nqu1LAnplok7rPs31scGr8hmXC1LV/5JazqINWZgrEMaHN3vuruy sOZcZVmbT6cXjngmKmAvna6vBK0PXAExRqS6JxZYJL5fFRlEnoX7+fZZA0RjBZxJzzSe miGj092xNv4gdwItdW/S7q7FZFRPgA4IV8qEmNkn40T5OsPbyzES9m5f9OiBQ+/iDNH6 5H1w== 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; bh=AiCWdYM0ZuktKgNCZC5+4qf0aE8KCLR1T4PJjAilY1k=; b=f3BxbioMVsnhEewM/TfmxnicWt48MhNxD3IVe5b+EJCWOL2CCesrt5i4s7Q5SeDVTV m3+r/hc5lNfRzm2swQLo1m5TCbGI5n+GxfWXi4g7BgIk+JQq3It/SFDpb7uUV7KkYckN ZKz//RVxxC4ij+q//uVXBXF6spAK+xXg8W58s3AHSjy9F9fFuSpcXnxw2ve/rWZ4NFKP DHrjl8tgt3sKdQiv8WAP5fiYO3EoXQytUFVrjC++3xevfvl55rS0dOXmqjjw1XM5d5Md i6UcoVkx+yJvom6B+MV4teThwfpGAyYSaAB8wwuHdjQXoQ/SqGuTPiI+C27lmHVkDYvR ju4w== X-Gm-Message-State: AOAM530Y0M77zjUbIVeYH76tGrPin1ar1RcEtm+p/gfbivrMlt4EYOSQ fc0sl4Axjh8Bl/GYUhiUCxx1tg== X-Received: by 2002:a65:6183:: with SMTP id c3mr80974pgv.73.1628064862981; Wed, 04 Aug 2021 01:14:22 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id g26sm2067445pgb.45.2021.08.04.01.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 01:14:22 -0700 (PDT) From: Shawn Guo To: Thierry Reding , Sam Ravnborg Cc: Daniel Vetter , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH 1/2] dt-bindings: display: panel: Add Truly NT35521 panel support Date: Wed, 4 Aug 2021 16:13:51 +0800 Message-Id: <20210804081352.30595-2-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210804081352.30595-1-shawn.guo@linaro.org> References: <20210804081352.30595-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Truly NT35521 is a 5.24" 1280x720 DSI panel, and the backlight is managed through DSI link. Signed-off-by: Shawn Guo --- .../bindings/display/panel/truly,nt35521.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/truly,nt35521.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/display/panel/truly,nt35521.yaml b/Documentation/devicetree/bindings/display/panel/truly,nt35521.yaml new file mode 100644 index 000000000000..4727c3df6eb8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/truly,nt35521.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/truly,nt35521.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Truly NT35521 5.24" 1280x720 MIPI-DSI Panel + +maintainers: + - Shawn Guo + +description: | + The Truly NT35521 is a 5.24" 1280x720 MIPI-DSI panel. The panel backlight + is managed through DSI link. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: truly,nt35521 + + reg: true + + reset-gpios: true + + enable-gpios: true + + pwr-positive5-gpios: + maxItems: 1 + + pwr-negative5-gpios: + maxItems: 1 + +required: + - compatible + - reg + - reset-gpios + - enable-gpios + - pwr-positive5-gpios + - pwr-negative5-gpios + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "truly,nt35521"; + reg = <0>; + reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>; + pwr-positive5-gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>; + pwr-negative5-gpios = <&msmgpio 17 GPIO_ACTIVE_HIGH>; + enable-gpios = <&msmgpio 10 GPIO_ACTIVE_HIGH>; + }; + }; +... From patchwork Wed Aug 4 08:13:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 491652 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp1404112jap; Wed, 4 Aug 2021 01:14:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4iBZ0KBBiD65155fLq/j+qrXDwbY5GMZMvYueERY0kyeKIBjxBj8eyuyGLqy9b726nsSo X-Received: by 2002:a05:6402:10cc:: with SMTP id p12mr30884796edu.328.1628064868955; Wed, 04 Aug 2021 01:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628064868; cv=none; d=google.com; s=arc-20160816; b=Xia9U1d9xl0o7sTDoPf+I2J9wyt1ME2gl2qpX2Tkyshrscm7OjUclvfCsFld1qVY7q 91GRmpZN23fvgicxP+emoiCAta9nxOy35YSHzb4Kgn447EY0RBQYWo4mz0gzpMVbFf+Q +SpE024SKR5CKvtV1sRw1hFDBZCwf6ztVl5pwFKoqjcDAG6UD+OocJ6nClYnmVedoTqp PYnAWIJP2vcx6MnjgBwQ1deVffXWWTSbbzFF1I7bQgc54TJ1CYZwmja9MVhIZ2+w/iXK wq1nwVD8Z8zNkVGVvlx3wkGdIvNp6VRqjyf8/JVgGJWhQIUGdZNRvYVuSCfAa7c03wJ1 W7HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=LXSdt5lb/U9IdaoMZbjWU5/UO1lqAEgjijgMwDxRemU=; b=Gm5kUqegUsKWbvVXOyrLKvkSavDrmTgEOKVI+yCb1oYCo5ccPGkW/Oj+hVrf5ZrmBY B+VK3NBQdFHO6FXf9VMRpEVJk/06fGwZ/UeI/ZS/G2lpCX2WcHScuL8s1brdLkm9Iwir nS5SuOQaJvTlbhq/5tX9ldnHBxOHSlzGVMGQGjpgvfJCxa99T39mmaG2ZRvya2Nm0IZ3 WAyvN2JGVsWm1Gt5kb3iCDuUMGBp6i5e+NqcE4WfrVVNcatV3xNoEsVT6YG6yVOQ4fa9 jBkBd7fY7P1NzO7MGigQaHll2FB3u7DZk6okjQ2oG2GFPFpyOGkqscz63FQnREh92RVW vgmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QfIs1gXZ; 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 bt23si1320144ejb.268.2021.08.04.01.14.28; Wed, 04 Aug 2021 01:14:28 -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=QfIs1gXZ; 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 S236237AbhHDIOk (ORCPT + 7 others); Wed, 4 Aug 2021 04:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236128AbhHDIOj (ORCPT ); Wed, 4 Aug 2021 04:14:39 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E6BC0613D5 for ; Wed, 4 Aug 2021 01:14:27 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id j18-20020a17090aeb12b029017737e6c349so5134951pjz.0 for ; Wed, 04 Aug 2021 01:14:27 -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; bh=LXSdt5lb/U9IdaoMZbjWU5/UO1lqAEgjijgMwDxRemU=; b=QfIs1gXZfmAsYsHu+9jNvROPGUtMfJzh/Y6QzhY+cuJ8yJ0YuRwyzw6+Qc5y8oEaKg KR5sOGRUSJDy9+5pn0eR8a9DrVgvnAIIGUeUdJJDKqpFbWHpjwVGv2JIQteqs6YQHwOm dprd9acEfFZHCh2H20UTDdR1F+pylet4xY3sCNb3/I5Y1HLkN/KIjSNe91uPVzrE7Ywv NpvgomB/4e+HfIMvEbS4xyTIxLplHC/4NRtY87euO4xGp+n8p3c1Ser0SuWlI+ouXEvF NY19PHw2Z/rGJZ06rbpEYbA/jyHhd0tEwuwB7GT5HCmQyEq6tKEfOyPyZ9J/hxVCSGxR zMgA== 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; bh=LXSdt5lb/U9IdaoMZbjWU5/UO1lqAEgjijgMwDxRemU=; b=R5izu9v8tz+mU8SL8xYsWWTiE+QBI4ALqOk59mMaPuJqD0ddfzi7UejV2vbCIRlDIl vsZHzEq4Bkm/hQ0jK30lR98bJ3O0HorABT7cgH9n5Tgxi9BjGh4fAoUYGCQf5igLQA19 RNmzrC/2oudLCUy9kzJbuWevOpw2t7FAp/IjaoxCh7WpnF/zmLduycCBoUNGQDzzJeMx EUlwGKATDNZSXAvkMJFnuVgwk3ddMN3mJaJyWpdjbBZDZddSrkiff4TsT/HHYWli91OZ 6l+R40xElltWUhCdxMxp4c/17AJJ3uBx0ytbCji0E0Uw2ZTdfT9Pvi+Puz96PApXrxvm MJ0A== X-Gm-Message-State: AOAM530F/A2Dj5P9fieYLfZy8rvaBQvvCp/SfpLfCPZ8EJA8sx0FfofM 5ZghKs2OXQi7RI/RjbUpv7gAkQ== X-Received: by 2002:aa7:9ec3:0:b029:32b:4eb5:4bad with SMTP id r3-20020aa79ec30000b029032b4eb54badmr26158861pfq.6.1628064866615; Wed, 04 Aug 2021 01:14:26 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id g26sm2067445pgb.45.2021.08.04.01.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 01:14:26 -0700 (PDT) From: Shawn Guo To: Thierry Reding , Sam Ravnborg Cc: Daniel Vetter , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH 2/2] drm/panel: Add Truly NT35521 panel driver Date: Wed, 4 Aug 2021 16:13:52 +0800 Message-Id: <20210804081352.30595-3-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210804081352.30595-1-shawn.guo@linaro.org> References: <20210804081352.30595-1-shawn.guo@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org It adds a drm driver for Truly NT35521 5.24" 1280x720 DSI panel, which can be found on Sony Xperia M4 Aqua phone. The panel backlight is managed through DSI link. Signed-off-by: Shawn Guo --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-truly-nt35521.c | 491 ++++++++++++++++++++ 3 files changed, 501 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-truly-nt35521.c -- 2.17.1 diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index ef87d92cdf49..cdc4abd5c40c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -537,6 +537,15 @@ config DRM_PANEL_TPO_TPG110 400CH LTPS TFT LCD Single Chip Digital Driver for up to 800x400 LCD panels. +config DRM_PANEL_TRULY_NT35521 + tristate "Truly NT35521 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 Truly NT35521 + 1280x720 DSI panel. + config DRM_PANEL_TRULY_NT35597_WQXGA tristate "Truly WQXGA" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index cae4d976c069..3d3c98cb7a7b 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -56,6 +56,7 @@ obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.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 +obj-$(CONFIG_DRM_PANEL_TRULY_NT35521) += panel-truly-nt35521.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o diff --git a/drivers/gpu/drm/panel/panel-truly-nt35521.c b/drivers/gpu/drm/panel/panel-truly-nt35521.c new file mode 100644 index 000000000000..ea3cfb46be7e --- /dev/null +++ b/drivers/gpu/drm/panel/panel-truly-nt35521.c @@ -0,0 +1,491 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, Linaro Limited + */ + +#include +#include +#include +#include + +#include