Subject: Re: Do 16650 or 16950 UARTs work for anyone?
To: None <port-i386@netbsd.org, current-users@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: current-users
Date: 08/11/2007 19:14:28
On Sat, Aug 11, 2007 at 06:58:31PM -0400, Thor Lancelot Simon wrote:
 [...]
> We do not support the clock prescaler
> that makes higher speeds than the standard 115200 available.
> 
> I'm trying to use a Startech card with an Oxford OX16PCI952 (dual-port
> 16950) with our com driver.  The 16952 is 16650-compatible including,
> according to the datasheet, starting up in 16550 mode.  I am seeing
> characters echoed back to me in 'cu' but not, as far as I can tell,
> transmitted by the device.  I haven't yet rebuilt the driver with the
> COM_16650 option.

The 16950 supports a MicroWire EEPROM that can set the prescaler and
other chip features at power-up.  Among the 950's features beyond those
of the 650 are, evidently, adjustable prescaler values per clock divisor
setting.

After a look at this page: http://osdir.com/ml/serial/2006-05/msg00043.html
I tried setting speeds from 2400 to 9600bps.  With all these rates, data
are actually transmitted and received at 230400bps -- but it does work.

Why the vendor would set up the chip to run at 230.4k for all speeds below
9600 I am not sure.  But, that's how it is.

I conclude that we're going to need actual prescaler support to have the
16950 work at arbitrary data rates, but if you just want to run at 230.4k
it works okay with the code that's in NetBSD now.  I may try to reach up
the device tree and check the PCI device ID for these so I can have the
driver only allow 230400bps for them right now, as a first step.

Thor