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 DC2ABC47082 for ; Thu, 3 Jun 2021 09:33:52 +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 D1B35613D8 for ; Thu, 3 Jun 2021 09:33:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1B35613D8 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 D8D9782AF6; Thu, 3 Jun 2021 11:33:49 +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="GSotNQFR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6747382AD2; Thu, 3 Jun 2021 11:33:47 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::61d]) (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 CF5AB82AD2 for ; Thu, 3 Jun 2021 11:33:43 +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=mqqInt2BGj63YnCH5WivwtSYBBLQ6JeNABuK9NaPAD8VoAgY+VlYAbb1Jif606U5So8JDR3lfto/CFulz0wuJGl5SdDxELP3x++HkTz1Cnb1WR+GVGCY/L7dNVhzjGJm+ZNw9LVDNYe//47QJivnoL9a6fPDQjOGDEzDEfj0Q7tFmaQdZv6b4rl5ehhpim7PsVqaQht0Tg20BGF8xHH3xpEp74MIaHRD2+MaP6dQUGZ1NgpY6jAcgZxqpkba+qP9Iclm2p/G9Rm2wDHC+EKAo/hAlJF0Vtbc2ptciAdI+mXj2aCbo2meC0U9I0a3FbJLgNfot7NBn0NjTUajn9CeEQ== 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=RV7DKdgA5r3OWy9VxfV++Sz0A5u2dKP0ssmDTowAquM=; b=I67t8vVwfjy5dyPAQTh8U+7RB2FEUlLuKSJMe9wa9ClnmBhKOWdPfmz5Km+6h7yNig+iYKH4DmWxGy4OknBXxOMjnHoeRR62BnMz8MpBxm7BhSQtTraIAJYMcbWMeeB93L+3CE3Jp7SzlJHFUno14+JTtLylORMAn4XiFpWhgp1I5L8m59ft6yxN9bipQNU+d7oDBRAE4yQeDj6oTOiznBdOgiRB/HIM2YYd4mIQUSiJJGRIeOmUgccB+2FstYpvuMhJu9YKfqvi5N5ruJPrnzG8nJLd/GK4jA4wGGk/4bUj1ohwCV6pBlzvEpgyXnYKMelU/xIOLPQueGEWEy6BMg== 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=RV7DKdgA5r3OWy9VxfV++Sz0A5u2dKP0ssmDTowAquM=; b=GSotNQFR2Zjv+D2gAh91dkfWpUB3pyqrPohy0SgbTRI62gMQG6MEEpFwjMcMvyx8XHt0KCCN8iqs+NSUXFBBJedL+IV5JozFh6WzuHwpJloWERWJb67zGaNrplz/qLF4+9CnrddgNL4fDrUGwf2AYFWq9YrWb2wHxosAPepDh20= Received: from SN6PR08CA0007.namprd08.prod.outlook.com (2603:10b6:805:66::20) by PH0PR02MB7509.namprd02.prod.outlook.com (2603:10b6:510:5e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Thu, 3 Jun 2021 09:33:41 +0000 Received: from SN1NAM02FT0020.eop-nam02.prod.protection.outlook.com (2603:10b6:805:66:cafe::4f) by SN6PR08CA0007.outlook.office365.com (2603:10b6:805:66::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.15 via Frontend Transport; Thu, 3 Jun 2021 09:33:41 +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-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0020.mail.protection.outlook.com (10.97.5.96) 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 09:33:40 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) 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 02:33:39 -0700 Received: from smtp.xilinx.com (172.19.127.95) 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 02:33:39 -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=44966) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lojjP-00020a-Jn; Thu, 03 Jun 2021 02:33:39 -0700 Subject: Re: [PATCHv3] drivers: tpm2: update reset gpio semantics To: Jorge Ramirez-Ortiz , CC: , , References: <20210603092101.27311-1-jorge@foundries.io> From: Michal Simek Message-ID: Date: Thu, 3 Jun 2021 11:33:37 +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: <20210603092101.27311-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: 1d3c67fa-839b-444a-fad0-08d92672ac0e X-MS-TrafficTypeDiagnostic: PH0PR02MB7509: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QdJEk8vnYAJWCnXqhOCop0QENAiWTaHVjM8ZgOENDUZJevlNNbLq0qL2mVpj7lWuyO0+zJ6zvXye2Jdx76t7AcAIX3j78ydXBjmKfT+qbUY0RZKPq2B8T1YcYMAAbz3ExL66D8BF4HJ0ysJcDk7xe29DXYXK4vkK1Nv7pEIDOEXx00yuOhPMrXMJW1ohX+ibWGc0dC0wJfZKtlJm7I5FkwFXa0cLw3sicp0Y6yBAWOtpHc4KnmsN8LGr1Tp73SAZUjUFoVfW1IMdBEq70IOtOxhLLrbE5+edX71NUFPReJEsnohpjmjI6nTbHRzB966ekqv6Z8WBzN9tDNYetjxfvzIqcsCl0fueUVpbn3u0ah0PWDbMe9Waq6QRdnJZB3l9sKAkDQRK70M24dXzKyr8gjVgnsP4tDs85jJkpvIrbd2+x9JE+5EasAOnd16F0h/gL80jBAUMSD12gFk/ihGrnoO9nZQk/B/2Q6mMAKbHy+FCF9QqC1fpt4xPTuvo4Zk484wX4PeKaeW5U+bWpPALa5oqiynm8VhnhRiuBxlVhY+1dL0OcTtHMVIPoJIfZG9JS6903vcUJi2ikBGVsZfuNlXt1Q4qohdEGsOmrU/7RbEUfoUw0k2Y+qsdt0EpVPqZEje6rglqxsHi3+5stdaRvvSHa1acCZn56QLGIgPcKlj1Ux+ZF2V74up1fKnxKrVjvdUjtGQK0jTSNkyo/WeELw== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(39850400004)(376002)(346002)(136003)(396003)(46966006)(36840700001)(5660300002)(110136005)(426003)(186003)(8676002)(336012)(82310400003)(44832011)(8936002)(83380400001)(7636003)(2616005)(82740400003)(356005)(478600001)(70586007)(70206006)(9786002)(31696002)(36756003)(54906003)(316002)(2906002)(36860700001)(26005)(53546011)(31686004)(36906005)(4326008)(47076005)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2021 09:33:40.3616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d3c67fa-839b-444a-fad0-08d92672ac0e 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-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0020.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB7509 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 11:21 AM, Jorge Ramirez-Ortiz wrote: > Use the more generic reset-gpios property name. > > Signed-off-by: Jorge Ramirez-Ortiz > --- > > v3: maintained the legacy property in the docs > > .../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..521550bf67 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 (will be deprecated, use reset-gpios instead) nit: I would use "is deprecated" > - 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..73e7c342aa 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 will be deprecated\n", __func__); ditto. > } > + 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); > > With above changes Acked-by: Michal Simek Thanks, Michal