From patchwork Fri Nov 5 19:05:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 516823 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp365785iml; Fri, 5 Nov 2021 12:05:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcFYsUiexb/ZZklF2q4U9rA5QNet5wPWUX/t1tAEt19OQ8xL3xHTC69T2UjoCxEsbLmirz X-Received: by 2002:a17:907:a411:: with SMTP id sg17mr49315396ejc.84.1636139128339; Fri, 05 Nov 2021 12:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636139128; cv=none; d=google.com; s=arc-20160816; b=BiExvev/+L2UJlpZ1GDk6n9BihhvMJ2Z1ke2TUA+/ejn4M32tKnPjJqeawrQabyu3Y 78n/IfvpEK46qvVbhlDP43evFWbjn+o7Wnnbs/7cNoc5W2eYUsB2s5W1+MB6ESU5ZGwc rXn0LaSDKb8tUeuSRFcGcwx+XkQJFsdrXxi5A9SXutKlbhWHdC/c3tcmsn8RTnrfVc7q bUimD1gYqxEYW8LzFHXFbc9q1QaeFIme1Z2nSbwDR/b1IqJU65dZ3JH1Zvjx8kjy+SGz lD9Qmo7sWMLkM9JZ6F6UpMSPFW7b+TSREKH8ONa0kHRADG4Ul6+DrCKBoOVW2Gc0nCkY rTrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=P5EjFrDLND5DR6E1zsEBkTtyYyPGSz0G1TGmY0pbT54=; b=yvkRrO1hzrytNJpmVSaqqD0wrBBtCshNx2kKh0UNVLB6FFJ+9lq8eNQbN0OdurAAE5 rppEH1KRTzBTEP22RqzG6Sd+2JeoWeEjFxqaH4LxsOMyVTCbbYNNOpbh8IR9oAXxzMy3 oWWxjMvrDQuJQ5iSbIhfS/DxzCcoH0xSYhxXalw8RbOjOlRGBzHEy1nMPimapbIyqz6c TcjXc3XdMETFDsfjw+9lOS2eT+vW9KRgQlfIjHfKVdaLEVXSrbV76/U7J6HLvUTn6ap3 iOPCIKwFbPA/uj0RjLRCdu8BgSZq++zNdmUXx/vITYzTxPhNy8ubJ3FAWet+z1nkJNGt n3EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RaQ4B9k3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id c16si12956456edj.456.2021.11.05.12.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 12:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RaQ4B9k3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E29883728; Fri, 5 Nov 2021 20:05:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="RaQ4B9k3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5274E83723; Fri, 5 Nov 2021 20:05:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 BCCA983701 for ; Fri, 5 Nov 2021 20:05:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id v127so7826688wme.5 for ; Fri, 05 Nov 2021 12:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P5EjFrDLND5DR6E1zsEBkTtyYyPGSz0G1TGmY0pbT54=; b=RaQ4B9k3sf4d0Jy92iprrVS8pRgceE1jdD+ly6QfxkEuiv/8bmi56KTSlssOUMnwjV /Qtni7gKmUUuY2C2uq9D8Y29z5v5qNiPkDBysTEVYZFZzbkDfqu8b/T+P8QXWXFUSPfG jcuc2/FCrkE6hGtBgzCp7PtHNdzXBeRvWLh9SgN23XmzFszNsRJKN9GFGKmdrilVgNoa VL3c/0AmLTCKVtj9qtsUPRxIaR5ZxMJFEk+CN9qdzP2iMnyQ0u8vQuIL8zz98Z/DS15g vEpzDwUo7kjZSurOmnsEcPgGygkUdogVkflbDcgUTnSUnKzL6mI++4e7gqukDF48Tvtb U9GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P5EjFrDLND5DR6E1zsEBkTtyYyPGSz0G1TGmY0pbT54=; b=YacRRvWjK5FD0EOpgGR8mgsJn7HGGUgkSIbydH5sC0xbdqD9LH8C+JTWIIDsnaBViF oh4WjPSDskch25hB3F4wutCjxGi4LR+dpMfSWc3badGkZ499ylySOnWg2NRyh3qxZHxI y0KNeIXLuNTxozzkPo72s1rldqQ1XdnYk+kYuF8eDQct2bni/yxxUnaBKmfLtTmprLHi b1LuwrISAbbjTNKjkXwrylvVOvbtoL/INCko9B5fB7+IlFEFXKtJqqspACbLMRU6jEaQ 88A6T6fxfkx1y3R8zZViVRVPvIuGzXcj9PhZddiNb2526WcIGFgaleN58pVvTMKO7KwZ dfbA== X-Gm-Message-State: AOAM533UpIafCPsf7vnUVnV7u48x35NefqKBnZxn3w4r3JOtQsSGGeWl VdJ3Ew+pYu6NgmL5ykYC59zF7G8I7oVpzw== X-Received: by 2002:a05:600c:41c2:: with SMTP id t2mr32279276wmh.76.1636139120346; Fri, 05 Nov 2021 12:05:20 -0700 (PDT) Received: from apalos.home ([2a02:587:4682:26e0:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id m125sm11832350wmm.39.2021.11.05.12.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 12:05:19 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: trini@konsulko.com, Ilias Apalodimas , Rick Chen , Sean Anderson , Simon Glass , Heinrich Schuchardt , Masahisa Kojima Subject: [PATCH 0/6 v5] TPM cleanups and MMIO driver Date: Fri, 5 Nov 2021 21:05:10 +0200 Message-Id: <20211105190517.233079-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi! This is the update for [1]. Changes since v4: - renamed struct udevice *udev -> struct udevice *dev - added comments on struct tpm_tis_phy_ops - removed duplicate defines from tpm2_tis_spi driver (now in tpm_tis.h) - moved API function description for the .c to the .h file - added Reviewed-by tags from Simon and Heinrich Changes since v3: - Coverted SPI TPM to use the API as well - moved some log_info to log_debug - Added documentation on how to run QEMU and enabled TPM by default o arm qemu builds Changes since v2: - Add myself as a maintainer on TPM drivers Changes since v1: - split off the tis core code into a different file Ilias Apalodimas (6): tpm2: Introduce TIS tpm core tpm2: Add a TPMv2 MMIO TIS driver tpm: Use the new API on tpm2 spi driver configs: Enable tpmv2 mmio on qemu for arm/arm64 doc: qemu: Add instructions for swtpm usage MAINTAINERS: Add entry for TPM drivers [1] https://lore.kernel.org/u-boot/20211103150910.69732-1-ilias.apalodimas@linaro.org/ Ilias Apalodimas (6): tpm2: Introduce TIS tpm core tpm2: Add a TPMv2 MMIO TIS driver tpm: Use the new API on tpm2 spi driver configs: Enable tpmv2 mmio on qemu for arm/arm64 doc: qemu: Add instructions for swtpm usage MAINTAINERS: Add entry for TPM drivers MAINTAINERS | 5 + configs/qemu_arm64_defconfig | 2 + configs/qemu_arm_defconfig | 2 + doc/board/emulation/qemu-arm.rst | 25 ++ drivers/tpm/Kconfig | 9 + drivers/tpm/Makefile | 3 +- drivers/tpm/tpm2_tis_core.c | 463 +++++++++++++++++++++++++++++++ drivers/tpm/tpm2_tis_mmio.c | 152 ++++++++++ drivers/tpm/tpm2_tis_spi.c | 447 +++-------------------------- drivers/tpm/tpm_tis.h | 128 +++++++++ include/tpm-v2.h | 1 + 11 files changed, 820 insertions(+), 417 deletions(-) create mode 100644 drivers/tpm/tpm2_tis_core.c create mode 100644 drivers/tpm/tpm2_tis_mmio.c -- 2.33.1