Hi,
I modprobe TPM driver: tpm_tis_spi.
but get the error message:
and I modified the device tree file ls1043a-rdb.dts for dspi as following:
......
&dspi0 {
bus-num = <1>;
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "n25q128a13", "jedec,spi-nor"; // 16MB /
reg = <0>;
spi-max-frequency = <1000000>; // input clock /
};
tcg@1 {
compatible = "tcg,tpm_tis-spi";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
pinctrl-names = "default";
};
...
Please help.
Thanks,
Randy
Do you use the following in LSDK 18.09 kernel menu for TPM enabling:
Device Drivers --->
Character devices --->
<*> TPM Hardware Support --->
TPM Interface Specification 1.3 Interface / TPM 2.0 FIFO Interface - (SPI)
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Pavel,
Thanks for your reply.
Yes, I have set the TPM enabled in LSDK1803 kernel menu.
As the dmesg shows, and I had traced the tpm_tis_spi driver code.
found that I cannot get the response as TPM_ACCESS_VALID(0x80) form TPM.
I just got 0x00 response, and got 0xff response when the TPM unplugged.
Should I do any settings about the dspi/spi ?
Thanks.
Randy
I have solve this issue.
And port the Infineon TPM on LS1043 successfully.
the key points is:
TPM SPI driver encapsulates the first 4 bytes as a single message, and try to read status byte from another message, so it try to keep CS as assertion by setting cs_change to 1.
However, the NXP SPI driver will not set its dspi->cs_change value according the cs_change of transfer object passed by TPM SPI driver
Thanks.