]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tpm2: tis_spi: add linux compatible fallback string
authorBruno Thomsen <bruno.thomsen@gmail.com>
Fri, 12 Jun 2020 15:17:33 +0000 (17:17 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2020 19:38:32 +0000 (15:38 -0400)
This solves a compatibility issue with Linux device trees
that contain TPMv2.x hardware. So it's easier to import DTS
from upstream kernel when migrating board init from C code
to DTS.

The issue is that fallback binding is different between Linux
and u-Boot.

Linux: "tcg,tpm_tis-spi"
U-Boot: "tis,tpm2-spi"

As there are currently no in-tree users of the U-Boot binding,
it makes sense to use Linux fallback binding.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
drivers/tpm/tpm2_tis_spi.c

index b48a15112d3357d12f953019d58ec47a8b80aee9..3a2ee4bd1759a7fecdf232239a4c597c980252d9 100644 (file)
@@ -2,7 +2,7 @@ ST33TPHF20 SPI TPMv2.0 bindings
 -------------------------------
 
 Required properties:
-- compatible           : Should be "tis,tpm2-spi"
+- compatible           : Should be "tcg,tpm_tis-spi"
 - reg                  : SPI Chip select
 
 Optional properties:
@@ -12,7 +12,7 @@ Optional properties:
 Example:
 
        tpm@1 {
-               compatible = "tis,tpm2-spi";
+               compatible = "tcg,tpm_tis-spi";
                reg = <1>;
                spi-max-frequency = <10000000>;
        };
index 36016de4a60a6b012582d0714de4621081123fa9..9a8145e6ba1f102ce78fc2f4222c2c9b80bc4557 100644 (file)
@@ -676,7 +676,7 @@ static const struct tpm_tis_chip_data tpm_tis_std_chip_data = {
 
 static const struct udevice_id tpm_tis_spi_ids[] = {
        {
-               .compatible = "tis,tpm2-spi",
+               .compatible = "tcg,tpm_tis-spi",
                .data = (ulong)&tpm_tis_std_chip_data,
        },
        { }