From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Mon, 18 Jun 2018 11:21:31 +0200 Subject: [U-Boot] tpm TIS TPMv2.0 In-Reply-To: References: <20180618100500.41e32bc9@xps13> <20180618104315.38274cab@xps13> Message-ID: <20180618112131.75e3dc5b@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi Martin, On Mon, 18 Jun 2018 09:13:36 +0000, "Hecht, Martin (Avnet Silica)" wrote: > Hi Miquèl, > > > -----Original Message----- > > From: Miquel Raynal [mailto:miquel.raynal at bootlin.com] > > Sent: Montag, 18. Juni 2018 10:43 > > To: Hecht, Martin (Avnet Silica) > > Cc: sjg at chromium.org; u-boot at lists.denx.de > > Subject: Re: [U-Boot] tpm TIS TPMv2.0 > > > > Hi Martin, > > > > On Mon, 18 Jun 2018 08:20:20 +0000, "Hecht, Martin (Avnet Silica)" > > wrote: > > > > > Hi Miquel, > > > > > > > -----Original Message----- > > > > From: Miquel Raynal [mailto:miquel.raynal at bootlin.com] > > > > Sent: Montag, 18. Juni 2018 10:05 > > > > To: Hecht, Martin (Avnet Silica) > > > > Cc: sjg at chromium.org; u-boot at lists.denx.de > > > > Subject: Re: [U-Boot] tpm TIS TPMv2.0 > > > > > > > > Hi Martin, > > > > > > > > On Fri, 15 Jun 2018 13:34:07 +0000, "Hecht, Martin (Avnet Silica)" > > > > wrote: > > > > > > > > > Hi Miquel, Simon, > > > > > > > > > > Is there any specific reason why the new tpm2_tis_spi_xfer doesn't > > > > support full duplex? It seems we did some work in parallel but you > > > > sent the patches earlier. Is that codes tested against an existing > > > > TPM v2? I have a working implementation what runs on SLB9670 including > > full duplex. > > > > > > > > What do you mean exactly? > > > > > > > > I don't think the TPM2 protocol makes real use of full-duplex unless > > > > for the wait state between the host command and the actual xfer. > > > > > > You are right, TIS 1.3 FIFO doesn’t use full duplex in physical level. What I > > mean is that the driver you just wrote doesn't use the xfer function in that > > way that you can specify in and out parameters at same time. I did this in my > > implementation what gave me an easy chance to control the CS# of the TPM. > > > > Do you need this CS# handling for more advanced features? Same question > > for the in/out xfers? > > > > > Can you tell me on what TPM did you test? For the SLB9670 the code > > > doesn't work on my hardware. > > > > I tested with a ST33TPHF20 SPI TPM. > > > > I'm surprised it did not work with an SLB9670, I don't see anything in the spec > > explaining this CS# specificity. > > The CS# may controls an internal state machine and the SLB9670 uses that signal. Ok, can you explain what should be done (and where/when) to make it work with the SLB9670? Thanks, Miquèl