Date: Wed, 28 Apr 2021 10:19:45 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Mark Murray <markm@FreeBSD.org> Cc: Mark Millard <marklmi@yahoo.com>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: I2C/IIC working on RPI4 8GB? Message-ID: <20210428101945.67417ef8eba251dcbcb38078@bidouilliste.com> In-Reply-To: <47A634E3-4938-4AFC-9341-E480CEBF67FB@FreeBSD.org> References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> <CF4C4332-BB2F-47E9-B879-8EEA0E53E848@FreeBSD.org> <C4828BF2-E8B7-45D1-B0F8-5E72AF84D565@yahoo.com> <47A634E3-4938-4AFC-9341-E480CEBF67FB@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 28 Apr 2021 09:01:56 +0100 Mark Murray <markm@FreeBSD.org> wrote: > On 27 Apr 2021, at 21:13, Mark Millard <marklmi@yahoo.com> wrote: > > > > 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. > > I took apart the i2c1.dtbo overlay that mentions pins 2, 3, and swapped them, and reassembled the overlay. This suggestion is to use i2c over gpio via iicbb, not the i2c controller in the SoC. > Nope. Same problem. > > What I have: > > [root@grasshopper ~]# dmesg | egrep -i 'ds3231|rtc|i2c|iic|time-of-day' > iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 26 on simplebus0 > iicbus0: <OFW I2C bus> on iichb0 > iic0: <I2C generic I/O> on iicbus0 > Warning: no time-of-day clock registered, system time will not be set accurately > > [root@grasshopper ~]# ls -al /dev | grep iic > crw------- 1 root wheel 0x44 Apr 28 08:42 iic0 > > I have found a PDF document "BCM2711 ARM Peripherals", and it says "The BSC controller in the BCM2711 fixes the clock-strectching[sic] bug that was present in BCM283x devices", so I suspect that the device may not be hardware compatible with the RPI3 and earlier. According to this document is this just to detect that the slave hold the scl line too long so I don't think that this is the problem here. If you have a scope or a logic analyzer I suggest you start by using it to confirm that when you scan with i2c -s you see something. > Time to dig in and hack. > > M > -- > Mark R V Murray > -- Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210428101945.67417ef8eba251dcbcb38078>