From patchwork Wed Jun 15 09:52:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1643557 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=VIYyBdy0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LNLFm320Tz9tl9 for ; Wed, 15 Jun 2022 19:52:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F50484447; Wed, 15 Jun 2022 11:52:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="VIYyBdy0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 142C3843E9; Wed, 15 Jun 2022 11:52:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C1E27842AF for ; Wed, 15 Jun 2022 11:52:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wr1-x433.google.com with SMTP id x17so14607350wrg.6 for ; Wed, 15 Jun 2022 02:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3PS3dRWcGqjJwa3Myt2f32tT88uHKn7c0YMU7D7lsio=; b=VIYyBdy0hlP3Ep+Y2HucHyaYCdzIZaiXxaZa6c7MCTBTbBKqxU6x4LvE7fhIq0vhPB DEXgD3U4NIX6C9+9wePFFjFE19q2PYJh04aDJySU9mJa99rF3Yw/GP7ibfDbEEd5V7oC u4aVNOhLRTuWhHF39dx9QgZoStk5UnFcAKPEri6ntc/DvC2lxuEFAYx3p+gUUvVCr1LH Gbw7iYg5zdMqeZ3k839+UH+kZmaNgZkkpbQLRY2lpWIQ+H3G3QnPLAYTORA1r6/vCrKz oamnJ/cojuUOK7H7VEvo8kRO8BVe+J9rwODXqU+71mwxIIK9ApU7td7tJVKe6/8MAgI0 BjEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3PS3dRWcGqjJwa3Myt2f32tT88uHKn7c0YMU7D7lsio=; b=wr3yJmF0BJNxDWJiTWS8cuDifRsvuGT1alZ2W7+GJngoDDL9RLIL2E4EFdDIiRuR8x HnqhZYZ71t/PvZg7LMgVQiXsiiKOH6BAUHQFzaUNp4QOa7UglGF+RMYuFGPkMcJwbwIZ sL379xGCFAEiC7pYvpaAd49ndoqAcZ8ZiCFf/DiRxzwek/AlpfiJOph8qvaZG4CswQvV 8p04ZTAUGs+WPywsyTWjT/TIN5JtMXLtfCyiU+CZ2t8NT/QCViUx+zH3RZ+Iy1hLU9a8 +oApS0FNEoGcippRtI+gdf65sXAcviuURJ+LPhNc+7TCE679tRWOk3J8DrcwOlhwpR/j uewg== X-Gm-Message-State: AJIora+scxEA+eF2iVH/Rp4pzTlZwcFLunnyhOj026XpuQ7Wac9KPHMq c5pL3NSyXv3w6WWItqd4CKLSeTIIpKbjlw== X-Google-Smtp-Source: AGRyM1tG0RJ4ND9rgzCTNDXGHYHpUIAwBHBHvrx02zlETa5I7shJMf784LX0yY2czDX+UkE6qQNY0A== X-Received: by 2002:a05:6000:1542:b0:218:549a:2a8e with SMTP id 2-20020a056000154200b00218549a2a8emr9149303wry.314.1655286753024; Wed, 15 Jun 2022 02:52:33 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id o33-20020a05600c512100b0039aef592ca0sm2020476wms.35.2022.06.15.02.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 02:52:32 -0700 (PDT) From: Michal Simek X-Google-Original-From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma Subject: [PATCH] pinctrl: zynqmp: Add support for output-enable and bias-high-impedance Date: Wed, 15 Jun 2022 11:52:28 +0200 Message-Id: <1a02cd41d183d397ebce23c497178281c7286692.1655286745.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma Add support to handle 'output-enable' and 'bias-high-impedance' configurations. DT property output-enable brings out the pins from tri-state, whereas bias-high-impedance changes the pins state to tri-state. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- drivers/pinctrl/pinctrl-zynqmp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c index 7c5a02db1b98..52d428f566fc 100644 --- a/drivers/pinctrl/pinctrl-zynqmp.c +++ b/drivers/pinctrl/pinctrl-zynqmp.c @@ -467,6 +467,10 @@ static int zynqmp_pinconf_set(struct udevice *dev, unsigned int pin, pin); break; case PIN_CONFIG_BIAS_HIGH_IMPEDANCE: + param = PM_PINCTRL_CONFIG_TRI_STATE; + arg = PM_PINCTRL_TRI_STATE_ENABLE; + ret = zynqmp_pm_pinctrl_set_config(pin, param, arg); + break; case PIN_CONFIG_LOW_POWER_MODE: /* * This cases are mentioned in dts but configurable @@ -475,6 +479,11 @@ static int zynqmp_pinconf_set(struct udevice *dev, unsigned int pin, */ ret = 0; break; + case PIN_CONFIG_OUTPUT_ENABLE: + param = PM_PINCTRL_CONFIG_TRI_STATE; + arg = PM_PINCTRL_TRI_STATE_DISABLE; + ret = zynqmp_pm_pinctrl_set_config(pin, param, arg); + break; default: dev_warn(dev, "unsupported configuration parameter '%u'\n", param);