From nobody Wed Sep 27 08:32:20 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwVGl6FZVz4v8Kc for ; Wed, 27 Sep 2023 08:32:31 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwVGk1mmVz3Lbx for ; Wed, 27 Sep 2023 08:32:30 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=LWWUI6Gu; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il; dmarc=pass (policy=none) header.from=huji.ac.il DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=GriWPs1eqhW+NW//b1ihQy76XCAsL0unKQxLAuxq0+w=; b=LWWUI6GuZ2D7PlXo3RPRm1MIjYWAbcmjh73Q5BTViSCKiXmmLMuUsrCShD7FJcNMVQIH1x9usNpINyv9vET9cZ2FFRkYxH1WNbUCYHtmfzUQwoFjdvJCLcP+bAWKxy+tCFZCxChSm2pHmjgHXNcW8cW5dgqNhZa/pom6NQkMxfnwiesPcNZevJN7z3YiCNDGAu6k6lHO2dFU1Q9EImi7HbKXYCZjATaRYG3XfKG/mDukEtsn8cm2zKzluDvb3KWutZWTPVXHsnqRVJEAULSoDMM+A3TgTlKnBcCGyP7y7SzdJUZ4eH4CbnpzHzqINVcYY6oA5sK6z0dD71NN/5wiCA==; Received: from bach.cs.huji.ac.il ([132.65.80.20] helo=smtpclient.apple) by kabab.cs.huji.ac.il with esmtp id 1qlPy0-000MTn-8O; Wed, 27 Sep 2023 11:32:20 +0300 From: Daniel Braniss Message-Id: <705D8590-5087-4DB8-B382-398D0B225CC9@cs.huji.ac.il> Content-Type: multipart/alternative; boundary="Apple-Mail=_DE8B6214-7B31-49C9-9BA8-E509047ED01B" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: FreeBSD 14, RPI CM3+ - how to use I2C? Date: Wed, 27 Sep 2023 11:32:20 +0300 In-Reply-To: <20230921155034.863ebfa8ead5bc85046fa988@bidouilliste.com> Cc: "Patrick M. Hausen" , freebsd-arm To: Emmanuel Vadot References: <8B10870E-C485-4626-BBCF-BEE0771D8B5A@hausen.com> <6E552CD8-4248-4EBE-A919-2A56CA1A87FA@hausen.com> <20230921155034.863ebfa8ead5bc85046fa988@bidouilliste.com> X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/15, country:IL]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEFALL_USER(0.00)[danny]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_NA(0.00)[no SPF record] X-Rspamd-Queue-Id: 4RwVGk1mmVz3Lbx --Apple-Mail=_DE8B6214-7B31-49C9-9BA8-E509047ED01B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii hi, is there a similar solution for allwinner i2c(twsi)? cheers, danny > On 21 Sep 2023, at 16:50, Emmanuel Vadot = wrote: >=20 > On Thu, 21 Sep 2023 15:09:45 +0200 > "Patrick M. Hausen" > wrote: >=20 >> Hi, >>=20 >>> Am 21.09.2023 um 14:10 schrieb Patrick M. Hausen : >>> dtoverlay=3Di2c1,pins_44_45 >>> dtoverlay=3Di2c-rtc,mcp7940x >>>=20 >>> Source: = https://docs.turingpi.com/docs/turing-pi1-cluster-management-bus-i2c >>>=20 >>> Did that, but >>>=20 >>> i2c -s >>>=20 >>> shows now output [...] >>=20 >> Turns out the FreeBSD installation does not come with all (?) = overlays >> by default like e.g. Ubuntu. >>=20 >> I downloaded the two missing files from here: >>=20 >> https://github.com/raspberrypi/firmware >>=20 >> and placed them in /boot/efi/overlays. >=20 > We don't install them all on the image but everything is packaged in > the rpi-firmware package. >=20 >> Bingo: >>=20 >> root@pi1:~ # i2c -s >> 57 5c >> root@pi1:~ # i2c -a 0x57 -o 0xf2 -d r -c 1 >> ff >>=20 >> Now I finally understand what all of this weird stuff *is* - sort of = ;-) >>=20 >> Kind regards, >> Patrick >=20 >=20 > --=20 > Emmanuel Vadot > = > --Apple-Mail=_DE8B6214-7B31-49C9-9BA8-E509047ED01B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii hi,
is there a similar solution for allwinner = i2c(twsi)?
cheers,
= danny


On 21 = Sep 2023, at 16:50, Emmanuel Vadot <manu@bidouilliste.com> wrote:

On Thu, 21 Sep 2023 15:09:45 +0200
"Patrick M. Hausen" = <pmh@hausen.com> wrote:

Hi,

Am = 21.09.2023 um 14:10 schrieb Patrick M. Hausen <pmh@hausen.com>:
dtoverlay=3Di2c1,pins_44_45
dtoverlay=3Di2c-rtc,mcp7940x

Source: https://docs.turingpi.com/docs/turing-pi1-cluster-management-bu= s-i2c

Did that, but

i2c -s

shows now output [...]

Turns out the FreeBSD = installation does not come with all (?) overlays
by = default like e.g. Ubuntu.

I downloaded the = two missing files from here:

https://github.com/raspberrypi/firmware

and placed them in /boot/efi/overlays.

We don't install them all on the image but everything is = packaged in
the = rpi-firmware package.

Bingo:

root@pi1:~ # i2c -s
57 5c
root@pi1:~ # i2c -a 0x57 -o 0xf2 -d r -c 1
ff

Now I finally understand what all of this = weird stuff *is* - sort of ;-)

Kind = regards,
Patrick


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

= --Apple-Mail=_DE8B6214-7B31-49C9-9BA8-E509047ED01B--