mbox series

[u-boot,v2019.04-aspeed-openbmc,v2,0/9] ast2600: Add I2C TPMv2 driver

Message ID 20220513170715.43475-1-eajames@linux.ibm.com
Headers show
Series ast2600: Add I2C TPMv2 driver | expand

Message

Eddie James May 13, 2022, 5:07 p.m. UTC
This series backports the addition of a TPM TIS core driver from
mainline u-boot. Then, add an I2C driver to talk to the NPCT75X
chip using the TPM TIS core.
Add the TPM to the Rainier/Everest devicetree.
Also, add new board code for IBM's systems that need to "poison"
the TPM during u-boot initialization.

I tested this on Everest hardware and verified in Linux that the TPM PCR0
was extended. I also tested with the TPM at the wrong bus address to
verify that the code can handle a missing TPM, and I saw no errors.

Changes since v1:
 - Use upstream core for I2C tpm driver. I initially couldn't get the
   core driver to work at all, but found a small bug in the ordering
   of operations in the core init. I also needed to force the locality
   to 0, like in the Linux NPCT75X driver.
 - Use new board init code for IBM's systems that need the TPM poisoning

Eddie James (5):
  tpm: core: Set timeouts before requesting locality
  i2c: ast_i2c: Remove SCL direct drive mode
  tpm: add support for TPMv2.x I2C chips
  arm: dts: ast2600-rainier: Add NPCT75X TPM
  board: ast2600-ibm: Add AST2600 BMC based POWER10+ servers

Heinrich Schuchardt (1):
  tis: fix tpm_tis_remove()

Ilias Apalodimas (1):
  tpm2: Introduce TIS tpm core

Johannes Holland (1):
  tpm: add #ifndef to fix redeclaration build errors

Simon Glass (1):
  tpm: Add more TPM2 definitions

 arch/arm/dts/ast2600-rainier.dts     |  12 +-
 arch/arm/mach-aspeed/ast2600/Kconfig |   7 +
 board/aspeed/ast2600_ibm/Kconfig     |  13 +
 board/aspeed/ast2600_ibm/Makefile    |   1 +
 board/aspeed/ast2600_ibm/ibm.c       |  46 +++
 configs/ast2600_ibm_defconfig        | 137 ++++++++
 drivers/i2c/ast_i2c.c                |   2 +-
 drivers/tpm/Kconfig                  |   9 +
 drivers/tpm/Makefile                 |   1 +
 drivers/tpm/tpm2_tis_core.c          | 470 +++++++++++++++++++++++++++
 drivers/tpm/tpm2_tis_i2c.c           | 171 ++++++++++
 drivers/tpm/tpm_tis.h                | 138 ++++++++
 include/tpm-v2.h                     |  32 ++
 13 files changed, 1033 insertions(+), 6 deletions(-)
 create mode 100644 board/aspeed/ast2600_ibm/Kconfig
 create mode 100644 board/aspeed/ast2600_ibm/Makefile
 create mode 100644 board/aspeed/ast2600_ibm/ibm.c
 create mode 100644 configs/ast2600_ibm_defconfig
 create mode 100644 drivers/tpm/tpm2_tis_core.c
 create mode 100644 drivers/tpm/tpm2_tis_i2c.c

Comments

Joel Stanley May 20, 2022, 6:31 a.m. UTC | #1
On Fri, 13 May 2022 at 17:07, Eddie James <eajames@linux.ibm.com> wrote:
>
> This series backports the addition of a TPM TIS core driver from
> mainline u-boot. Then, add an I2C driver to talk to the NPCT75X
> chip using the TPM TIS core.
> Add the TPM to the Rainier/Everest devicetree.
> Also, add new board code for IBM's systems that need to "poison"
> the TPM during u-boot initialization.
>
> I tested this on Everest hardware and verified in Linux that the TPM PCR0
> was extended. I also tested with the TPM at the wrong bus address to
> verify that the code can handle a missing TPM, and I saw no errors.
>
> Changes since v1:
>  - Use upstream core for I2C tpm driver. I initially couldn't get the
>    core driver to work at all, but found a small bug in the ordering
>    of operations in the core init. I also needed to force the locality
>    to 0, like in the Linux NPCT75X driver.
>  - Use new board init code for IBM's systems that need the TPM poisoning

I've merged patches 1-8.

Patch 9 needs a little more discussion. If you repost, start a new
series with just those changes (separating out the defconfig and
device tree change).

>
> Eddie James (5):
>   tpm: core: Set timeouts before requesting locality
>   i2c: ast_i2c: Remove SCL direct drive mode
>   tpm: add support for TPMv2.x I2C chips
>   arm: dts: ast2600-rainier: Add NPCT75X TPM
>   board: ast2600-ibm: Add AST2600 BMC based POWER10+ servers
>
> Heinrich Schuchardt (1):
>   tis: fix tpm_tis_remove()
>
> Ilias Apalodimas (1):
>   tpm2: Introduce TIS tpm core
>
> Johannes Holland (1):
>   tpm: add #ifndef to fix redeclaration build errors
>
> Simon Glass (1):
>   tpm: Add more TPM2 definitions
>
>  arch/arm/dts/ast2600-rainier.dts     |  12 +-
>  arch/arm/mach-aspeed/ast2600/Kconfig |   7 +
>  board/aspeed/ast2600_ibm/Kconfig     |  13 +
>  board/aspeed/ast2600_ibm/Makefile    |   1 +
>  board/aspeed/ast2600_ibm/ibm.c       |  46 +++
>  configs/ast2600_ibm_defconfig        | 137 ++++++++
>  drivers/i2c/ast_i2c.c                |   2 +-
>  drivers/tpm/Kconfig                  |   9 +
>  drivers/tpm/Makefile                 |   1 +
>  drivers/tpm/tpm2_tis_core.c          | 470 +++++++++++++++++++++++++++
>  drivers/tpm/tpm2_tis_i2c.c           | 171 ++++++++++
>  drivers/tpm/tpm_tis.h                | 138 ++++++++
>  include/tpm-v2.h                     |  32 ++
>  13 files changed, 1033 insertions(+), 6 deletions(-)
>  create mode 100644 board/aspeed/ast2600_ibm/Kconfig
>  create mode 100644 board/aspeed/ast2600_ibm/Makefile
>  create mode 100644 board/aspeed/ast2600_ibm/ibm.c
>  create mode 100644 configs/ast2600_ibm_defconfig
>  create mode 100644 drivers/tpm/tpm2_tis_core.c
>  create mode 100644 drivers/tpm/tpm2_tis_i2c.c
>
> --
> 2.27.0
>