This behavior is not expected. What kind of scope probes are you using? Can you use active probes?
The “Pin Direction” and “Req. Initial State” entries should not be left blank. Set DIN to input and all others to output and set the initial states to match the POR pin states.
This behavior is not expected. What kind of scope probes are you using? Can you use active probes?
I don’t have active probes.
The “Pin Direction” and “Req. Initial State” entries should not be left blank. Set DIN to input and all others to output and set the initial states to match the POR pin states.
Even after making the above changes, the host is still unable to communicate properly with the TPM.
Could you please advise me on how to configure the SPI-related functions? Based on the results from the manufacturer’s LA analyzer, it appears that the host pulled the CS pin high too early, causing the communication to fail.
It went high too early in comparison to the Data Read phase. The CS pin went high immediately after receiving the READY signal (MISO = 0x01), without waiting for the host to actually clock out and read the data.
ch0 is clk, ch1 is cs, ch2 is mosi, and ch3 is miso. After CS is pulled to low and MOSI outputs 83d40f00, wait 845.8 μs, then pull MISO high, and wait another 293.84 μs.
Could it be that after receiving data from MISO 01, the clock signal wasn’t sent, causing the TPM to stop transmitting subsequent data?
According to the TPM specification, once the CS is pulled high, the current transaction is immediately terminated, resulting in the subsequent data not being read at all.
From the waveform you shared, both CS and SPI-CLK output the expected signal.
Could you also check with your vendor for this issue? as I believe SPI is working as expected.
Could you also check with your vendor for this issue? as I believe SPI is working as expected.
Yes, I have already confirmed the waveforms of these analyzers with the TPM vendor, and the waveforms from the LA analyzer do not appear to comply with the TCG TPM SPI specification.
The SPI communication with the TPM 2.0 chip fails during the transition from the Flow Control (Wait State) Phase to the Data Phase.
Although the TPM correctly asserts the “Ready Bit” (0x01) on the MISO line, the SPI controller de-asserts the Chip Select (CS) signal immediately after the flow control message is completed.
Due to a software processing delay between the two spi_sync() calls, the CS remains High for a duration that causes the TPM internal state machine to reset/abort the transaction. Consequently, no data is returned during the subsequent Data Phase (MISO remains 0xFF or High-Z).
I also applied the following patch separately to test it: Jetson orin nano SPI Speed not changing - #9 by KevinFFF. However, the situation remains the same — it still cannot communicate with the TPM device. Although the ‘ready’ bit is received from the MISO, subsequent reception from the MISO still fails. This is because the CS pin is pulled high, resetting the TPM’s current transmission.
Based on my experiments (with the [T5000] SPI3 connect to TPM fail - #28 by KevinFFF patch applied), once the TPM has sent the ready bit, tpm_tis_spi_transfer_full sends cs_change=1 to the SPI host controller driver upon receiving the final data packet.
This causes ‘command1’ to change in ‘tegra_spi_setup_transfer_one’, and ‘tegra_spi_start_transfer_one’ writes ‘command1’ to the register. I’m not sure whether this step pulls the CS pin high or whether this is done in the ‘tegra_spi_transfer_end’ function.
Do you have an Orin or Xavier available to verify if a similar issue occurs on JetPack 5.x?
Yes, I have tested the Jetpack 6.2.1 SDK with Linux kernel 5.15 on the Orin NX and Orin NANO SOM, and the hardware SPI1 connection to the NPCT750 TPM works properly.
Based on the TPM module , it works on Orin NX, Orin nano, DGX Spark, Fails only on AGX Thor.
In the meantime, could you please verify if the same behavior is observed on the devkit? Or SPI1?
The Thor Dev Kit does not have an SPI pin conveniently accessible for connecting to the TPM for testing, but I can try connecting to the Thor SPI1 interface on a custom board.
I suspect I’m not the only one encountering this issue. See [T5000] SPI3 connect to TPM fail - #15 by jack_lan
Does the AGX Thor platform have a validated reference design for discrete TPM (SPI TPM)?
If dTPM is supported:
Is there a recommended SPI instance (SPIx)?
Are there any pinmux or timing constraints specific to TPM integration?
Yes, there’s no expansion header on the devkit for SPI pins and we don’t have such TPM module(NPCT760) to verify them locally.
Have you checked if AGX Thor can work with NPCT750?
It could help to clarify if the issue is specific to TPM module.(i.e. NPCT760)
You can also try porting the SPI driver(spi-tegra-114.c) from Orin Nano with JP6.x to AGX Thor with JP7.1 to clarify if the issue is actually caused from SPI driver.
Please also run the following commands on your board and share extracted_proc.dts for further check.