From owner-freebsd-arm@freebsd.org Thu Feb 7 06:16:31 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB8ED14C6D73 for ; Thu, 7 Feb 2019 06:16:30 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D8DC271091 for ; Thu, 7 Feb 2019 06:16:29 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id x176GIP5060854 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Thu, 7 Feb 2019 17:16:21 +1100 (AEDT) (envelope-from bscott@bunyatech.com.au) To: freebsd-arm@freebsd.org From: Brian Scott Subject: Serial Port on RPi3 Message-ID: <75aa4f8f-1c93-0cc0-b3ed-0208c40098be@bunyatech.com.au> Date: Thu, 7 Feb 2019 17:16:17 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 06:16:31 -0000 Hi, Has anyone had any success using the serial port on a Raspberry Pi 3 at anything other than 115200? I'm trying to connect a GPS module to it (as most people do...) but am having a lot of trouble. To give myself some diagnostics I have connected another machine up using an adafruit cable and a terminal program. My first problem was u-boot. I have largely managed to get it out of the way by setting the stdin, stdout and stderr environment variables to usbkbd, vidconsole, and vidconsole (i.e. removing the serial option) but it still insists on sending: MMC:   mmc@7e300000: 1 Loading Environment from FAT... OK In:    serial Out:   vidconsole Err:   vidconsole at 115200 baud before getting out of the way. No big deal because it doesn't look like gps commands and it is being sent at much higher speeds than I would expect the gps to understand anyway. The message on boot for the UART is: uart0: mem 0x7e201000-0x7e201fff irq 24 on simplebus0 If I send data to the uart (echo Hi >/dev/cuau0) it works but at 115200 baud, not respecting the stty speed of 9600. Similarly, using cu (cu -l cuau0 -s 9600), I can send data but at 115200, not the expected 9600 baud. I have done some experiments with enable_uart= in the config.txt as well as overlays from the linux world (uart0.dtbo and uart1.dtbo). While I can get FreeBSD to detect the Mini-UART with some combinations of settings, either on it's own or with the PL011, I haven't been able to get anything out of the mini-uart and only a single character out of the PL011 (at 115200 baud despite other settings). My conclusions so far: * There is no working driver behind the detection of the mini-uart. * There is no way to change the speed of the PL011 to anything other than 115200 (maybe because u-boot sets it that way at startup - haven't fiddled with those knobs yet). Am I missing something important somewhere? Cheers, Brian P.S. I'm running 12-RELEASE with no software changes.