As of this morning, we’ve managed to get the TPM working with TorizonCore 6.3. When I had shifted from using 5.7, I had to reconfigure how the device tree paths were referenced and found no SPI activity at all. It turns out that I had introduced a subtle change and a disconnection between the compatibility string st,st33htpm
and the driver that needed to be loaded tpm_tis_spi
. I was able to enable the TPM with the following overlay:
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,colibri-imx8x";
};
&lpspi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
tpm@0 {
compatible = "tcg,tpm_tis_spi";
reg = <0>;
spi-max-frequency = <10000000>;
status = "okay";
};
};
In my previous version of the overlay, the compatibility string read:
compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
My belief is that SPI transactions weren’t properly waking the TPM with the 5.4 kernel, although I don’t have details as to the differences between kernel versions or the protocol differences that required a change. In any case, this has been solved with the combination of upgrading to TorizonCore 6 and ensuring that the compatibility string references the tpm_tis_spi
driver.