From patchwork Thu Nov 18 09:19:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12626365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12BECC433EF for ; Thu, 18 Nov 2021 09:20:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D67F761B3B for ; Thu, 18 Nov 2021 09:20:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D67F761B3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 520606EC75; Thu, 18 Nov 2021 09:20:19 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FA1C6EC6F for ; Thu, 18 Nov 2021 09:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227214; x=1668763214; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufYaztoM7btUy9LuPRGwqpeGKIKUMrwofkGEOKopoSs=; b=kkAg7vxYDfPi9LE17gU+pF+bWUyMKNa+Qh/dgLlIxUZ6wIu0hqZstFJn hK+Pp+mmqC8eTlGxrjGvyghjC6QKLl3GjGNPQ250NpFZipcqPPb5Mww8B oNPTYTez4nqPzG9EYbQ5eqwH42NCVWqcQta+UGtB7CJl34WVwElYEyBuV UItmMqFIcLi9kotcKWgHx5jxBbRegsjZYJl9BN2jYWWnUnXb8nIV8pyOZ vuiyaljfAEHtFJWKM92mMBXATER1VJpa3rYAN7cE+a80dLsbFjMrFpRi0 hOrCot5nFOgGUYYk8GPPR74Y+WCSqx0iw0hV43iQcw6HJU0RqjjRL903V A==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534722" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 18 Nov 2021 10:20:04 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 18 Nov 2021 10:20:05 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 18 Nov 2021 10:20:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227205; x=1668763205; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufYaztoM7btUy9LuPRGwqpeGKIKUMrwofkGEOKopoSs=; b=Wl+eFsIhLEvvwFtAI4I7mL4qDhk7+c4DHRMbPU/FtjW1HSJEHYKwaW4n /VjWyKrgxxvFLd3hqaitwARE07pzuuZ9/30tBrL4FasCArYfLSmpl6Irh X++9EKyOOI2YyJCZ2yRRApYwhZfcUZhXbvtZ2u3jqsIlejDLTjudfmM56 k6cWcXmsEtwg/JjR/HcA+E8vE253/qCFcOgdUXfiGuBBpLGgPfpiBy70x qrLjkl8iu3gQ7qcUMV8jCogmUTxy/AbP7zL5SH8hyttRjZ1PcZ1oTLb/n /CoizWD6cr7KcRrfILS5rCQsVNB4UoZqs8829+DWm/THVbME+eSsCyu+D w==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534709" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Nov 2021 10:20:02 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id DEAB1280075; Thu, 18 Nov 2021 10:20:01 +0100 (CET) From: Alexander Stein To: David Airlie , Daniel Vetter , Rob Herring , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH v4 1/4] dt-bindings: display: bridge: sn65dsi83: Make enable GPIO optional Date: Thu, 18 Nov 2021 10:19:52 +0100 Message-Id: <20211118091955.3009900-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> References: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> 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: Alexander Stein , devicetree@vger.kernel.org, Laurent Pinchart , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Laurent Pinchart The SN65DSI8x EN signal may be tied to VCC, or otherwise controlled by means not available to the kernel. Make the GPIO optional. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Alexander Stein --- .../devicetree/bindings/display/bridge/ti,sn65dsi83.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml index b446d0f0f1b4..c3f3e73f740a 100644 --- a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml @@ -91,7 +91,6 @@ properties: required: - compatible - reg - - enable-gpios - ports allOf: From patchwork Thu Nov 18 09:19:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12626361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 705DFC433F5 for ; Thu, 18 Nov 2021 09:20:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EFD061B3B for ; Thu, 18 Nov 2021 09:20:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2EFD061B3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5B386EC70; Thu, 18 Nov 2021 09:20:17 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF0266EC71 for ; Thu, 18 Nov 2021 09:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227215; x=1668763215; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NmZSdW+5LVfKmAVPKZKf41GorbnUuDSvFzzyCMsfbWk=; b=OrlkAz4e3oaANM5qKU8Osu5bJqgcTkRZErg+7POs7eiyine32JZ32vk0 P73HCA+GpWMbOH/MVCsJbTcTqXYcadoEgS1xnU1zBY3zV8gnz/AYT5/di an9gMNThOUT24WJctUM/u4QTO/ZHpj5xIPRLIBWtOqnsSDKLQmCevQ91w Da32NsUDpKkGZl/nJRUDsHsQWd06KUOaVuSMnnuq1NwdU4dzDRcm4Ntih FAo6XXY9yddJCAbINl5+HMtFivxHMiQi9iuwS6l/0rFFDmnchGLWAZADS CkQQsLyDLPXq+ttw7LTfa2YI5GBMWc+yQ3LvqmvlJ2kOIqZAPfsdBnSG4 Q==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534723" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 18 Nov 2021 10:20:04 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 18 Nov 2021 10:20:05 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 18 Nov 2021 10:20:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227205; x=1668763205; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NmZSdW+5LVfKmAVPKZKf41GorbnUuDSvFzzyCMsfbWk=; b=obUpin4bO7+TZ9kixzEElsGKqf2eohEGNlhKB9cwJDEUakg1x6LvR9Hc NWS1plOM5zM9sToTtXQa/xNCZxlAbZLaw08IM0XyCqif1soBWLJ03y7ej kIzE5To0qt6cu5g5DrCRjY7jI/e28RUkHFVvMDojEkdPBQmMyrHS90UsQ uhNxoZ1eXP1y2wY1q7yC5VV03gMs8djrzbRhPKM2v3xu84ADVLAPjj4Lk qLKr3TfmcsBOolLorbcQ1tyRh5CbTgzExAKTHr6yNJSbnSaCZ4D4C7xEX Pj2kFd7p6UCx7G5+Ov/OQRrrU4VunhdWERR2IlUeUAWux23FwkVqIA8F8 Q==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534713" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Nov 2021 10:20:03 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 2C80F280078; Thu, 18 Nov 2021 10:20:02 +0100 (CET) From: Alexander Stein To: David Airlie , Daniel Vetter , Rob Herring , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH v4 2/4] drm/bridge: ti-sn65dsi83: Make enable GPIO optional Date: Thu, 18 Nov 2021 10:19:53 +0100 Message-Id: <20211118091955.3009900-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> References: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> 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: Alexander Stein , devicetree@vger.kernel.org, Sam Ravnborg , Laurent Pinchart , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The enable signal may not be controllable by the kernel. Make it optional. This is a similar to commit bbda1704fc15 ("drm/bridge: ti-sn65dsi86: Make enable GPIO optional") Reviewed-by: Laurent Pinchart Reviewed-by: Sam Ravnborg Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 945f08de45f1..065610edc37a 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -662,7 +662,8 @@ static int sn65dsi83_probe(struct i2c_client *client, } /* Put the chip in reset, pull EN line low, and assure 10ms reset low timing. */ - ctx->enable_gpio = devm_gpiod_get(ctx->dev, "enable", GPIOD_OUT_LOW); + ctx->enable_gpio = devm_gpiod_get_optional(ctx->dev, "enable", + GPIOD_OUT_LOW); if (IS_ERR(ctx->enable_gpio)) return PTR_ERR(ctx->enable_gpio); From patchwork Thu Nov 18 09:19:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12626363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7EB5C433F5 for ; Thu, 18 Nov 2021 09:20:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B746361B3B for ; Thu, 18 Nov 2021 09:20:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B746361B3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 39BEC6EC72; Thu, 18 Nov 2021 09:20:18 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 402226EC70 for ; Thu, 18 Nov 2021 09:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227215; x=1668763215; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=POh5eXzb/NnaGXPE+zuDTJeI+unBh++bhwgJfe3afeU=; b=OIKd6KDC4aY2Xy5QEAYC4adL8/M4bhtYQBOk4GoiBGjrYfXCXv6W4v3p avpCYRu/zHcPBqDul36EON/lU0HZboczV8VbMVrcoGQkfdBc3ZftLcJTY lRiDV30gNEEJ47o0Q9oQhvPZ+EVoPAphBhMFIDe60V3PtXmxItxztMu0M DQimsZZBUv+2S6HHgFZTZNI/6tylhOwEXAWZRa8vXVYYDdxDCU/qv0JM3 25PFJhBigFeG7v0MnB74LuVjGrAta5+uK2q8atx6fqZ5HZdoWcZiE0E0s wxdqGwsUW4h0ZrpZAJdtd0kccywFUgRN6kBHJR/5FQvvH7yUAppSkjW27 A==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534724" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 18 Nov 2021 10:20:05 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 18 Nov 2021 10:20:05 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 18 Nov 2021 10:20:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227205; x=1668763205; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=POh5eXzb/NnaGXPE+zuDTJeI+unBh++bhwgJfe3afeU=; b=LHbIzizSJONzd4xa9nhI1KnTSGI5k/AnPu02kXKFRoun5RuTj3zb+VdD Zgcpt3LOcD9JczhLeOTIMEKUMVSZa0mez89ECuEoY5ZjBvYfLJc9/O6Oe G8WzliNAK+vFD8V57JahG6O9s6lTiq6BqV8BfxYMTFVblDfgG2L9/iOEh DbiKZY8gcrZIN5HKOk0Wd4gkEkaXANEPYpJh1YC5ic1h6xNDFVw+GBVzP JMDFs+lh+ATgo6uenKBymrFBviClqkCBnKJnT8TgP9lnPyIMbdfNrlM85 B/gbtYC5PFItfOM2QVqrZ0DrO6UqiX01LFy4oi/ehJqLHk+QyOxOMA8te w==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534714" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Nov 2021 10:20:03 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 6C0AE28007C; Thu, 18 Nov 2021 10:20:02 +0100 (CET) From: Alexander Stein To: David Airlie , Daniel Vetter , Rob Herring , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH v4 3/4] dt-bindings: drm/bridge: ti-sn65dsi83: Add vcc supply bindings Date: Thu, 18 Nov 2021 10:19:54 +0100 Message-Id: <20211118091955.3009900-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> References: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> 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: Alexander Stein , devicetree@vger.kernel.org, Sam Ravnborg , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add a VCC regulator which needs to be enabled before the EN pin is released. Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Signed-off-by: Alexander Stein Reviewed-by: Jagan Teki --- .../devicetree/bindings/display/bridge/ti,sn65dsi83.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml index c3f3e73f740a..48a97bb3e2e0 100644 --- a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml @@ -32,6 +32,9 @@ properties: maxItems: 1 description: GPIO specifier for bridge_en pin (active high). + vcc-supply: + description: A 1.8V power supply (see regulator/regulator.yaml). + ports: $ref: /schemas/graph.yaml#/properties/ports @@ -132,6 +135,7 @@ examples: reg = <0x2d>; enable-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + vcc-supply = <®_sn65dsi83_1v8>; ports { #address-cells = <1>; From patchwork Thu Nov 18 09:19:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12626359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66627C433EF for ; Thu, 18 Nov 2021 09:20:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E08B61B5F for ; Thu, 18 Nov 2021 09:20:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E08B61B5F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB3B36EC6D; Thu, 18 Nov 2021 09:20:16 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C7F86EC6D for ; Thu, 18 Nov 2021 09:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227213; x=1668763213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yNZUM5l+dYJ1D2T3WexBrl09S2UyQ6CTHXDDKPUWb1Y=; b=C0gkAY4WXP8dK9c7jqKXL5mBprpa9iMVUNmzLQ1UFaKLRsGxMn5gWPf/ QDqkGUQHzWQSi4gAmsMdKFQOCgwz2N/KhefDlHQNTSYZWFa7XrsHRoBbC qjXZ8QfFS0d0mn1aJmu2m32mYfpJT+heIStAxEBi6HEg8+a1fhaSNjL31 Mfc0ld4lPESwKe4gp4dQhOuycShcKvF/Jm4Rv0SwSU65/rvpkZG+6g3rV 9TjzrIqikdDjsdhJJmEpcy27XvhTV7hWprWw+4pcr1C28+qmVsGcD+Njn morSa5avsGZ3IVOhUstGd986+J4KSHAlmUQdpNRGq3phyX0mhPf825Z4V w==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534721" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 18 Nov 2021 10:20:04 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 18 Nov 2021 10:20:04 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 18 Nov 2021 10:20:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1637227204; x=1668763204; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yNZUM5l+dYJ1D2T3WexBrl09S2UyQ6CTHXDDKPUWb1Y=; b=AqrEgKg7hCvJHtT/QAXdjmd551L79lkgSHtLU+xyv4Gp6IcfEJ7ElkhP qaYFOgWkLDomNBjzzGL/0aWYA0wJlGMla1sRDAJP/oA/NGPOWLZXtMd3X yZtuGUbIev1mAQOQlnZcOAcsz32tjMjq/IlG2fguZOUzLhZXPBChR4358 9/d5ZQ9/m8uLpCDZWy1GUnNeUWIJIXwRwZaFM5XqqqUd6kSswo3Mho3nH 2JJOkjEUjsW/Zt4u8nhOuctnj7vavdLkahhwaZo1/czJ8coU+SfZroW3P H6qSG3BM4fKFGccEDixcBIhwndK2KI9/MqA/hssrSIrwPtO7Q8920KipD A==; X-IronPort-AV: E=Sophos;i="5.87,244,1631570400"; d="scan'208";a="20534715" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Nov 2021 10:20:03 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id A9D7328007F; Thu, 18 Nov 2021 10:20:02 +0100 (CET) From: Alexander Stein To: David Airlie , Daniel Vetter , Rob Herring , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH v4 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support Date: Thu, 18 Nov 2021 10:19:55 +0100 Message-Id: <20211118091955.3009900-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> References: <20211118091955.3009900-1-alexander.stein@ew.tq-group.com> 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: Alexander Stein , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" VCC needs to be enabled before releasing the enable GPIO. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 065610edc37a..54d18e82ed74 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -143,6 +144,7 @@ struct sn65dsi83 { struct mipi_dsi_device *dsi; struct drm_bridge *panel_bridge; struct gpio_desc *enable_gpio; + struct regulator *vcc; int dsi_lanes; bool lvds_dual_link; bool lvds_dual_link_even_odd_swap; @@ -337,6 +339,12 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge, u16 val; int ret; + ret = regulator_enable(ctx->vcc); + if (ret) { + dev_err(ctx->dev, "Failed to enable vcc\n"); + return; + } + /* Deassert reset */ gpiod_set_value(ctx->enable_gpio, 1); usleep_range(1000, 1100); @@ -486,11 +494,16 @@ static void sn65dsi83_atomic_disable(struct drm_bridge *bridge, struct drm_bridge_state *old_bridge_state) { struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); + int ret; /* Put the chip in reset, pull EN line low, and assure 10ms reset low timing. */ gpiod_set_value(ctx->enable_gpio, 0); usleep_range(10000, 11000); + ret = regulator_disable(ctx->vcc); + if (ret) + dev_err(ctx->dev, "Failed to disable vcc: %i\n", ret); + regcache_mark_dirty(ctx->regmap); } @@ -599,6 +612,12 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->panel_bridge = panel_bridge; + ctx->vcc = devm_regulator_get(dev, "vcc"); + if (IS_ERR(ctx->vcc)) + return dev_err_probe(dev, PTR_ERR(ctx->vcc), + "Failed to get supply 'vcc': %pe\n", + ERR_PTR(ret)); + return 0; }