From patchwork Mon Dec 13 13:36:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12673895 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8A9D3C433F5 for ; Mon, 13 Dec 2021 13:36:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2EEF10E717; Mon, 13 Dec 2021 13:36:39 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6EF2A10E717 for ; Mon, 13 Dec 2021 13:36:37 +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=1639402597; x=1670938597; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufYaztoM7btUy9LuPRGwqpeGKIKUMrwofkGEOKopoSs=; b=ZnnM+mubbqCBvQxlRpttwO104EfIb/mSGUjU7ysLJZZd6ok6KDL9jFOp 9C6NFDdFKU0ZXDFKY1oT5mVNeAdM/wco79SWoCdPSoeDDUijUFF3b+BGA gTRZvslNQPZSdqxbRiOfmIi88F2m7uoOXdl07yl1OeSJN5qrEiqFQ+72c yv3rOhB3uwKB83XU8i7apR9Nkh2mBTX6RHM/PG90bder2mwdpyVu38AjG qmdgK1gwlvo+xdqMvMj4kNUwOSdScgPE46eqNw5vp7Uteg1hC5J0vFvns 60fzLAjP1nLBSUTRXvs8fiMXcnCwQeo/Jb1F4NoN9m9FRWqAlfbgwhnWc Q==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012622" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 13 Dec 2021 14:36:34 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 13 Dec 2021 14:36:34 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 13 Dec 2021 14:36:34 +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=1639402594; x=1670938594; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufYaztoM7btUy9LuPRGwqpeGKIKUMrwofkGEOKopoSs=; b=KKj+3NMxyj6W07qYUFOR8sqRTVsvFBiGLmoZtc8gxWUUyxOpo6ggjE1X dDGAo7aFwzbn9OuuduhVYRYQbxe/KtnNjnmMJKTxzcXf9GEkM+QHL2zqi UoWf+HA/U8Fqms0QFKcJGR6VaQmmSAQybktKbMGoCjDppWWfPPigSP5RJ ugl0ff+IoV/RQRMr8ND8WBk8TJ0JGaskMTBnfG0f075s6lq3Sr40tj4PA p28kLvsYG+6YzruKHBZLmJJyz2Nm1Ee7tvAcjyyGuWJGA4+msOb31zbtH vyMGYZ8Ps2jRlnAIanszLb3UjC/0ODf9Ahof5fvezIfgaAkKRPlLXxOFp A==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012621" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 13 Dec 2021 14:36:34 +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 31B95280075; Mon, 13 Dec 2021 14:36:34 +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 v5 1/4] dt-bindings: display: bridge: sn65dsi83: Make enable GPIO optional Date: Mon, 13 Dec 2021 14:36:23 +0100 Message-Id: <20211213133626.2498056-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213133626.2498056-1-alexander.stein@ew.tq-group.com> References: <20211213133626.2498056-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 Mon Dec 13 13:36:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12673897 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CF0E0C433F5 for ; Mon, 13 Dec 2021 13:36:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01A7910E7C7; Mon, 13 Dec 2021 13:36:41 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E9B010E717 for ; Mon, 13 Dec 2021 13:36:38 +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=1639402598; x=1670938598; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NmZSdW+5LVfKmAVPKZKf41GorbnUuDSvFzzyCMsfbWk=; b=DxHDCXcPehiTyiMlj4peewGKOKsW3Z0fHEMApgCUrXqejZUVe85dmGpe goffVOJQzH5c2N8BkX78+ononzfFc6dD1qBTkuL8blACWIk4LN01/7nzG mQj5hogyRoyo4uaJpYeZPnXdlKEEee81nLCbQ243AaRkAmzBbUgjudfwf /jT/Vw7xGrxXWjTu8iwQEHGnzeXihgBDuMLLy5rIa5jkLqx0ISb1A4KPS C2b9tqyZglIf28OfFMY3dhE3h7uWzJ0PqHW9jv54HNa7Ypo8XNGFPBIP+ u1Cg6RPQr7TCqKyGtDZRDlSwrg/yEjxKmqpqsXzEa26P/hB00pi27jwUw A==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012624" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 13 Dec 2021 14:36:34 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 13 Dec 2021 14:36:34 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 13 Dec 2021 14:36:34 +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=1639402594; x=1670938594; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NmZSdW+5LVfKmAVPKZKf41GorbnUuDSvFzzyCMsfbWk=; b=Zop98oTzMsSSGvBHCFRovQoJG3cg0lGmyHvzmmihnsW8R6ahxsOSDyfJ tQQ+9Z0gXPFgVkz2TsJXcXA11HXThBZx7B6IAVq+Cb5oAPchokfqjVNpD WYEkcVoE9xxrtPCV4+mbA6E+AOVhExFo2Ed0aVKdbyMbHhwVh+T3z6SH8 j6qM+cJRp5gMnu1EQDQOeVbJYRZDpR+eq7/3zmXZIqRrjR9JBsobx/RDx Wu0D6PEjYhcQnNIejDcoaNaVIw3EltlOfgxgtbulu93JfFl2n9lSkH99D Ocif6SJFHxV9xlJoU0JqpuQJqz/2sdQzdyWMRmPzszu7QuARiHQF7tUl6 A==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012623" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 13 Dec 2021 14:36:34 +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 78F6E280065; Mon, 13 Dec 2021 14:36:34 +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 v5 2/4] drm/bridge: ti-sn65dsi83: Make enable GPIO optional Date: Mon, 13 Dec 2021 14:36:24 +0100 Message-Id: <20211213133626.2498056-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213133626.2498056-1-alexander.stein@ew.tq-group.com> References: <20211213133626.2498056-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 Mon Dec 13 13:36:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12673899 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BD2BBC433F5 for ; Mon, 13 Dec 2021 13:36:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D05610E78D; Mon, 13 Dec 2021 13:36:44 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id D0C2710E78D for ; Mon, 13 Dec 2021 13:36:38 +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=1639402599; x=1670938599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9uQ/nA2SxUtGSmaROU3d1oxGvu+83eq3tQzha9jKgE8=; b=We85k4fVnRWXCDGHHYAttNk0wJTF37giRtsz5GvP9ildiV2Ut/gxKEmB 8nO3FH8rU9Nlmv+l0WNE3ijdRTgvjLfForRhhYP4Ym0hK6JagkcO7FByv lzPsahz71FwGxW7gk7q80L2fD51RBfq5+yJ5Sx0a5n1S8cEFpPxoez1Hw y4cDDL8oZTfddjfd3GNFPH4pgq6zrxzlg9TugCIQn09nJWFvjEGqts3AJ z+VTAm9l3sVuhHeJeip2NvmdFYlNvhSdpi0GBIP3qwvgwk3xHKanTYco3 3OWXm0tLC+IsOAGM0IcLtUeQv9GqQgFtW3dB7l9T7S6Dqru/Y+JZv7J8g g==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012626" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 13 Dec 2021 14:36:35 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 13 Dec 2021 14:36:35 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 13 Dec 2021 14:36:35 +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=1639402595; x=1670938595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9uQ/nA2SxUtGSmaROU3d1oxGvu+83eq3tQzha9jKgE8=; b=MG0gvtoPgv49ZprXvvDLocnT8t7f7SJ3rAUj/Yprp69skCI6FMavXUHv 41AqhmQGoFAXJL/vtmRE5zp2KDDdmOjXj5jFN/4DF4RnY75VrxLJ2Gyay Nd/QdaS1RZmZNabMLqXTuHMxj2/o+yqxKB8/1jcTd9VuarH3KzGzTZztd NV2ScNb2KmdRyqO6JPiCM+s4MxTA6hxUKyDPXlPlRTOc/5Uoa/cSlhwng FZuBzxWbFgEDtqEInKyvHXp5K8fcTRtVsR/lni4vF7ZVd+0yy0qF6I3/Z Cxvs0wmIQ8LSBkzb5Sa0OofuAC14PS6Zc3p3QKlBonDsLfsYjrzgkOZFs Q==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012625" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 13 Dec 2021 14:36:34 +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 B1DB9280078; Mon, 13 Dec 2021 14:36:34 +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 v5 3/4] dt-bindings: drm/bridge: ti-sn65dsi83: Add vcc supply bindings Date: Mon, 13 Dec 2021 14:36:25 +0100 Message-Id: <20211213133626.2498056-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213133626.2498056-1-alexander.stein@ew.tq-group.com> References: <20211213133626.2498056-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: devicetree@vger.kernel.org, Alexander Stein , dri-devel@lists.freedesktop.org, Jagan Teki , Sam Ravnborg 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 Reviewed-by: Jagan Teki Signed-off-by: Alexander Stein --- .../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 Mon Dec 13 13:36:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12673901 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C6307C433F5 for ; Mon, 13 Dec 2021 13:36:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D65CF10E83F; Mon, 13 Dec 2021 13:36:44 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34CE310E7C7 for ; Mon, 13 Dec 2021 13:36:39 +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=1639402599; x=1670938599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f0TcSdjQnv9GI4VZ9011XTyB+4bRaVnjqp87fSW/zWM=; b=cGQNy9dkxhUuKEOwMaVweihhWdC+HABEQUu9Mu01pzohhpeJONjsUQf0 pOvuErltYjkeMqXI5TNQ7fpoLRNNOjSYJeHD2efpdgN58Qp4DSIKlyWhk Je3wXg/HTl+lzIUowGU8dTcIZhnsCaB0RjH85Hi5ichKNt1PZmeN4w8Ov 00FoAs3Tn5VkoxBfs4dDdqc1zREvST1TclTgfq42U6v9w0uoHVE+wK17A 9JvDBZoxu+rGBp12pPAsSHacPrWn/ICRvTnTl8hBB0E8XQYckfrbJuJAc e6payg6wwbDD04eVPHSPxK8A6ZSZD/daNc7Yo6hLpPuR1Q+OWbCZcwYpv A==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012628" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 13 Dec 2021 14:36:35 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 13 Dec 2021 14:36:35 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 13 Dec 2021 14:36:35 +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=1639402595; x=1670938595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f0TcSdjQnv9GI4VZ9011XTyB+4bRaVnjqp87fSW/zWM=; b=Dr2nCVGHANHuCzg4rh82qa6e9mJy9cG4zCKYc2jc+Gl3AwcoxnWERun6 tLF+Ot7f9p2/pT2HAP8RrIrSJwor7mWBsKKDIkBpJy7YrofJpeTdr756V +IgxycZt29aTyf2NWe4jo/r5nsPPyk2Jwnap2W9L4+5X4hTHbw0q42ac/ UdfoWf4yrM5zC+M0Czix8o5GH9/gMoMBlzxehRzw+6JHHqvPJ4oFGOSG7 /G2ccplRJznAOlK8IcjIXAw5FXyMIif4xxJHkdTi9Y5bTscunAGcv1TdW NyFJHEhBclNJ6JumDk+12eSXOdqpuuVfNpqG3+HvEdEGTAi6Mfko3j7fT w==; X-IronPort-AV: E=Sophos;i="5.88,202,1635199200"; d="scan'208";a="21012627" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 13 Dec 2021 14:36:35 +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 EEFF8280065; Mon, 13 Dec 2021 14:36:34 +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 v5 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support Date: Mon, 13 Dec 2021 14:36:26 +0100 Message-Id: <20211213133626.2498056-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211213133626.2498056-1-alexander.stein@ew.tq-group.com> References: <20211213133626.2498056-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" VCC needs to be enabled before releasing the enable GPIO. Reviewed-by: Laurent Pinchart Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 065610edc37a..5650a793db81 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: %d\n", ret); + 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: %d\n", ret); + regcache_mark_dirty(ctx->regmap); } @@ -599,6 +612,11 @@ 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'\n"); + return 0; }