From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18A20C47097 for ; Thu, 3 Jun 2021 10:39:38 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C22A613B8 for ; Thu, 3 Jun 2021 10:39:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C22A613B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4E65482FBB; Thu, 3 Jun 2021 12:39:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="Hp+NPeJT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0674D82FAC; Thu, 3 Jun 2021 12:39:33 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on20626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7ea9::626]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0500182FB8 for ; Thu, 3 Jun 2021 12:39:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PWryagPKysXbyV/8vEoC+FIxfXUfyb3FyCVfep0/0ZeunPWVMmGBxlU5S88CjxTtZJRKiMuOS0Qh+vE0o5rtnzV2LCe2mPCy+8pWlPMviTIGL4D9slusOm6UXYnHspEZ9WpSOp7EJwHQ0dfVkIOavtSqkHCEZV1tPCl2h4eCopvpDHQYZSwmJfd7lCcE/omzinZEMRavh4qFtCj3s/m0SDkJfioNLX5Vp/hRyjsYWHwVyEFO0SGHQfKtr60wDW+RAsgt1ANcVCJyJG57EPMsrXDRHQiALM6snz6knsiWfldOxNo7FQCWHl9NaRWsbFBq9R6xVxk301BeXFKcVQCR5Q== 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-SenderADCheck; bh=r3KZYCiHJHAZ0vOAfLfxpqGb/QgPdFnaMPEWAv5r2u4=; b=iaHy2v1HLcF5iMbkCZZ8e468zblU6hZFWNSyBXcKxqGcCxzizioBr2GzVJoLsXiWsNC77UNUopSsiEGQbstTGR3CwE2xE2+dN4SNTbwTIJ7mvVJ3rI5x8xeg9Y+Uk48YZnk++zHwcvru2HBZ1pwSJP3cM6BBFf7g4E4Tn9Qwy4itQZObQoqOAbi6G5MNQF9FUvbI1c9kIFL9ewl5MPLO7pXf5n8p8V3EjAPnUaE2VM63ucG0JmXknmclW69hAR4vjouFWTtDlu8zb7jVXG4FdHVQJq/9Oxhu9eMWWufx0g82sivtSArUcMRsJICmskzcV6OJ1VU9jkis4YghpUUOwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=lists.denx.de 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=r3KZYCiHJHAZ0vOAfLfxpqGb/QgPdFnaMPEWAv5r2u4=; b=Hp+NPeJTYYKlklm4w0mt/6ER9cyUnmgvgzTK5UGaywrPnJh5XIrvbQXZmBGY8DyG2dEUHGlGd5A9VG1nHesdhnJ53qd04GKsLI+MR1+UU/5pySA7hACZXUdoiPZzS0Rmodhl30207wROtlpGAzf3oHmjsh6n6R4jHAwW2vj+FWc= Received: from BN6PR13CA0063.namprd13.prod.outlook.com (2603:10b6:404:11::25) by SN6PR02MB4416.namprd02.prod.outlook.com (2603:10b6:805:a4::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.27; Thu, 3 Jun 2021 10:39:21 +0000 Received: from BN1NAM02FT011.eop-nam02.prod.protection.outlook.com (2603:10b6:404:11:cafe::12) by BN6PR13CA0063.outlook.office365.com (2603:10b6:404:11::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.9 via Frontend Transport; Thu, 3 Jun 2021 10:39:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; 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; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT011.mail.protection.outlook.com (10.13.2.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4195.18 via Frontend Transport; Thu, 3 Jun 2021 10:39:19 +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.2; Thu, 3 Jun 2021 03:39:18 -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.2 via Frontend Transport; Thu, 3 Jun 2021 03:39:18 -0700 Envelope-to: u-boot@lists.denx.de, bruno.thomsen@gmail.com, sjg@chromium.org, jorge@foundries.io Received: from [172.30.17.109] (port=50864) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lokkw-0002jh-7a; Thu, 03 Jun 2021 03:39:18 -0700 Subject: Re: [PATCHv4] drivers: tpm2: update reset gpio semantics To: Jorge Ramirez-Ortiz , CC: , , References: <20210603103818.23475-1-jorge@foundries.io> From: Michal Simek Message-ID: Date: Thu, 3 Jun 2021 12:39:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210603103818.23475-1-jorge@foundries.io> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7371822b-2c0e-433a-eb8c-08d9267bd80d X-MS-TrafficTypeDiagnostic: SN6PR02MB4416: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:277; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Llx7Z5n1jdwqRcpze+Znuimx5KPIkYdA3RYU43AcHDDzPzPsZDmYG9/xSb6xkm5kFqwaRJKy63aYFGjP27cqbqQkAvO1OB40R0KSRwFh87O79vu/lRYZGEolCEbEEJcNMt5IeR3NSRowvxOBJBLWnluAruuW0dNLERse8XUlPz6VTI6zfpl8SjXce5M61famETH8FRe1ZYj1dmqZLpGyBv7tKY0eMuwVgpe9dkEju23qdUjYXBII17Y7Gm5XqXClJnvvLfXip7DP2guguMBQPzt1uRqb41EjysaYpGBp/hFQ+XDU+EoHDVlFRko5pSiuxkNK9qeCWf4phjwB6+xYuKf6Atn/6Y0dMVV3MbK8kl4gexuB/rhLJIHkqF2y8aryKv+1esOVxCw0uuA8P5jwt350ge3IXWQR7FPpwWruqfHSUTxaHaZkZUxtsEoADKCv4cUqocBR8+4R68dUdDgsFQFLjn2gMIbUxhBnJXecraiz9jxgbgJmLX6/mdI/86IPFjrbHJhPqPZ0L6c5+/2NuUHWYuZChnb/wuKUSuqRGJEsYxeQprKytulRzhTZwP/0AivvqaAHJVL4tV2euoQrj0CyWSlQHvz6kmmYMcV5zykwncViLttMPp9wFr2Szix+wy70OoFA7aXQGBnLd91H7hsxab2l0hF2oIchaGr6HScSIlTvjuqB0beV2xOoxp50/ZyTZF4/DgstTrmOqXkDog== 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:(4636009)(396003)(39860400002)(136003)(376002)(346002)(46966006)(36840700001)(82310400003)(47076005)(44832011)(70206006)(53546011)(36860700001)(8936002)(186003)(26005)(426003)(4326008)(54906003)(336012)(83380400001)(2616005)(2906002)(110136005)(36756003)(7636003)(9786002)(478600001)(5660300002)(8676002)(31696002)(316002)(31686004)(82740400003)(36906005)(356005)(70586007)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2021 10:39:19.5730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7371822b-2c0e-433a-eb8c-08d9267bd80d 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: BN1NAM02FT011.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4416 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean On 6/3/21 12:38 PM, Jorge Ramirez-Ortiz wrote: > Use the more generic reset-gpios property name. > > Signed-off-by: Jorge Ramirez-Ortiz > --- > > v4: s/will be deprecated/is deprecated > > .../tpm2/tis-tpm2-spi.txt | 3 ++- > drivers/tpm/tpm2_tis_spi.c | 23 ++++++++++++------- > 2 files changed, 17 insertions(+), 9 deletions(-) > > diff --git a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > index 3a2ee4bd17..16f870225f 100644 > --- a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > +++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt > @@ -6,7 +6,8 @@ Required properties: > - reg : SPI Chip select > > Optional properties: > -- gpio-reset : Reset GPIO (if not connected to the SoC reset line) > +- reset-gpios : Reset GPIO (if not connected to the SoC reset line) > +- gpio-reset : Reset GPIO (deprecated, use reset-gpios instead) > - spi-max-frequency : See spi-bus.txt > > Example: > diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c > index 4b33ac8fd3..1d24d32d86 100644 > --- a/drivers/tpm/tpm2_tis_spi.c > +++ b/drivers/tpm/tpm2_tis_spi.c > @@ -589,18 +589,25 @@ static int tpm_tis_spi_probe(struct udevice *dev) > if (CONFIG_IS_ENABLED(DM_GPIO)) { > struct gpio_desc reset_gpio; > > - ret = gpio_request_by_name(dev, "gpio-reset", 0, > + ret = gpio_request_by_name(dev, "reset-gpios", 0, > &reset_gpio, GPIOD_IS_OUT); > if (ret) { > - log(LOGC_NONE, LOGL_NOTICE, "%s: missing reset GPIO\n", > - __func__); > - } else { > - dm_gpio_set_value(&reset_gpio, 1); > - mdelay(1); > - dm_gpio_set_value(&reset_gpio, 0); > + /* legacy reset */ > + ret = gpio_request_by_name(dev, "gpio-reset", 0, > + &reset_gpio, GPIOD_IS_OUT); > + if (ret) { > + log(LOGC_NONE, LOGL_NOTICE, > + "%s: missing reset GPIO\n", __func__); > + goto init; > + } > + log(LOGC_NONE, LOGL_NOTICE, > + "%s: gpio-reset is deprecated\n", __func__); > } > + dm_gpio_set_value(&reset_gpio, 1); > + mdelay(1); > + dm_gpio_set_value(&reset_gpio, 0); > } > - > +init: > /* Ensure a minimum amount of time elapsed since reset of the TPM */ > mdelay(drv_data->time_before_first_cmd_ms); > > Acked-by: Michal Simek Thanks, Michal