Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2019 02:10:19 -0600
From:      Dustin Marquess <dmarquess@gmail.com>
To:        Brian Scott <bscott@bunyatech.com.au>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Serial Port on RPi3
Message-ID:  <CAJpsHY7trHxX2QDAnh--tE8UXnEAH0ZsQ2YZ2-Y0SppFYojPpA@mail.gmail.com>
In-Reply-To: <75aa4f8f-1c93-0cc0-b3ed-0208c40098be@bunyatech.com.au>
References:  <75aa4f8f-1c93-0cc0-b3ed-0208c40098be@bunyatech.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
You're absolutely right about the PL011 speed change issue.  I had the
same exact issue (for the exact same reason too, GPS!) and gonzo told
me to use init_uart_baud in my config.txt:

https://lists.freebsd.org/pipermail/freebsd-arm/2017-January/015474.html

I managed to get the older U-Boots to not spew on the UART at all.
The newer ones seem to desperately want one and panic/die/etc if they
can't find one.  I spent hours on it and finally just gave up :(.

-Dustin

On Thu, Feb 7, 2019 at 12:17 AM Brian Scott <bscott@bunyatech.com.au> wrote:
>
> 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: <PrimeCell UART (PL011)> 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.
>
>
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJpsHY7trHxX2QDAnh--tE8UXnEAH0ZsQ2YZ2-Y0SppFYojPpA>