Hi all,
I’m trying to enable Infineon SLB9670 TPM2 evaluation module (IRIDIUM9670 TPM2.0 LINUX - Infineon Technologies). I’m using L4T R32.4.3. Jetson Nano Production module + B01 carrier board.
The 40pins GPIO header on Nano is compatible with Pi3/4, so I plug the SLB9670 module into pins 1 → 26 of 40pins GPIO header.
I updated the device tree pinmux and gpio, to use SPI1 (pins 19->26) as below:
spi1_mosi_pc0 {
nvidia,pins = "spi1_mosi_pc0";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
spi1_miso_pc1 {
nvidia,pins = "spi1_miso_pc1";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
spi1_sck_pc2 {
nvidia,pins = "spi1_sck_pc2";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
spi1_cs0_pc3 {
nvidia,pins = "spi1_cs0_pc3";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
spi1_cs1_pc4 {
nvidia,pins = "spi1_cs1_pc4";
nvidia,function = "spi1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
The slb9670 node was added into spi0 tree:
spi@7000d400 {
status = “okay”;
slb9670: slb9670@0{
compatible = "infineon,slb9670";
reg = <0>;
spi-max-frequency = <32000000>;
status = "okay";
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <7>;
};
};
};
Then I enabled TPM in kernel:
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS_SPI=y
But TPM is failed to probe. I added some debug printing into tpm_tis_spi.c and tpm_tis_core.c, and it prints out:
root@jetson-nano:~# dmesg | grep -i spi
[ 0.452947] iommu: Adding device 7000d400.spi to group 7
[ 0.453285] iommu: Adding device 7000d600.spi to group 8
[ 5.096867] LLL tpm_tis_spi_probe():
[ 5.096871] LLL tpm_tis_spi_probe(): irq -1
[ 5.096890] LLL tpm_tis_spi_transfer(): addr 0 len 1
[ 5.183053] LLL tpm_tis_spi_transfer(): timeout
[ 5.187614] LLL tpm_tis_spi_transfer(): ok ret -110
[ 5.280585] LLL tpm_tis_spi_transfer(): addr 8 len 4
[ 5.297818] LLL tpm_tis_spi_transfer(): timeout
[ 5.322813] LLL tpm_tis_spi_transfer(): ok ret -110
[ 5.322816] LLL tpm_tis_spi_transfer(): addr 8 len 4
[ 5.352542] LLL tpm_tis_spi_transfer(): timeout
[ 5.352545] LLL tpm_tis_spi_transfer(): ok ret -110
[ 5.352548] LLL tpm_tis_spi_transfer(): addr 0 len 1
[ 5.354176] LLL tpm_tis_spi_transfer(): timeout
[ 5.354178] LLL tpm_tis_spi_transfer(): ok ret -110
[ 5.354181] LLL tpm_tis_spi_probe(): ret -19
So, it looks like the communication with SLB9670 modules was failed here: linux-tegra-4.9/tpm_tis_spi.c at oe4t-patches-l4t-r32.4 · OE4T/linux-tegra-4.9 · GitHub
Interrupt count of SPIs
root@jetson-jano:~# cat /proc/interrupts | grep spi
66: 204 0 0 0 LIC 59 Level 7000d400.spi
67: 0 0 0 0 LIC 82 Level 7000d600.spi
Does anyone have had the same problem or any idea to troubleshoot/solve this? Thank you.