All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Johannes Holland <johannes.holland@infineon.com>
Cc: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, amirmizi6@gmail.com
Subject: Re: [PATCH 4/4] tpm: Add YAML schema for the TPM TIS I2C options
Date: Mon, 4 Apr 2022 11:18:31 -0500	[thread overview]
Message-ID: <YksaVw74Eotowyse@robh.at.kernel.org> (raw)
In-Reply-To: <20220404081835.495-4-johannes.holland@infineon.com>

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.

> 
> Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
> ---
>  .../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.

> 
> 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 <johannes.holland@infineon.com>
> +
> +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.

> +      - const: tcg,tpm-tis-i2c

Pretty sure I killed this off when originally reviewing the TPM I2C 
binding.

> +
> +  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
> 
> 

  parent reply	other threads:[~2022-04-04 21:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04  8:18 [PATCH 1/4] tpm: Add tpm_tis_i2c backend for tpm_tis_core Johannes Holland
2022-04-04  8:18 ` [PATCH 2/4] tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer Johannes Holland
2022-04-04  8:18 ` [PATCH 3/4] tpm: Implement command and response retry in tpm_tis_core Johannes Holland
2022-04-04  8:18 ` [PATCH 4/4] tpm: Add YAML schema for the TPM TIS I2C options Johannes Holland
2022-04-04 16:08   ` Rob Herring
2022-04-11 11:33     ` Johannes Holland
2022-04-04 16:18   ` Rob Herring [this message]
2022-04-11 11:30     ` Johannes Holland
2022-04-07 10:07 ` [PATCH 1/4] tpm: Add tpm_tis_i2c backend for tpm_tis_core Jarkko Sakkinen
2022-04-11 12:30   ` Johannes Holland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YksaVw74Eotowyse@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=amirmizi6@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=johannes.holland@infineon.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.