On Mon, Nov 27, 2023 at 8:09 AM Lukas Wunner <lukas@xxxxxxxxx> wrote: > > 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 3 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 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 > 1e2714bb83fc ("tpm: Add reserved memory event log"). > > Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx> > --- > Changes v1 -> v2: > * Overhaul i2c compatible definitions. Turns out that the fallback > tcg,tpm-tis-i2c only applies to chips conforming to the PTP spec, > wheras other chips use a vendor-specific interface and thus omit > the fallback. > * Don't enforce fallback compatible tcg,tpm_tis-spi for google,cr50. > * Add nodename restriction to tpm-common.yaml. > * Add clock constraints that were previously documented for > infineon,slb9635tt and infineon,slb9645tt. > * Drop google,cr50 SPI example (Rob). That's going to avoid a warning in the examples, but it's going to fail any actual google,c50 SPI user. What's going to happen is both the SPI and I2C TPM schemas will be applied. Any SPI based cases will fail if they have SPI properties because the I2C schema won't allow them. If there is no fallback for google,cr50, then you must do a separate schema doc (well, you could do an if/then schema in tcg,tpm-tis-i2c.yaml to reference spi-peripheral-props.yaml, but that would look kind of odd). Rob