[PATCH 0/7] tpm: Pull tpm_tis_phy_ops and tpm_tis_i2c updates
Peter Delevoryas
peter at pjd.dev
Thu Aug 11 07:01:21 AEST 2022
On Wed, Aug 10, 2022 at 06:19:38AM +0000, Joel Stanley wrote:
> On Mon, 8 Aug 2022 at 22:08, Peter Delevoryas <peter at pjd.dev> wrote:
> >
> > OpenBMC's Linux dev-5.15 has an old tpm_tis_i2c driver from Nuvoton, but
> > it was never merged upstreamed and produces compilation warnings now.
> >
> > Infineon took that driver, modified it, and merged it upstream. Nuvoton
> > never merged theirs, so the first patch in this series reverts theirs.
>
> Thanks Peter!
>
> I've been testing this version of the driver (applied to v5.19 instead
> of our 5.15 tree, but it is the same code) and it doesn't work with
> the hardware we have:
>
> [ 1.571105] tpm tpm0: Operation Canceled
> [ 1.576301] tpm_tis_i2c 1-002e: 1.2 TPM (device-id 0xFC, rev-id 1)
> [ 1.610168] tpm tpm0: Operation Canceled
> [ 1.615580] tpm tpm0: A TPM error (-125) occurred attempting to
> determine the timeouts
> [ 1.685651] tpm_tis_i2c: probe of 1-002e failed with error -125
>
> This appears to be detected as a "1.2 TPM", when I am pretty sure it's
> a 2.0 device. I suspect I'm missing something.
>
> The tree I was testing with is here:
>
> https://github.com/shenki/linux/commits/dev-5.19
>
> I've cc'd Eddie as he also has access to this hardware, and perhaps
> can help with the debugging.
>
Oh, yikes, ok. That's not good. Maybe I can help debug this too. We have
some lab systems that connected to the TPM through I2C, but that might
have been a TPM 1.2 chip, not a TPM 2 chip. Thanks though.
>
> Cheers,
>
> Joel
>
>
>
> >
> > Also, I included the "Remove read16, read32, write32" patch because
> > otherwise Alexander's patches don't apply cleanly. But, I could actually
> > resolve the merge conflicts. I figured it will be easier later to just
> > include more patches from upstream to make it clean.
> >
> > I also noticed there was one follow-up change submitted by alibaba to
> > remove one line, so I included that.
> >
> > Alexander didn't include the compatible strings from the old driver,
> > even though it should be compatible, so I've included a patch at the end
> > which fixes that. I did it as a separate patch so that we maintain a
> > patch series closer to what the upstream will be.
> >
> > cc'ing Alexander on this thread too to see if he has any suggestions, or
> > thinks I missed anything.
> >
> > I haven't cc'd the linux kernel mailing list aliases because I don't
> > think this is relevant to them. Only the patch including the compatible
> > strings will be relevant.
> >
> > checkpath.pl warns agains MAINTAINERS, but I'm pretty sure it's fine.
> > The upstream MAINTAINERS file hasn't been updated with these changes, so
> > we probably don't need to do anything there.
> >
> > This was a follow-up from the following OpenBMC mailing list thread:
> >
> > https://lore.kernel.org/openbmc/20220725225151.393384-1-peter@pjd.dev/
> >
> > Thanks,
> > Peter
> >
> > Alexander Steffen (3):
> > dt-bindings: trivial-devices: Add Infineon SLB9673 TPM
> > tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer
> > tpm: Add tpm_tis_i2c backend for tpm_tis_core
> >
> > Johannes Holland (1):
> > tpm: Remove read16/read32/write32 calls from tpm_tis_phy_ops
> >
> > Peter Delevoryas (2):
> > Revert "tpm: tpm_tis: Add tpm_tis_i2c driver"
> > tpm_tis_i2c: Add old compatible strings back
> >
> > Yang Li (1):
> > tpm: fix platform_no_drv_owner.cocci warning
> >
> > .../devicetree/bindings/trivial-devices.yaml | 2 +
> > drivers/char/tpm/Kconfig | 24 +-
> > drivers/char/tpm/tpm_tis.c | 67 ++-
> > drivers/char/tpm/tpm_tis_core.c | 14 +
> > drivers/char/tpm/tpm_tis_core.h | 68 ++-
> > drivers/char/tpm/tpm_tis_i2c.c | 431 ++++++++++++------
> > drivers/char/tpm/tpm_tis_spi.h | 4 -
> > drivers/char/tpm/tpm_tis_spi_cr50.c | 7 +-
> > drivers/char/tpm/tpm_tis_spi_main.c | 45 +-
> > drivers/char/tpm/tpm_tis_synquacer.c | 98 ++--
> > 10 files changed, 436 insertions(+), 324 deletions(-)
> >
> > --
> > 2.37.1
> >
More information about the openbmc
mailing list