Skip to contentSkip to conversation

Add missing TPM compatible strings

PATCH In review Lukas Wunner 3 participants 14 messages Jan 13, 2024 – Feb 20, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover Add missing TPM compatible strings

Dear Jarkko,

you've requested me to resend two patches which add "atmel,attpm20p" as a compatible string to the dt-bindings and to the driver:

https://lore.kernel.org/all/CY65RSEA4VMD.MXHPX898TSW4@suppilovahvero/

The patches depend on a commit which landed in Linus' tree yesterday, it consolidates the TPM dt-bindings:

https://git.kernel.org/linus/26c9d152ebf3

So after pulling from Linus, you should be able to apply the enclosed patches cleanly.

I am also including two patches to add other missing compatible strings to the driver. I already submitted them in November and December but they haven't been picked up yet:

https://lore.kernel.org/all/096e5d9d22eaed0a256d2d9b315a77245bd423c6.1701095446.git.lukas@wunner.de/
https://lore.kernel.org/all/5c92620082189dc4e6be277952d0b46df26a6478.1702811113.git.lukas@wunner.de/

Because all these patches merely add device IDs, I believe they can be picked up and forwarded to Linus at any time, even outside the merge window. (According to Documentation/process/stable-kernel-rules.rst, patches which "just add a device ID" are eligible for stable and should thus be fair game for fixes pulls.)

Thank you!

Lukas Wunner (4):
dt-bindings: tpm: Add compatible string atmel,attpm20p
tpm_tis_spi: Add compatible string atmel,attpm20p
tpm_tis: Add compatible string atmel,at97sc3204
tpm: tis_i2c: Add compatible string nuvoton,npct75x

 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml | 1 +
 drivers/char/tpm/tpm_tis.c                                 | 1 +
 drivers/char/tpm/tpm_tis_i2c.c                             | 2 ++
 drivers/char/tpm/tpm_tis_spi_main.c                        | 1 +
 4 files changed, 5 insertions(+)
Signature · 1 line
2.40.1
#1 lore raw

PATCH v2 1/4 dt-bindings: tpm: Add compatible string atmel,attpm20p

Commit 4f2a348aa365 ("arm64: dts: imx8mm-venice-gw73xx: add TPM device") added a devicetree node for the Trusted Platform Module on certain Gateworks boards.

The commit only used the generic "tcg,tpm_tis-spi" compatible string, but public documentation shows that the chip is an ATTPM20P from Atmel (nowadays Microchip):
https://trac.gateworks.com/wiki/tpm

Add the chip to the supported compatible strings of the TPM TIS SPI schema.

For reference, a datasheet is available at:
https://ww1.microchip.com/downloads/en/DeviceDoc/ATTPM20P-Trusted-Platform-Module-TPM-2.0-SPI-Interface-Summary-Data-Sheet-DS40002082A.pdf

---
 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml +1 -0
index c3413b4..6cb2de7 100644
@@ -20,6 +20,7 @@ properties:
   compatible:
     items:
       - enum:
+          - atmel,attpm20p
           - infineon,slb9670
           - st,st33htpm-spi
           - st,st33zp24-spi
Signature · 1 line
2.40.1
maintainer
#2 lore raw

Re: [PATCH v2 1/4] dt-bindings: tpm: Add compatible string atmel,attpm20p

Quoted 27 lines · Lukas Wunner

Commit 4f2a348aa365 ("arm64: dts: imx8mm-venice-gw73xx: add TPM device") added a devicetree node for the Trusted Platform Module on certain Gateworks boards.

The commit only used the generic "tcg,tpm_tis-spi" compatible string, but public documentation shows that the chip is an ATTPM20P from Atmel (nowadays Microchip):
https://trac.gateworks.com/wiki/tpm

Add the chip to the supported compatible strings of the TPM TIS SPI schema.

For reference, a datasheet is available at:
https://ww1.microchip.com/downloads/en/DeviceDoc/ATTPM20P-Trusted-Platform-Module-TPM-2.0-SPI-Interface-Summary-Data-Sheet-DS40002082A.pdf

---
 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml +0 -0
index c3413b4..6cb2de7 100644

Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml properties: · line 26

Quoted 7 lines
Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml +1 -0
@@ -20,6 +20,7 @@ properties:
   compatible:
     items:
       - enum:
+          - atmel,attpm20p
           - infineon,slb9670
           - st,st33htpm-spi
           - st,st33zp24-spi

You should to send the patch set with Rob Herring as CC for syncing up. Please do it for future versions, if there is need for additional versions.

Rob, 3 out of 4 patches are TPM patches. Do you mind if I take all four patches once the patch set is ready or do you want to pick this patch (assuming that you think it is correctly implemented ofc)?

BR, Jarkko

maintainer
#3 lore raw

Re: [PATCH v2 1/4] dt-bindings: tpm: Add compatible string atmel,attpm20p

Quoted 23 lines · Jarkko Sakkinen
Quoted 22 lines · Lukas Wunner

Commit 4f2a348aa365 ("arm64: dts: imx8mm-venice-gw73xx: add TPM device") added a devicetree node for the Trusted Platform Module on certain Gateworks boards.

The commit only used the generic "tcg,tpm_tis-spi" compatible string, but public documentation shows that the chip is an ATTPM20P from Atmel (nowadays Microchip):
https://trac.gateworks.com/wiki/tpm

Add the chip to the supported compatible strings of the TPM TIS SPI schema.

For reference, a datasheet is available at:
https://ww1.microchip.com/downloads/en/DeviceDoc/ATTPM20P-Trusted-Platform-Module-TPM-2.0-SPI-Interface-Summary-Data-Sheet-DS40002082A.pdf

---
 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines

Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml properties: · line 26

Quoted 12 lines
Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml +1 -0
index c3413b4..6cb2de7 100644
@@ -20,6 +20,7 @@ properties:
   compatible:
     items:
       - enum:
+          - atmel,attpm20p
           - infineon,slb9670
           - st,st33htpm-spi
           - st,st33zp24-spi

You should to send the patch set with Rob Herring as CC for syncing up. Please do it for future versions, if there is need for additional versions.

More specifically, use what get_maintainers.pl outputs.

I don't actually care if I'm Cc'ed because I'm just Cc'ed on everything to the DT list.

Quoted 3 lines

Rob, 3 out of 4 patches are TPM patches. Do you mind if I take all four patches once the patch set is ready or do you want to pick this patch (assuming that you think it is correctly implemented ofc)?

You can take it.

Rob

maintainer Acked-by on v2 1/4
#4 lore raw

Re: [PATCH v2 1/4] dt-bindings: tpm: Add compatible string atmel,attpm20p

In reply to Lukas Wunner
Quoted 15 lines · Lukas Wunner

Commit 4f2a348aa365 ("arm64: dts: imx8mm-venice-gw73xx: add TPM device") added a devicetree node for the Trusted Platform Module on certain Gateworks boards.

The commit only used the generic "tcg,tpm_tis-spi" compatible string, but public documentation shows that the chip is an ATTPM20P from Atmel (nowadays Microchip):
https://trac.gateworks.com/wiki/tpm

Add the chip to the supported compatible strings of the TPM TIS SPI schema.

For reference, a datasheet is available at:
https://ww1.microchip.com/downloads/en/DeviceDoc/ATTPM20P-Trusted-Platform-Module-TPM-2.0-SPI-Interface-Summary-Data-Sheet-DS40002082A.pdf

Quoted 7 lines
---
 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml | 1 +
 1 file changed, 1 insertion(+)
#5 lore raw

PATCH v2 2/4 tpm_tis_spi: Add compatible string atmel,attpm20p

In reply to Lukas Wunner

Commit 4f2a348aa365 ("arm64: dts: imx8mm-venice-gw73xx: add TPM device") added a devicetree node for the Trusted Platform Module on certain Gateworks boards.

The commit only used the generic "tcg,tpm_tis-spi" compatible string, but public documentation shows that the chip is an ATTPM20P from Atmel (nowadays Microchip):
https://trac.gateworks.com/wiki/tpm

Add the chip to the supported compatible strings of the TPM TIS SPI driver.

For reference, a datasheet is available at:
https://ww1.microchip.com/downloads/en/DeviceDoc/ATTPM20P-Trusted-Platform-Module-TPM-2.0-SPI-Interface-Summary-Data-Sheet-DS40002082A.pdf

---
 drivers/char/tpm/tpm_tis_spi_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_tis_spi_main.c +1 -0
index c5c3197..7d376a6 100644
@@ -327,6 +327,7 @@ static void tpm_tis_spi_remove(struct spi_device *dev)
 MODULE_DEVICE_TABLE(spi, tpm_tis_spi_id);
 
 static const struct of_device_id of_tis_spi_match[] __maybe_unused = {
+	{ .compatible = "atmel,attpm20p", .data = tpm_tis_spi_probe },
 	{ .compatible = "st,st33htpm-spi", .data = tpm_tis_spi_probe },
 	{ .compatible = "infineon,slb9670", .data = tpm_tis_spi_probe },
 	{ .compatible = "tcg,tpm_tis-spi", .data = tpm_tis_spi_probe },
Signature · 1 line
2.40.1
#6 lore raw

PATCH v2 3/4 tpm_tis: Add compatible string atmel,at97sc3204

In reply to Lukas Wunner

Commit 420d439849ca ("tpm_tis: Allow tpm_tis to be bound using DT") added the fallback compatible "tcg,tpm-tis-mmio" to the TPM TIS driver, but not the chip-specific "atmel,at97sc3204". However it did document it as a valid compatible string.

Add it to tis_of_platform_match[] for consistency.

Cc Jason Gunthorpe <[email protected]>
---
 drivers/char/tpm/tpm_tis.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_tis.c +1 -0
index 2c52b79..14652aa 100644
@@ -347,6 +347,7 @@ static void tpm_tis_plat_remove(struct platform_device *pdev)
 
 #ifdef CONFIG_OF
 static const struct of_device_id tis_of_platform_match[] = {
+	{.compatible = "atmel,at97sc3204"},
 	{.compatible = "tcg,tpm-tis-mmio"},
 	{},
 };
Signature · 1 line
2.40.1
maintainer Reviewed-by on v2 3/4
#7 lore raw

Re: [PATCH v2 3/4] tpm_tis: Add compatible string atmel,at97sc3204

Quoted 18 lines · Lukas Wunner

Commit 420d439849ca ("tpm_tis: Allow tpm_tis to be bound using DT") added the fallback compatible "tcg,tpm-tis-mmio" to the TPM TIS driver, but not the chip-specific "atmel,at97sc3204". However it did document it as a valid compatible string.

Add it to tis_of_platform_match[] for consistency.

Cc Jason Gunthorpe <[email protected]>
---
 drivers/char/tpm/tpm_tis.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_tis.c +0 -0
index 2c52b79..14652aa 100644

drivers/char/tpm/tpm_tis.c static void tpm_tis_plat_remove(struct platform_device *pdev) · line 353

Quoted 7 lines
drivers/char/tpm/tpm_tis.c +1 -0
@@ -347,6 +347,7 @@ static void tpm_tis_plat_remove(struct platform_device *pdev)
 
 #ifdef CONFIG_OF
 static const struct of_device_id tis_of_platform_match[] = {
+	{.compatible = "atmel,at97sc3204"},
 	{.compatible = "tcg,tpm-tis-mmio"},
 	{},
 };

BR, Jarkko

#8 lore raw

PATCH v2 4/4 tpm: tis_i2c: Add compatible string nuvoton,npct75x

In reply to Lukas Wunner

Add "nuvoton,npct75x" as well as the fallback compatible string "tcg,tpm-tis-i2c" to the TPM TIS I²C driver. They're used by:

arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts

And by all accounts, NPCT75x is supported by the driver:

https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/

---
 drivers/char/tpm/tpm_tis_i2c.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/tpm/tpm_tis_i2c.c +2 -0
index a897402..9511c0d 100644
@@ -383,6 +383,8 @@ static void tpm_tis_i2c_remove(struct i2c_client *client)
 #ifdef CONFIG_OF
 static const struct of_device_id of_tis_i2c_match[] = {
 	{ .compatible = "infineon,slb9673", },
+	{ .compatible = "nuvoton,npct75x", },
+	{ .compatible = "tcg,tpm-tis-i2c", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
Signature · 1 line
2.40.1
maintainer Reviewed-by on v2 4/4
#9 lore raw

Re: [PATCH v2 4/4] tpm: tis_i2c: Add compatible string nuvoton,npct75x

Quoted 21 lines · Lukas Wunner

Add "nuvoton,npct75x" as well as the fallback compatible string "tcg,tpm-tis-i2c" to the TPM TIS I²C driver. They're used by:

arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts

And by all accounts, NPCT75x is supported by the driver:

https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/

---
 drivers/char/tpm/tpm_tis_i2c.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/tpm/tpm_tis_i2c.c +0 -0
index a897402..9511c0d 100644

drivers/char/tpm/tpm_tis_i2c.c static void tpm_tis_i2c_remove(struct i2c_client *client) · line 390

Quoted 8 lines
drivers/char/tpm/tpm_tis_i2c.c +2 -0
@@ -383,6 +383,8 @@ static void tpm_tis_i2c_remove(struct i2c_client *client)
 #ifdef CONFIG_OF
 static const struct of_device_id of_tis_i2c_match[] = {
 	{ .compatible = "infineon,slb9673", },
+	{ .compatible = "nuvoton,npct75x", },
+	{ .compatible = "tcg,tpm-tis-i2c", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, of_tis_i2c_match);

BR, Jarkko

maintainer
#11 lore raw
Quoted 5 lines · Lukas Wunner

Dear Jarkko,

since v6.8-rc6 is approaching and the end of this cycle is thus in sight, please do not forget to merge this series:

Quoted 8 lines

https://lore.kernel.org/all/[email protected]/

All 4 patches have a Reviewed-by from you and patch 1 has an Acked-by from Rob.

Thanks,

Lukas

Thanks for reminding!

Since this patch set only has DT changes and zero actual TPM driver changes, I think it would be better if Rob picked this.

Rob, what you think?

I'm good either way but need to check.

BR, Jarkko

maintainer
#12 lore raw
Quoted 15 lines · Jarkko Sakkinen
Quoted 5 lines · Lukas Wunner

Dear Jarkko,

since v6.8-rc6 is approaching and the end of this cycle is thus in sight, please do not forget to merge this series:

Quoted 8 lines

https://lore.kernel.org/all/[email protected]/

All 4 patches have a Reviewed-by from you and patch 1 has an Acked-by from Rob.

Thanks,

Lukas

Quoted 8 lines

Thanks for reminding!

Since this patch set only has DT changes and zero actual TPM driver changes, I think it would be better if Rob picked this.

Rob, what you think?

I'm good either way but need to check.

Ah, sorry I was looking at wrong lore link (had multiple tabs open).

I will definitely pick this despite one DT patch. Rob, please ignore.

Sorry for causing confusion.

BR, Jarkko

maintainer
#13 lore raw
Quoted 23 lines · Jarkko Sakkinen
Quoted 22 lines · Jarkko Sakkinen
Quoted 5 lines · Lukas Wunner

Dear Jarkko,

since v6.8-rc6 is approaching and the end of this cycle is thus in sight, please do not forget to merge this series:

Quoted 8 lines

https://lore.kernel.org/all/[email protected]/

All 4 patches have a Reviewed-by from you and patch 1 has an Acked-by from Rob.

Thanks,

Lukas

Thanks for reminding!

Since this patch set only has DT changes and zero actual TPM driver changes, I think it would be better if Rob picked this.

Rob, what you think?

Quoted 7 lines
Quoted 1 line

I'm good either way but need to check.

Ah, sorry I was looking at wrong lore link (had multiple tabs open).

I will definitely pick this despite one DT patch. Rob, please ignore.

Sorry for causing confusion.

OK, should be good now:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/?h=next

BR, Jarkko