From patchwork Fri Jun 17 10:46:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Krishna Potthuri X-Patchwork-Id: 12885556 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 10ACAC433EF for ; Fri, 17 Jun 2022 10:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zUI0SewX6oMWKFerFZg0CPeFPdwJDNQJ9i7aFdajvdA=; b=U4+6nMOZmILKO7 lPD2qxPXhXC0VjX3xnG7A2xv5AAmnSw7jq8W2336a3mRmADgQn33EAQ4AF07iFuhXB0Q/4ZxMYT+O ttkY6vtgvWQ/DliD/1p2mZ6z2qI46e3DTqaVzrbEcSsffbByTZB5MDK48IfUVKpyUuw363HXAL6ss czjt99oAyAOX4PfLGtbGIpvt6a478sxlshSyONx4E6s4JL3t2cxpZlGFMFXD3qyvmGoojKItuLvHi SF+6pRabzL1zWuKp8nU64//nfIESQMbABZ1wazY05TUXrfMGRfnD42V4BOJWfQQRu+YXjSDzlPd3Y +tHhucr5IFYnCnEWRtJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o29fx-007899-OU; Fri, 17 Jun 2022 10:58:08 +0000 Received: from mail-dm6nam11on20628.outbound.protection.outlook.com ([2a01:111:f400:7eaa::628] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o29WF-0073A9-Sn for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 10:48:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iiac8m0crUL5yIa+oAPe4V3oRr3NRBWUhc4hHy+GxKdlWgVuaJIjl7MfWwAn6C7ku8ORqKDF7CXO5q/OpjQU0j9fJ7Y7h2o54QZqwIZ1fkIiFL7isJg5aXC2ioXmOOydabYhEkrnteYA9MH/RdAHSa+qiPEQc+0W/S5h63d8bhtIrFbD+8t6RRVOC+QTe64Y83SzvomhKQwOykXpTy9MgFDqDx5uOc/GRvCaP32fvcE/yr1SW1IlH6fJkv5eo6xJkZJXfARd5Kk+KU+BlI+gCCs43xK4ey4QR5pRD3M45jjCDxmV7G0c9oNqG4C/MA1iAHXky6vbAVPEbfzP5i7O5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K+Sr14pksdLyrxxdBOMtkBYHPvMFWVgs/WfZnfF/+pM=; b=deegUGb8M2QspFI1YWCIX+r1vh4eStnwt7VsGXeYgYI/vjhDnp4zKgjMKvnzbSkuT0Q11lxzVwepyiP++wHvVRVgsGmTbXys8X9dH0IqcJR/x7/Q1VbB/aDYKXzSKAHPwoxFNG+WFZ44oMLvpGagq12QEnKWMap2NiZyCHC8nQPYaxW404Zv0VearwgkTVunu7Bs7aXgPmRRt+eR4Rzwy/HTIw9GxdPo/Abx68bk9s/Ij25voUEfjoH3M4C8wADwntz0/j7tEgAVuuIoMN3aIMgSM1Uj+LCa1ET4OcGrUTm7UVWZi6c3t0oCcwhxvLaxraLZdDOvPqsfwHwbQZPq5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=gmail.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K+Sr14pksdLyrxxdBOMtkBYHPvMFWVgs/WfZnfF/+pM=; b=aBAG9owIyaMPgvCIMiNHsaZjfOyAWVpc1SIOYbwYRPGjuKbO6ah4hu6NM6666cxrGrcwyvfnNKVhfoYHyjsH1YETcTk9y3ktspvtdeO459bJGfxgkezTL2T3iU9QqjN30R1HzsrJuIQ3wWHeNB72IVeYVTtWv1H7eXaSof20zaQ= Received: from DM5PR04CA0031.namprd04.prod.outlook.com (2603:10b6:3:12b::17) by BYAPR02MB4981.namprd02.prod.outlook.com (2603:10b6:a03:71::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.15; Fri, 17 Jun 2022 10:47:56 +0000 Received: from DM3NAM02FT020.eop-nam02.prod.protection.outlook.com (2603:10b6:3:12b:cafe::28) by DM5PR04CA0031.outlook.office365.com (2603:10b6:3:12b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Fri, 17 Jun 2022 10:47:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; pr=C Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT020.mail.protection.outlook.com (10.13.4.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5353.14 via Frontend Transport; Fri, 17 Jun 2022 10:47:56 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 17 Jun 2022 03:47:54 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 17 Jun 2022 03:47:54 -0700 Received: from [172.23.64.1] (port=60019 helo=xhdvnc101.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o29W6-000B0E-6x; Fri, 17 Jun 2022 03:47:54 -0700 Received: by xhdvnc101.xilinx.com (Postfix, from userid 14964) id B974621637; Fri, 17 Jun 2022 16:17:08 +0530 (IST) From: Sai Krishna Potthuri To: Linus Walleij , Rob Herring , Michal Simek , "Krzysztof Kozlowski" CC: , , , , , , Sai Krishna Potthuri Subject: [PATCH 3/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high-impedance Date: Fri, 17 Jun 2022 16:16:58 +0530 Message-ID: <1655462819-28801-4-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1655462819-28801-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> References: <1655462819-28801-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1babcc64-0787-41ca-b0e3-08da504ed6d0 X-MS-TrafficTypeDiagnostic: BYAPR02MB4981:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0XvK+oYiOSW0ooR8hD9zhQntL4WLqoFSsdQhpmQRE5pg+pdLWy9C9Sv79tbDv/IBqNN58vitmnPJg+lssnKJ96i2YWpQhxU+huyvPWDKj4d7dn7a64JWCxshvuiEuCJy+SdvHR5e4LLa38YmUKB/KsuMGxmKHUBoj1qV//WEoweErVf+w2CgtCGoU9p0BAZkX6hzihrlzrE/CD74ukcA7ZmwkUOi1YkUg2UDBD1XK6fh18rZlM3IMWwLJoH0fe9Qr9iB48ugOUKTaYLC/WGd0AMGz0Ycwqt32qd78YTN8kyqcv1LE9jkvtR2WCXNfv4EDHNb9lXYv4i+i5nce7OmjNWMsz5HiSBPBJPf7VegdU2+7d/iQtyh27thr9nguJ5phuLQcDjRl86sImqJxQFtMnmsIlmuNzeGXZcvUTSgp5D2Lz+6GsxuJ+6ZDiKtg/U4WRPFIJqTgLWrMOUzN+K/biGevVxrzc37yuaX4yYjNtR3YtNzXtVdNougwKh8clPrUOLOiKwaAzCjlZRMhlk8vOgBgdO5Rh0LW9YXBLUWH9FtymG00MIr7sY2oUoEIkBz7k06qVhR0knBOirCCqZbL0ie3gP2JaZ2ZwRyTLXqy+1wzp7PL+EzDr8cGjOt2MacR5LoaWZyq+JD+v8IE0xaqz8ZS6KYlijfxqDhz8ViDxachoD31zuTqTnJYh54TrsXOjZ928FC8CFcdH71sNMXlg== X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230016)(4636009)(46966006)(40470700004)(36840700001)(426003)(40460700003)(6666004)(42186006)(36756003)(316002)(82310400005)(5660300002)(107886003)(8936002)(356005)(8676002)(110136005)(336012)(2906002)(47076005)(508600001)(54906003)(26005)(36860700001)(2616005)(7636003)(70586007)(4326008)(186003)(6266002)(70206006)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 10:47:56.7081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1babcc64-0787-41ca-b0e3-08da504ed6d0 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT020.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4981 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_034804_039283_5424ED27 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support to handle 'output-enable' and 'bias-high-impedance' configurations. As part of the output-enable configuration, ZynqMP pinctrl driver takes care of removing the pins from tri-state. Signed-off-by: Sai Krishna Potthuri --- 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 e14012209992..b25e9e76fbf8 100644 --- a/drivers/pinctrl/pinctrl-zynqmp.c +++ b/drivers/pinctrl/pinctrl-zynqmp.c @@ -410,6 +410,10 @@ static int zynqmp_pinconf_cfg_set(struct pinctrl_dev *pctldev, 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_MODE_LOW_POWER: /* * These cases are mentioned in dts but configurable @@ -418,6 +422,11 @@ static int zynqmp_pinconf_cfg_set(struct pinctrl_dev *pctldev, */ 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(pctldev->dev, "unsupported configuration parameter '%u'\n",