Hello,
We are interfacing TPM2.0 SLB9670 with the IMX8M processor using SPI communication as shown in below schematic.
We have made the following ECSPI2 configurations for SPI communication in the device tree file and its working as we are able to see spidev1.0 when we use ls -l /dev/spidev* command in linux terminal of imx8m.
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
fsl,spi-num-chipselects = <1>;
cs-gpios = GP_ECSPI2_CS0;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
compatible = "spidev";
spi-max-frequency = <2000000>;
reg = <0>;
};
};
Similarly we have made the following ECSPI2 configurations for TPM SLB9670 chip in the device tree file but we are not able to see TPM being detected when we use ls -l /dev/tpm* command in linux terminal of imx8m.
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
fsl,spi-num-chipselects = <1>;
cs-gpios = GP_ECSPI2_CS0;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
tpm0: slb9670@0 {
};
};
Please suggest us some steps to make the TPM chip SLB9670 to detect in IMX8M processor
Yes its already present in imx8m processor
Hello @Jeevan ,
We faced a problem quite similar some months ago. It turns out that the SPI kernel driver doesn't work as expected. The problem is that the iMX8 SPI HW module pulls up the CS signal as soon as no data remains in the output buffer and this, puts the slave ( SLB9670 ) in a non selected mode, thus no communication is possible.
We solved the problem changing the CS signal used by the driver
Change your dts from this:
pinctrl-0 = <&pinctrl_ecspi2>;
cs-gpios = GP_ECSPI2_CS0;
to this:
Is there a driver for SLB9670 in the kernel? Do you select it in the menuconfig?
Yes there is, it is named "tpm_tis_spi".
You have to both select it in menuconfig and also place the device in the dtb.
BR