From nobody Wed Jun 25 12:38:21 2025 X-Original-To: dev-commits-src-main@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 4bS1ZP5f5Wz600Rc; Wed, 25 Jun 2025 12:38:21 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bS1ZP3Rlfz3nFv; Wed, 25 Jun 2025 12:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750855101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFtKyPCGDOwXN3k2Na5g1ihCbhMDEYdSUBZHLDipmIc=; b=EgJ0SMzQdTiibpTq9e5RR7wEA6M2j2OrtGcyU4+5zzAxrP2DO8++MY2IR0jyF+1zO8NoAW 7nNdfn7YLqOGGTl/AgwlZNebEPO/Bd1R46IfsOkJOblzwod+pVxtvcLfJ7q+Py3GLRz4s8 YYMnRHo7YppTVyxudwCnD4iIK/lxtfx/zCALc9IDec8j2qUe4mXgYZ8VoSDK1QELmw7xdF WZUApOUJb3n/uBBA13ndvA3WWJvMyfLp7ZrFEt6gvyDpONjpFboC/8GvVCTonMtQB6fPiU BBqv7PFIzbXOAfLLpJ+j8KnF2irYWMoRo6CEhZ0ukTpSG8niUpENxsu50Eb7vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750855101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vFtKyPCGDOwXN3k2Na5g1ihCbhMDEYdSUBZHLDipmIc=; b=qkcWw7Eefemu6MI7QjJL3maKMKrnlJunHIeKaNKnaVYkKTHLFpMgRTI8Ty8A5yqEZ+8EqB jh1HCqpD8QxzKL/7pfi5prL24z83crwDVT6ExrurKsUPC0Kj0ot1A8UPRz+t/3Cxl99047 kRps+uxG4WRC/xt0MKjqxETVIYPIds/XtH3SFjUMpQC8BXoRyZpD2QhHqQeFJixXYuaGDm 5apLZ3Xo0RoFDKixFb9YSvLA+MqdmSQMh9xhJEf83In5+GqMB0aR/cBWhZwVdXk3Q85pal 0ldZiA1IeERY0qz72k9vOcAjq9RoSyjqjisC6/FRnVrSRYXe9bRw2CyLdJeY7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750855101; a=rsa-sha256; cv=none; b=oDfXMRrItvJF0BioOofTbKsi4dtG7Y/pbhlWo/U9ksHm44VK9N4bkEam8AXj5+qVahfhmx 269l3rA1z4Mou9oPxAtxU5fWGi4L4/Q478nYipWRhJ7Lf6yEHrb7CVSH4QxA7sE7nUXR/3 Lc3dU2oTttpvhlDNbkZDjhqDH4/HxFOpL3PYj29XmDASFgQB6ER37//t1GzVad11b64rgr ZLpL5u5RP6S3uk0BlSAdcotepK7KTXG8z5IqTv5uLxR0pny9f+ODEKLMWUgLVUjUvKvuTm oIFjIhYsDmqCcVW1OQ57/7Lf8+PI/+9+KCmyIZqw1c8JaTWVtmoPojbQUNAVKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bS1ZP2MT1z2Sq; Wed, 25 Jun 2025 12:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55PCcL2w034090; Wed, 25 Jun 2025 12:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55PCcLGG034086; Wed, 25 Jun 2025 12:38:21 GMT (envelope-from git) Date: Wed, 25 Jun 2025 12:38:21 GMT Message-Id: <202506251238.55PCcLGG034086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 7176e1e3b547 - main - uftdi.4: Makeover! List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7176e1e3b5474a209f54cfd5d567a523bce3b9f6 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=7176e1e3b5474a209f54cfd5d567a523bce3b9f6 commit 7176e1e3b5474a209f54cfd5d567a523bce3b9f6 Author: Alexander Ziaee AuthorDate: 2025-05-30 01:54:15 +0000 Commit: Alexander Ziaee CommitDate: 2025-06-25 12:36:32 +0000 uftdi.4: Makeover! + tag SPDX + rewrite document description to one line in contemporary style + rewrite synopsis in vt/iwx/mtw/uart's style, adding all sysctls for brevity, in the future I will call this "possibilities style" + move ioctls into an ioctl section (we should use these more) + add a sysctl section listing all sysctls and their defaults + remove list of specific 20 year old usb serial adapters from hardware + move list of supported controllers to the hardware section + explain how the driver is loaded in description, and give usage hints MFC after: 3 days Thanks: cperciva (devd calls devmatch at runtime) Thanks: linimon (you dont need to be able to read *) Thanks: adrian (here, you can find things in the code) Reviewed by: adrian, ivy, mhorne (previous version) Differential Revision: https://reviews.freebsd.org/D50608 --- share/man/man4/uftdi.4 | 119 +++++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 54 deletions(-) diff --git a/share/man/man4/uftdi.4 b/share/man/man4/uftdi.4 index 9bd3d4a4a293..b526143eaa25 100644 --- a/share/man/man4/uftdi.4 +++ b/share/man/man4/uftdi.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: uftdi.4,v 1.5 2002/02/07 03:15:08 ross Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -27,61 +30,90 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 26, 2017 +.Dd June 25, 2025 .Dt UFTDI 4 .Os .Sh NAME .Nm uftdi -.Nd USB support for serial adapters based on the FTDI family of USB -serial adapter chips. +.Nd Future Technology Devices International 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 uftdi" -.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 -uftdi_load="YES" -.Ed +In +.Xr rc.conf 5 : +.Cd kld_list="uftdi" +.Pp +In +.Xr sysctl.conf 5 : +.Cd hw.usb.uftdi.debug=1 +.Cd hw.usb.uftdi.skip_jtag_interfaces=0 .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the -following FTDI chips: +driver supports FTDI USB to serial UART devices. +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 .Bl -bullet -compact .It -FT8U100AX +FTDI FT4232H .It -FT8U232AM +FTDI FT232R .It -FT8U232BM +FTDI FT230X .It -FT232R +FTDI FT2232H .It -FT2232C +FTDI FT2232D .It -FT2232D +FTDI FT2232C .It -FT2232H +FTDI FT8U232BM .It -FT4232H +FTDI FT8U232AM .It -FT230X +FTDI FT8U100AX .El -.Pp -The device is accessed through the -.Xr ucom 4 -driver which makes it behave like a -.Xr tty 4 . -.Pp +.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.uftdi.skip_jtag_interfaces" +.It Va hw.usb.uftdi.debug +Enable debugging messages, default +.Ql 0 +.It Va hw.usb.uftdi.skip_jtag_interfaces +Ignore JTAG interfaces, default +.Ql 1 +.El +.Sh IOCTLS Many of the supported chips provide additional functionality such as bitbang mode and the MPSSE engine for serial bus emulation. The @@ -219,27 +251,6 @@ ioctl, you must pass the special value .Dv UFTDI_CONFIRM_ERASE as the argument to this ioctl. .El -.Sh HARDWARE -The -.Nm -driver supports the following adapters: -.Pp -.Bl -bullet -compact -.It -B&B Electronics USB->RS422/485 adapter -.It -Elexol USB MOD1 and USB MOD3 -.It -HP USB-Serial adapter shipped with some HP laptops -.It -Inland UAS111 -.It -QVS USC-1000 -.It -Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote -.It -Prologix GPIB-USB Controller -.El .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact .It Pa /dev/ttyU* @@ -255,14 +266,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 -appeared in +driver appeared in .Fx 4.8 from .Nx 1.5 .