LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Andrey Pronin <apronin@chromium.org>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	Marcel Selhorst <tpmdd@selhorst.net>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	groeck@chromium.org, smbarber@chromium.org,
	dianders@chromium.org
Subject: Re: [PATCH 0/2] tpm: add driver for cr50 on SPI
Date: Thu, 14 Jul 2016 19:50:26 -0700
Message-ID: <20160715025026.GA21375@apronin> (raw)
In-Reply-To: <9A3CFCAE-F2FD-438D-A32B-AD59E0362E71@gmx.de>

On Thu, Jul 14, 2016 at 07:28:55PM -0700, Peter Huewe wrote:
> Am 14. Juli 2016 19:20:16 GMT-07:00, schrieb Andrey Pronin <apronin@chromium.org>:
> >This patchset adds a TCG TPM2.0 PTP FIFO compliant interface for
> >Cr50 chip on SPI.
> >
> >Depends on the following patches by Andrey Pronin
> ><apronin@chromium.org>
> >that add new members to phy_ops in tpm_tis_core:
> > - tpm: support driver-specific sysfs attrs in tpm_tis_core
> > - tpm_tis_core: add optional max xfer size check
> >
> >Andrey Pronin (2):
> >  tpm: devicetree: document properties for cr50
> >  tpm: add driver for cr50 on SPI
> >
> > .../devicetree/bindings/security/tpm/cr50_spi.txt  |  30 ++
> > drivers/char/tpm/Kconfig                           |   9 +
> > drivers/char/tpm/Makefile                          |   1 +
> >drivers/char/tpm/cr50_spi.c                        | 409
> >+++++++++++++++++++++
> > 4 files changed, 449 insertions(+)
> >create mode 100644
> >Documentation/devicetree/bindings/security/tpm/cr50_spi.txt
> > create mode 100644 drivers/char/tpm/cr50_spi.c
> 
> 
> Hi, 
> can you explain a bit more about this device? And why it needs a special driver and cannot be handled by tpm_tis_spi if its tcg compliant?
> 
> Peter
> -- 
> Sent from my mobile

Hi Peter,

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.

All that combined to me seemed to be enough justification to add a
device-specific driver rather than adding vendor-specific code to
tpm_tis_spi in multiple places.

Plus, where it seemed appropriate, I added additional hooks to
tpm_tis_core (device-specific sysfs attributes, capping burstcnt
in case of chip error) to support this chip specifics.

Best regards,
Andrey

  reply index

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  2:20 Andrey Pronin
2016-07-15  2:20 ` [PATCH 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-15  4:05   ` Guenter Roeck
2016-07-15 17:31     ` Andrey Pronin
2016-07-15 18:28       ` Guenter Roeck
2016-07-17 13:28   ` Rob Herring
2016-07-15  2:20 ` [PATCH 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-15  3:32   ` Jason Gunthorpe
2016-07-15  3:44     ` Andrey Pronin
2016-07-19 12:55       ` Jarkko Sakkinen
2016-07-20  0:24         ` Andrey Pronin
2016-07-20 17:03           ` Jason Gunthorpe
2016-07-21 18:10             ` Andrey Pronin
2016-07-21 21:00               ` Jason Gunthorpe
2016-07-15  2:28 ` [PATCH 0/2] " Peter Huewe
2016-07-15  2:50   ` Andrey Pronin [this message]
2016-07-15  3:28     ` Jason Gunthorpe
2016-07-15 17:15       ` Andrey Pronin
2016-07-19 12:56 ` Jarkko Sakkinen
2016-07-20  3:41 ` [PATCH v2 " Andrey Pronin
2016-07-20  3:41   ` [PATCH v2 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-20 19:03     ` Rob Herring
2016-07-20 19:49       ` Andrey Pronin
2016-07-20 19:54         ` Jason Gunthorpe
2016-07-27 21:02           ` Andrey Pronin
2016-07-21 21:03         ` Rob Herring
2016-07-27 21:00           ` Andrey Pronin
2016-07-20  3:41   ` [PATCH v2 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-25 17:09   ` Aw: [PATCH v2 0/2] " Peter Huewe
2016-07-27 21:12     ` Andrey Pronin
2016-07-28  4:25 ` [PATCH v3 " Andrey Pronin
2016-07-28  4:25   ` [PATCH v3 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-28  4:25   ` [PATCH v3 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-07-28 23:01     ` Dmitry Torokhov
2016-07-28 23:17       ` Jason Gunthorpe
2016-07-29  3:01         ` Andrey Pronin
2016-07-29  1:55 ` [PATCH v4 0/2] " Andrey Pronin
2016-07-29  1:55   ` [PATCH v4 1/2] tpm: devicetree: document properties for cr50 Andrey Pronin
2016-07-29 17:27     ` Jason Gunthorpe
2016-07-29 21:42       ` Rob Herring
2016-08-09 10:08     ` Jarkko Sakkinen
2016-07-29  1:55   ` [PATCH v4 2/2] tpm: add driver for cr50 on SPI Andrey Pronin
2016-08-09 10:20     ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160715025026.GA21375@apronin \
    --to=apronin@chromium.org \
    --cc=dianders@chromium.org \
    --cc=groeck@chromium.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=smbarber@chromium.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git