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=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 2A5F7C47082 for ; Mon, 31 May 2021 13:17:18 +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 ECE0D61376 for ; Mon, 31 May 2021 13:17:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECE0D61376 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io 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 1016E82E88; Mon, 31 May 2021 15:17:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="DiWPL/7Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 624D382E82; Mon, 31 May 2021 15:17:12 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 832EE82E7B for ; Mon, 31 May 2021 15:17:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x32d.google.com with SMTP id o127so6225672wmo.4 for ; Mon, 31 May 2021 06:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BeC+ezLKe5dBzzjUhw/n3LhRlN+7mmbaF9Ggv1/PVW0=; b=DiWPL/7Z8+0xHMMbSXH1qRx+H19MmP9KRDlY1LxFPnSxb9WNUAQYOgyDFqc2xiFjNX ygpPOqB51VPLtqJqJwFJ+cR4v3D2Ro2rdz/ZB5kG/GiQm85JUzAwqhL31uxfzwgx5tsl 77sz9sSc2bJaGVVeVgMj6D+rK389xykmK0GgmMvoNNFtusqZFYCNl6fO4Hg9ZwGabaM+ inQ3Z2yu323cpRo2oFTxFL8O1uhdaZhE9jrIH0XFhIji6fUUD6+EFgKZz0fKg8vG3Gbx 8IMYMdlvXxTKPb7b8+TpGet0piTbuc06+KxcyTQFz7RMrK2gLKnjo4rkjYW7qdloD29q SQMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BeC+ezLKe5dBzzjUhw/n3LhRlN+7mmbaF9Ggv1/PVW0=; b=AmBHiil9MmvmTBF3r6B2NR/kTGZlReFx2BcfGCa4BLxMu50dmEL/joPn+7EhT8eT3N QHeGt7ltEaaoYDQxHd2A8blUg19r9eVYUbXMrq8DU8Cf7h8icWpAg9olMBrgXVrq1nH+ sqC4WFcZz5cvw47GoFQYhlhyoaug5T6126TImsSxoHK5koXQLSWstjd06V/AAxN03m+m wgYUzr1GzHQo+DkJKNu4kr3O2HGwXqMHQ/t1qJUefcL/KSlk/jHaFCROyVQsqAYe+YbX Gdc2B1Kz6BGFyqStUdn5CT+eBXS3thVVBbj/oAhznvjO+xZ1IjoHuFN8KenkL1M9vzt5 khKg== X-Gm-Message-State: AOAM533AcT1gm28srab0Pv0914jebXYEUwxERKxZblgg+ZyJFI8WKq+j Mmavk7eIBZosBAxTbKJAbE3yBw== X-Google-Smtp-Source: ABdhPJzZdo/Fz7i2Yd4gnwzgooAC95h0NaBpFDff8OAEpFde0t3fPzaU2pp5080FuKoc+60MZR7h4A== X-Received: by 2002:a05:600c:2059:: with SMTP id p25mr6021679wmg.56.1622467027074; Mon, 31 May 2021 06:17:07 -0700 (PDT) Received: from trex (113.red-79-154-202.dynamicip.rima-tde.net. [79.154.202.113]) by smtp.gmail.com with ESMTPSA id v10sm16497312wre.33.2021.05.31.06.17.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 May 2021 06:17:06 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Mon, 31 May 2021 15:17:05 +0200 To: Michal Simek Cc: Bruno Thomsen , Jorge Ramirez-Ortiz , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH] drivers: tpm2: update reset gpio semantics Message-ID: <20210531131705.GA19835@trex> References: <20210526195712.15210-1-jorge@foundries.io> <95ea140e-0122-a978-139a-407355ce4448@xilinx.com> <90d399f9-1ff3-5491-d983-2d9f992135fb@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90d399f9-1ff3-5491-d983-2d9f992135fb@xilinx.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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 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? > > Thanks, > Michal > >