Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2021 18:26:48 +0100
From:      =?utf-8?Q?Klaus_K=C3=BCchemann?= <maciphone2@googlemail.com>
To:        Mark Murray <markm@FreeBSD.org>, freebsd-arm@freebsd.org
Subject:   Re: RPI4/8GB i2c not working?
Message-ID:  <3B3786FE-7A47-4D29-8F99-98C1F483C0AA@googlemail.com>
In-Reply-To: <526E2EA2-DF46-4CF0-B75C-1D1118AA4FD8@googlemail.com>
References:  <0D013C24-3CDD-4262-922C-524916ACCB10@FreeBSD.org> <E4AACBB5-4ADB-4BDC-936F-9BF8D45B3EC9@googlemail.com> <DD3F8DC8-03ED-40A7-8709-86F7BD06F8C8@googlemail.com> <599EDCF7-D716-4645-8832-E429C5E17F6E@yahoo.com> <D7553FC1-7545-4823-A04D-598BA53BA94D@googlemail.com> <D854419D-8182-4D59-9EB5-16A958DAB15F@FreeBSD.org> <526E2EA2-DF46-4CF0-B75C-1D1118AA4FD8@googlemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
root@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.

=E2=80=94=E2=80=94

So the device is there ! ....

root@generic:~ # ktrace -t+ i2c -s -f /dev/iic0

root@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  =
|................|

=E2=80=94

successful GIO   fd 3 read looks quite good working !=E2=80=A6


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=20
supports START/STOP scanning and which not.

Also possibly some things cood depend on loaded overlays/config.txt=20
and which corresponding GPIO-pins are configured=20

K.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B3786FE-7A47-4D29-8F99-98C1F483C0AA>