The "official" Firefly-RK3399 firmware use a baudrate of 1.5 Mbps.
This is somewhat annoying (OpenBSD/arm64 expects the console to run at
115200 bps) and I plan to provide firmware images that use the
standard rate instead. But until I figure out how to properly build
ATF (ARM Trusted Firmware) for the board, I'm stuck with 1.5 MBps.
The Firefly-RK3399 board that was donated to me came with a little
serial-to-USB converter board that containst a Silican Labs CP2104
chip. This chip is supported by uslcom(4), but that drivers limits
the baudrate to speeds up to 921600. But the chip defenitely supports
the higher rates.
Turns out the older CP2101/2/3 chips only support speeds up to 921600
bps, but later chips support speeds up to 2 Mbps. The diff below
raises the limit to 2 Mbps. This allows me to connect to the board.
I'm not sure what happens if you try to configure speeds above 921600
for the older chips. My guess would be that the USLCOM_SET_BAUD_RATE
command will fail, but maybe it will simply pick a supported speed. I
don't think that's a big issue and it's not really worth trying to
figure out which of the supported devices don't support the high
rates,
ok?
Index: uslcom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uslcom.c,v
retrieving revision 1.39
diff -u -p -r1.39 uslcom.c
--- uslcom.c 2 Sep 2016 09:14:59 -0000 1.39
+++ uslcom.c 19 May 2017 18:12:19 -0000
@@ -438,7 +438,7 @@ uslcom_param(void *vsc, int portno, stru
uint32_t baudrate, flowctrl[4];
int data;
- if (t->c_ospeed <= 0 || t->c_ospeed > 921600)
+ if (t->c_ospeed <= 0 || t->c_ospeed > 2000000)
return (EINVAL);
baudrate = t->c_ospeed;