From patchwork Wed Sep 28 04:39:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 12991599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C6BCC32771 for ; Wed, 28 Sep 2022 04:41:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232418AbiI1ElI (ORCPT ); Wed, 28 Sep 2022 00:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbiI1ElH (ORCPT ); Wed, 28 Sep 2022 00:41:07 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D97B72B7D; Tue, 27 Sep 2022 21:41:06 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id v4so11179538pgi.10; Tue, 27 Sep 2022 21:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date; bh=2aGBJX41wwhP5xiOS3w6q9sOFoPx6hcoxIUBu1dhhaE=; b=XVw9Jd+hyeAyhNNgBtEF1vJ6HqOCKnXDqoaV3VUmmWZpeufHOtB8bF9EalEEH5OJqJ jbwAS50QkX09nzPsBXMubHMStMcGxk3JYhgpryTS9S4I0Wt0qJ5DJSH5MIx5lht2aLFt jUiXbQmR5vtDdxo/ag0tEFGxmo8lvtBt0TYixJteXEw0YCAEa1YVuzD5TKmRufELf1Rg IDPOZpl9mv2anlmDfcSjojuEvl7aa2tjf69O13Osz2DzvhMkhAbvNO0m65ZJipLg44dw GAXjnFsg7NPbwVXB4czpfzlZzZBQxRUBc9CJYezxWeIk4zcI1d6do/1KdU7b3mWHPSz3 yvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date; bh=2aGBJX41wwhP5xiOS3w6q9sOFoPx6hcoxIUBu1dhhaE=; b=L0kw3kdo/vojLZmFLlF8AbAVmN0uYNrxuEM0pIwoUe0RK22jpRDgJK0kkM4512HyAn qL8pvpJ9Nzl7AEiDszQQkr7vpNsI7bhtRKJcjQlg/todz/SQaYNybDw5N1BsJ74R8mqM 3VJwWRlByAa+CkgmiS19W9zykOXs84z9O6UhPGD/IdEzNX0cq0US7me6k7QkADeQM19K /1RNlG75tk+LzXtE6hC7ZRuyf3XD03qxC30XZ9/kSveLqBLL8UFtobsNYtVH+qkRpqBZ ZaGMMvczyQnasu0sJBiZ9iu+KLjV9l9UN2aSlZ6b64jTDcd5LC7h/vi92wfizP5aAGBa BEsQ== X-Gm-Message-State: ACrzQf0RBkN3UuGOaYnusJ3gHBQFliZfj0sABmedFjd3ApZ8oFFFPmhT eyj+O9x4VhQgDHcbiH2J1b0= X-Google-Smtp-Source: AMsMyM7LdmQNUBvc6yH9dqBJb3XFMwlC9JHatFE0JcTkvSgVBszIqKiwESVztToKe/kcF00Ths+32g== X-Received: by 2002:a63:2a02:0:b0:42b:2711:d534 with SMTP id q2-20020a632a02000000b0042b2711d534mr27362498pgq.176.1664340065808; Tue, 27 Sep 2022 21:41:05 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e80800b00178ac4e70dcsm2504439plg.185.2022.09.27.21.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 21:41:05 -0700 (PDT) Sender: "joel.stan@gmail.com" From: Joel Stanley To: Rob Herring , Peter Huewe , Jarkko Sakkinen Cc: devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, Jason Gunthorpe , Johannes Holland , eajames@linux.ibm.com Subject: [PATCH v2 1/3] dt-bindings: trivial-devices: Remove Infineon SLB9673 TPM Date: Wed, 28 Sep 2022 14:09:55 +0930 Message-Id: <20220928043957.2636877-2-joel@jms.id.au> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928043957.2636877-1-joel@jms.id.au> References: <20220928043957.2636877-1-joel@jms.id.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org This reverts commit 2353673d8a025a6ba3b3aa3917a3a98944e64702. It will be added to its own bindings document. Signed-off-by: Joel Stanley Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 61746755c107..7c62c2740330 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -139,8 +139,6 @@ properties: - infineon,slb9635tt # Infineon SLB9645 I2C TPM (new protocol, max 400khz) - infineon,slb9645tt - # Infineon SLB9673 I2C TPM 2.0 - - infineon,slb9673 # Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor - infineon,tlv493d-a1b6 # Infineon Multi-phase Digital VR Controller xdpe11280 From patchwork Wed Sep 28 04:39:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 12991600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90D96C04A95 for ; Wed, 28 Sep 2022 04:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232166AbiI1ElM (ORCPT ); Wed, 28 Sep 2022 00:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbiI1ElL (ORCPT ); Wed, 28 Sep 2022 00:41:11 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4AD183F21; Tue, 27 Sep 2022 21:41:10 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id l9-20020a17090a4d4900b00205e295400eso657139pjh.4; Tue, 27 Sep 2022 21:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date; bh=YP8+TpInxIDb5PM1pJKT5re6Yn5jKTALc0NCg1LZkn0=; b=KKLaNJ1QH76g3DIxqhzTpeYElGtBvYDnAUlpInkf/PnC5rgspVWBGbOu+sTHH1EPa6 xd0NzM7+ETu5R/2Nvba5H5ET2kqvQ6TPdkHClXNW/dkrtqsE7HW7T4/7bTCUZT7Je8Vl C/E5ehDgKSJw5Yra8MJdhJGEfG2aJjzu0cR/Uft6ypf3PLgKSqDSlzSHLcO30w/wLbJn dO4PthWxb9cTm/pPiJObzRmZci3pJu6a4pUKlRLWuLQyfm89xiWfFORHmLkePk4f4+Po rbCMA224531Pss3CZiskB+UOGweWbnb0anfoWbKZ43ItI9xyvRQ0JrxswVTC/WcGSWyl YWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date; bh=YP8+TpInxIDb5PM1pJKT5re6Yn5jKTALc0NCg1LZkn0=; b=v0MgiaNZn6j7G5HaVP4wEKfYpNS70ddQP5D5NtkuOSpD97Tv6b4hTHpcVIomGDHgnW xw87NWu0kmiFA/QFW5xpNun5kKoFcJ6c4RVSLaaTSHgZrGoFDsdt0gU3s6pbg5mt4yBy cDDh9tfW0KXfQQ4VUMVIRA5CsaHESVCPuA85M/jnpj7Ax6vENVDM+3q1JXAxjFs+1EYf foFTBJ2epkX9TMhUANbKf/scZwZj5yMmu6SDlP6aq2U0V64rtdA7zucdtxX2jQTzuOpG +Hc6/maj4+FruEpxUtjCNJoKbui6kVAMqRbnn9JhzEBw6eI0X/eTSuElvJOcV9KVDkYM 04cA== X-Gm-Message-State: ACrzQf1N78zYPluE6eaNIMAmXj4YvmVmJXiMfZPG3daUapS20fq0FnTe lDSCSY67HUUzYu2S4/DyzG41YDhKgY+AEw== X-Google-Smtp-Source: AMsMyM7deK8wlX0z1IjwHr/cLNIQYfRM7lKaVFdlqAj02nLxiOg+hhxLPeMfkDtGjUFFjxhbcvvQcw== X-Received: by 2002:a17:902:ecc6:b0:178:3c7c:18ad with SMTP id a6-20020a170902ecc600b001783c7c18admr30387274plh.112.1664340070156; Tue, 27 Sep 2022 21:41:10 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e80800b00178ac4e70dcsm2504439plg.185.2022.09.27.21.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 21:41:09 -0700 (PDT) Sender: "joel.stan@gmail.com" From: Joel Stanley To: Rob Herring , Peter Huewe , Jarkko Sakkinen Cc: Johannes Holland , devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, Jason Gunthorpe , eajames@linux.ibm.com Subject: [PATCH v2 2/3] dt-bindings: tpm: Add schema for TIS I2C devices Date: Wed, 28 Sep 2022 14:09:56 +0930 Message-Id: <20220928043957.2636877-3-joel@jms.id.au> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928043957.2636877-1-joel@jms.id.au> References: <20220928043957.2636877-1-joel@jms.id.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org From: Johannes Holland Add a dt schema to support device tree bindings for the generic I2C physical layer. Refer to the TCG PC Client Platform TPM Profile (PTP) Specification for TPM 2.0 v1.04 Revision 14. This includes descriptions for the Nuvoton and Infineon devices. Signed-off-by: Johannes Holland Signed-off-by: Joel Stanley Reviewed-by: Rob Herring --- v2: String changes --- .../bindings/security/tpm/tpm-tis-i2c.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml new file mode 100644 index 000000000000..de1e34065748 --- /dev/null +++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/security/tpm/tpm-tis-i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: I2C PTP based TPM Devices + +maintainers: + - Johannes Holland + +description: + Device Tree Bindings for I2C based Trusted Platform Module (TPM). + +properties: + $nodename: + pattern: "^tpm(@[0-9a-f]+)?$" + + compatible: + oneOf: + - description: Infineon's Trusted Platform Module (TPM) (SLB9673). + items: + - const: infineon,slb9673 + - const: tcg,tpm-tis-i2c + - description: Nuvoton's Trusted Platform Module (TPM) (NPCT75x). + items: + - const: nuvoton,npct75x + - const: tcg,tpm-tis-i2c + - const: tcg,tpm-tis-i2c + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + tpm@2e { + compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c"; + reg = <0x2e>; + }; + }; +... From patchwork Wed Sep 28 04:39:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 12991601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1519CC54EE9 for ; Wed, 28 Sep 2022 04:41:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232351AbiI1ElV (ORCPT ); Wed, 28 Sep 2022 00:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232343AbiI1ElT (ORCPT ); Wed, 28 Sep 2022 00:41:19 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31CC19B879; Tue, 27 Sep 2022 21:41:15 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id w2so11543919pfb.0; Tue, 27 Sep 2022 21:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date; bh=fmTTNMO6nsNe3wwRALCsW2vgWT26jAViSTGEkQkN2xQ=; b=jxBQhnmvzqGCDopGTTWap7p3CfH89/qdhBvA2jCdFcstc30gbSfpozgkE6NAT1Gj+H 5BSTzGE4t/RVKqSbRykONVgD7iltxOf3qRrk3riU+UA9DIhHHbNmOCyZ8gMUajW+HZVI NLP2WTJUS9/Ub71qoV7HKTiD4InpViwiixbdUHymIVZFo07b7pNhSs6ruIc+oSTJ5zZo ndGfqN+oVLod8oJMo9TIKFG3HIgXZOunjqLB1lcc6lvhrfZxn8jUPT71+VxHuSR8Mtsm VIE4HuJIp517+WIPEO1xSSvHX5Gn9wt+PfKDH8FI3Trhl4DyUf0VwnBNNRPAIgfoIMUi iZZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date; bh=fmTTNMO6nsNe3wwRALCsW2vgWT26jAViSTGEkQkN2xQ=; b=e7bY1Cq407ODp3bjbEIXfGoupXMizWX8vqksvnDKZ6SbS1scJb8q3Gs1/idBrvWKW6 mPyuZwPJHiNXs5+kJT6Kpa8jFTXkwCBmsyJbA4eUzTGjbEjT+AoCT85nggje4wWQ0b0Q dsS1ai/ZEt7eqR1F38+958dToFLotnDClUPp4puOik+MZg1KSlQOkeLkwW7aDAePesqZ KP5/d3Y2ceJUjI1uXtGpkLjQcuVahf866PZd6dfSLwC02uB/VJIGuitMe32xf7MFUQ3y 7FqqpzwohZvM/ENg00g4rIhQsy27J2smBZvrnle28yhrsmStoMCKaxmaoggFvXTViwr1 5waQ== X-Gm-Message-State: ACrzQf2uf2J9Gf9MemB7bppizOKrDtyg/zRmHpRwCI9Bwo+XVAv5w2JI 1TsQ3hm8y3SXunrxf6/YKzkwu5jklLrbkQ== X-Google-Smtp-Source: AMsMyM6OjeMBDncKovrfBrauwsMbC7jPBrOrDGMVCCdiVbGsbmIIYeu+lFoSHceRGW54M4IlSuUhew== X-Received: by 2002:a63:d118:0:b0:43c:1440:6486 with SMTP id k24-20020a63d118000000b0043c14406486mr27160681pgg.92.1664340074533; Tue, 27 Sep 2022 21:41:14 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id u8-20020a170902e80800b00178ac4e70dcsm2504439plg.185.2022.09.27.21.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 21:41:13 -0700 (PDT) Sender: "joel.stan@gmail.com" From: Joel Stanley To: Rob Herring , Peter Huewe , Jarkko Sakkinen Cc: devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, Jason Gunthorpe , Johannes Holland , eajames@linux.ibm.com Subject: [PATCH v2 3/3] tpm: tis-i2c: Add more compatible strings Date: Wed, 28 Sep 2022 14:09:57 +0930 Message-Id: <20220928043957.2636877-4-joel@jms.id.au> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928043957.2636877-1-joel@jms.id.au> References: <20220928043957.2636877-1-joel@jms.id.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface. https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/ Add a compatible string for it, and the generic compatible. Signed-off-by: Joel Stanley Acked-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c index 0692510dfcab..4af27b7ec5b1 100644 --- a/drivers/char/tpm/tpm_tis_i2c.c +++ b/drivers/char/tpm/tpm_tis_i2c.c @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id); #ifdef CONFIG_OF static const struct of_device_id of_tis_i2c_match[] = { { .compatible = "infineon,slb9673", }, + { .compatible = "nuvoton,npct75x", }, + { .compatible = "tcg,tpm-tis-i2c", }, {} }; MODULE_DEVICE_TABLE(of, of_tis_i2c_match);