This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM64X: AM64X TPM slb9670

Part Number: PROCESSOR-SDK-AM64X
Other Parts Discussed in Thread: AM3352

Hi,

We want to include the spi TPM v2.0 device from Infineon (slb9670) in our yocto build.

We've patched the kernel config:

+CONFIG_HW_RANDOM_TIMERIOMEM=y
+CONFIG_HW_RANDOM_TPM=y
+CONFIG_TCG_TPM=y
+CONFIG_TCG_TIS_CORE=y
+CONFIG_TCG_TIS_SPI=y
+# CONFIG_SECURITYFS is not set
+CONFIG_TCG_TIS=y
+CONFIG_TCG_TIS_I2C_ATMEL=n
+CONFIG_TCG_TIS_I2C_INFINEON=n
+CONFIG_TCG_TIS_I2C_NUVOTON=n
+CONFIG_TCG_ATMEL=n
+CONFIG_TCG_VTPM_PROXY=n
+CONFIG_TCG_TIS_ST33ZP24_I2C=n
+CONFIG_TCG_TIS_ST33ZP24_SPI=y
+CONFIG_TRUSTED_KEYS=y

Patched the device tree:

--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index c797f5a..7cb673a 100644
@@ -339,6 +339,7 @@
         pinctrl-single,pins = <
             AM64X_IOPAD(0x0210, PIN_INPUT, 0) /* (D13) SPI0_CLK */
             AM64X_IOPAD(0x0208, PIN_OUTPUT, 0) /* (D12) SPI0_CS0 */
+            AM64X_IOPAD(0x020c, PIN_OUTPUT, 0) /* (C6) SPI0_CS1 */
             AM64X_IOPAD(0x0214, PIN_OUTPUT, 0) /* (A13) SPI0_D0 */
             AM64X_IOPAD(0x0218, PIN_INPUT, 0) /* (A14) SPI0_D1 */
         >;
@@ -567,6 +568,11 @@
         spi-cs-high;
         data-size = <16>;
     };
+    tpm_slb9670@1{
+        compatible = "infineon, slb9670";
+        reg = <1>;
+        spi-max-frequency = <24000000>;
+    };
 };

The CS from the TPM Module is connected to SOC_SPI1_CS1.

The device can be found here:

root@am64xx-evm:~# ls -l /sys/bus/spi/devices/spi1.1/
total 0
-rw-r--r--    1 root     root         65536 Aug  4 15:19 driver_override
-r--r--r--    1 root     root         65536 Aug  4 15:19 modalias
lrwxrwxrwx    1 root     root             0 Aug  4 15:19 of_node -> ../../../../../../../firmware/devicetree/base/bus@f4000/spi@20100000/tpm_slb9670@1
drwxr-xr-x    2 root     root             0 Aug  4 15:19 power
drwxr-xr-x    2 root     root             0 Aug  4 15:19 statistics
lrwxrwxrwx    1 root     root             0 Aug  4 15:10 subsystem -> ../../../../../../../bus/spi
-rw-r--r--    1 root     root         65536 Aug  4 15:10 uevent

But not under /dev/tpm*

Could you please help us to find what is wrong?

Regards,
Jonas

  • Hey Jonas,

    Thank you for your question, my name is Andrew and I would be happy to assist with this.  I have relayed your question to the team and hope to have a response for you within the next 1-2 business days.  While I look into this, has there been any updates/developments to this problem on your end that we should take into consideration?

    Best regards,

    Andrew

  • Hi Andrew,

    Thank you.
    I soldered off the 93lc46b EEPROM and replaced it with the infineon,slb9670.
    Unfortunately still nothing to be found under /dev/tpm*

    Device Tree looks like the following now:

        main_spi0_pins_default: main-spi0-pins-default {
            pinctrl-single,pins = <
                AM64X_IOPAD(0x0210, PIN_INPUT, 0) /* (D13) SPI0_CLK */
                AM64X_IOPAD(0x0208, PIN_OUTPUT, 0) /* (D12) SPI0_CS0 */
                AM64X_IOPAD(0x0214, PIN_OUTPUT, 0) /* (A13) SPI0_D0 */
                AM64X_IOPAD(0x0218, PIN_INPUT, 0) /* (A14) SPI0_D1 */
            >;
        };


    &main_spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&main_spi0_pins_default>;
        ti,pindir-d0-out-d1-in = <1>;
        ti,spi-num-cs = <1>;
        tpm_slb9670@0{
            /compatible = "infineon,slb9670";
            reg = <0>;
            spi-max-frequency = <1000000>;
        };
    };

    Regards,

    Jonas

  • Hey Jonas,

    The first response from the team was to double check all of your connections, but of course it seems that you have already done that.  Do you have any way of independently verifying the functionality of the external TPM device itself in this case? Would like to make sure there are no internal device faults that could be interfering with the integration.

    Upon further investigation, I found this E2E thread that debugs a similar error with this TPM device (SLB9670): https://e2e.ti.com/support/processors-group/processors/f/processors-forum/932918/am3352-u-boot-use-tpm2-0-via-spi1.  Although the host device is an AM3352 in this case, I believe the answers posted could still be applicable here.  Could you review this thread and let me know if this provides any clarity?

    Best regards,

    Andrew