Date: Tue, 2 Jun 2020 11:55:40 -0300 From: "Dr. Rolf Jansen" <freebsd@cyclaero.com> To: Ian Lepore <ian@freebsd.org> Cc: freebsd-arm@freebsd.org Subject: Re: BeagleBone AI Message-ID: <5299B3F7-1C95-4769-9701-F13699FE355C@cyclaero.com> In-Reply-To: <840faedfcf7c3c09a372cf566acddd8ad876ff2b.camel@freebsd.org> References: <DCF67826-C2CA-461F-9A61-F934F6FB042A@cyclaero.com> <966c33ea1924c2cfab5d9e295a9239d134e03f8a.camel@freebsd.org> <3CA84BA5-FEA8-4BD8-A713-C794139170EE@cyclaero.com> <840faedfcf7c3c09a372cf566acddd8ad876ff2b.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 02.06.2020 um 10:49 schrieb Ian Lepore <ian@freebsd.org>: >=20 > On Sun, 2020-05-31 at 16:56 -0300, Dr. Rolf Jansen wrote: >>> Am 31.05.2020 um 14:11 schrieb Ian Lepore <ian@freebsd.org>: >>>=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=B4t= >> 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 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=B2C = devices, we will perhaps run into some timing issues, and then I = probably want to revisit changing the clock frequency again. Best reagrds Rolf=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5299B3F7-1C95-4769-9701-F13699FE355C>