Date: Mon, 9 Dec 2019 21:55:44 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355572 - in head: share/man/man4 sys/dev/usb/serial Message-ID: <201912092155.xB9LtiTn015004@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Mon Dec 9 21:55:44 2019 New Revision: 355572 URL: https://svnweb.freebsd.org/changeset/base/355572 Log: Allow baud rates of 1,228,800 and 1,843,200 on CP2101/2/3 usb-serial adapters. The datasheets for these chips claim the maximum is 921,600, but testing shows these two higher rates also work (but no rates above 921,600 other than these two work; these represent dividing the base buad clock by 3 and 2 respectively). Modified: head/share/man/man4/uslcom.4 head/sys/dev/usb/serial/uslcom.c Modified: head/share/man/man4/uslcom.4 ============================================================================== --- head/share/man/man4/uslcom.4 Mon Dec 9 21:10:18 2019 (r355571) +++ head/share/man/man4/uslcom.4 Mon Dec 9 21:55:44 2019 (r355572) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd December 9, 2019 .Dt USLCOM 4 .Os .Sh NAME @@ -43,6 +43,11 @@ The .Nm driver supports Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105 based USB serial adapters. +.Pp +The datasheets for the CP2101/CP2102/CP2103 list the maximum +supported baud rate as 921,600. +Empirical testing has shown that the rates 1,228,800 and 1,843,200 also work, +at least on some hardware, so the driver allows setting those rates. .Sh HARDWARE The following devices should work with the .Nm Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Mon Dec 9 21:10:18 2019 (r355571) +++ head/sys/dev/usb/serial/uslcom.c Mon Dec 9 21:55:44 2019 (r355572) @@ -624,7 +624,11 @@ uslcom_pre_param(struct ucom_softc *ucom, struct termi case USLCOM_PARTNUM_CP2102: case USLCOM_PARTNUM_CP2103: default: - maxspeed = 921600; + /* + * Datasheet for cp2102 says 921600 max. Testing shows that + * 1228800 and 1843200 work fine. + */ + maxspeed = 1843200; break; } if (t->c_ospeed <= 0 || t->c_ospeed > maxspeed)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912092155.xB9LtiTn015004>