From patchwork Thu Nov 11 04:06:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 1553756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.a=rsa-sha256 header.s=fm2 header.b=ksxib+6K; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=d+paC0Kw; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HqSph5rfXz9s1l for ; Thu, 11 Nov 2021 15:07:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E47618373A; Thu, 11 Nov 2021 05:06:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au 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=traverse.com.au header.i=@traverse.com.au header.b="ksxib+6K"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="d+paC0Kw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E02D8370A; Thu, 11 Nov 2021 05:06:51 +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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 18AF483224 for ; Thu, 11 Nov 2021 05:06:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matt@traverse.com.au Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AE4355C01AF; Wed, 10 Nov 2021 23:06:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 10 Nov 2021 23:06:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=/NkOTD6gBPe7mL/F9A/W2nNpOc WGAZOfDN+CLfxDvUg=; b=ksxib+6KTaLqNVPlYVIjp4a3m2RX8/RIj95f3azpNB 8j1b2ym6Xz5iArNmyCg1Wp+I0ZbMX745I78RicoJ7x7nor8hVJuZwTq+wcQTm1/y BbHxbPWejAAc8Q5Iocbq5pnOYQzhpSmSQChCY7U4fzbshc+RhEms3an/Fl73HLCo Q5eNBQRmLrBFffpD8ezfQifgjgBbnZ8uUhBc1fnogwUkCuBteW3gtgKIngmvMrcb +XYk7QIBgs2Sl4Z360883msABBmczw9zIh/Io2Shr/hvuWctLPXz9I8yub9ljqWk DdUaTjaWZD2/e1n4tlHxa6XL2wI5DeuNEWdis7eOMALg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/NkOTD6gBPe7mL/F9 A/W2nNpOcWGAZOfDN+CLfxDvUg=; b=d+paC0KwhUaEZpK6Qu5FU7ghLIgmkTYte y4rLzblZlm/YeYzqYR6ujmufIdb1sbrorIH3+hxGbmPxQdTM+OB2Cg3P7vWuNIz8 0mSD9c3VHwip4fuBwOF4v68ELO6k0O5ARtt25KVee4gl870u+bjE63SwMmbgkMhw vKxZRqWlJFRoUvopfXyhZyokpFJZ1CTg5subvBt5U+bX6HXy0G9m93+V/Qb4XXmr ik5NUDFvMnE7mVn73dimBfpB5rsqHty3pqQDOLn3mPvd8XRgw3G/HLhTlsfesqZP SwKHiobveK6ud0hbXm4F6Lwz0o+/IPyyvXVRsWt8wk9nD/ZRtV6og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrvddtgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofgrthhhvgifucfo tgeurhhiuggvuceomhgrthhtsehtrhgrvhgvrhhsvgdrtghomhdrrghuqeenucggtffrrg htthgvrhhnpefgkeehgfeiheffteduheevveduuedttdetieffuefgveeutddttdegleef keelvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrghtthesthhrrghvvghrshgvrdgtohhmrdgruh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 23:06:43 -0500 (EST) From: Mathew McBride To: Ilias Apalodimas , eugen.hristev@microchip.com, sjg@chromium.org, u-boot@lists.denx.de Cc: Mathew McBride Subject: [PATCH v2 0/6] drivers: tpm: Fix Atmel/Microchip TPMv1.2 issues Date: Thu, 11 Nov 2021 04:06:25 +0000 Message-Id: <20211111040631.21262-1-matt@traverse.com.au> X-Mailer: git-send-email 2.30.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 While doing bringup/rebase for the Ten64 I did some troubleshooting for the tpm (v1.2, NOT tpm2) command which did not appear to function, despite the Linux driver and tools (tcsd) working on the same board. Evidently the Atmel TPM driver hasn't kept up with various step changes in the I2C and TPM stacks, and while TPMv1.2 is quite dated to TPMv2 it would be nice to make some use of the hardware that is there. (Admittedly I would love to replace our hardware TPM with an fTPM but that is a project for another day) There are also subcommands in tpm-v1 which also have been missed in changes to the TPMv1 API and are fixed in this patchset. Changes in v2: - Include model number in get_desc output Example: "Atmel AT97SC3204T I2C 1.2 TPM (tpm@29)" Mathew McBride (6): cmd: tpm-v1: fix compile error in TPMv1 list resources command cmd: tpm-v1: fix load_key_by_sha1 compile errors drivers: tpm: atmel_twi: drop non-DM_I2C compatibility drivers: tpm: atmel_twi: do not use an offset byte drivers: tpm: atmel_twi: implement get_desc operation drivers: tpm: atmel_twi: fix printf specifier compile warning cmd/tpm-v1.c | 17 +++++++++++------ drivers/tpm/tpm_atmel_twi.c | 22 +++++++--------------- lib/tpm-v1.c | 4 ++-- 3 files changed, 20 insertions(+), 23 deletions(-)