嗨,我已经将 TPM 2.0 Iridium SLB 9670 与连接到 ECSP1 的 imx8mp 处理器集成在一起,以使用 IMA Linux 内核模块实现远程认证。有时我会得到一个奇怪的错误,我在任何地方都找不到,所以我想了解一下设备树是否正确或者是配置错误。然而,在其他一些情况下,它甚至无法建立初始连接('2.0 TPM(设备 ID 0x1B,rev-id 22')并且一些调试显示 tpm spi 驱动程序陷入无限循环等待对于 TPM 位置。dmesg
| grep -i tpm 的输出
[2.077539]tpm_tis_spi spi1.0:2.0 TPM(设备 ID 0x1B,rev-id 22)
[2.088911]tpm tpm0:尝试自检时发生 TPM 错误 (256)
[2.095719]tpm tpm0:手动启动TPM
[12.489312]tpm tpm0:tpm_try_transmit:发送():错误-5
[38.235405]tpm tpm0:tpm_transmit:tpm_recv:错误-52
[38.284794]tpm tpm0:无效的TPM_STS.x 0x85,为取证转储堆栈
[38.284861]tpm_tis_status+0xc8/0xe4
[38.284869]wait_for_tpm_stat+0x54/0x224
[38.284878]tpm_tis_send_data+0x220/0x28c
[38.284886]tpm_tis_send_main+0x34/0x110
[38.284893]tpm_tis_send+0x44/0x110
[38.284901]tpm_transmit+0xc8/0x340
[38.284908]tpm_transmit_cmd+0x30/0xc0
[38.284914]tpm2_pcr_extend+0x25c/0x300
[38.284921]tpm_pcr_extend+0xc4/0xd4
我的设备树是通过以下各种线程获得的 :
&ecspi1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>, <&pinctrl_spi1_ss0>;
cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
状态=“好的”;
tpm0: slb9670@0 {
compatible = "infineon,slb9670";
注册 = <0>;
spi-max-频率 = <32000000>;
状态=“好的”;
};
};
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK 0x1916
MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI 0x116
MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO 0x116
>;
};
pinctrl_spi1_ss0: spi1_ss0 {
fsl,pins = <
MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x116
>;
};