Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1543785ybl; Mon, 2 Dec 2019 05:04:53 -0800 (PST) X-Google-Smtp-Source: APXvYqytX/jcq7lxB6gKA5/+HfTcKTRdwMoUfV5Mcgkj1qGgUmgPiXjFmG+8K6z5d4DgR78X4zIu X-Received: by 2002:a50:9316:: with SMTP id m22mr63446403eda.39.1575291892919; Mon, 02 Dec 2019 05:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575291892; cv=none; d=google.com; s=arc-20160816; b=bRB/yhErWUB52EUbS4D1QRU2L5LUpVA0PSWfMtKY7h7qEcbC8xVx3IN4w3lc4R2Wn1 I8I8riyAptKlRfYpEFTbMgBhlCx24D7l3/bJnwOfKS+DjDXDRtQibJD0ddC42+ql3deA Oj5+vcErO/28UdLRs0VhhRjhV+Gry+uNWGFtUiOTW7XbJhfqcl6m/NXZL9DGtYWYWfDX zqdCxsaOGI4cDCmdzt+Y7K0J75ND70hYdXAxq81UshHal64Mqwzapbcm8cBvdoQwm1Xq 5z/1wisPqExwEBiyOq0tDLXYvqcFZ3MhuOj5wSTDly6VEFq35vY4JjRrO+B4ddgBWoZ1 nn3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7+vw1g4C5xBr1C36eNWXCz7/GFJWxzwGda/lNhkrfak=; b=ixnoc8459MReinjZNg7uMzQ+f9vTMn/KVF1WLfUTVc+wUXcb/QotW4TwHKYpjv7bVL 0N8GFJ1PbB4VCpT5Rwx/O6zvi2xqrQuk/9YXCryNUq3DwNXYaaoJoVsmrdUWBJbfwdqr rrnpSYUnQBzXRoZdmac58sGfQhxJ87L3b5Uo3S7G4y7MdAMr7U0AnT28/qNhY9VCsPf+ egoiLN9TeDy1mAfcrdE77a44C84PQCkfpHuPlnxeWhgsS1BGl4e3ctpiSYsDu7Wcq0/v vIEX8uhWzwPY/yfXP6eerzVzX280ZHPVdFhi84csi4smAjsqhvdGrosawJVArjOU60wv SoSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si12013841ejw.357.2019.12.02.05.04.17; Mon, 02 Dec 2019 05:04:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727510AbfLBNCp (ORCPT + 99 others); Mon, 2 Dec 2019 08:02:45 -0500 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:45796 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727466AbfLBNCk (ORCPT ); Mon, 2 Dec 2019 08:02:40 -0500 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id xB2D1f3T015190; Mon, 2 Dec 2019 15:01:41 +0200 Received: by taln60.nuvoton.co.il (Postfix, from userid 10140) id 8FE4660275; Mon, 2 Dec 2019 15:01:41 +0200 (IST) From: amirmizi6@gmail.com To: Eyal.Cohen@nuvoton.com, jarkko.sakkinen@linux.intel.com, oshrialkoby85@gmail.com, alexander.steffen@infineon.com, robh+dt@kernel.org, mark.rutland@arm.com, peterhuewe@gmx.de, jgg@ziepe.ca, arnd@arndb.de, gregkh@linuxfoundation.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, oshri.alkoby@nuvoton.com, tmaimon77@gmail.com, gcwilson@us.ibm.com, kgoldman@us.ibm.com, ayna@linux.vnet.ibm.com, Dan.Morav@nuvoton.com, oren.tanami@nuvoton.com, shmulik.hager@nuvoton.com, amir.mizinski@nuvoton.com, Amir Mizinski Subject: [PATCH v1 0/5] add tpm i2c ptp driver Date: Mon, 2 Dec 2019 15:01:27 +0200 Message-Id: <20191202130132.175382-1-amirmizi6@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amir Mizinski *This patch set adds support for TPM devices that implement the I2C interface defined by TCG PTP specification: https://trustedcomputinggroup.org/wp-content/uploads/TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22.pdf The driver was tested on Raspberry-Pie 3, using Nuvoton NPCT75X TPM. interupts are not implemented yet, preparing it for the next patch. this patch is based on initial work by oshri Alkoby, Alexander Steffen and Christophe Ricard Amir Mizinski (5): char: tpm: Make implementation of read16 read32 write32 optional char: tpm: Add check_data handle to tpm_tis_phy_ops in order to check data integrity char: tpm: rewrite "tpm_tis_req_canceled()" dt-bindings: tpm: Add the TPM TIS I2C device tree binding documentaion char: tpm: add tpm_tis_i2c driver .../bindings/security/tpm/tpm_tis_i2c.txt | 24 ++ drivers/char/tpm/Kconfig | 12 + drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_tis_core.c | 109 +++++---- drivers/char/tpm/tpm_tis_core.h | 41 +++- drivers/char/tpm/tpm_tis_i2c.c | 272 +++++++++++++++++++++ drivers/char/tpm/tpm_tis_spi.c | 41 ---- 7 files changed, 407 insertions(+), 93 deletions(-) create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm_tis_i2c.txt create mode 100644 drivers/char/tpm/tpm_tis_i2c.c -- 2.7.4