1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause 3.\" 4.\" $NetBSD: uchcom.4,v 1.2 2008/04/30 13:10:54 martin Exp $ 5.\" 6.\" Copyright (c) 2007 The NetBSD Foundation, Inc. 7.\" All rights reserved. 8.\" 9.\" This code is derived from software contributed to The NetBSD Foundation 10.\" by Takuya SHIOZAKI (tshiozak@netbsd.org). 11.\" 12.\" Redistribution and use in source and binary forms, with or without 13.\" modification, are permitted provided that the following conditions 14.\" are met: 15.\" 1. Redistributions of source code must retain the above copyright 16.\" notice, this list of conditions and the following disclaimer. 17.\" 2. Redistributions in binary form must reproduce the above copyright 18.\" notice, this list of conditions and the following disclaimer in the 19.\" documentation and/or other materials provided with the distribution. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 22.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 25.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31.\" POSSIBILITY OF SUCH DAMAGE. 32.\" 33.Dd June 25, 2025 34.Dt UCHCOM 4 35.Os 36.Sh NAME 37.Nm uchcom 38.Nd WinChipHead CH9102/CH343/CH341/CH340 USB to serial UART driver 39.Sh SYNOPSIS 40.Cd "device usb" 41.Cd "device ucom" 42.Cd "device uchcom" 43.Pp 44In 45.Xr rc.conf 5 : 46.Cd kld_list="uchcom" 47.Pp 48In 49.Xr sysctl.conf 5 : 50.Cd hw.usb.uchcom.debug=1 51.Sh DESCRIPTION 52The 53.Nm 54driver provides support for the WinChipHead USB to serial UART adapters. 55If the appropriate hardware is detected, 56the driver will be loaded automatically by 57.Xr devmatch 8 . 58To load the driver manually, add it to the 59.Ic kld_list 60in 61.Xr rc.conf 5 , 62or use 63.Xr kldload 8 64at runtime. 65The device is accessed through the 66.Xr ucom 4 67driver, which makes it behave like a 68.Xr tty 4 . 69.Pp 70Call out through this interface with applications like 71.Xr cu 1 72or 73.Xr tip 1 . 74.Sh HARDWARE 75The 76.Nm 77driver supports the following USB to serial UART controllers: 78.Pp 79.Bl -bullet -compact 80.It 81WinChipHead CH9102 (max 6Mbps) 82.It 83WinChipHead CH343 (max 6Mbps) 84.It 85WinChipHead CH341 (max 2Mbps) 86.It 87WinChipHead CH340 (max 2Mbps) 88.El 89.Sh SYSCTL VARIABLES 90These settings can be entered in the 91.Xr loader 8 92prompt, set in 93.Xr loader.conf 5 , 94.Xr sysctl.conf 5 , 95or changed at runtime with 96.Xr sysctl 8 : 97.Bl -tag -width "hw.usb.uchcom.debug" 98.It Va hw.usb.uchcom.debug 99Enable debugging messages, default 100.Ql 0 101.El 102.Sh FILES 103.Bl -tag -width "/dev/ttyU*.init" -compact 104.It Pa /dev/ttyU* 105for callin ports 106.It Pa /dev/ttyU*.init 107.It Pa /dev/ttyU*.lock 108corresponding callin initial-state and lock-state devices 109.Pp 110.It Pa /dev/cuaU* 111for callout ports 112.It Pa /dev/cuaU*.init 113.It Pa /dev/cuaU*.lock 114corresponding callout initial-state and lock-state devices 115.El 116.Sh SEE ALSO 117.Xr cu 1 , 118.Xr tty 4 , 119.Xr ucom 4 , 120.Xr usb 4 121.Sh HISTORY 122The 123.Nm 124driver appeared in 125.Fx 8.0 126from 127.Nx 5.0 . 128