From owner-freebsd-arm@freebsd.org Tue Jun 2 15:23:05 2020 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 1977D2F2651 for ; Tue, 2 Jun 2020 15:23:05 +0000 (UTC) (envelope-from freebsd@cyclaero.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.219]) (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 (2048 bits) client-digest SHA256) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bwlq2K8Lz46XJ; Tue, 2 Jun 2020 15:23:02 +0000 (UTC) (envelope-from freebsd@cyclaero.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1591111381; s=strato-dkim-0002; d=cyclaero.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=etEEbtGdrpJRvO/Mjr6eDCGCi0pcpCJtSlznjHAynVc=; b=kn3z5qoMgxp9brfrq2UQFIgXSGIc0g8FKqUGlni11ik7ksNBH8WIepsF5ks9fdqZtg Sg+3BQGhlZ6CzASPjwOybHx0k8E0ihEWkkxIptVizc7hjScb9gd2f/Nz5AvvWiEFRUnv E6cgNdua5Y0k7RDMFiH8Ajz5ItImJ/lH97ZxGWi0SmHlkEa2pvpCW/XbipUJuaZuamcp GhfXpQOi7UAnRHEdB1UzbVD1ebB8+Eru9WvJWOpPHYpy95SelkGy+2iQGNSY/aBuKC+W h2/YMIOcn2QyH8aXbz+pJ6tvBTBWgmoio7qxk5V0vZEXcbjzodqqYvM8rYkeyLgxAlQD 39ig== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9PbZFAm0A==" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 46.9.0 DYNA|AUTH) with ESMTPSA id I06cf5w52FMsOgx (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 2 Jun 2020 17:22:54 +0200 (CEST) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 3505F1350F91D; Tue, 2 Jun 2020 12:22:52 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: BeagleBone AI From: "Dr. Rolf Jansen" In-Reply-To: <479317334.2616392.1591110518765@mail.yahoo.com> Date: Tue, 2 Jun 2020 12:22:51 -0300 Cc: Ian Lepore , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <72C6B827-3F3E-4CB2-8987-C926602F755D@cyclaero.com> References: <966c33ea1924c2cfab5d9e295a9239d134e03f8a.camel@freebsd.org> <3CA84BA5-FEA8-4BD8-A713-C794139170EE@cyclaero.com> <840faedfcf7c3c09a372cf566acddd8ad876ff2b.camel@freebsd.org> <5299B3F7-1C95-4769-9701-F13699FE355C@cyclaero.com> <479317334.2616392.1591110518765@mail.yahoo.com> To: Oskar Holmlund X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 49bwlq2K8Lz46XJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cyclaero.com header.s=strato-dkim-0002 header.b=kn3z5qoM; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@cyclaero.com designates 81.169.146.219 as permitted sender) smtp.mailfrom=freebsd@cyclaero.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[81.169.146.219:from]; R_DKIM_ALLOW(-0.20)[cyclaero.com:s=strato-dkim-0002]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:81.169.146.128/25]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cyclaero.com]; NEURAL_HAM_LONG(-1.05)[-1.053]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cyclaero.com:+]; NEURAL_HAM_SHORT(-0.41)[-0.411]; FROM_NAME_HAS_TITLE(1.00)[dr]; NEURAL_HAM_MEDIUM(-1.02)[-1.018]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6724, ipnet:81.169.144.0/22, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[81.169.146.219:from] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 15:23:05 -0000 > Am 02.06.2020 um 12:08 schrieb Oskar Holmlund = : >> Den tisdag 2 juni 2020 16:56:02 CEST, Dr. Rolf Jansen = skrev:=20 >>> Am 02.06.2020 um 10:49 schrieb Ian Lepore : >>> On Sun, 2020-05-31 at 16:56 -0300, Dr. Rolf Jansen wrote: >>>>> Am 31.05.2020 um 14:11 schrieb Ian Lepore : >>>>>=20 >>>>> On Fri, 2020-05-29 at 23:21 -0300, Dr. Rolf Jansen wrote: >>>>>> ... >>>>>>=20 >>>>>> First Question: >>>>>>=20 >>>>>> What modern SBC with more than 1 I=C2=B2C bus and which can run >>>>>> FreeBSD 13++ would you suggest? >>>>>>=20 >>>>>> ... >>>>>>=20 >>>>>> Two more Questions: >>>>>>=20 >>>>>> Is it reasonable to assume that FreeBSD would run on a BBAI in >>>>>> the future, let=C2=B4s say in 2 to 3 years? >>>>>>=20 >>>>>> Perhaps I could help porting FreeBSD to a BBAI. What would be the >>>>>> general steps? >>>>>>=20 >>>>>>=20 >>>>>> Many thanks in advance for any suggestions, advices and >>>>>> clarifications. >>>>>>=20 >>>>>> Best regards >>>>>>=20 >>>>>> Rolf >>>>>=20 >>>>> BTW, if you need drivers for any new i2c devices just let me know >>>>> and >>>>> I'll see what I can do. >>>>=20 >>>> I am pretty comfortable with register level programming, and so far = I >>>> came away with ioctl() calls for what I needed. So perhaps I won=C2=B4= t >>>> need exactly a driver for new I=C2=B2C devices. However, I am far = away >>>> from being a perfect I=C2=B2C expert, specially when it comes to = timing >>>> and the best sequence of addressing different devices on the bus. >>>> Perhaps, I may ask some questions when I run into problems. >>>>=20 >>>>> Also, in my experience you can often get away with running an i2c >>>>> bus >>>>> faster than 400khz if you need more bandwidth. I've never seen = any >>>>> modern chip fail to work at 800khz, and most seem to work fine up >>>>> to >>>>> about 1mhz; above that they become pretty unreliable. >>>>=20 >>>> Does this =E2=80=9Eover clocking=E2=80=9C work for the ARM boards = as well? I just set >>>> the clock-frequency in the dts-overlay which activates I2C1 of the >>>> BBB from 400000 to 800000. The bus seems to work as usual, however, = I >>>> did not yet come to check its speed. How again would I do that? >>>> Probably there are many more questions to come :-) >>>>=20 >>>> Best regards >>>>=20 >>>> Rolf >>>=20 >>> I suspect it works on some boards and maybe won't work on others. = Some >>> SOCs have very flexible clock settings in their i2c controllers, a = few >>> just allow choosing between fixed low and high speeds. >>>=20 >>> For experimenting, there is a sysctl dev.iicbus.#.frequency that you >>> can change on the fly (it will override any value from the dts). = The >>> value is the frequency in hz. >>>=20 >>> -- Ian >>=20 >> Thank you very much for your response. I checked the sysctl setting, = and the system accepts the values. The bus works at 800000, however, I = can set it as high as 10000000 (10 MHz) and it is still working. = Perhaps, there is some sort of internal validation before the frequency = value is actually applied to the HW. In the moment this is more a matter = of curiosity than an actual need. Once we equipped the bus with all I=C2=B2= C devices, we will perhaps run into some timing issues, and then I = probably want to revisit changing the clock frequency again. >>=20 >> Expect no more than 1MHz >> = https://svnweb.freebsd.org/base/head/sys/arm/ti/ti_i2c.c?revision=3D355727= &view=3Dmarkup >> Line 127+ >>=20 >> //Oskar Ah, OK, that explains the finding. So perhaps the bus is really working = at 1 MHz. Thank you very much for the hint. Best regards Rolf=