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 5FD00C47094 for ; Mon, 31 May 2021 07:05:59 +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 7B4B561042 for ; Mon, 31 May 2021 07:05:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B4B561042 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 CDBB082B3D; Mon, 31 May 2021 09:05:56 +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="hv9td+sp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 184E382B1C; Mon, 31 May 2021 09:05:55 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::61f]) (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 6676E82B1C for ; Mon, 31 May 2021 09:05:51 +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=SmOx1WTmbLwY5Wq8piP7yYJfzGHyFOFUTIdpbREECWIsKK9QXZYCcA/hr9XXIpddc8dzAD+qVmecmII0ePxFIDpGO8L5hfTip49yFu0lCx0bAyBlU3eJvZlOGboFs0wO6RaIVnF7c2gA8znlwromsNZrezB2o5pGcSNA8CbfvzeAYAH+oCJla/OWldkbSNaiu07PbPx422sEhhpN2tBVjDyi8HIJPknQJoPCBXIpPap7ZFMRsnqhFMiRcjbHOfw4jLq2UUkzjjT3236+UlwbY9qDR6TYYvIwWBttNkVaxQw44qYJFSTJt0cfRS2Yf7lCvWpAfsCXxNKp3rxaBJ6AkQ== 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=pnVhK+oHK7UmWR8iObfy/3r8GSgXzsv+aFWXVdDJxHg=; b=ZL/dNW8Dt2rw0jglrWQfnb8OVVwZsp3WVXdROOINQBGtmF1+69Cxg+nXCrurFp6mN/q0kdAtXOA/qjGOOa7eJDUtm3NwnS6bCZ5i23cWi/yfaGff2s+VYEPnTbU/6rNC3E+YnNwatqJleGGx3gTg6C4Yid8dOEBDe2QZ7+n7wYLGJznqXx5XJF7u2T8M0iv+W3MTNBrUPbKcZ/rf05VOPMWTy8xtrglJqwFa5EjSGOBfbu3TgUT5OacvaeXJajoXovonhHhwscBUik6By1ouPQOy5NE/zhijRIaNGwx8rDldA57y/r+Nl4LIwbyr3hJcScGYN9gzRuDKNoNTiPx2cw== 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=pnVhK+oHK7UmWR8iObfy/3r8GSgXzsv+aFWXVdDJxHg=; b=hv9td+sp4a8MZFxvfzxin1tpxaAnNniv6iAXBct7foHiGjOFb3O0QA58bO+sveb8UttfyOpkc9IwkpRCYVOVmPMyVfMjz4bEkyE1KdM0qtOWD4bSTSyQrE+x/bwnHYNujmjQtDc5qpE02MphegoalReeUgMX7Q0u/gZx4xxP4Ks= Received: from DS7PR03CA0268.namprd03.prod.outlook.com (2603:10b6:5:3b3::33) by CH2PR02MB6293.namprd02.prod.outlook.com (2603:10b6:610:11::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Mon, 31 May 2021 07:05:37 +0000 Received: from DM3NAM02FT042.eop-nam02.prod.protection.outlook.com (2603:10b6:5:3b3:cafe::48) by DS7PR03CA0268.outlook.office365.com (2603:10b6:5:3b3::33) 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 07:05:37 +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 DM3NAM02FT042.mail.protection.outlook.com (10.13.4.213) 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 07:05:35 +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 00:05:33 -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 00:05:33 -0700 Envelope-to: u-boot@lists.denx.de, sjg@chromium.org, jorge@foundries.io, bruno.thomsen@gmail.com Received: from [172.30.17.109] (port=56524) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lnbzQ-00037u-UG; Mon, 31 May 2021 00:05:33 -0700 Subject: Re: [PATCH] drivers: tpm2: update reset gpio semantics To: Bruno Thomsen , Michal Simek CC: Jorge Ramirez-Ortiz , Simon Glass , References: <20210526195712.15210-1-jorge@foundries.io> <95ea140e-0122-a978-139a-407355ce4448@xilinx.com> From: Michal Simek Message-ID: <90d399f9-1ff3-5491-d983-2d9f992135fb@xilinx.com> Date: Mon, 31 May 2021 09:05:31 +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: 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: 3bc240ae-3eac-40ae-31e8-08d924027cee X-MS-TrafficTypeDiagnostic: CH2PR02MB6293: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uy0y4dW2mK7ZN7QjNMCQ6X6WPLLLhds011l0aWqB1uo8OgpZ9O4ZOvUe4yx+x37B+qykakHQu12tw6ky7OO11fGsNK7SfJP8hAqlh+m/EJ8SAxx8L6Q5KzVUOAaXq9APRmhphE1AJRg5K2UbdnqQB1TzZtvgQW5WnB8dFetqpcC0P2LYpnkZcEI1QkjLYBHkRNx1AqR3AqMWDQ5DmSwGtZ1Pcfp/ol6FE3vh926DkRnHr634cohIgzBJTmT8lE5ElZByPxG80Sz0Ad7sCE5xtc/aiSP13omsIYM8C4bb8hk1+IYmiEF5qG3uSx5qdpv2qef1YOTA7WqH47it4iMJRzwFJMRoKWRYwfLTc5Xm5yZrigCH1qaR3ln4yMeln11ySmOOBB1ZHqBCWjEB+Tpj9l1E9ip/bTCotMeO35YQIXbJeaspx4ny3Gt6fQiTnXq3E9PAHtl+SCI280PbrNITDu2FsNR8XdQ6fB58ahut+Vg6MpMt0gxMkH1LikACmEU/R4dLWWwySf8ZaLv1dePeRHsT6q6SKy6hs7dyNOQ231CFTk2r5dmRBypzBcTZ+zuV0C/urQ3J4p3xvhWmclSKP7obNDVDatfT+jLiVSMp1ZNcassOiIlLUQlPGRcBbyihW/pD7wX2Ih5MyIXvHS3zyspWqNpfD4LwOmW3aHQFjiPOWwZxJL0Uv4RCes0ap4mys8Vknh3MSBzq+/w+XdXo1A== 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)(136003)(346002)(396003)(376002)(46966006)(36840700001)(8936002)(4326008)(5660300002)(82740400003)(2616005)(186003)(8676002)(36756003)(426003)(47076005)(31696002)(478600001)(70586007)(70206006)(356005)(36860700001)(44832011)(2906002)(31686004)(54906003)(110136005)(7636003)(53546011)(9786002)(82310400003)(336012)(316002)(26005)(83380400001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2021 07:05:35.3255 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc240ae-3eac-40ae-31e8-08d924027cee 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: DM3NAM02FT042.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR02MB6293 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/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. Thanks, Michal