xref: /linux/Documentation/devicetree/bindings/tpm/tcg,tpm-tis-i2c.yaml (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
126c9d152SLukas Wunner# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
226c9d152SLukas Wunner%YAML 1.2
326c9d152SLukas Wunner---
426c9d152SLukas Wunner$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
526c9d152SLukas Wunner$schema: http://devicetree.org/meta-schemas/core.yaml#
626c9d152SLukas Wunner
726c9d152SLukas Wunnertitle: I²C-attached Trusted Platform Module conforming to TCG TIS specification
826c9d152SLukas Wunner
926c9d152SLukas Wunnermaintainers:
1026c9d152SLukas Wunner  - Lukas Wunner <lukas@wunner.de>
1126c9d152SLukas Wunner
1226c9d152SLukas Wunnerdescription: |
1326c9d152SLukas Wunner  The Trusted Computing Group (TCG) has defined a multi-vendor standard
1426c9d152SLukas Wunner  for accessing a TPM chip.  It can be transported over various buses,
1526c9d152SLukas Wunner  one of them being I²C.  The standard is named:
1626c9d152SLukas Wunner  TCG PC Client Specific TPM Interface Specification (TIS)
1726c9d152SLukas Wunner  https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
1826c9d152SLukas Wunner
1926c9d152SLukas Wunner  The I²C interface was not originally part of the standard, but added
2026c9d152SLukas Wunner  in 2017 with a separate document:
2126c9d152SLukas Wunner  TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP)
2226c9d152SLukas Wunner  https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
2326c9d152SLukas Wunner
2426c9d152SLukas Wunner  Recent TPM 2.0 chips conform to this generic interface, others use a
2526c9d152SLukas Wunner  vendor-specific I²C interface.
2626c9d152SLukas Wunner
2726c9d152SLukas Wunnerproperties:
2826c9d152SLukas Wunner  compatible:
2926c9d152SLukas Wunner    oneOf:
3026c9d152SLukas Wunner      - description: Generic TPM 2.0 chips conforming to TCG PTP interface
3126c9d152SLukas Wunner        items:
3226c9d152SLukas Wunner          - enum:
3326c9d152SLukas Wunner              - infineon,slb9673
3426c9d152SLukas Wunner              - nuvoton,npct75x
35*45121fcbSMichael Haener              - st,st33ktpm2xi2c
3626c9d152SLukas Wunner          - const: tcg,tpm-tis-i2c
3726c9d152SLukas Wunner
3826c9d152SLukas Wunner      - description: TPM 1.2 and 2.0 chips with vendor-specific I²C interface
3926c9d152SLukas Wunner        items:
4026c9d152SLukas Wunner          - enum:
4126c9d152SLukas Wunner              - atmel,at97sc3204t # TPM 1.2
4226c9d152SLukas Wunner              - infineon,slb9635tt # TPM 1.2 (maximum 100 kHz)
4326c9d152SLukas Wunner              - infineon,slb9645tt # TPM 1.2 (maximum 400 kHz)
4426c9d152SLukas Wunner              - infineon,tpm_i2c_infineon # TPM 1.2
4526c9d152SLukas Wunner              - nuvoton,npct501 # TPM 1.2
4626c9d152SLukas Wunner              - nuvoton,npct601 # TPM 2.0
4726c9d152SLukas Wunner              - st,st33zp24-i2c # TPM 2.0
4826c9d152SLukas Wunner              - winbond,wpct301 # TPM 1.2
4926c9d152SLukas Wunner
5026c9d152SLukas Wunner  reg:
5126c9d152SLukas Wunner    description: address of TPM on the I²C bus
5226c9d152SLukas Wunner
5326c9d152SLukas WunnerallOf:
5426c9d152SLukas Wunner  - $ref: tpm-common.yaml#
5526c9d152SLukas Wunner
5626c9d152SLukas Wunnerrequired:
5726c9d152SLukas Wunner  - compatible
5826c9d152SLukas Wunner  - reg
5926c9d152SLukas Wunner
6026c9d152SLukas WunnerunevaluatedProperties: false
6126c9d152SLukas Wunner
6226c9d152SLukas Wunnerexamples:
6326c9d152SLukas Wunner  - |
6426c9d152SLukas Wunner    i2c {
6526c9d152SLukas Wunner        #address-cells = <1>;
6626c9d152SLukas Wunner        #size-cells = <0>;
6726c9d152SLukas Wunner
6826c9d152SLukas Wunner        tpm@57 {
6926c9d152SLukas Wunner            label = "tpm";
7026c9d152SLukas Wunner            compatible = "nuvoton,npct601";
7126c9d152SLukas Wunner            reg = <0x57>;
7226c9d152SLukas Wunner            linux,sml-base = <0x7f 0xfd450000>;
7326c9d152SLukas Wunner            linux,sml-size = <0x10000>;
7426c9d152SLukas Wunner        };
7526c9d152SLukas Wunner    };
7626c9d152SLukas Wunner
7726c9d152SLukas Wunner  - |
7826c9d152SLukas Wunner    #include <dt-bindings/gpio/gpio.h>
7926c9d152SLukas Wunner    #include <dt-bindings/interrupt-controller/irq.h>
8026c9d152SLukas Wunner    i2c {
8126c9d152SLukas Wunner        #address-cells = <1>;
8226c9d152SLukas Wunner        #size-cells = <0>;
8326c9d152SLukas Wunner
8426c9d152SLukas Wunner        tpm@13 {
8526c9d152SLukas Wunner            reg = <0x13>;
8626c9d152SLukas Wunner            compatible = "st,st33zp24-i2c";
8726c9d152SLukas Wunner            interrupt-parent = <&gpio5>;
8826c9d152SLukas Wunner            interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
8926c9d152SLukas Wunner            lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
9026c9d152SLukas Wunner        };
9126c9d152SLukas Wunner    };
92