Skip to contentSkip to conversation

tpm2: tis_spi: add linux compatible fallback string

PATCH New Bruno Thomsen 2 participants 3 messages Jun 12, 2020 – Jul 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tpm2: tis_spi: add linux compatible fallback string

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.

---
v2:
Only use Linux compatible fallback binding.

---
 doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt | 4 ++--
 drivers/tpm/tpm2_tis_spi.c                     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt +2 -2
index b48a15112d..3a2ee4bd17 100644
@@ -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 at 1 {
-		compatible = "tis,tpm2-spi";
+		compatible = "tcg,tpm_tis-spi";
 		reg = <1>;
 		spi-max-frequency = <10000000>;
 	};
drivers/tpm/tpm2_tis_spi.c +1 -1
index 36016de4a6..9a8145e6ba 100644
@@ -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,
 	},
 	{ }
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/1 tpm2: tis_spi: add linux compatible fallback string

Quoted 8 lines · Bruno Thomsen

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.

Quoted 7 lines

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.

Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/6e53d4af/attachment.sig>
#2 lore raw

PATCH v2 1/1 tpm2: tis_spi: add linux compatible fallback string

In reply to Bruno Thomsen
Quoted 8 lines · Bruno Thomsen

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.

Quoted 8 lines

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200708/2ea44ab0/attachment.sig>