From owner-freebsd-arm@freebsd.org Tue Apr 27 07:52:42 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B22F76241B5 for ; Tue, 27 Apr 2021 07:52:42 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FTvBL4TrLz3Nk6; Tue, 27 Apr 2021 07:52:42 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from [IPv6:2a02:8011:300b:42:6812:2cb5:f4a1:7879] (unknown [IPv6:2a02:8011:300b:42:6812:2cb5:f4a1:7879]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: markm) by smtp.freebsd.org (Postfix) with ESMTPSA id 2A1C129506; Tue, 27 Apr 2021 07:52:42 +0000 (UTC) (envelope-from markm@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_7F18B693-9745-4023-BB6A-E24AE6B56551"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: I2C/IIC working on RPI4 8GB? From: Mark Murray In-Reply-To: <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> Date: Tue, 27 Apr 2021 08:52:39 +0100 Cc: freebsd-arm Message-Id: References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3654.60.0.2.21) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2021 07:52:42 -0000 --Apple-Mail=_7F18B693-9745-4023-BB6A-E24AE6B56551 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 26 Apr 2021, at 15:11, Emmanuel Vadot wrote: >=20 > On Sun, 25 Apr 2021 13:32:00 +0100 > Mark Murray 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. >> >> Scanning I2C devices on /dev/iic0: >>=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 I don't know which one maps to > the pins you want to use) in the ESP partition and add "i2c" to the > dtoverlay line in config.txt I want to use the i2c on the "regular" pins, GPIO2 and GPIO3, AKA = physical pins 3 and 5. 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? Same result as before - long timeout, no I2C. M -- Mark R V Murray --Apple-Mail=_7F18B693-9745-4023-BB6A-E24AE6B56551 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAmCHwscACgkQQlsJDh9C UqBFrQf9GtppHD3/4IdmNo9jksyXwjXfkH+gyWwGarawXgSGhKuxWkGaf1tlgw+x BI2m2UZCm3QU8wmm2HCL1psB8yzSsC3DoWKSbwAyqCNUZiwe2504dp87ieVuvD8W UAZZc7Ux7AdjpSWQiwo90SRUIjVff6nqiRo0xeQ75H8B1ZVZ3+LqXd3Cl3a2BCB9 hozZOO/XapKrFLSfPna7h2IPqZhkq8+N/8AVoRQl7mJZX3OOfcT2RG0tl68FiTBI RwUyywXPQtZ/23iyOd6oRyQbojn9qViIPv6hmFwgD1PYxDuDypA/RX/gbu7ZaW0M F+xgxR1w3al9zvmulKYcMLzrKIHKsQ== =b8OB -----END PGP SIGNATURE----- --Apple-Mail=_7F18B693-9745-4023-BB6A-E24AE6B56551--