Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 2021 13:13:00 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Mark Murray <markm@freebsd.org>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: I2C/IIC working on RPI4 8GB?
Message-ID:  <C4828BF2-E8B7-45D1-B0F8-5E72AF84D565@yahoo.com>
In-Reply-To: <CF4C4332-BB2F-47E9-B879-8EEA0E53E848@FreeBSD.org>
References:  <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> <CF4C4332-BB2F-47E9-B879-8EEA0E53E848@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2021-Apr-27, at 00:52, Mark Murray <markm at freebsd.org> wrote:

> On 26 Apr 2021, at 15:11, Emmanuel Vadot <manu@ at idouilliste.com> =
wrote:
>>=20
>> On Sun, 25 Apr 2021 13:32:00 +0100
>> Mark Murray <markm@FreeBSD.org> wrote:
>>=20
>>> Hi All,
>>>=20
>>> Does anyone here have IIC/I2C working on a CURRENT (I'm running =
latest) FreeBSD?
>>>=20
>>> I've never seen it work; Last time I had working IIC was on an RPI3.
>>>=20
>>> There is a /dev/iic0, and I have a known working RTC on it, but the =
scan just times out:
>>>=20
>>> [root@grasshopper ~]# i2c -s
>>> Hardware may not support START/STOP scanning; trying less-reliable =
read method.
>>> <TIMEOUT>
>>> Scanning I2C devices on /dev/iic0: <none found>
>>>=20
>>>=20
>>> I suspect something not-quite-right in DTS land, but I lack the =
knowledge to investigate. I've done some random stumbling around in the =
dark with overlays and the like, but I've either seen the above error, =
or a total lack of /dev/iic0.
>>>=20
>>> Thanks!
>>>=20
>>> M
>>> --
>>> Mark R V Murray
>>>=20
>>=20
>> I2C is disabled by default.
>> You need to copy i2c0.dtbo (or i2c1<X> I don't know which one maps to
>> the pins you want to use) in the ESP partition and add "i2c<X>" to =
the
>> dtoverlay line in config.txt
>=20
> I want to use the i2c on the "regular" pins, GPIO2 and GPIO3, AKA =
physical pins 3 and 5.
>=20
> I looked at all the i2c[0-6].dtbo overlays in =
/usr/ports/sysutils/rpi-firmware. Only 1 had "pins =3D <2, 3>", so I =
used that one. I presume the 2,3 refers to GPIO pin numbers, not =
physical pin numbers?
>=20
> Same result as before - long timeout, no I2C.
>=20

Did you try the suggestion in:

https://lists.freebsd.org/pipermail/freebsd-arm/2021-April/023687.html

? It suggests that you need to have the config.txt swap
the the pins in order to undo another swap that happens
at some internal stage. The swapped problem was indicated
to be visible in the dmesg reporting and the manual swap
was reported to cause the dmesg reporting to produce the
correct overall result.

(Note: GPIO and I2C are not things I fiddle with. I
just happened to notice that the message indicated had
a specific suggestion to try and you do not seem to
have reported on the result of trying it.)


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C4828BF2-E8B7-45D1-B0F8-5E72AF84D565>