From nobody Sun Jan 18 21:11:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dvR943Pn8z6NxVs for ; Sun, 18 Jan 2026 21:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dvR942TYYz3sXJ for ; Sun, 18 Jan 2026 21:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768770696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nV3Nou97LPSR1mFCwGci/GPhAOLdWalkHxtNHyZ5rx8=; b=YlNhadMecdVAS3napNnz/fgfzMnRU6k4RZdoRWfhtRX4cJDK3u1JEzcAeyaGweh6FWzIXX PU90uV2IiEnm/NOmgRdDctoQ5k27xf4gjtXlD7geTNxI1s6ZvckRoA1EwGQ8gwLerBWYfl 8VP2xxucGBd5QmL1MYPDwsX0398Ie832Cxwwua1DuzZCFSuO1Knc9a3+6d9DAv7X5ws1bQ OXizSt5fZhETpEzU2lxyvydoF+lkomLIlXDAOwdOkSCENiiDVvVwgrHzVC+hRmqY3Asz2h PddB3Rg1LdakywmqQWnKlnGKtk7lCqyPZGpW7VRb59Wga0qJC5TViTw4tpsFcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768770696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nV3Nou97LPSR1mFCwGci/GPhAOLdWalkHxtNHyZ5rx8=; b=lVEvguGR/ZS1REHq+/v2JwD6iugLBciw7P37ryqJe2yrCvtoiVVHHLRkwxaypCDOuZYDHq 9PkJb8AQtGEI6uala2f0kjYQgeVvhY6Pg+1cowz/AfPZBcvNDpAE4cHlh9zzilzuxri5ff cU6/IgTHyijOiyvLa8SpjIWVYLpfuc9CBTa4Spxk3tpQMtX6pel/pa/5/x7k7aCxMhZNdX AszlZgTOcl8mzQfi4eQe2viC9BkLWRcvvaUmc+P/Ggr+cOd4xajSGs+TRIpVvx6T9QxvNk 5ILPVfTXVhpCbgnLC2iSIWAFS7D1ZZ/YoZ8cIeZzxkkkmb4wlG9weUvdSDuIsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768770696; a=rsa-sha256; cv=none; b=MUBht+M1bKhif3zRj0p0Xd8hXjISMrTD6s82i3rRUoAP/aWvkx8ptbGYrhiGJ8qXJuJcAY bQb13h535JlQ4sBzabv2FjUBOuXZVHuHfuxknWLgdww2vE9TVBlMdCvnTRXLqRdzxN2iEV tvZXADVFgG2fl3ETRAUQ5/bqFBgN+IKGsg54m81DRkls940fuCEo0cPzMK5GW90WxIo+9r JD4fTOzb6PclYM9HfQ15EwevrumsTrnjDY8+FhLv3sTjSjXNls5hKF9O4yEyeByVTLFBtK Mpy3tOCurF98UrUnoRBU+J8Pqbudk46wfYcLTGMaa3lkrPp17KHOgmMsdHZlqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dvR941gTnz12nR for ; Sun, 18 Jan 2026 21:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2232b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 18 Jan 2026 21:11:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alexander Ziaee From: Warner Losh Subject: git: 916166d9f98f - stable/14 - uchcom.4: Add HARDWARE, makeover List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 916166d9f98f6db8630b1955c1ae5606614a950f Auto-Submitted: auto-generated Date: Sun, 18 Jan 2026 21:11:36 +0000 Message-Id: <696d4c88.2232b.7b79f6e3@gitrepo.freebsd.org> The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=916166d9f98f6db8630b1955c1ae5606614a950f commit 916166d9f98f6db8630b1955c1ae5606614a950f Author: Alexander Ziaee AuthorDate: 2025-06-25 04:37:37 +0000 Commit: Warner Losh CommitDate: 2026-01-18 21:10:52 +0000 uchcom.4: Add HARDWARE, makeover Tag spdx, improve document description for apropos, improve synopsis for clarity and consistency, improve description to explain usage, improve hardware for hardware release notes, mention the sysctl, xref the application to use this driver, improve history. MFC: no (unless change adding CH9102/CH343 mfcs) Fixes: 1395712cab8e9 (add support for CH9102 and CH343) Reviewed by: carlavilla, kevlo Differential Revision: https://reviews.freebsd.org/D51036 (cherry picked from commit f0ba0b99ef0a9cf9e7822278d7d2bc0a80911361) --- share/man/man4/uchcom.4 | 88 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 24 deletions(-) diff --git a/share/man/man4/uchcom.4 b/share/man/man4/uchcom.4 index 4d395573589f..6cee3d82c2ce 100644 --- a/share/man/man4/uchcom.4 +++ b/share/man/man4/uchcom.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: uchcom.4,v 1.2 2008/04/30 13:10:54 martin Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -27,37 +30,75 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 19, 2024 +.Dd June 25, 2025 .Dt UCHCOM 4 .Os .Sh NAME .Nm uchcom -.Nd WinChipHead CH9102/CH343/CH341/CH340 serial adapter driver +.Nd WinChipHead CH9102/CH343/CH341/CH340 USB to serial UART driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device usb" .Cd "device ucom" .Cd "device uchcom" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -uchcom_load="YES" -.Ed +In +.Xr rc.conf 5 : +.Cd kld_list="uchcom" +.Pp +In +.Xr sysctl.conf 5 : +.Cd hw.usb.uchcom.debug=1 .Sh DESCRIPTION The .Nm -driver provides support for the WinChipHead CH9102/CH343/CH341/CH340 -USB-to-RS-232 Bridge chip. +driver provides support for the WinChipHead USB to serial UART adapters. +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually, add it to the +.Ic kld_list +in +.Xr rc.conf 5 , +or use +.Xr kldload 8 +at runtime. +The device is accessed through the +.Xr ucom 4 +driver, which makes it behave like a +.Xr tty 4 . +.Pp +Call out through this interface with applications like +.Xr cu 1 +or +.Xr tip 1 . +.Sh HARDWARE +The +.Nm +driver supports the following USB to serial UART controllers: .Pp -The datasheets for the CH340/CH341 list the maximum -supported baud rate as 2,000,000. -CH9102/CH343 devices support any baud rate up to 6 Mbps. +.Bl -bullet -compact +.It +WinChipHead CH9102 (max 6Mbps) +.It +WinChipHead CH343 (max 6Mbps) +.It +WinChipHead CH341 (max 2Mbps) +.It +WinChipHead CH340 (max 2Mbps) +.El +.Sh SYSCTL VARIABLES +These settings can be entered in the +.Xr loader 8 +prompt, set in +.Xr loader.conf 5 , +.Xr sysctl.conf 5 , +or changed at runtime with +.Xr sysctl 8 : +.Bl -tag -width "hw.usb.uchcom.debug" +.It Va hw.usb.uchcom.debug +Enable debugging messages, default +.Ql 0 +.El .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact .It Pa /dev/ttyU* @@ -73,15 +114,14 @@ for callout ports corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO +.Xr cu 1 , .Xr tty 4 , .Xr ucom 4 , .Xr usb 4 .Sh HISTORY The .Nm -driver first appeared in -.Nx . -The first -.Fx -release to include it was -.Fx 8.0 . +driver appeared in +.Fx 8.0 +from +.Nx 5.0 .