[U-Boot] [PATCH v3 14/18] serial: 16550: allow the driver to support MediaTek serial

Ryder Lee ryder.lee at mediatek.com
Mon Nov 5 02:20:21 UTC 2018


On Sat, 2018-11-03 at 00:09 -0600, Simon Glass wrote:
> Hi Ryder,
> 
> On 2 November 2018 at 09:15, Ryder Lee <ryder.lee at mediatek.com> wrote:
> > This patch adds an extra operation in ns16550.c to suuport MediaTek
> > SoCs as we have a highspeed register which influences the calcualtion
> > of the divisor.
> >
> > Note that we don't support the baudrate greater than 115200 currently.
> >
> > Signed-off-by: Ryder Lee <ryder.lee at mediatek.com>
> > Tested-by: Matthias Brugger <matthias.bgg at gmail.com>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> > ---
> >  drivers/serial/ns16550.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> 
> Actually it seems to me that we should have a compatible string for
> this and deal with this at run-time?
> 
> Is that easy to do here?
> 

How about this:

uart0: serial at 11002000 { 
	compatible = "ns16550a"; 
	....
	mediatek,highspeed = <0>; 
	....

Ryder




More information about the U-Boot mailing list