Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Feb 2013 12:03:56 -0800
From:      Tim Kientzle <tim@kientzle.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Beaglebone Serial Ports
Message-ID:  <66029B5F-2A19-4683-B589-814932E156A2@kientzle.com>
In-Reply-To: <1359818003.93359.381.camel@revolution.hippie.lan>
References:  <510CE8E0.9070102@g7iii.net> <1359818003.93359.381.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 2, 2013, at 7:13 AM, Ian Lepore wrote:

> On Sat, 2013-02-02 at 10:22 +0000, Iain Young wrote:
>> Hi Folks,
>> 
>> Just a quick question with regards to some clarification serial ports
>> on the Beaglbone and FreeBSD. Am I correct in deducing that FreeBSD
>> lacks support for UARTS1 thru 5 at the moment ?
>> 
>> I can see what I believe to be UART0 (which is attached to the USB) as
>> /dev/cuau0, but not the others. A few finds and greps through the
>> kernel source didn't show up anything obvious either.
>> 
>> Is any one working on them ? Or is there a kernel module or option
>> that I need to enable for them to build ?

It should just be a matter of updating the DTS file with
additional UART entries and updated pinmux.

Unfortunately, the current BeagleBone builds use a compiled-in
device tree, so you'll have to edit the DTS file at
   sys/boot/fdt/dts/beaglebone.dts
and then rebuild the kernel.

I'd like to move that out of the kernel; the loader already
has logic to load a DTS file and pass it to the kernel,
it should just need some tinkering with loader.rc to get
it working.  That would make it a lot easier to tweak
settings on a per-system basis without having to rebuild
the kernel.

> According to the datasheet all the onboard uarts should be supported by
> our standard uart driver (but only uart1 has all the modem-control lines
> wired).  Two things need to be done to enable them: add entries to
> the .dts file (easy), and configure the multipurpose pins for them at
> runtime.  I have no idea how we handle the latter in the FDT world.  In
> the pre-FDT world it was pretty much ad-hoc and board-support routines
> that ran at startup configured pins for that board.


The pinmux for BeagleBone is in the DTS file,
specifically, the scm@44e10000 section.
 The pad-config section is parsed by
general code in sys/arm/ti/ti_scm.c driven from an
SoC-specific table in sys/arm/ti/am335x/am335x_scm_padconf.c.

I don't know offhand if there is currently a mechanism for
changing pinmux at runtime.   It would certainly be nice to
have such a mechanism.

Tim





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?66029B5F-2A19-4683-B589-814932E156A2>