Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp51185lfv; Tue, 12 Apr 2022 16:55:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztQhS27X1bQX5rXIQ6RpqjTj9qSTsXc9sg2QFkwGHcSi7NTUq0H7gnpiHG30k98tkQRXbs X-Received: by 2002:a05:6a00:238f:b0:4f6:b09a:4c63 with SMTP id f15-20020a056a00238f00b004f6b09a4c63mr7017354pfc.35.1649807721568; Tue, 12 Apr 2022 16:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649807721; cv=none; d=google.com; s=arc-20160816; b=tna8oi2fFkO6Ms4sSO6GMr7N1hDp32yDUzIP9QR9Mb8dRcsWKeG5W/v+wqWAeROshK a+Ucww/6mIOrYcqeOdi1ndxhbNYRpbOP4XBo1mtF1G0PiFWypryiKwc5JB3xnlb9hwn+ qFSB9oFYb2+X9MnLhkrBEPh5SqtjzTnIw655B/zxl/6yzVmV5CoWfchZ40FQrobpGM9B Px38Z84AEyuFKI0vmnFGTzYT7loPl5yKkzzBEzyrseOdwJKBsnpZT6sUQl5NL1RBxVMv UwJeLL17FXAJMLU3HizQgrrkN02hgTJqHI4LER5O6O8s8BZnX2Xlg/mYxlRwsE3zsH7z Yxxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8S0NlYynxvbU1rDanKKHgEX7+XecriVF6W9TWkmKMSs=; b=vzJ9d5YSzJunB3bhQTvID+n6Z+VIUBrMgmYDfeOag1bo1lomJHJlEC4bh3Syrl/E2u 84BppBjnqBNFC1fA3/dai+pW0g0F5lRyMFxoYldxW8NARnTVdbyJdLZsliMfoBXsqOWa aak1FPcHrABIj2ldbVdSaAKfoRNGbGx8dkUNsAJeDL31XVBqRwviSWPNyU4QMSWKpnh0 lrVjoV+c2eJVmbeU4gPYZQdwCoZ1kZENjQCkjOD6GU1t7u0RjbJoyi57vzMeRstsYZe3 I6+yIYNRMJCf2R5Hm7s/I4oM5C7qK2ZW5sm0mzSmlwKhzfT4us6r24ZW4KStofv/r5zB xNLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=Zkyhyzv4; 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 x35-20020a056a0018a300b004fa3a8dffe2si8738164pfh.153.2022.04.12.16.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:55:21 -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=Zkyhyzv4; 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 95CC411D79E; Tue, 12 Apr 2022 14:50:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237446AbiDKLdX (ORCPT + 99 others); Mon, 11 Apr 2022 07:33:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345736AbiDKLdS (ORCPT ); Mon, 11 Apr 2022 07:33:18 -0400 Received: from smtp11.infineon.com (smtp11.infineon.com [IPv6:2a00:18f0:1e00:4::5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B0CC4578F; Mon, 11 Apr 2022 04:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1649676665; x=1681212665; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=gugPxkZRoxMXAphUXKAPVO6SK72+rb+7kZN6teQ7Gwk=; b=Zkyhyzv4p1U84NEwsOQa5GX3OVm2asMwuLEcjLxx5ii2FYAoIXFNqC5i O5mZ88DoNUO8+EZu87C8Bb9CtFnKgUOlPDEJhziNfONk7JCJ0KCgjaKfA i9cWHEjyA7oA4qngy3lPxzghCpc3WCLJthXqPLV25MvVlhlQxoR/GcJiL U=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="289851380" X-IronPort-AV: E=Sophos;i="5.90,251,1643670000"; d="scan'208";a="289851380" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 13:30:55 +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; Mon, 11 Apr 2022 13:30:54 +0200 (CEST) Received: from [10.160.241.183] (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; Mon, 11 Apr 2022 13:30:54 +0200 Message-ID: <52cfa5fc-9fc5-dee4-6d53-70d241510269@infineon.com> Date: Mon, 11 Apr 2022 13:30:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 4/4] tpm: Add YAML schema for the TPM TIS I2C options Content-Language: en-US To: Rob Herring CC: , , , , , , References: <20220404081835.495-1-johannes.holland@infineon.com> <20220404081835.495-4-johannes.holland@infineon.com> From: Johannes Holland In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE816.infineon.com (172.23.29.42) To MUCSE819.infineon.com (172.23.29.45) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 04.04.2022 18:18, Rob Herring wrote: > On Mon, Apr 04, 2022 at 10:18:35AM +0200, Johannes Holland wrote: >> Add a YAML 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. > > Bindings are for devices. A protocol layer does not make a device. Agreed. I will change this in my next patch. > >> >> Signed-off-by: Johannes Holland >> --- >> .../bindings/security/tpm/tpm-tis-i2c.yaml | 48 +++++++++++++++++++ >> 1 file changed, 48 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml > > We already have a binding for I2C TPM. That one should be converted. Will do. There are two required properties which are in fact not needed by any I2C driver. If that is ok with you, I would like to turn them optional. - linux,sml-base - linux,sml-size >>> >> 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..7948867ff3f7 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml >> @@ -0,0 +1,48 @@ >> +# 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 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's Trusted Platform Module (TPM) (NPCT75x) >> + - nuvoton,npct75x > > I see this is already used, but in general wildcards should not be used > in device compatibles. Ok, I took this over from a previous patch. Since I am not familiar with Nuvoton products, so I am going to remove this for now. > >> + - const: tcg,tpm-tis-i2c > > Pretty sure I killed this off when originally reviewing the TPM I2C > binding. > Sorry, I did not see any discussion related to this. IMHO, the TPM is a open standard device. That should allow for plug and play, regardless of the manufacturer. For SPI, we also have tcg,tpm_tis-spi. However, if you want it removed, I can do that. >> + >> + reg: >> + maxItems: 1 >> + >> + interrupt: >> + maxItems: 1 >> + >> +required: >> + - compatible >> + - reg >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + tpm@2e { >> + compatible = "infineon,slb9673", "nuvoton,npct75x", "tcg,tpm-tis-i2c"; >> + reg = <0x2e>; >> + }; >> + }; >> +... >> -- >> 2.31.1.windows.1 >> >>