xref: /freebsd/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8d13bc63SEmmanuel Vadot%YAML 1.2
3*8d13bc63SEmmanuel Vadot---
4*8d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
5*8d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8d13bc63SEmmanuel Vadot
7*8d13bc63SEmmanuel Vadottitle: I²C-attached Trusted Platform Module conforming to TCG TIS specification
8*8d13bc63SEmmanuel Vadot
9*8d13bc63SEmmanuel Vadotmaintainers:
10*8d13bc63SEmmanuel Vadot  - Lukas Wunner <lukas@wunner.de>
11*8d13bc63SEmmanuel Vadot
12*8d13bc63SEmmanuel Vadotdescription: |
13*8d13bc63SEmmanuel Vadot  The Trusted Computing Group (TCG) has defined a multi-vendor standard
14*8d13bc63SEmmanuel Vadot  for accessing a TPM chip.  It can be transported over various buses,
15*8d13bc63SEmmanuel Vadot  one of them being I²C.  The standard is named:
16*8d13bc63SEmmanuel Vadot  TCG PC Client Specific TPM Interface Specification (TIS)
17*8d13bc63SEmmanuel Vadot  https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
18*8d13bc63SEmmanuel Vadot
19*8d13bc63SEmmanuel Vadot  The I²C interface was not originally part of the standard, but added
20*8d13bc63SEmmanuel Vadot  in 2017 with a separate document:
21*8d13bc63SEmmanuel Vadot  TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP)
22*8d13bc63SEmmanuel Vadot  https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
23*8d13bc63SEmmanuel Vadot
24*8d13bc63SEmmanuel Vadot  Recent TPM 2.0 chips conform to this generic interface, others use a
25*8d13bc63SEmmanuel Vadot  vendor-specific I²C interface.
26*8d13bc63SEmmanuel Vadot
27*8d13bc63SEmmanuel Vadotproperties:
28*8d13bc63SEmmanuel Vadot  compatible:
29*8d13bc63SEmmanuel Vadot    oneOf:
30*8d13bc63SEmmanuel Vadot      - description: Generic TPM 2.0 chips conforming to TCG PTP interface
31*8d13bc63SEmmanuel Vadot        items:
32*8d13bc63SEmmanuel Vadot          - enum:
33*8d13bc63SEmmanuel Vadot              - infineon,slb9673
34*8d13bc63SEmmanuel Vadot              - nuvoton,npct75x
35*8d13bc63SEmmanuel Vadot          - const: tcg,tpm-tis-i2c
36*8d13bc63SEmmanuel Vadot
37*8d13bc63SEmmanuel Vadot      - description: TPM 1.2 and 2.0 chips with vendor-specific I²C interface
38*8d13bc63SEmmanuel Vadot        items:
39*8d13bc63SEmmanuel Vadot          - enum:
40*8d13bc63SEmmanuel Vadot              - atmel,at97sc3204t # TPM 1.2
41*8d13bc63SEmmanuel Vadot              - infineon,slb9635tt # TPM 1.2 (maximum 100 kHz)
42*8d13bc63SEmmanuel Vadot              - infineon,slb9645tt # TPM 1.2 (maximum 400 kHz)
43*8d13bc63SEmmanuel Vadot              - infineon,tpm_i2c_infineon # TPM 1.2
44*8d13bc63SEmmanuel Vadot              - nuvoton,npct501 # TPM 1.2
45*8d13bc63SEmmanuel Vadot              - nuvoton,npct601 # TPM 2.0
46*8d13bc63SEmmanuel Vadot              - st,st33zp24-i2c # TPM 2.0
47*8d13bc63SEmmanuel Vadot              - winbond,wpct301 # TPM 1.2
48*8d13bc63SEmmanuel Vadot
49*8d13bc63SEmmanuel Vadot  reg:
50*8d13bc63SEmmanuel Vadot    description: address of TPM on the I²C bus
51*8d13bc63SEmmanuel Vadot
52*8d13bc63SEmmanuel VadotallOf:
53*8d13bc63SEmmanuel Vadot  - $ref: tpm-common.yaml#
54*8d13bc63SEmmanuel Vadot
55*8d13bc63SEmmanuel Vadotrequired:
56*8d13bc63SEmmanuel Vadot  - compatible
57*8d13bc63SEmmanuel Vadot  - reg
58*8d13bc63SEmmanuel Vadot
59*8d13bc63SEmmanuel VadotunevaluatedProperties: false
60*8d13bc63SEmmanuel Vadot
61*8d13bc63SEmmanuel Vadotexamples:
62*8d13bc63SEmmanuel Vadot  - |
63*8d13bc63SEmmanuel Vadot    i2c {
64*8d13bc63SEmmanuel Vadot        #address-cells = <1>;
65*8d13bc63SEmmanuel Vadot        #size-cells = <0>;
66*8d13bc63SEmmanuel Vadot
67*8d13bc63SEmmanuel Vadot        tpm@57 {
68*8d13bc63SEmmanuel Vadot            label = "tpm";
69*8d13bc63SEmmanuel Vadot            compatible = "nuvoton,npct601";
70*8d13bc63SEmmanuel Vadot            reg = <0x57>;
71*8d13bc63SEmmanuel Vadot            linux,sml-base = <0x7f 0xfd450000>;
72*8d13bc63SEmmanuel Vadot            linux,sml-size = <0x10000>;
73*8d13bc63SEmmanuel Vadot        };
74*8d13bc63SEmmanuel Vadot    };
75*8d13bc63SEmmanuel Vadot
76*8d13bc63SEmmanuel Vadot  - |
77*8d13bc63SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
78*8d13bc63SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
79*8d13bc63SEmmanuel Vadot    i2c {
80*8d13bc63SEmmanuel Vadot        #address-cells = <1>;
81*8d13bc63SEmmanuel Vadot        #size-cells = <0>;
82*8d13bc63SEmmanuel Vadot
83*8d13bc63SEmmanuel Vadot        tpm@13 {
84*8d13bc63SEmmanuel Vadot            reg = <0x13>;
85*8d13bc63SEmmanuel Vadot            compatible = "st,st33zp24-i2c";
86*8d13bc63SEmmanuel Vadot            interrupt-parent = <&gpio5>;
87*8d13bc63SEmmanuel Vadot            interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
88*8d13bc63SEmmanuel Vadot            lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
89*8d13bc63SEmmanuel Vadot        };
90*8d13bc63SEmmanuel Vadot    };
91