From owner-freebsd-arm@FreeBSD.ORG Sat Feb 2 20:04:04 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B4425942; Sat, 2 Feb 2013 20:04:04 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 71595273; Sat, 2 Feb 2013 20:04:04 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r12K3vDh069100; Sat, 2 Feb 2013 20:03:57 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id fvuwqdeybn75gmahr4yr3hkyhs; Sat, 02 Feb 2013 20:03:57 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: Beaglebone Serial Ports Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <1359818003.93359.381.camel@revolution.hippie.lan> Date: Sat, 2 Feb 2013 12:03:56 -0800 Content-Transfer-Encoding: 7bit Message-Id: <66029B5F-2A19-4683-B589-814932E156A2@kientzle.com> References: <510CE8E0.9070102@g7iii.net> <1359818003.93359.381.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1283) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Feb 2013 20:04:04 -0000 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