All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tpm2: tis_spi: add linux compatible fallback string
@ 2020-06-12 15:17 Bruno Thomsen
  2020-06-12 15:24 ` Tom Rini
  2020-07-09  0:23 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Bruno Thomsen @ 2020-06-12 15:17 UTC (permalink / raw)
  To: u-boot

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>
---
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(-)

diff --git a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
index b48a15112d..3a2ee4bd17 100644
--- a/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
+++ b/doc/device-tree-bindings/tpm2/tis-tpm2-spi.txt
@@ -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>;
 	};
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 36016de4a6..9a8145e6ba 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -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,
 	},
 	{ }
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] tpm2: tis_spi: add linux compatible fallback string
  2020-06-12 15:17 [PATCH v2] tpm2: tis_spi: add linux compatible fallback string Bruno Thomsen
@ 2020-06-12 15:24 ` Tom Rini
  2020-07-09  0:23 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-06-12 15:24 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 12, 2020 at 05:17:33PM +0200, Bruno Thomsen wrote:

> 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>

Thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] tpm2: tis_spi: add linux compatible fallback string
  2020-06-12 15:17 [PATCH v2] tpm2: tis_spi: add linux compatible fallback string Bruno Thomsen
  2020-06-12 15:24 ` Tom Rini
@ 2020-07-09  0:23 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-07-09  0:23 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 12, 2020 at 05:17:33PM +0200, Bruno Thomsen wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-09  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 15:17 [PATCH v2] tpm2: tis_spi: add linux compatible fallback string Bruno Thomsen
2020-06-12 15:24 ` Tom Rini
2020-07-09  0:23 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.