I2C/IIC working on RPI4 8GB?
Hrant Dadivanyan
hrant at dadivanyan.com
Sun Apr 25 17:30:19 UTC 2021
Hi Mark,
Exactly the same here for 13.0-RELEASE. I use ds3231 on RPI-B and RPI3,
but it never works on RPI4 8GB (periodically trying from August 2020 as
far as I can remember). Not even when booting from the SD card pulled
out from RPI3 and inserted into RPI4.
Found the following workaround though (config.txt):
#device_tree_overlay=i2c-rtc,ds3231
device_tree_overlay=i2c-rtc-gpio,ds3231,i2c_gpio_scl=2,i2c_gpio_sda=3
Please note pins REVERSE assignment in config.
# 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
gpioiic0: <GPIO I2C> on ofwbus0
gpioiic0: SCL pin: gpiobus0:3, SDA pin: gpiobus0:2
iicbb0: <I2C bit-banging driver> on gpioiic0
iicbus1: <OFW I2C bus> on iicbb0 master-only
iic1: <I2C generic I/O> on iicbus1
ds32310: <Maxim DS3231 RTC> at addr 0xd0 on iicbus1
ds32310: registered as a time-of-day clock, resolution 1.000000s
#
Please note pins CORRECT assignment in the dmesg.
Thank you,
Hrant
On 4/25/21 4:32 PM, Mark Murray wrote:
> Hi All,
>
> Does anyone here have IIC/I2C working on a CURRENT (I'm running latest)
FreeBSD?
>
> I've never seen it work; Last time I had working IIC was on an RPI3.
>
> There is a /dev/iic0, and I have a known working RTC on it, but the scan just times out:
>
> [root at grasshopper ~]# i2c -s
> Hardware may not support START/STOP scanning; trying less-reliable read
method.
> <TIMEOUT>
> Scanning I2C devices on /dev/iic0: <none found>
>
>
> 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.
>
> Thanks!
>
> M
> --
> Mark R V Murray
>
--
Hrant Dadivanyan - hrant(at)dadivanyan.net
/* "Feci quod potui, faciant meliora potentes." */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20210425/2f76e4a4/attachment.sig>
More information about the freebsd-arm
mailing list