Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4637145iob; Sun, 8 May 2022 20:08:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKX8z99JwxUmnNhitSOB+/JxXzCiyjRu3g4+M2nlwMLhGHh/RghIO6oa4rdDFR8UzEt3FI X-Received: by 2002:a17:90b:3ec7:b0:1dc:b008:3cd3 with SMTP id rm7-20020a17090b3ec700b001dcb0083cd3mr24305766pjb.226.1652065703034; Sun, 08 May 2022 20:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652065703; cv=none; d=google.com; s=arc-20160816; b=aDmlY/TUQ7FK44nsZtSOHcoWjaIz3esn631hABjbpOK9obRbmOsT0cDFvMTEornJL6 aw7euYcsW5cHHA76GlQYgJyz/DeqGUN5dLd1V4pnh6Y/hc+a8noxwT7esZGwUp41rPn2 l9nxXujav6RxfLdEtlMWt0agV6cxZwX8qIPHW624CYbYQoiGEYq2Na8yUWl4xn94si/V vcCSBVr+43Wj2rPZ99zx1qY9JCdHWWSjCrYd/+zq/iiFkuNLs4XpsYMz3L5r9+CmRVV9 DhgDOC8V3JHzmaHj1fea88O4H+KMe8pVdZMNK16s9prNlowlxvv4lHRUdG0dOCfxJMuN OaEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HzkrwBX0bUl9SJXqGhPOyKrkGpTpoi26PfbSG6RhDUY=; b=CQOS2V56qsGucPPhF13aUKzAWp8B6Zim7rmRgpA2vUY8WuUs/zTMWalmtfGzP+V55v ELwDYDwQi+/OWoTD0+0SMtYct/KDWkodbqlTHpZeV7ut+SDSxs+HHEr3p4fU+k/Zc7cF 9+P4xhW9TXKktPYwgh0kNA+PveH4bZOBL25kp9GX9bMlYxdDW62lcmYT847NZubr/zEh 1wg7RvXsDbnXV0el8WRtKJzSeN1RWrh1tgri+BZgLRg41tax3M/hs292fwotnC/K1O1N hmPGdkgIE+sCHyRk4rKIQEga10/CMpvWsOdAt7h+HsIovEFQ1JD42VR82dOu1xZ0TwDK aKvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=HBs7GtUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g130-20020a636b88000000b0038233e5d18dsi11141525pgc.491.2022.05.08.20.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=HBs7GtUE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 550F3890AF; Sun, 8 May 2022 20:07:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444099AbiEFRJE (ORCPT + 99 others); Fri, 6 May 2022 13:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444093AbiEFRJB (ORCPT ); Fri, 6 May 2022 13:09:01 -0400 Received: from smtp2.infineon.com (smtp2.infineon.com [IPv6:2a00:18f0:1e00:4::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06A84D9E7; Fri, 6 May 2022 10:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1651856717; x=1683392717; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8R9iqVwlSWBcLxOnV282bKq83f750AtG8muuAs3ZADI=; b=HBs7GtUEFQ5Pe2zrwVGT48QaT3OOxGu86ca5aVglAO72xdEFFV5693YE bhm/AVRB6/9Ps9TQKi/OOl2/ALvvkZbGPbk5lmtZFGmBG6gTVBbegCAVm x+INJdBhXBO2w3KPFq2AJaVYu6JZXm3aaLOjSBgZ7UM1/Bmbf0rq/Io57 A=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="176373805" X-IronPort-AV: E=Sophos;i="5.91,203,1647298800"; d="scan'208";a="176373805" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 19:05:15 +0200 Received: from MUCSE819.infineon.com (MUCSE819.infineon.com [172.23.29.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS; Fri, 6 May 2022 19:05:15 +0200 (CEST) Received: from ISCN5CG1067W80.agb.infineon.com (172.23.8.247) by MUCSE819.infineon.com (172.23.29.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 6 May 2022 19:05:14 +0200 From: Johannes Holland To: , , , , CC: , , , Johannes Holland Subject: [PATCH v2 4/4] dt-bindings: doc/devicetree/bindings/security/tpm: Move tpm-i2c.txt to YAML Date: Fri, 6 May 2022 19:00:17 +0200 Message-ID: <20220506170013.22598-4-johannes.holland@infineon.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220506170013.22598-1-johannes.holland@infineon.com> References: <20220506170013.22598-1-johannes.holland@infineon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE812.infineon.com (172.23.29.38) To MUCSE819.infineon.com (172.23.29.45) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Migrate the existing plain text I2c driver schema to YAML and extend by the options of the generic TIS driver for I2C TPMs which comply to the TCG PC Client Platform TPM Profile (PTP) specification for TPM 2.0 v1.04 Revision 14. Signed-off-by: Johannes Holland --- Changelog: * v2: * move existing device tree instead of just adding a new one * do not use wildcard compatibles * make properties "label", "linux,sml-base" and "linux,sml-size" optional, as they should be All properties are listed, even if some drivers do not implement them. As mentioned, I kept the generic compatible in there because the TPM is a standardized device. For vendor-specific features and bugs, the specific compatibles can be used. Please let me know if you need it removed. .../bindings/security/tpm/tpm-i2c.txt | 26 -------- .../bindings/security/tpm/tpm-i2c.yaml | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.yaml diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt deleted file mode 100644 index a65d7b71e81a..000000000000 --- a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt +++ /dev/null @@ -1,26 +0,0 @@ -* Device Tree Bindings for I2C based Trusted Platform Module(TPM) - -Required properties: - -- compatible : 'manufacturer,model', eg. nuvoton,npct650 -- label : human readable string describing the device, eg. "tpm" -- linux,sml-base : 64-bit base address of the reserved memory allocated for - the firmware event log -- linux,sml-size : size of the memory allocated for the firmware event log - -Optional properties: - -- powered-while-suspended: present when the TPM is left powered on between - suspend and resume (makes the suspend/resume - callbacks do nothing). - -Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C) ----------------------------------------------------------- - -tpm@57 { - reg = <0x57>; - label = "tpm"; - compatible = "nuvoton,npct650", "nuvoton,npct601"; - linux,sml-base = <0x7f 0xfd450000>; - linux,sml-size = <0x10000>; -}; diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.yaml b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.yaml new file mode 100644 index 000000000000..952605ab8611 --- /dev/null +++ b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/security/tpm/tpm-i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: I2C PTP based TPM Device Tree Bindings + +maintainers: + - Johannes Holland + +description: + Device Tree Bindings for I2C based Trusted Platform Module (TPM). + +properties: + compatible: + items: + - enum: + # Infineon's Trusted Platform Module (TPM) (SLB9673) + - infineon,slb9673 + - nuvoton,npct601 + - nuvoton,npct650 + - const: tcg,tpm-tis-i2c + + reg: + maxItems: 1 + + interrupt: + maxItems: 1 + + label: + description: | + Human readable string describing the device, eg. "tpm". + + linux,sml-base: + description: | + 64-bit base address of the reserved memory allocated + for the firmware event log. + + linux,sml-size: + description: | + Size of the memory allocated for the firmware event log. + + powered-while-suspended: + description: | + Present when the TPM is left powered on between suspend and + resume (makes the suspend/resume callbacks do nothing). + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + tpm@2e { + compatible = "infineon,slb9673", "tcg,tpm-tis-i2c"; + reg = <0x2e>; + }; + }; +... -- 2.34.1