From: kevlo Date: Wed, 15 May 2024 01:41:18 +0000 (+0000) Subject: Add CH9102 support. Tested on the NodeMCU esp8266 v3 ch9102x board. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e990f8b2e58ba48028898d85639f5555cc45c16f;p=openbsd Add CH9102 support. Tested on the NodeMCU esp8266 v3 ch9102x board. ok deraadt@ --- diff --git a/share/man/man4/uchcom.4 b/share/man/man4/uchcom.4 index 5aa552b44f0..fc983d1bda8 100644 --- a/share/man/man4/uchcom.4 +++ b/share/man/man4/uchcom.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uchcom.4,v 1.3 2024/04/12 00:43:32 kevlo Exp $ +.\" $OpenBSD: uchcom.4,v 1.4 2024/05/15 01:41:18 kevlo Exp $ .\" .\" Copyright (c) 2007 Jonathan Gray .\" @@ -14,23 +14,23 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 12 2024 $ +.Dd $Mdocdate: May 15 2024 $ .Dt UCHCOM 4 .Os .Sh NAME .Nm uchcom -.Nd WinChipHead CH343/341/340 based USB serial adapter +.Nd WinChipHead CH9102/343/341/340 based USB serial adapter .Sh SYNOPSIS .Cd "uchcom* at uhub?" .Cd "ucom* at uchcom?" .Sh DESCRIPTION The .Nm -driver supports WinChipHead CH343/341/340 serial devices. +driver supports WinChipHead CH9102/343/341/340 serial devices. .Pp The CH341/340 devices only support a variety of baud rates up to 921600. -CH343 devices support any baud rate up to 6 Mbps. +CH9102/343 devices support any baud rate up to 6 Mbps. .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , diff --git a/share/man/man4/ucom.4 b/share/man/man4/ucom.4 index 260986fe7be..5bec190ea04 100644 --- a/share/man/man4/ucom.4 +++ b/share/man/man4/ucom.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ucom.4,v 1.34 2024/04/12 00:43:32 kevlo Exp $ +.\" $OpenBSD: ucom.4,v 1.35 2024/05/15 01:41:18 kevlo Exp $ .\" $NetBSD: ucom.4,v 1.3 2000/04/14 14:55:18 augustss Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 12 2024 $ +.Dd $Mdocdate: May 15 2024 $ .Dt UCOM 4 .Os .Sh NAME @@ -38,7 +38,7 @@ .Cd "ucom* at moscom?" # MosChip Semiconductor MCS7703 .Cd "ucom* at uark?" # Arkmicro Technologies .Cd "ucom* at ubsa?" # Belkin -.Cd "ucom* at uchcom?" # WinChipHead CH343/341/340 +.Cd "ucom* at uchcom?" # WinChipHead CH9102/343/341/340 .Cd "ucom* at ucycom?" # Cypress .Cd "ucom* at uftdi?" # FTDI .Cd "ucom* at uipaq?" # iPAQ diff --git a/share/man/man4/usb.4 b/share/man/man4/usb.4 index 57ebda4a046..c51113aa4a5 100644 --- a/share/man/man4/usb.4 +++ b/share/man/man4/usb.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usb.4,v 1.218 2024/04/12 00:43:32 kevlo Exp $ +.\" $OpenBSD: usb.4,v 1.219 2024/05/15 01:41:18 kevlo Exp $ .\" $NetBSD: usb.4,v 1.15 1999/07/29 14:20:32 augustss Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 12 2024 $ +.Dd $Mdocdate: May 15 2024 $ .Dt USB 4 .Os .Sh NAME @@ -179,7 +179,7 @@ Arkmicro Technologies ARK3116 based USB serial adapter .It Xr ubsa 4 Belkin USB serial adapter .It Xr uchcom 4 -WinChipHead CH343/341/340 based USB serial adapter +WinChipHead CH9102/343/341/340 based USB serial adapter .It Xr ucom 4 USB tty support .It Xr ucrcom 4 diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c index 94c451c03b9..96a71fadc2a 100644 --- a/sys/dev/usb/uchcom.c +++ b/sys/dev/usb/uchcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uchcom.c,v 1.34 2024/04/12 00:43:32 kevlo Exp $ */ +/* $OpenBSD: uchcom.c,v 1.35 2024/05/15 01:41:19 kevlo Exp $ */ /* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */ /* @@ -31,7 +31,7 @@ */ /* - * driver for WinChipHead CH343/341/340. + * driver for WinChipHead CH9102/343/341/340. */ #include @@ -249,7 +249,8 @@ static const struct usb_devno uchcom_devs[] = { { USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341 }, { USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH340 }, { USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341A }, - { USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH343 } + { USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH343 }, + { USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH9102 } }; struct cfdriver uchcom_cd = { diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index c1bdf7a11e2..87997e99043 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$OpenBSD: usbdevs,v 1.762 2024/05/06 05:00:19 jsg Exp $ +$OpenBSD: usbdevs,v 1.763 2024/05/15 01:41:19 kevlo Exp $ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ /* @@ -4654,6 +4654,7 @@ product WAVESENSE JAZZ 0xaaaa Jazz blood glucose meter product WCH CH341 0x5523 CH341 serial/parallel product WCH2 CH341A 0x5523 CH341A serial/parallel product WCH2 CH343 0x55d3 CH343 serial/parallel +product WCH2 CH9102 0x55d4 CH9102 serial/parallel product WCH2 CH340 0x7523 CH340 serial/parallel product WCH2 TEMPER 0xe025 TEMPer sensor