Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2017 14:53:15 -0600
From:      Dustin Marquess <dmarquess@gmail.com>
To:        Oleksandr Tymoshenko <gonzo@bluezbox.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Getting the kernel to let go of my UART!
Message-ID:  <CAJpsHY6c3Mu6iGc=FrPEvV5VtNubBGsgCRzOQegF5mJ-yQBUbQ@mail.gmail.com>
In-Reply-To: <20170123204400.GA73924@bluezbox.com>
References:  <CAJpsHY4LEdtnTVVz3nrpQcLFePwNnVQ_RdZ3k-2VMaf=HAJ-9A@mail.gmail.com> <48f8cbc1-3814-b9f6-0e3a-ebe97466d1df@selasky.org> <CAJpsHY6Wsoi14YMR3nM_OwfZphqF7rA5-E=SGfB0sM5EXfP9KA@mail.gmail.com> <20170122190659.GA62786@bluezbox.com> <CAJpsHY4Q%2BnpLa7QsN7%2BWOPP9EF65EEakGgxUnW3cmOJ4p0iQMQ@mail.gmail.com> <CAJpsHY5JedMAG88ThNMTFiWb02TyGAPzLfMiOG0_0=p7%2BPXDhg@mail.gmail.com> <20170123204206.GA73799@bluezbox.com> <20170123204400.GA73924@bluezbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 23, 2017 at 2:44 PM, Oleksandr Tymoshenko
<gonzo@bluezbox.com> wrote:
> Oleksandr Tymoshenko (gonzo@bluezbox.com) wrote:
>> Dustin Marquess (dmarquess@gmail.com) wrote:
>> > Okay, maybe the console thing was a red herring then.
>> >
>> > It's not marking it as a console at all anymore, but something is
>> > still locking the baud rate to 115200.  Even though stty and minicom
>> > are both set to 9600, anything set/received at 9600 doesn't work/is
>> > garbled.  If I set it to 115200, it works fine.  I had wrongly assumed
>> > it was because of it marking it as a console (since the console line
>> > in dmesg said 115200).
>> >
>> > Device map? enable_uart=1 aka core_freq= maybe? I'll try tinkering..
>>
>> It might be a problem with the driver itself. From a quick glance,
>> PL011 driver sets baudrate only if it has reference clock frequency
>> which doesn't seem to be the case for RPi. If reference clock
>> frequency is unknown divider register is left untouched.
>>
>> According to this document: http://elinux.org/RPiconfig you can
>> set initial baudrate in config.txt using init_uart_baud variable
>
> Also if you use u-boot divider register can be overridden by U-Boot
> intialization routine.

Okay, you're completely amazing and I definitely owe you some alcoholic drinks!

init_uart_baud=9600 did the trick completely.  I had completely
removed #define CONFIG_BCM283X_MU_SERIAL & #define CONFIG_PL01X_SERIAL
in U-boot to keep it from even touching the UART, and for good measure
I even commented-out the "puts("\r\nRPi3 PSCI monitor
installed\r\n");" in your PSCI monitor code (which probably wasn't
needed, but I wanted to keep the GPS module happy).. and sure enough,
after adding that config.txt setting, it works like a charm!

Thanks again!
-Dustin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJpsHY6c3Mu6iGc=FrPEvV5VtNubBGsgCRzOQegF5mJ-yQBUbQ>