Hello
I am posting this post because I read similar threads on the forum and unfortunately they did not help me solve the problem (
I have a problem to communicate TPM SLB9670 with AM6442-SK over SPI protocol.
The problem is that although the TPM device is connected to the board, initialization of device fails. The tpm_tis_core_init () function returns the code -110 (ETIMEDOUT) or -19 (ENODEV). The result returned by this function depends on whether the MISO line to TPM is connected. If MISO is connected function returns -110, if not - then -19.
I also connected the oscilloscope probes to the appropriate pins. The waveform below indicates that a configuration message is being sent to the TPM. What's more interesting, if I connect the oscilloscope probe to the MISO pin, the tpm_tis_core_init () function returns -110, and if I do not connect the probe, it returns -19. This is a very strange behavior and it was detected on two same AM6442 boards.
Below is kernel configuration and k3-am642-sk device-tree overlay:
CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_TCG_TPM=y CONFIG_TCG_TIS_SPI=y CONFIG_TCG_INFINEON=y CONFIG_TCG_CRB=y CONFIG_TCG_TIS=y CONFIG_TCG_TIS_CORE=y CONFIG_TCG_TIS_I2C_ATMEL=n CONFIG_TCG_TIS_I2C_INFINEON=n CONFIG_TCG_TIS_I2C_NUVOTON=n ========================================================= /dts-v1/; /plugin/; #include "dt-bindings/pinctrl/k3.h" / { compatible = "ti,am642-sk", "ti,am642", "ti,am642-evm"; fragment@0 { target = <&main_pmx0>; __overlay__ { 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(0x020C, PIN_OUTPUT, 0) /* (C13) SPI0_CS1 */ AM64X_IOPAD(0x0214, PIN_OUTPUT, 0) /* (A13) SPI0_D0 */ AM64X_IOPAD(0x0218, PIN_INPUT, 0) /* (A14) SPI0_D1 */ >; }; }; }; fragment@1 { target = <&main_spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&main_spi0_pins_default>; ti,pindir-d0-out-d1-in = <1>; ti,spi-num-cs = <1>; slb9670: slb9670@0 { compatible = "infineon,slb9670"; reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <100000>; status = "okay"; }; }; }; };
I am using Yocto to build the image. I patched the tpm and spi driver to add some traces to have more verbose output. bellow screens:
How to resolve this problem?
Thanks,
Jakub