device-tree on BeagleBone Black (enabling UART)
Emmanuel Vadot
manu at bidouilliste.com
Fri Feb 12 08:01:20 UTC 2021
On Thu, 11 Feb 2021 19:15:49 -0700
Ian Lepore <ian at freebsd.org> wrote:
> On Fri, 2021-02-12 at 01:00 +0100, Kristoff wrote:
> > Hi Ian, Daniel,
> >
> >
> > I am sorry for the late reply.
> > (inline comments)
> >
> >
> > On 8/02/2021 9:41 p.m., Ian Lepore wrote:
> > >
> > > > I am running FreeBSD 12.1 on a beaglebone black. As I want to use
> > > > it
> > > > for
> > > > a time-server (i.e. connect it to a GPS), I want to enable an
> > > > additional
> > > > UART (and also a pps gpio-pin, I guess).
> >
> > Good news! I managed to get the uart working.
> > To get to the same configuration as Daniel, I upgraded to FreeBSD
> > 13.0,
> > and that seams to have done the trick.
> >
> > Uart1 has been created with a device-tree overlay-file and I can use
> > it
> > on the device.
> >
> >
> > Question, what is the difference between /dev/cuau0 and /dev/ttyu0,
> > and
> > which one do I use for what?
> >
>
> ttyu0 is the "call-in" device, and cuau0 is teh "call-out" device. The
> difference is that when you call open on a call-in device, the open
> call blocks until the carrier-detect signal on the tty goes active
> (presumably signaling that a modem has answered and connected). With
> the call-out device, the blocking doesn't happen.
>
> > > The beaglebone has a special pps driver that uses the am335x chip's
> > > timer hardware to measure the pps pulse time with better accuracy
> > > than
> > > the generic gpio-pps driver. To use it, add
> > >
> > > am335x_dmtpps_load=YES
> >
> > At the same time I also wanted to try the pps driver you mention.
> >
> > However, it does not seams to load.
> >
> > I get this:
> >
> > [root at black1 ~]# kldload am335x_dmtpps
> > kldload: can't load am335x_dmtpps: No such file or directory
> >
> >
> > The issue seams to be this:
> >
> > # dmesg
> > (...)
> > KLD am335x_dmtpps.ko: depends on ti_sysc - not available or version
> > mismatch
> >
> > Looking on my system, I seems to have the source of 'to_sysc', but
> > not
> > the .ko.
> > [root at black1 ~]# locate ti_sysc
> > /usr/src/sys/arm/ti/ti_sysc.c
> > /usr/src/sys/arm/ti/ti_sysc.h
> >
> >
> > What is the procedure to compile one single kernel-module?
> > I tried "make ti_sysc", but that failed due to compilation errors
> >
> >
>
> Hmm, are you using the GENERIC kernel, or a custom kernel, or what?
> The ti_sysc device is a relative newcomer, and we may have neglected to
> add it to the GENERIC config. There probably isn't a makefile to build
> it as a module.
>
> So the fix for that would be to add 'device ti_sysc' to whatever kernel
> config you're using and rebuild the kernel.
>
> -- Ian
There is no device ti_sysc, it's standard and should be present as
long as one does "files ../ti/files.ti" in the kernel config.
https://cgit.freebsd.org/src/tree/sys/arm/ti/files.ti#n21
--
Emmanuel Vadot <manu at bidouilliste.com>
More information about the freebsd-arm
mailing list