Hello,
I am trying to get a SLB9670 SPI based TPM working with a Jetson Orin Nano on a custom carrier board. The TPM is mostly functional, but I am having some troubles configuring the interrupt correctly.
I am seeing the following error message in the kernel logs when probing the device:
[ 627.473792] tpm_tis_spi spi1.0: 2.0 TPM (device-id 0x1D, rev-id 54)
[ 627.480711] tpm tpm1: [Firmware Bug]: TPM interrupt not working, polling instead
Below is a condensed version of my device-tree configuration:
/ {
bus@0 {
pinmux@2430000 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&tpm_pinmux>;
tpm_pinmux: tpm {
// GPIO14 <- TPM_PIRQ_N
gpio14-slb9670-irq {
nvidia,pins = "gp_pwm3_px3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
// SPI1_MOSI
spi1-mosi {
nvidia,pins = "spi3_mosi_py2";
nvidia,function = "spi3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
// SPI1_MISO
spi1-miso {
nvidia,pins = "spi3_miso_py1";
nvidia,function = "spi3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
// SPI1_CS0
spi1-cs0-slb9670 {
nvidia,pins = "spi3_cs0_py3";
nvidia,function = "gp";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
// SPI1_CLK
spi1-sclk {
nvidia,pins = "spi3_sck_py0";
nvidia,function = "spi3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
};
};
pinmux@c300000 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&tpm_pinmux_aon>;
tpm_pinmux_aon: tpm-aon {
// GPIO05 -> TPM_PP
gpio05-slb9670-present {
nvidia,pins = "spi2_mosi_pcc2";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
// GPIO_06 -> TPM_RST_N
gpio06-slb9670-nreset {
nvidia,pins = "spi2_cs0_pcc3";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
};
};
spi@3230000 {
status = "okay";
cs-gpios = <&gpio TEGRA234_MAIN_GPIO(Y, 3) GPIO_ACTIVE_LOW>;
num-cs = <1>;
/delete-node/ spi@0;
// TPM: SPI1_CS0
tpm_slb9670: slb9670@0 {
compatible = "infineon,slb9670";
status = "okay";
reg = <0>;
spi-max-frequency = <32000000>;
reset-gpios = <&gpio TEGRA234_AON_GPIO(CC, 3) GPIO_ACTIVE_LOW>;
interrupts = <TEGRA234_MAIN_GPIO(X, 3) IRQ_TYPE_EDGE_FALLING>; // GPIO14
interrupt-parent = <&gpio>;
};
};
};
};
The PIRQ signal from the TPM is connected to GPIO14 on the Jetson (gp_pwm_px3 on the SoC)
There is also 10k external pullup on the PIRQ signal from the TPM.
I’ve put a logic analyzer on the interrupt line near the TPM previously, and I do see the TPM toggling the interrupt line.
Any help would be greatly appreciated. Thanks!