From: Kevin Lo Subject: uchcom(4): support CH9102 To: tech@openbsd.org Date: Tue, 14 May 2024 11:25:53 +0800 Hi, This diff adds CH9102 support. Tested with NodeMCU esp8266 v3 ch9102x board. ok? Index: share/man/man4/uchcom.4 =================================================================== RCS file: /cvs/src/share/man/man4/uchcom.4,v retrieving revision 1.3 diff -u -p -u -p -r1.3 uchcom.4 --- share/man/man4/uchcom.4 12 Apr 2024 00:43:32 -0000 1.3 +++ share/man/man4/uchcom.4 14 May 2024 03:20:37 -0000 @@ -19,18 +19,18 @@ .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 , Index: share/man/man4/ucom.4 =================================================================== RCS file: /cvs/src/share/man/man4/ucom.4,v retrieving revision 1.34 diff -u -p -u -p -r1.34 ucom.4 --- share/man/man4/ucom.4 12 Apr 2024 00:43:32 -0000 1.34 +++ share/man/man4/ucom.4 14 May 2024 03:20:37 -0000 @@ -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 Index: share/man/man4/usb.4 =================================================================== RCS file: /cvs/src/share/man/man4/usb.4,v retrieving revision 1.218 diff -u -p -u -p -r1.218 usb.4 --- share/man/man4/usb.4 12 Apr 2024 00:43:32 -0000 1.218 +++ share/man/man4/usb.4 14 May 2024 03:20:37 -0000 @@ -179,7 +179,7 @@ Arkmicro Technologies ARK3116 based USB .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 Index: sys/dev/usb/uchcom.c =================================================================== RCS file: /cvs/src/sys/dev/usb/uchcom.c,v retrieving revision 1.34 diff -u -p -u -p -r1.34 uchcom.c --- sys/dev/usb/uchcom.c 12 Apr 2024 00:43:32 -0000 1.34 +++ sys/dev/usb/uchcom.c 14 May 2024 03:20:38 -0000 @@ -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_dev { 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 = { Index: sys/dev/usb/usbdevs =================================================================== RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.762 diff -u -p -u -p -r1.762 usbdevs --- sys/dev/usb/usbdevs 6 May 2024 05:00:19 -0000 1.762 +++ sys/dev/usb/usbdevs 14 May 2024 03:20:38 -0000 @@ -4654,6 +4654,7 @@ product WAVESENSE JAZZ 0xaaaa Jazz bloo 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