BeagleBone AI
Ian Lepore
ian at freebsd.org
Tue Jun 2 13:49:45 UTC 2020
On Sun, 2020-05-31 at 16:56 -0300, Dr. Rolf Jansen wrote:
> > Am 31.05.2020 um 14:11 schrieb Ian Lepore <ian at freebsd.org>:
> >
> > On Fri, 2020-05-29 at 23:21 -0300, Dr. Rolf Jansen wrote:
> > > ...
> > >
> > > First Question:
> > >
> > > What modern SBC with more than 1 I²C bus and which can run
> > > FreeBSD 13++ would you suggest?
> > >
> > > ...
> > >
> > > Two more Questions:
> > >
> > > Is it reasonable to assume that FreeBSD would run on a BBAI in
> > > the future, let’s say in 2 to 3 years?
> > >
> > > Perhaps I could help porting FreeBSD to a BBAI. What would be the
> > > general steps?
> > >
> > >
> > > Many thanks in advance for any suggestions, advices and
> > > clarifications.
> > >
> > > Best regards
> > >
> > > Rolf
> >
> > BTW, if you need drivers for any new i2c devices just let me know
> > and
> > I'll see what I can do.
>
> 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’t
> need exactly a driver for new I²C devices. However, I am far away
> from being a perfect I²C 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.
>
> > 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.
>
> Does this „over clocking“ 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 :-)
>
> Best regards
>
> Rolf
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.
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.
-- Ian
More information about the freebsd-arm
mailing list