Commit 26c9d152 authored by Lukas Wunner's avatar Lukas Wunner Committed by Rob Herring
Browse files

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
1e2714bb ("tpm: Add reserved memory event log").

Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/953fd4c7519030db88e5b5e12ab6307414ebdd21.1702806810.git.lukas@wunner.de


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 4ec295ef
Loading
Loading
Loading
Loading
+0 −34
Original line number Diff line number Diff line
* STMicroelectronics SAS. ST33ZP24 TPM SoC

Required properties:
- compatible: Should be "st,st33zp24-i2c".
- clock-frequency: I²C work frequency.
- reg: address on the bus

Optional ST33ZP24 Properties:
- interrupts: GPIO interrupt to which the chip is connected
- lpcpd-gpios: Output GPIO pin used for ST33ZP24 power management D1/D2 state.
If set, power must be present when the platform is going into sleep/hibernate mode.

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.

Example (for ARM-based BeagleBoard xM with ST33ZP24 on I2C2):

&i2c2 {


        st33zp24: st33zp24@13 {

                compatible = "st,st33zp24-i2c";

                reg = <0x13>;
                clock-frequency = <400000>;

                interrupt-parent = <&gpio5>;
                interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;

                lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
        };
};
+0 −32
Original line number Diff line number Diff line
* STMicroelectronics SAS. ST33ZP24 TPM SoC

Required properties:
- compatible: Should be "st,st33zp24-spi".
- spi-max-frequency: Maximum SPI frequency (<= 10000000).

Optional ST33ZP24 Properties:
- interrupts: GPIO interrupt to which the chip is connected
- lpcpd-gpios: Output GPIO pin used for ST33ZP24 power management D1/D2 state.
If set, power must be present when the platform is going into sleep/hibernate mode.

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.

Example (for ARM-based BeagleBoard xM with ST33ZP24 on SPI4):

&mcspi4 {


        st33zp24@0 {

                compatible = "st,st33zp24-spi";

                spi-max-frequency = <10000000>;

                interrupt-parent = <&gpio5>;
                interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;

                lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
        };
};
+0 −26
Original line number Diff line number Diff line
* Device Tree Bindings for I2C based Trusted Platform Module(TPM)

Required properties:

- compatible     : 'manufacturer,model', eg. nuvoton,npct650
- label          : human readable string describing the device, eg. "tpm"
- linux,sml-base : 64-bit base address of the reserved memory allocated for
                   the firmware event log
- linux,sml-size : size of the memory allocated for the firmware event log

Optional properties:

- powered-while-suspended: present when the TPM is left powered on between
                           suspend and resume (makes the suspend/resume
                           callbacks do nothing).

Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C)
----------------------------------------------------------

tpm@57 {
	reg = <0x57>;
	label = "tpm";
	compatible = "nuvoton,npct650", "nuvoton,npct601";
	linux,sml-base = <0x7f 0xfd450000>;
	linux,sml-size = <0x10000>;
};
+0 −25
Original line number Diff line number Diff line
Trusted Computing Group MMIO Trusted Platform Module

The TCG defines multi vendor standard for accessing a TPM chip, this
is the standard protocol defined to access the TPM via MMIO. Typically
this interface will be implemented over Intel's LPC bus.

Refer to the 'TCG PC Client Specific TPM Interface Specification (TIS)' TCG
publication for the specification.

Required properties:

- compatible: should contain a string below for the chip, followed by
              "tcg,tpm-tis-mmio". Valid chip strings are:
	          * "atmel,at97sc3204"
- reg: The location of the MMIO registers, should be at least 0x5000 bytes
- interrupts: An optional interrupt indicating command completion.

Example:

	tpm_tis@90000 {
				compatible = "atmel,at97sc3204", "tcg,tpm-tis-mmio";
				reg = <0x90000 0x5000>;
				interrupt-parent = <&EIC0>;
				interrupts = <1 2>;
	};
+0 −23
Original line number Diff line number Diff line
Required properties:
- compatible: should be one of the following
    "st,st33htpm-spi"
    "infineon,slb9670"
    "tcg,tpm_tis-spi"
- spi-max-frequency: Maximum SPI frequency (depends on TPMs).

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.

Example (for ARM-based BeagleBoard xM with TPM_TIS on SPI4):

&mcspi4 {


        tpm_tis@0 {

                compatible = "tcg,tpm_tis-spi";

                spi-max-frequency = <10000000>;
        };
};
Loading