Date: Sun, 25 Apr 2021 21:30:13 +0400 From: Hrant Dadivanyan <hrant@dadivanyan.com> To: freebsd-arm@freebsd.org Subject: Re: I2C/IIC working on RPI4 8GB? Message-ID: <af64e769-a3ad-c877-5dfa-35f9bcbae90e@dadivanyan.net> In-Reply-To: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KOnGszPo1Cy2wL34VrAjecVt6UzNAGS06 Content-Type: multipart/mixed; boundary="0KfHqylAhmfSoeHaMCQjLWU5rjRF841AX"; protected-headers="v1" From: Hrant Dadivanyan <hrant@dadivanyan.com> To: freebsd-arm@freebsd.org Message-ID: <af64e769-a3ad-c877-5dfa-35f9bcbae90e@dadivanyan.net> Subject: Re: I2C/IIC working on RPI4 8GB? References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> In-Reply-To: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> --0KfHqylAhmfSoeHaMCQjLWU5rjRF841AX Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Mark, Exactly the same here for 13.0-RELEASE. I use ds3231 on RPI-B and RPI3,=20 but it never works on RPI4 8GB (periodically trying from August 2020 as=20 far as I can remember). Not even when booting from the SD card pulled=20 out from RPI3 and inserted into RPI4. Found the following workaround though (config.txt): #device_tree_overlay=3Di2c-rtc,ds3231 device_tree_overlay=3Di2c-rtc-gpio,ds3231,i2c_gpio_scl=3D2,i2c_gpio_sda=3D= 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=20 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=20 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, >=20 > Does anyone here have IIC/I2C working on a CURRENT (I'm running latest)=20 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 sca= n just times out: >=20 > [root@grasshopper ~]# i2c -s > Hardware may not support START/STOP scanning; trying less-reliable read=20 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 knowled= ge to investigate. I've done some random stumbling around in the dark wit= h overlays and the like, but I've either seen the above error, or a total=20 lack of /dev/iic0. >=20 > Thanks! >=20 > M > -- > Mark R V Murray >=20 --=20 Hrant Dadivanyan - hrant(at)dadivanyan.net /* "Feci quod potui, faciant meliora potentes." */ --0KfHqylAhmfSoeHaMCQjLWU5rjRF841AX-- --KOnGszPo1Cy2wL34VrAjecVt6UzNAGS06 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEPbz+l3tnoK718ci3h/fmw7c/bD0FAmCFpyUFAwAAAAAACgkQh/fmw7c/bD0s twf+JnwBiP3cPJCTUcO/MU0MiVIOkctjLELkwSypQJ3jMLYAS+4jq2nSnar4sGtFv3azMbmouCVo Ciy8+pSKLP7Ig/YxnpEqH8FEpHdM8MI52OPyWQaalmTq5MWnjJaPbDXleFdl50lQCPlY4Kodxy2U WCbD78C5arjnyFCjLDZny5ZZYR2TqNdm/pz5suVpV1FZJb13BmKaVrzibHBY/UmJiOEbD0o52hfJ q/OYF3R9Aa60vEfDyFN4Z6+I21J3/ziJB+fjHadKfhIx0CQDkTjmbbP3eU8tqkB4ya7aG7Pj8Qcd gbK8vt7aAiNhMc1MMyhIN5jXmu9ScozfAaPTBU6itA== =MKO2 -----END PGP SIGNATURE----- --KOnGszPo1Cy2wL34VrAjecVt6UzNAGS06--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?af64e769-a3ad-c877-5dfa-35f9bcbae90e>