Re: [PATCH 0/2] tpm: add driver for cr50 on SPI

Andrey Pronin
2016-07-15T17:16:04Z

On Thu, Jul 14, 2016 at 09:28:14PM -0600, Jason Gunthorpe wrote:
> On Thu, Jul 14, 2016 at 07:50:26PM -0700, Andrey Pronin wrote:
> > Yes, it has a TCG-compliant interface, however, there are several things
> > specific to this device:
> > - need to ensure a certain delay between spi transactions, or else
> > the chip can miss several first bytes.
> > - if there is no spi activity for this chip, it may go to sleep, and
> > needs to be waken up before sending further commands.
> > - it has some vendor-specific registers accessible from spi bus.
>
> This all needs to be commented clearly in the driver..
>

Will provide more details in the patch description. The driver code
has comments about those cases in the code: see cr50_ensure_access_delay
and cr50_needs_waking, for example.