RPI4/8GB i2c not working?
Klaus Küchemann
maciphone2 at googlemail.com
Wed Mar 10 17:26:53 UTC 2021
root at generic:~ # i2c -f /dev/iic0 -s -v
dev: /dev/iic0, addr: 0x40100401, r/w: r, offset: 0x00, width: 8, count: 1
Hardware may not support START/STOP scanning; trying less-reliable read method.
——
So the device is there ! ....
root at generic:~ # ktrace -t+ i2c -s -f /dev/iic0
root at generic:~ # kdump
....
1287 i2c RET open 3
1287 i2c CALL read(0x3,0x4027cc18,0x80)
1287 i2c GIO fd 3 read 128 bytes
0x0000 4568 6e74 0100 0000 8000 0000 d500 0000 |Ehnt............|
0x0010 0000 0000 d400 0000 0000 0000 0000 0000 |................|
0x0020 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x0030 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x0040 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x0050 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x0060 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x0070 0000 0000 0000 0000 0000 0000 0000 0000 |................|
—
successful GIO fd 3 read looks quite good working !…
But then loops in the end :
1287 i2c RET ioctl -1 errno 35 Resource temporarily unavailable
1287 i2c CALL ioctl(0x3,I2CRSTCARD,0xffffffffea70)
1287 i2c RET ioctl 0
1287 i2c CALL ioctl(0x3,I2CRDWR,0xffffffffe998)
1287 i2c RET ioctl -1 errno 35 Resource temporarily unavailable
1287 i2c CALL ioctl(0x3,I2CRSTCARD,0xffffffffea70)
since I don't have an i2c-gadget to test at the moment , can't say which device exactly
supports START/STOP scanning and which not.
Also possibly some things cood depend on loaded overlays/config.txt
and which corresponding GPIO-pins are configured
K.
More information about the freebsd-arm
mailing list