Enable TPM infineon

Hi ,

i follow the topic:

without success.
Why the pinmux on the topic 266719 is not this:
devmem2 0x0243d028 w 0x00000444
devmem2 0x0243d018 w 0x00000444
devmem2 0x0243d040 w 0x00000444
devmem2 0x0243d008 w 0x00000008
devmem2 0x0243d038 w 0x00000448

to enable SPI1 ? Furthermore i’ll set this on runtime and then load the follow module :
tpm_tis_spi tpm_tis_core tpm_tis but the driver replies with:

tpm_tis_spi: probe of spi0.0 failed with error -110.

thanks
Best regards
VP

Hi vpellino,

Are you working on IGX developer kit or board kit?

Please share the full dmesg/device tree and also the result of the following command on your board.

$ ls -l /dev/spi*
$ cat /proc/device-tree/bus@0/spi@3210000/status 
$ zcat /proc/config.gz |grep -E "CONFIG_TCG_TIS_CORE|CONFIG_TCG_TIS_SPI"

Hi Kevin,

thanks for reply.

cat /proc/device-tree/bus@0/spi@3210000/status 
okay

for spi device i see in the kernel log :
[ 3.153719] spi-tegra114 3210000.spi: Adding to iommu group 1

ls -l /dev/spi*
ls: cannot access ‘/dev/spi*’: No such file or directory

in my configuration there isn’t the file /proc/config.gz but i already compile the features with modules mode for debugging, so i have the tpm_tis_spi.ko, tpm_tis.ko and tpm_tis_core.ko kernel modules.

Thanks
VP

So, are you using IGX developer kit or board kit?

Please try to run the following command instead.

$ grep CONFIG_TCG_TIS /boot/config-$(uname -r)

Do you also update the device tree?

Hi Kevin,

CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_TIS_SPI=m
CONFIG_TCG_TIS_SPI_CR50=y
CONFIG_TCG_TIS_SYNQUACER=m
CONFIG_TCG_TIS_I2C_CR50=m
CONFIG_TCG_TIS_I2C_ATMEL=m
CONFIG_TCG_TIS_I2C_INFINEON=m
CONFIG_TCG_TIS_I2C_NUVOTON=m
CONFIG_TCG_TIS_ST33ZP24=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
CONFIG_TCG_TIS_ST33ZP24_SPI=m

Yes i have update the device tree but i have a question about reset pin :

reset-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(A, 2) GPIO_ACTIVE_LOW>;

i checked on tpm pins strip configured with gpio mode the A,2 but is not connected on pin strip. Is it a problem?

PA.02

echo 350 > export
devmem2 0x02432030 w 1
echo out > PA.02/direction
echo 1 > PA.02/value
echo 0> PA.02/value

after this i didn’t see the gpio movementi on the j43 connector.

Thanks.
VP

We just checked the schematic that we use SYS_RESET_N as the reset gpio for TPM so that TPM should get reset during boot up.

I want to confirm that if you haveTPM module on the IGX devkit.
(i.e. do you connect TPM module on the J43?)

Hi Kevin,

so the device-tree configuration for TPM is:

spi@3210000 {
		status = "okay";
// I think the first chip select is based on @0 in the device name
//		cs-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 6) GPIO_ACTIVE_LOW>;
		sbl9670@0 {
			compatible = "infineon,slb9670";
			reg = <0x0>;
			spi-max-frequency = <32000000>;
			controller-data {
				nvidia,variable-length-transfer;
				nvidia,rx-clk-tap-delay = <0x31>;
			};
		};
	};

Yes i have TPM module ( Gigabyte TPM GC-TPM2.0 SPI 2.0 ) on J43.

Thank You
VP

So, it seems the different model as slb9670…

Please request your vendor for the porting guide for this module.

Hi kevin,

the module is this: https://www.gigabyte.com/Motherboard/GC-TPM20-SPI-20#ov

it is slb9670 infineon chip.

VP

You may still need to configure CS gpio here.

Plea try if the following device tree working in your case.

	spi@3210000 {
		status = "okay";
		cs-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 6) GPIO_ACTIVE_LOW>;
		sbl9670@0 {
			compatible = "infineon,slb9670";
			spi-max-frequency = <0x1e84800>;
			reg = <0x1>;

			controller-data {
				nvidia,variable-length-transfer;
				nvidia,rx-clk-tap-delay = <0x31>;
			};
		};
	};

Please also confirm that the pinmux for this SPI interface has benn configured correctly for SPI usage.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.