Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2945927rwo; Mon, 24 Jul 2023 04:05:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEWP8MfLjs7B017yagoejALoFmc/Q0N01mqyz9OA+GUfWOZWbQfiPKmz/wBZRebJ796qh0S X-Received: by 2002:a17:906:2096:b0:992:42d4:a7dc with SMTP id 22-20020a170906209600b0099242d4a7dcmr9260123ejq.21.1690196715077; Mon, 24 Jul 2023 04:05:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690196715; cv=pass; d=google.com; s=arc-20160816; b=t9F3v21EupelIqy/BGQtMASmQNHkxnDCTctV79ISQMe2tzuXt4hRNxE5iSPO1QAMPD GxnWgKK1Lc8zBKMnaagU5rjWpGSZh03g/4KhlRvV4B2R44zqgIi8WESENprCVccRblc5 QEwTpdwiDBTLiQ3a2FwIzPWPIiPtEwkOVce2zcbhfGiH+bFZkJlnBibLMyG+nlpMWds3 0O+hGYO781ZtTxrjD4dYSp0FFXC+pLEY3ykV5CTBjpFKJks8DvGSMbdPE5vHlK3xcTUE jEPT2rKydmzuzOk2Q06hE4j9JcboUDR2FNOR58fuvow8wjJ6AnoIgihmgmKnqrF1DKUd HJ4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=kqT8oSwEa9++vxb79JInQpqu0VgkfTNbpytgkSgDVT8=; fh=1Gsm+o/8bmPTl4AmLO3KWGJm9po0NHQCgYGslE4VkQg=; b=M0Haktrg3vfgVKql3DuVK4C3skBq9jXS62G5ixs7Qr4khoYc4DaZt6ueLOY/b6K2DC XKApx2ntvrWoEWp5DYGa8zsaTx7x/8ZHP58HGMa2WT9OKT039eN+U+9wWhj7J13VEPE+ YmwlH1nd3NBEAYNLoiCYSuGLTzK8Y5FO4WvY54EMSrGf/N8ZCOi/N2aEY1ArszXSzA+G RpGMWTDpMK92MhqiuHed/5/kaqak7/jZ4rYg0036zisZDXN9cJaMIj955vEq+MzZnaRC odClbWIM7NSAysqlUndHiCwr9P7IDB9WmFOT3d9VqyPplO/w9Kieodkrl/crOqM+/JX5 4+bQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ouCKOmRc; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a1709063c1500b00982817b0858si5962192ejg.364.2023.07.24.04.04.49; Mon, 24 Jul 2023 04:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ouCKOmRc; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231479AbjGXKXu (ORCPT + 99 others); Mon, 24 Jul 2023 06:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233516AbjGXKXK (ORCPT ); Mon, 24 Jul 2023 06:23:10 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2050.outbound.protection.outlook.com [40.107.96.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCD749CB; Mon, 24 Jul 2023 03:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O5VE2Q4wfmvJA3mMyW7b/1Ekr1rlJz+qNuHwptHFMUCmKPkIs2c2+ZJ2N+vaHVLGF0HnQBr9kvk5vg82Rx4AZ9cg/GqW63NFXwcm2dIINft5Ob03aBgSQD4tUTDOKFjSL0jPHWNHXiusWcnym7n9rWqBiSfjv65Hcul5rGIYYVTlBW1nUE7AksOf9PkAT5U4W7/dqt7noG/y0Cvk+r9CtPDF8t99eU9SOFYjdwzy5xL+BnrFRUdnFqGt8+mXxOFJlBdmCuDOZA2EGHzzOSwhT8Pe/dn1EFmitSNfTdviUnrfDcjP2i1+fpkMv33dM/PdNUkSxh7Sm3qIvJ8g6G+UZQ== 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=kqT8oSwEa9++vxb79JInQpqu0VgkfTNbpytgkSgDVT8=; b=V12THPLIylfRy9bDgV8zzWYKc5yv3vpTaAvw4CGthxOAkP2INRejKSHQbMxnV1cUYmHeiQXGhvQnTEKyG7ASaTKGbpKJCbqcxR+fe7ySSsFF6x03AGy/m7k0J2yLoOncqzRL9LDmkWkd/xos3v0fVtj9jzOrd+U+bo/hoYQJ9xW2cuorIQFXjshRVfVytDX5zDEO7AP5EAb+139gljxoku3GhSVrRLmXSOMu1tlGX3TK7G1FfVcaO/ThMfh0kLXFx9BmqsNmxMDSjd1bzOK9JZnGc9QwvNygF4qIa4oPGC06iDKw4JjQH9rWqcxL6Bc8X7/5Izqr/kLi84TsTQyBOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kqT8oSwEa9++vxb79JInQpqu0VgkfTNbpytgkSgDVT8=; b=ouCKOmRcG6BmLMuBG7aAlIS9syZ64phrMsZZ9PXpspcyiCdL3q3scktxdnxL0k9ws7e8CbjzADOEs2SJkzEERic+syQJUlzKHouMWIxIGHQREfRT81VZ7s610QFreY5iqoRMLwgsuYpGmTerIOoRfuEYJD2wudfqWsMGONqagMQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB4758.namprd12.prod.outlook.com (2603:10b6:a03:a5::28) by BY5PR12MB4258.namprd12.prod.outlook.com (2603:10b6:a03:20d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 10:16:48 +0000 Received: from BYAPR12MB4758.namprd12.prod.outlook.com ([fe80::be39:45a4:cd9b:4684]) by BYAPR12MB4758.namprd12.prod.outlook.com ([fe80::be39:45a4:cd9b:4684%3]) with mapi id 15.20.6609.031; Mon, 24 Jul 2023 10:16:48 +0000 Message-ID: <77b45165-e6bb-6ed1-f96c-90565740db2f@amd.com> Date: Mon, 24 Jul 2023 12:16:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 2/4] firmware: xilinx: Add version check for TRISTATE configuration Content-Language: en-US To: Sai Krishna Potthuri , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , Tanmay Shah , Ben Levinsky , Marek Vasut , Roman Gushchin , Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, saikrishna12468@gmail.com, git@amd.com References: <20230724084554.1924378-1-sai.krishna.potthuri@amd.com> <20230724084554.1924378-3-sai.krishna.potthuri@amd.com> From: Michal Simek In-Reply-To: <20230724084554.1924378-3-sai.krishna.potthuri@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0067.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::7) To BYAPR12MB4758.namprd12.prod.outlook.com (2603:10b6:a03:a5::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB4758:EE_|BY5PR12MB4258:EE_ X-MS-Office365-Filtering-Correlation-Id: 46a79421-86ad-4479-d412-08db8c2f16fa X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e0LcrGWesnUGec3wTKEWc6GKSx1z0BUj+4NrH8CKLMzeKmELuLpbUL+POPAjCWQj4x+OEFdoCc1XRdjgaQP4JqS2m1zHwG8Jx5E8Ye9DCJ4bpYxg8jXimP+oBLHQFFXnm0xzBnk7A4XpxFmTaXjGb3KRSgbxFYofnIIZYNnH39Ab5adAlfyFxo3VNMeDST3xiUTXmFzX7qJsP4iRrSumk4E9fuFqU3yVmQNouCv6QIbQBFwn61EIeD4txrOAyVvNrt0npkDJ3UVypA9wAtY74y95N6zQj+lz4gDUA3fdA709xdmu2YK9nb4Zg+oA7AkLMlQpQJuS7tjYcJkYPv27wPoXCqeI+gumdTuuybkKcPKC7i/SO+Oox1yXYTXQ6yeWB/PvzOpmtcR4n9G4c686ggCl75BWEVPoh6tnsrSDyD5wA+CgKyHQS/j+QFxL79zQdgQP28y2CVMsqHc+TV17lbH9jlT1Y9SGM5IxdfY5eFT6Ha1UT9+Zso0UtFxv8704qgZW5coGN3/1Zw9dMA2QCBHoM7qE7NuiydwcuF8JLProq6+OpQCBhBQ1+izC1pHXpKce2b6+k7ia8roghMZLNo5yncel4cV4mDMwwRU3OEuSuIWlZhF+34J/suZGwxLwmJtq2VbdG8RJu6khiw3E5hXodddJxO5PUQj9zAwo9Kk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB4758.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(366004)(136003)(451199021)(86362001)(31686004)(31696002)(921005)(38100700002)(66556008)(478600001)(66476007)(41300700001)(4326008)(66946007)(110136005)(5660300002)(8936002)(44832011)(7416002)(8676002)(6486002)(6512007)(6666004)(2906002)(186003)(26005)(6506007)(316002)(83380400001)(53546011)(36756003)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aVVLZ25MN3N0bUd0RjF3NXQrcitJb2o0cHgycVB2SVFSZ3gyN3BqSTVweGlG?= =?utf-8?B?bk1seUZ4dFRMRU5KY0tZZG1OWlBDcjBaY1BBSXRqbE5DSG9UR3FWU2sxdWtI?= =?utf-8?B?RWVWVjRZMW1ESFpnaGl6ei9ELzJxYXNNWHhvT01Gb2lhdHY4RFIvUVMzdGdr?= =?utf-8?B?UHNwa0dxeGkyQWh2QXhqaEI4WURQTlYxcGg5VDVicG4xbUZyWndFejhraVBH?= =?utf-8?B?NWlEK0c1SnNzQk1vd1BZc1Fmd0Z1YXZLeDNld2Vwd2lJcVBLRnpPQjNXN1NE?= =?utf-8?B?N3orZ2RHbVdzYkJ4cEJNWjNRN0hDUVVNNk9Z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ZsVjJJ?= =?utf-8?Q?MCeziQRLFcT7cUYfM4IWmI85q?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46a79421-86ad-4479-d412-08db8c2f16fa X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB4758.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 10:16:48.2851 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IRV6tzUOjr4eDofnt0xCbw1R+GwspBZ2hrkjHTuaI+MtSqvucfcgOak2hNrB57Lg X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4258 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/24/23 10:45, Sai Krishna Potthuri wrote: > Support for configuring TRISTATE parameter is added in ZYNQMP PMUFW(Xilinx > ZynqMP Platform Management Firmware) Configuration Param Set version 2.0. > If the requested configuration is TRISTATE and platform is ZYNQMP then > check the version before requesting Xilinx firmware to set the > configuration. > > Signed-off-by: Sai Krishna Potthuri > --- > drivers/firmware/xilinx/zynqmp.c | 9 +++++++++ > include/linux/firmware/xlnx-zynqmp.h | 2 ++ > 2 files changed, 11 insertions(+) > > diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c > index f9498e7ea694..307717f24a98 100644 > --- a/drivers/firmware/xilinx/zynqmp.c > +++ b/drivers/firmware/xilinx/zynqmp.c > @@ -1150,6 +1150,15 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_pinctrl_get_config); > int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param, > u32 value) > { > + int ret; > + > + if (pm_family_code == ZYNQMP_FAMILY_CODE && > + param == PM_PINCTRL_CONFIG_TRI_STATE) { > + ret = zynqmp_pm_feature(PM_PINCTRL_CONFIG_PARAM_SET); > + if (ret < PM_PINCTRL_PARAM_SET_VERSION) > + return -EOPNOTSUPP; > + } > + > return zynqmp_pm_invoke_fn(PM_PINCTRL_CONFIG_PARAM_SET, pin, > param, value, 0, NULL); > } > diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h > index d7f94b42ad4c..6359eeea8dd7 100644 > --- a/include/linux/firmware/xlnx-zynqmp.h > +++ b/include/linux/firmware/xlnx-zynqmp.h > @@ -34,6 +34,8 @@ > /* PM API versions */ > #define PM_API_VERSION_2 2 > > +#define PM_PINCTRL_PARAM_SET_VERSION 2 > + > #define ZYNQMP_FAMILY_CODE 0x23 > #define VERSAL_FAMILY_CODE 0x26 > Reviewed-by: Michal Simek Thanks, Michal