public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot]  Issue enabling TPM 2.0 on RPI
@ 2019-06-14  7:43 Elena Unix
  2019-06-17  8:44 ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Elena Unix @ 2019-06-14  7:43 UTC (permalink / raw)
  To: u-boot

Hello,

I am trying to enable the TPM 2.0 SLB9670 in U-Boot for a Raspberry Pi 3 B+. More precisely, the TPM is on an add-on board, the IRIDIUM SLB9670.
The communication between the RPI and the TPM is ensured by SPI so I enabled the software spi driver (spi-gpio) in U-Boot because the bcm28x spi driver is not available in U-Boot.

CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SOFT_SPI=y

Then, I enabled the TPM support in U-Boot.

CONFIG_CMD_TPM_V2=y
CONFIG_CMD_TPM=y
CONFIG_TPM_V2=y
CONFIG_TPM2_TIS_SPI=y
CONFIG_TPM=y

Finally, I updated my Device Tree.
/dts-v1/
/ {
...
   aliases {
       spi0 = &soft_spi;
   };

   soft_spi: soft-spi {
       compatible = "spi-gpio";
       pinctrl-names = "default";
       pinctrl-0 = <&spi0_gpio7>;
       status = "okay";
       gpio-sck = <&gpio 11 0>;
       gpio-mosi = <&gpio 10 0>;
       gpio-miso = <&gpio 9 0>;
       cs-gpios = <&gpio 7 1>;
       #address-cells = <1>;
       #size-cells = <0>;

       slb9670: slb9670 at 0 {
           compatible = "tis,tpm2-spi";
           reg = <1>;
           #address-cells = <1>;
           #size-cells = <0>;
           spi-max-frequency = <32000000>;
           status = "okay";
       };
   };

   spio0_gpio7: spio0_gpio7 {
       brcm,pins = <7 8 9 10 11>;
       brcm,function = <4>;
   };
...
};

But, when I try to execute the following command : 
U-Boot> tpm2 init

I have the following response :

tpm_tis_spi_probe : missing reset GPIO
tpm_tis_spi_request_locality : Timeout getting locality : -2
tpm_tis_spi_probe : could not request locality 0
Could not find TPM (ret=-2)

The Iridium board contains a reset circuit on board, which pulls the reset line of the TPM to GND after VCC becomes available, so the reset GPIO is not needed I think.

I don’t see what is wrong with my setup, a little help would be very appreciated.

Thank you in advance, 
Elena

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-20 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14  7:43 [U-Boot] Issue enabling TPM 2.0 on RPI Elena Unix
2019-06-17  8:44 ` Miquel Raynal
2019-06-17  9:06   ` Miquel Raynal
2019-06-17 13:54     ` Elena Unix
2019-06-17 13:46   ` Elena Unix
2019-06-17 14:28     ` Miquel Raynal
2019-06-20 10:39       ` Hecht, Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox