* [PATCH 0/2] tpm: tsi-i2c: Add compatible strings
@ 2022-09-13 9:10 Joel Stanley
2022-09-13 9:10 ` [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices Joel Stanley
2022-09-13 9:10 ` [PATCH 2/2] tpm: tis-i2c: Add more compatible strings Joel Stanley
0 siblings, 2 replies; 4+ messages in thread
From: Joel Stanley @ 2022-09-13 9:10 UTC (permalink / raw)
To: Rob Herring, Peter Huewe, Jarkko Sakkinen
Cc: devicetree, linux-integrity, Jason Gunthorpe, Johannes Holland, eajames
Joel Stanley (1):
tpm: tis-i2c: Add more compatible strings
Johannes Holland (1):
dt-bindings: tpm: Add schema for TIS I2C devices
drivers/char/tpm/tpm_tis_i2c.c | 2 +
.../bindings/security/tpm/tpm-tis-i2c.yaml | 49 +++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
--
2.35.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices
2022-09-13 9:10 [PATCH 0/2] tpm: tsi-i2c: Add compatible strings Joel Stanley
@ 2022-09-13 9:10 ` Joel Stanley
2022-09-13 16:31 ` Rob Herring
2022-09-13 9:10 ` [PATCH 2/2] tpm: tis-i2c: Add more compatible strings Joel Stanley
1 sibling, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2022-09-13 9:10 UTC (permalink / raw)
To: Rob Herring, Peter Huewe, Jarkko Sakkinen
Cc: Johannes Holland, devicetree, linux-integrity, Jason Gunthorpe, eajames
From: Johannes Holland <johannes.holland@infineon.com>
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.
This includes descriptions for the Nuvoton and Infineon devices.
Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
.../bindings/security/tpm/tpm-tis-i2c.yaml | 49 +++++++++++++++++++
1 file changed, 49 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..fb7b747ff2a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
@@ -0,0 +1,49 @@
+# 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:
+ $nodename:
+ pattern: "^tpm(@[0-9a-f]+)?$"
+
+ compatible:
+ oneOf:
+ - description: Infineon's Trusted Platform Module (TPM) (SLB9673).
+ items:
+ - const: infineon,slb9673
+ - 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>;
+ };
+ };
+...
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] tpm: tis-i2c: Add more compatible strings
2022-09-13 9:10 [PATCH 0/2] tpm: tsi-i2c: Add compatible strings Joel Stanley
2022-09-13 9:10 ` [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices Joel Stanley
@ 2022-09-13 9:10 ` Joel Stanley
1 sibling, 0 replies; 4+ messages in thread
From: Joel Stanley @ 2022-09-13 9:10 UTC (permalink / raw)
To: Rob Herring, Peter Huewe, Jarkko Sakkinen
Cc: devicetree, linux-integrity, Jason Gunthorpe, Johannes Holland, eajames
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 <joel@jms.id.au>
---
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);
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices
2022-09-13 9:10 ` [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices Joel Stanley
@ 2022-09-13 16:31 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-09-13 16:31 UTC (permalink / raw)
To: Joel Stanley
Cc: Peter Huewe, Jarkko Sakkinen, Johannes Holland, devicetree,
linux-integrity, Jason Gunthorpe, eajames
On Tue, Sep 13, 2022 at 06:40:23PM +0930, Joel Stanley wrote:
> From: Johannes Holland <johannes.holland@infineon.com>
>
Not really v1. And there was v19 that I already reviewed...
> Add a YAML schema to support device tree bindings for the generic I2C
s/YAML/DT/
> 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 <johannes.holland@infineon.com>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> .../bindings/security/tpm/tpm-tis-i2c.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 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..fb7b747ff2a5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
> @@ -0,0 +1,49 @@
> +# 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
s/Device Tree Bindings/Devices/
> +
> +maintainers:
> + - Johannes Holland <johannes.holland@infineon.com>
> +
> +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
You need to remove from trivial-devices.yaml. A revert of [1] perhaps.
> + - 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>;
> + };
> + };
> +...
> --
> 2.35.1
>
>
[1] https://lore.kernel.org/all/20220608173113.9232-2-Alexander.Steffen@infineon.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-13 17:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 9:10 [PATCH 0/2] tpm: tsi-i2c: Add compatible strings Joel Stanley
2022-09-13 9:10 ` [PATCH 1/2] dt-bindings: tpm: Add schema for TIS I2C devices Joel Stanley
2022-09-13 16:31 ` Rob Herring
2022-09-13 9:10 ` [PATCH 2/2] tpm: tis-i2c: Add more compatible strings Joel Stanley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).