cancel
Showing results for 
Search instead for 
Did you mean: 

Linux driver for TPM ST33TPHF2ESPI

GChen.3
Associate

Hello

I'm following the instruction of https://www.st.com/resource/en/data_brief/stpm4raspi.pdf to setup the tpm driver on my embedded linux using ST33TPHF2ESPI tpm module. But unable get /dev/tpm0 and /dev/tpmrm0 present due to driver read spi failed.

[   2.245477] device: 'spi1.0': device_add

[   2.245488] bus: 'spi': add device spi1.0

[   2.245563] PM: Adding info for spi:spi1.0

[  98.631758] bus: 'spi': driver_probe_device: matched device spi1.0 with driver tpm_tis_spi

[  98.631770] bus: 'spi': really_probe: probing driver tpm_tis_spi with device spi1.0

[  98.631799] tpm_tis_spi spi1.0: no pinctrl handle

[  98.634842] tpm_tis_spi: probe of spi1.0 rejects match -19

Check the logic analyzer, the driver code cannot handle wait state of tpm on my platform (tpm_tis_spi.c).

0693W000001rsgzQAA.png

I also replace tpm driver to spidev driver and run the spidev_test (https://github.com/rm-hull/spidev-test/blob/master/spidev_test.c) tool under linux.

The result shows I need send out more byte to get correct respond on my platform, is that the correct behavior? 

If this is correct behavior, any suggestion about tpm driver cannot access spi well?

0693W000001rsh4QAA.png

thanks,

Gilbert

1 REPLY 1
Zyep.1
Associate

Hi! What's your development borad?