mipsan
June 14, 2017, 1:27pm
1
Hello Dear,
I attached TPM 1.2 module via I2C to GEN2_I2C, on the J3A1 expansion socket.
TPM chip is Infineon’s SLB9645 .
To enable TPM, required configurations are added as follow:
#define CONFIG_TPM
#define CONFIG_TPM_TIS_I2C
#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 2
#define CONFIG_TPM_TIS_I2C_SLAVE_ADDRESS 0x20
#define CONFIG_CMD_TPM
#define CONFIG_TPM_TARGET_TK1
After flash fusing, I probed I2C firstly.
Tegra124 (Jetson TK1) # i2c dev 2
Setting bus to 2
Tegra124 (Jetson TK1) # i2c probe
Valid chip addresses: 20
probing done.
But TPM commands failed during tpm_transmit () of drivers/tpm/tpm.c:396.
By investigation, it seems like request_locality() failed.
Tegra124 (Jetson TK1) # tpm init
Tegra124 (Jetson TK1) # tpm startup TPM_ST_CLEAR
ERROR: tpm_transmit: tpm_send: error 4294967280
at /home/ubuntu/build_src/u-boot/drivers/tpm/tpm.c:396/tpm_transmit()
How can I resolve this issue in this case?
Thanks,
Hi mipsan,
What are the connections of other signals of TPM, such as RESET#, DAVINT# and PP pin?
mipsan
June 15, 2017, 3:21am
3
Hi Trumany,
RESET is not connected.
3.3V, GND, SCL and SDA 4 pins are connected.
During debugging, if fails request_locality() which is done before TX/RX job.
update!
PP is connected to VDD, 3.3V.
update again!
PP pin is connected to a jumper.
Then I tested it both open and close.
Same result I have.
mipsan
June 19, 2017, 5:04am
4
Hi Trumany,
2014.10 U-Boot version is used for my Jetson-TK1 currently.
Does it matter with TPM?
mipsan
June 22, 2017, 12:35pm
6
Hi Shane,
YES True.
static ssize_t tpm_transmit(const unsigned char *buf, size_t bufsiz)
{
....
rc = chip->vendor.send(chip, (u8 *)buf, count);
if (rc < 0) {
error("tpm_transmit: tpm_send: error %zd\n", rc);
goto out;
}
The send() function calls tpm_tis_i2c_send() , because of this,
static struct tpm_vendor_specific tpm_tis_i2c = {
.status = tpm_tis_i2c_status,
.recv = tpm_tis_i2c_recv,
.send = tpm_tis_i2c_send,
.cancel = tpm_tis_i2c_ready,
.req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID,
.req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID,
.req_canceled = TPM_STS_COMMAND_READY,
};
I’ve got a screenshot. However, no idea how to upload it here.
U-BOOT has simple I2C command, not i2c-tools as Linux.
If I down I2C speed around 30000bps, I2C command can read VID from TPM chip.
kayccc
August 8, 2017, 7:08am
7