Integrate the SLB9670 TPM with IMx8MM EVK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Integrate the SLB9670 TPM with IMx8MM EVK

543件の閲覧回数
kanimozhi_t
Contributor V

Hi,

We tired to integrate the SLB9670 with the IMX8MM EVK through the SPI communication.We used the ECSPI2 pins from the expansion connector to connect the TPM module.

In device tree file imx8mm-evk.dtsi file.Added the below lines for the device tree integration

 

&ecspi2 {
	#address-cells = <1>;
	#size-cells = <0>;
	fsl,spi-num-chipselects = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
	status = "okay";

	/*spidev0: spi@0 {
		reg = <0>;
		compatible = "rohm,dh2228fv";
		spi-max-frequency = <500000>;
	};*/

	slb9670: slb9670@0 {
		compatible="infineon,slb9670","tcg,tpm_tis-spi";
		/*fsl,spi-num-chipselects = <1>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
		*/
		reg = <0>;	
		cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
		spi-max-frequency = <38000000>;
		status = "okay";
       };
};

 

 The TPM device is not listed in the /dev/ in the userspace.

In the device tree file the  0x82 is set for the SCLK/MOSI/MISO pins.Why this same value is configured for all pins.

pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
>;
};

pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x40000
>;
};

Could you please help on how to integrate TPM with IMX8MM?

 

Thanks,

kanimozhi

0 件の賞賛
返信
3 返答(返信)

526件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello

this appnote may be helpful for your design.

https://www.nxp.com/docs/en/application-note/AN13633.pdf

 

Regards

0 件の賞賛
返信

511件の閲覧回数
kanimozhi_t
Contributor V

Hi,
How to configure the ECSPI as master to communicate with the TPM  device SLB9670?

In the shared link it looks the ECSPI is configured as the slave


Thanks

Kanimozhi

0 件の賞賛
返信

501件の閲覧回数
kanimozhi_t
Contributor V

Hi,

I have gone through the App note you have shared, but it doesnt mention any details about the SPI Master configuration in the device tree.

Can we get an example working device tree configuration for the ECSPI2 working as SPI Master and example any SPI slave device connected to it.

We also see that a default spi device connected to the ECSPI2 device configuration as below,

spidev0: spi@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <500000>;

If we comment this spidev0 in the device tree configuration, then the we face an error during our yocto build,

Error occurs in the imx8mmevk-ecspi-slave.dts file.Not able to find the spidev0

When we include the our TPM device configuration also in the ecspi2 node, error ocuurs as the failed configure slb9670@30830000

&ecspi2 {

slb9670: slb9670@0 {
compatible="infineon,slb9670","tcg,tpm_tis-spi";
/*fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
*/
reg = <0>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
spi-max-frequency = <38000000>;
status = "okay";
};
};

When we change the reg=<1>, there is no error information, but the TPM device is not listed in userspace.

We directly plugin the TPM module to the expansion connector. And we use the chip select pin assigned in the iMX8MMini processor.

Menu config in user space configured as below

Default
*SPI support is enabled

*TPM hardware information -> Default infenion TPM  and tcg spi support enable as the module and we changed to builtin option

How to configure the ECSPI as master to communicate with the TPM device SLB9670?

Is there any other thing need to configure in the Menuconfig for integrating the TPM module?

We looked into the application note AN13633, We not find any configuration related to ECSPI as master mode?

In the device tree file SCLK/MOSI/MISO set as 0x82.Why this value is configured?

pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
>;

I observe in the forum threads that this 0x82 value is replaced with 0x116 including the MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 set to 0x116.

Which value should be used for running the ECSPI2 as SPI master and how is this 0x82 or 0x116 derived to be set?


Thanks

Kanimozhi

0 件の賞賛
返信