xref: /freebsd/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
18d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28d13bc63SEmmanuel Vadot%YAML 1.2
38d13bc63SEmmanuel Vadot---
48d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
58d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68d13bc63SEmmanuel Vadot
78d13bc63SEmmanuel Vadottitle: I²C-attached Trusted Platform Module conforming to TCG TIS specification
88d13bc63SEmmanuel Vadot
98d13bc63SEmmanuel Vadotmaintainers:
108d13bc63SEmmanuel Vadot  - Lukas Wunner <lukas@wunner.de>
118d13bc63SEmmanuel Vadot
128d13bc63SEmmanuel Vadotdescription: |
138d13bc63SEmmanuel Vadot  The Trusted Computing Group (TCG) has defined a multi-vendor standard
148d13bc63SEmmanuel Vadot  for accessing a TPM chip.  It can be transported over various buses,
158d13bc63SEmmanuel Vadot  one of them being I²C.  The standard is named:
168d13bc63SEmmanuel Vadot  TCG PC Client Specific TPM Interface Specification (TIS)
178d13bc63SEmmanuel Vadot  https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
188d13bc63SEmmanuel Vadot
198d13bc63SEmmanuel Vadot  The I²C interface was not originally part of the standard, but added
208d13bc63SEmmanuel Vadot  in 2017 with a separate document:
218d13bc63SEmmanuel Vadot  TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP)
228d13bc63SEmmanuel Vadot  https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
238d13bc63SEmmanuel Vadot
248d13bc63SEmmanuel Vadot  Recent TPM 2.0 chips conform to this generic interface, others use a
258d13bc63SEmmanuel Vadot  vendor-specific I²C interface.
268d13bc63SEmmanuel Vadot
278d13bc63SEmmanuel Vadotproperties:
288d13bc63SEmmanuel Vadot  compatible:
298d13bc63SEmmanuel Vadot    oneOf:
308d13bc63SEmmanuel Vadot      - description: Generic TPM 2.0 chips conforming to TCG PTP interface
318d13bc63SEmmanuel Vadot        items:
328d13bc63SEmmanuel Vadot          - enum:
338d13bc63SEmmanuel Vadot              - infineon,slb9673
348d13bc63SEmmanuel Vadot              - nuvoton,npct75x
35*7d0873ebSEmmanuel Vadot              - st,st33ktpm2xi2c
368d13bc63SEmmanuel Vadot          - const: tcg,tpm-tis-i2c
378d13bc63SEmmanuel Vadot
388d13bc63SEmmanuel Vadot      - description: TPM 1.2 and 2.0 chips with vendor-specific I²C interface
398d13bc63SEmmanuel Vadot        items:
408d13bc63SEmmanuel Vadot          - enum:
418d13bc63SEmmanuel Vadot              - atmel,at97sc3204t # TPM 1.2
428d13bc63SEmmanuel Vadot              - infineon,slb9635tt # TPM 1.2 (maximum 100 kHz)
438d13bc63SEmmanuel Vadot              - infineon,slb9645tt # TPM 1.2 (maximum 400 kHz)
448d13bc63SEmmanuel Vadot              - infineon,tpm_i2c_infineon # TPM 1.2
458d13bc63SEmmanuel Vadot              - nuvoton,npct501 # TPM 1.2
468d13bc63SEmmanuel Vadot              - nuvoton,npct601 # TPM 2.0
478d13bc63SEmmanuel Vadot              - st,st33zp24-i2c # TPM 2.0
488d13bc63SEmmanuel Vadot              - winbond,wpct301 # TPM 1.2
498d13bc63SEmmanuel Vadot
508d13bc63SEmmanuel Vadot  reg:
518d13bc63SEmmanuel Vadot    description: address of TPM on the I²C bus
528d13bc63SEmmanuel Vadot
538d13bc63SEmmanuel VadotallOf:
548d13bc63SEmmanuel Vadot  - $ref: tpm-common.yaml#
558d13bc63SEmmanuel Vadot
568d13bc63SEmmanuel Vadotrequired:
578d13bc63SEmmanuel Vadot  - compatible
588d13bc63SEmmanuel Vadot  - reg
598d13bc63SEmmanuel Vadot
608d13bc63SEmmanuel VadotunevaluatedProperties: false
618d13bc63SEmmanuel Vadot
628d13bc63SEmmanuel Vadotexamples:
638d13bc63SEmmanuel Vadot  - |
648d13bc63SEmmanuel Vadot    i2c {
658d13bc63SEmmanuel Vadot        #address-cells = <1>;
668d13bc63SEmmanuel Vadot        #size-cells = <0>;
678d13bc63SEmmanuel Vadot
688d13bc63SEmmanuel Vadot        tpm@57 {
698d13bc63SEmmanuel Vadot            label = "tpm";
708d13bc63SEmmanuel Vadot            compatible = "nuvoton,npct601";
718d13bc63SEmmanuel Vadot            reg = <0x57>;
728d13bc63SEmmanuel Vadot            linux,sml-base = <0x7f 0xfd450000>;
738d13bc63SEmmanuel Vadot            linux,sml-size = <0x10000>;
748d13bc63SEmmanuel Vadot        };
758d13bc63SEmmanuel Vadot    };
768d13bc63SEmmanuel Vadot
778d13bc63SEmmanuel Vadot  - |
788d13bc63SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
798d13bc63SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
808d13bc63SEmmanuel Vadot    i2c {
818d13bc63SEmmanuel Vadot        #address-cells = <1>;
828d13bc63SEmmanuel Vadot        #size-cells = <0>;
838d13bc63SEmmanuel Vadot
848d13bc63SEmmanuel Vadot        tpm@13 {
858d13bc63SEmmanuel Vadot            reg = <0x13>;
868d13bc63SEmmanuel Vadot            compatible = "st,st33zp24-i2c";
878d13bc63SEmmanuel Vadot            interrupt-parent = <&gpio5>;
888d13bc63SEmmanuel Vadot            interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
898d13bc63SEmmanuel Vadot            lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
908d13bc63SEmmanuel Vadot        };
918d13bc63SEmmanuel Vadot    };
92