Skip to content

Commit 26c9d15

Browse files
l1krobherring
authored andcommitted
dt-bindings: tpm: Consolidate TCG TIS bindings
A significant number of Trusted Platform Modules conform to the "TIS" specification published by the Trusted Computing Group ("TCG PC Client Specific TPM Interface Specification"). These chips typically use an SPI, I²C or LPC bus as transport (via MMIO in the latter case). Some of them even support multiple of those buses (selectable through a config strap) or the same chip is available in multiple SKUs, each with a different bus interface. The devicetree bindings for these TPMs have not been converted to DT schema yet and are spread out across 3 generic files and 2 chip-specific files. A few TPM compatible strings were added to trivial-devices.yaml even though additional properties are documented in the plaintext bindings. Consolidate the devicetree bindings into 3 yaml files, one per bus. Move common properties to a separate tpm-common.yaml. Document compatible strings which are supported by the TPM TIS driver but were neglected to be added to the devicetree bindings. Document the memory-region property recently introduced by commit 1e2714b ("tpm: Add reserved memory event log"). Signed-off-by: Lukas Wunner <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/953fd4c7519030db88e5b5e12ab6307414ebdd21.1702806810.git.lukas@wunner.de Signed-off-by: Rob Herring <[email protected]>
1 parent 4ec295e commit 26c9d15

File tree

10 files changed

+301
-156
lines changed

10 files changed

+301
-156
lines changed

Documentation/devicetree/bindings/security/tpm/st33zp24-i2c.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.

Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt

Lines changed: 0 additions & 32 deletions
This file was deleted.

Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

Documentation/devicetree/bindings/security/tpm/tpm_tis_mmio.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

Documentation/devicetree/bindings/security/tpm/tpm_tis_spi.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: I²C-attached Trusted Platform Module conforming to TCG TIS specification
8+
9+
maintainers:
10+
- Lukas Wunner <[email protected]>
11+
12+
description: |
13+
The Trusted Computing Group (TCG) has defined a multi-vendor standard
14+
for accessing a TPM chip. It can be transported over various buses,
15+
one of them being I²C. The standard is named:
16+
TCG PC Client Specific TPM Interface Specification (TIS)
17+
https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
18+
19+
The I²C interface was not originally part of the standard, but added
20+
in 2017 with a separate document:
21+
TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP)
22+
https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
23+
24+
Recent TPM 2.0 chips conform to this generic interface, others use a
25+
vendor-specific I²C interface.
26+
27+
properties:
28+
compatible:
29+
oneOf:
30+
- description: Generic TPM 2.0 chips conforming to TCG PTP interface
31+
items:
32+
- enum:
33+
- infineon,slb9673
34+
- nuvoton,npct75x
35+
- const: tcg,tpm-tis-i2c
36+
37+
- description: TPM 1.2 and 2.0 chips with vendor-specific I²C interface
38+
items:
39+
- enum:
40+
- atmel,at97sc3204t # TPM 1.2
41+
- infineon,slb9635tt # TPM 1.2 (maximum 100 kHz)
42+
- infineon,slb9645tt # TPM 1.2 (maximum 400 kHz)
43+
- infineon,tpm_i2c_infineon # TPM 1.2
44+
- nuvoton,npct501 # TPM 1.2
45+
- nuvoton,npct601 # TPM 2.0
46+
- st,st33zp24-i2c # TPM 2.0
47+
- winbond,wpct301 # TPM 1.2
48+
49+
reg:
50+
description: address of TPM on the I²C bus
51+
52+
allOf:
53+
- $ref: tpm-common.yaml#
54+
55+
required:
56+
- compatible
57+
- reg
58+
59+
unevaluatedProperties: false
60+
61+
examples:
62+
- |
63+
i2c {
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
67+
tpm@57 {
68+
label = "tpm";
69+
compatible = "nuvoton,npct601";
70+
reg = <0x57>;
71+
linux,sml-base = <0x7f 0xfd450000>;
72+
linux,sml-size = <0x10000>;
73+
};
74+
};
75+
76+
- |
77+
#include <dt-bindings/gpio/gpio.h>
78+
#include <dt-bindings/interrupt-controller/irq.h>
79+
i2c {
80+
#address-cells = <1>;
81+
#size-cells = <0>;
82+
83+
tpm@13 {
84+
reg = <0x13>;
85+
compatible = "st,st33zp24-i2c";
86+
interrupt-parent = <&gpio5>;
87+
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
88+
lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
89+
};
90+
};
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-mmio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MMIO-accessed Trusted Platform Module conforming to TCG TIS specification
8+
9+
maintainers:
10+
- Lukas Wunner <[email protected]>
11+
12+
description: |
13+
The Trusted Computing Group (TCG) has defined a multi-vendor standard
14+
for accessing a TPM chip. It can be transported over various buses,
15+
one of them being LPC (via MMIO). The standard is named:
16+
TCG PC Client Specific TPM Interface Specification (TIS)
17+
https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
18+
19+
properties:
20+
compatible:
21+
items:
22+
- enum:
23+
- at97sc3201
24+
- atmel,at97sc3204
25+
- socionext,synquacer-tpm-mmio
26+
- const: tcg,tpm-tis-mmio
27+
28+
reg:
29+
description:
30+
location and length of the MMIO registers, length should be
31+
at least 0x5000 bytes
32+
33+
allOf:
34+
- $ref: tpm-common.yaml#
35+
36+
required:
37+
- compatible
38+
- reg
39+
40+
unevaluatedProperties: false
41+
42+
examples:
43+
- |
44+
tpm@90000 {
45+
compatible = "atmel,at97sc3204", "tcg,tpm-tis-mmio";
46+
reg = <0x90000 0x5000>;
47+
interrupt-parent = <&EIC0>;
48+
interrupts = <1 2>;
49+
};
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: SPI-attached Trusted Platform Module conforming to TCG TIS specification
8+
9+
maintainers:
10+
- Lukas Wunner <[email protected]>
11+
12+
description: |
13+
The Trusted Computing Group (TCG) has defined a multi-vendor standard
14+
for accessing a TPM chip. It can be transported over various buses,
15+
one of them being SPI. The standard is named:
16+
TCG PC Client Specific TPM Interface Specification (TIS)
17+
https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
18+
19+
properties:
20+
compatible:
21+
items:
22+
- enum:
23+
- infineon,slb9670
24+
- st,st33htpm-spi
25+
- st,st33zp24-spi
26+
- const: tcg,tpm_tis-spi
27+
28+
allOf:
29+
- $ref: tpm-common.yaml#
30+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
31+
- if:
32+
properties:
33+
compatible:
34+
contains:
35+
const: st,st33zp24-spi
36+
then:
37+
properties:
38+
spi-max-frequency:
39+
maximum: 10000000
40+
41+
required:
42+
- compatible
43+
- reg
44+
45+
unevaluatedProperties: false
46+
47+
examples:
48+
- |
49+
spi {
50+
#address-cells = <1>;
51+
#size-cells = <0>;
52+
53+
tpm@0 {
54+
reg = <0>;
55+
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
56+
spi-max-frequency = <10000000>;
57+
};
58+
};
59+
60+
- |
61+
#include <dt-bindings/gpio/gpio.h>
62+
#include <dt-bindings/interrupt-controller/irq.h>
63+
spi {
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
67+
tpm@0 {
68+
reg = <0>;
69+
compatible = "st,st33zp24-spi", "tcg,tpm_tis-spi";
70+
spi-max-frequency = <10000000>;
71+
interrupt-parent = <&gpio5>;
72+
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
73+
lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
74+
};
75+
};

0 commit comments

Comments
 (0)