Hi All!
In a project I added an I2C TPM device to my dragonboard.
I modified the kernel so it contains its driver module and also integrate it in the device-tree so it is automatically loaded at boot.
The system detects the device with i2cdetect.
When I start to communicate with the device some of the commands are working but others came back with error.
I am using the tpm-tools to communicate with the board. So there should not be any coding error on my side…
Strace output of the error:
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(30003), inet_pton(AF_INET6, “::1”, &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
sendto(3, “\0\0\0\34\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34”, 28, 0, NULL, 0) = 28
recvfrom(3, “\0\0\0&\0\0\0\0\0\0\0\2\0\0\0\2\0\0\0\34\0\0\0\10\0\0\0\36”, 28, 0, NULL, NULL) = 28
recvfrom(3, “\3\3\240N\20\2\0\0\0\2”, 10, 0, NULL, NULL) = 10
openat(AT_FDCWD, “/dev/urandom”, O_RDONLY) = 4
fstat(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), …}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fe038fb18) = -1 EINVAL (Invalid argument)
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9f2ab000
read(4,[ 512.087572] i2c_quirk_error: 143 callbacks suppressed
“\221\221\316g0\342p\177\377\r\255)\f\31Jc(\356\241\2d\276\3173\261\217Q\363x\235\375\30”…, 4096) = 4096
close(4) = 0
munmap(0x7f9f2ab000, 65536) = 0
sendto(3, “\0\0\0006\0\0\0002\0\0\0\2\0\0\0\2\0\0\0\34\0\0\0\30\0\0\0\36\3\6\240N”…, 54, 0, NULL, 0) = 54
recvfrom(3, [ 512.240984] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.278265] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.278455] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.285228] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.293822] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.299753] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.307455] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.315649] i2c i2c-0: adapter quirk: msg too long (addr 0x0020, size 304, read)
[ 512.394588] tpm_i2c_infineon 0-0020: Unable to read remainder of result
[ 512.398923] tpm_i2c_infineon 0-0020: tpm_transmit: tpm_recv: error -62
TCSD TDDL ERROR: write to device /dev/tpm0 failed: Timer expired
“\0\0\0\34\0\0\20\207\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”, 28, 0, NULL, NULL) = 28
write(2, “Tspi_TPM_TakeOwnership failed: 0”…, 83Tspi_TPM_TakeOwnership failed: 0x00001087 - layer=tddl, code=0087 (135), I/O error
) = 83
Does anyone experienced similar misbehaviour of the I2C?
Any help is welcomed!