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.8 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,URIBL_BLOCKED, 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 28ECCC47082 for ; Mon, 31 May 2021 13:49:24 +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 0E23F61C35 for ; Mon, 31 May 2021 13:49:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E23F61C35 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 7568982D62; Mon, 31 May 2021 15:49:20 +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="SzO4bXHF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6137F82E21; Mon, 31 May 2021 15:49:19 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::61c]) (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 2874B82B82 for ; Mon, 31 May 2021 15:49:16 +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=Wu6QSGjnLANXzp5XSYmkjj66Do3SJ+QufRHmx9fUkKESQNi92hpsWbsbU/F4pwEeWjYoO79RMFOy+mL1psFh3BJsfjxCtMy1y6gCx9RQd6ZGyWO0DMHHQdDjaCH+q70HEJkmQnqw8/MK1ke7r0Xi3Ykf5uYvb7ciipOLJtKT5/cKFxHIEkryqtjc2XS/5dEkmNk/ys5yh6DD0EitFbXRaCylxncZojXJXS2SeKRM5k3eX9uabQQwEuf0E0ehe1kxqHm1njHcJQefjJcxqYiSD/4V4NbP/6zC/wmb0fEmKqqfw/KOBOUCB15YyPMR+5MbHtLU9/k8jUZfUhsfXgjT4g== 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=n4vMYpiobs6dYNWgdDKmc5T1zTcczopb5AFEjmAsEs0=; b=LXKDfjkXqrjo6VgRDY1q3wSPwveoMNwNeA2fpKyt1oV/8BgMFleZJSU7prIswAJENzQkzC2FDXvP7EzW6zvLkD3YM17Dqi+Wn//it4B12HTXq+RYfy+/xUhPQviZlgpCfwQqYC/tjb83uxqZWqDkYltARQJ6YbpHsw9s6wPq1pIqoPY2z9NcHz6+G+K+YhxErlEWVlfMYXG4bPw9/1XQthPPL4yyjZ3fU1Epg+ZjDpVs0q7OV4vZzkNRC7KNsvXeYRL2EkUOPBxlE1D3DhUFg9au0kObnzalj5MvPANLEE+4h2qivHje0pursvITYlnd7SisPsCNkqCWQDEpf1hzoQ== 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=n4vMYpiobs6dYNWgdDKmc5T1zTcczopb5AFEjmAsEs0=; b=SzO4bXHFVwfX+WzZCN9xcZs6sHt5LlNtmc21VRygCOGYvKM4jgY1b5j3oCWURhZ0yOrJXXEbu8xkN6/WDcEhA1JZJb8pRUU7tv/PdK7MgCT1v/SVBO/p0j53sGMNRPnJaNxOKsZ/wwQ/MdLJp5qoMGsexHIBLT/gaN5pHGc766o= Received: from SN1PR12CA0044.namprd12.prod.outlook.com (2603:10b6:802:20::15) by BY5PR02MB6338.namprd02.prod.outlook.com (2603:10b6:a03:1b5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.27; Mon, 31 May 2021 13:49:07 +0000 Received: from SN1NAM02FT0034.eop-nam02.prod.protection.outlook.com (2603:10b6:802:20:cafe::1) by SN1PR12CA0044.outlook.office365.com (2603:10b6:802:20::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Mon, 31 May 2021 13:49:07 +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 SN1NAM02FT0034.mail.protection.outlook.com (10.97.5.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4150.30 via Frontend Transport; Mon, 31 May 2021 13:49:05 +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; Mon, 31 May 2021 06:49:04 -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; Mon, 31 May 2021 06:49:04 -0700 Envelope-to: u-boot@lists.denx.de, sjg@chromium.org, bruno.thomsen@gmail.com, jorge@foundries.io Received: from [172.30.17.109] (port=38160) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lniHw-00083h-18; Mon, 31 May 2021 06:49:04 -0700 Subject: Re: [PATCH] drivers: tpm2: update reset gpio semantics To: "Jorge Ramirez-Ortiz, Foundries" , Michal Simek CC: Bruno Thomsen , Simon Glass , References: <20210526195712.15210-1-jorge@foundries.io> <95ea140e-0122-a978-139a-407355ce4448@xilinx.com> <90d399f9-1ff3-5491-d983-2d9f992135fb@xilinx.com> <20210531131705.GA19835@trex> From: Michal Simek Message-ID: <476fca53-3d2c-6b49-3454-871b5b7c802f@xilinx.com> Date: Mon, 31 May 2021 15:49:02 +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: <20210531131705.GA19835@trex> 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: 85e376ba-bc15-4fe6-d026-08d9243adb15 X-MS-TrafficTypeDiagnostic: BY5PR02MB6338: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xxLk1qvIm3UPb10nKD6jeE1pmfbuBQrqw70HlaYOLQ0uw/KLbPrEaJIvZBVF1nfBl6mUVuzfpTq21HAHVZ6BOrl1M9UkERit5XIJCUoX38PzTuXemt78XRZ2G4fd4HdYs2O1olmELe5lptaOOh4OD8vJQTXlYbAq9mu90ZedL8vtCJQevL0N7hZ/8hLryYB0oL3yz2GLcvIYQzjPBj4oNKhocTbW7+1k45dFm/AQN9XmMpXC36hPz9EhC2pFA5DUCEvCwMIf/PK87aDoqlrcugPmgK21cNr8ZwR+PRHjtl6RyhwYHxmGYMqY/ortJXPDZp7YLXM2g+FPd5dz5IPtss19RPCdil85+RmaFyJl5/FVOUuaepmD7q6CzmtUSP/ND8/NGGSxklZGBWwwX3qfspqkW+LlikHgtAEabx09C0YaDi9psLCKPrWubztxs3eAmRqFnlfEkKTfuIDEozbz7STjcldgrYS4aZLMoz8z2SzAdfL6q+7LaSXonsq97nds6phT/Q0Mshx/9sVW5qiFRv7EaBri1c51A/mLijwuanQsFOkLTwXH+vI8oRsZUaok0r7F2uz9Hsz2uT2KMiNOpJwgjlrgFLA9qfpjlKbVnUq1/AbT2f9u43ZC+Q454+q0LWzZPDnv0G8AL8ywovlcJ1mDy63bBiwLzpklpe0HvFqHrOtlgHizqAUhxvtxkaWiokdP0ABE66uVNEUP+kJlFQ== 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)(346002)(39860400002)(376002)(136003)(396003)(36840700001)(46966006)(70586007)(316002)(8676002)(31686004)(8936002)(54906003)(82740400003)(70206006)(15650500001)(186003)(82310400003)(7636003)(356005)(26005)(110136005)(31696002)(47076005)(478600001)(9786002)(2906002)(36756003)(5660300002)(53546011)(426003)(4326008)(36860700001)(44832011)(336012)(36906005)(2616005)(83380400001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2021 13:49:05.1179 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85e376ba-bc15-4fe6-d026-08d9243adb15 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: SN1NAM02FT0034.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6338 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 5/31/21 3:17 PM, Jorge Ramirez-Ortiz, Foundries wrote: > On 31/05/21, Michal Simek wrote: >> >> >> On 5/28/21 6:18 PM, Bruno Thomsen wrote: >>> Den tor. 27. maj 2021 kl. 09.15 skrev Michal Simek : >>>> >>>> >>>> >>>> On 5/26/21 9:57 PM, Jorge Ramirez-Ortiz wrote: >>>>> Use the more generic reset-gpios propery name. >>>>> >>>>> Signed-off-by: Jorge Ramirez-Ortiz >>>>> --- >>>>> doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt | 2 +- >>>>> drivers/tpm/tpm2_tis_spi.c | 2 +- >>>>> 2 files changed, 2 insertions(+), 2 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..bbcd12950f 100644 >>>>> --- a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt >>>>> +++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt >>>>> @@ -6,7 +6,7 @@ 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) >>>>> - 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..94ac52d9ce 100644 >>>>> --- a/drivers/tpm/tpm2_tis_spi.c >>>>> +++ b/drivers/tpm/tpm2_tis_spi.c >>>>> @@ -589,7 +589,7 @@ 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", >>>>> >>>> >>>> I think you should deprecate gpio-reset but keep supporting that option >>>> with any warning and add code for reset-gpios. >>>> >>>> Also would be good to add it as optional property to Linux kernel to >>>> keep it in sync. >>> >>> Hi >>> >>> The reason the Linux kernel does not have a TPM reset signal, is >>> that being able to reset the chip from software is a vulnerability. >>> There was a discussion on it over on the Barebox mailing list >>> a while ago. >>> >>> TLDR: TPM reset needs to follow SOC reset. >> >> I expect chip has the reset in both cases and it is just about who >> should be calling it. But we should be using the same DT for u-boot and >> Linux. It means it should be handled properly but described properly. > > right, I agree that it should be described properly (that was the > patch intent). > > but do we need to keep the legacy property? I prefer all the time to have some time for transition. It means add support for new property. Keep there old one with message that this will be removed in near future. Not aware if there is any time defined. We normally keep it there for a year. Thanks, Michal