We've a few Pi's, model 2, 3B+ and Zero W all running default Raspbian and with the latest firmware updates as of 25 March '19. All of these have an Infineon TPM 2.0 board attached to the gpio pins configured to use SPI. Config.txt is configured with the loading of the correct overlay and the SPI bus on.
On boot we have a script run by systemd to write some data into the TPM. We are using the the Infineon eltt2 tool to access the TPM (we also use Intel's TPM2 tools also, but during boot only eltt2 is used).
On the zero w only, during boot systemd reports that the script fails ( error 2 - invalid argument). We've traced this down to the TPM not being accessible. Using dmesg we get the following:
$dmesg | grep tpm [ 5.338101] systemd: [/etc/systemd/system/tpm2_measure_eltt2.service:12] Unknown lvalue 'After' in section 'Install' [ 29.151117] tpm_tis_spi spi0.1: 2.0 TPM (device-id 0x1B, rev-id 16)
Ignore the error from systemd, it was only because of this error that we discovered that systemd is trying to run the script before the tpm device driver gets loaded by the kernel.
So basically what seems to be happening is that the TPM device driver doesn't get started until much later in the boot sequence (and thus does not send the startup command to the TPM). After login the script to access the TPM runs perfectly.
Any help appreciated at this stage. Note, this affects the zero w only.