From nobody Fri Jul 4 18:23:13 2025 X-Original-To: dev-commits-src-all@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 4bYhpB2Jkdz61jQ5; Fri, 04 Jul 2025 18:23:14 +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 4bYhpB16brz3nJP; Fri, 04 Jul 2025 18:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751653394; 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=SIRxe9P9ANwXIOWuZ68PQM64pBzN2nvjPF4T0Lt5CLI=; b=BCJJ3n6egn09GxN/EG2RAxjsvINnG7tKhEanyFOdXGUPd6hXb8+AehDBSqifcQMmBrNjCp XvgXwTXnkd/4DpXZflWYgoohpW0ZBl1hRTIcIqzlQsnc3gG3YBOL4iWdpJboQQp2j8vTWE 5pQe7DIDELJWrzGwvCnYlj4cO57iRw7g9hql1/NGtPOp9ayA4ZYuD97C2zt2ATy01lhGz4 bl2rJW2umC/nmCetU3z3KH+o3XFni6jRu/VXIS342bn1hnqA1lIK1riYrWeQxTzbzRmbzb 9UjfvzFWPletnQIJFxf58ZCG7qqk+oe0KPLjJkH22kknTdkPIC2+W8CsRid/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751653394; 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=SIRxe9P9ANwXIOWuZ68PQM64pBzN2nvjPF4T0Lt5CLI=; b=mkpS2J0REoNRBmPB9A6XW8xQkN/aaZ+Oxmv8bpcUOSD+TnsIWWwI82TX61cyQjPalWEvqr 1vZwXzcqViQzHgMeqvXcakTyK56v6eMO59KyGy9jgriKIrh5kQHemQaT67ImDKzg36RI0T p7Q23xkDyi5KN6kQZhSgNXDLtG/zfJ0KUdPqJyV0Roe3It/IUH5jQnoXRzPIT6E38XEmhE /RHQxgGpjWXJ83ItqeKCV3DLvA8mtk62djrMEO5V/qiPCddHznj0n3u5cA6MxYd1Zo8/A7 OC3x+/Z1sLkn+wkwZK0sBisG9CMOOf7FkSKN83G1/DAy5CkzqlGt47Qg3sp62A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751653394; a=rsa-sha256; cv=none; b=Yh9yiHRGHkvDl6CFf+/MDQNB0oiZCJkS1mT6bf6XTFDfA8D3k0s/d7vLoQjtZu95oJxspd /aa3mlgWvlNVhS3ZhpP4Vwz3MrVyQmhP2Phl16M1yzUIzwdH+g4agYmy4c/JzeLLocgcIU 7r21cMHYgTPv4sZ7tpWif2xtFK7eyN+CqTHgI9UUm2XxdL7o9Mgp16zWBUJUkrolV8RYWB JwPOFpIHUCBWmA3CE9p/BtGJfSq2vtdET+JJ5uXNbX5bakItAnvh5s1mJGB9ZXmOyUbj85 wkrU0c2xhDyiBzJy0RFAAiMp62V996srl4sCHQWnrIj+Z+sgr77+Kloh1TH7cw== 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 4bYhpB0X2tz11ZW; Fri, 04 Jul 2025 18:23:14 +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 564INDk7069919; Fri, 4 Jul 2025 18:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 564INDcX069916; Fri, 4 Jul 2025 18:23:13 GMT (envelope-from git) Date: Fri, 4 Jul 2025 18:23:13 GMT Message-Id: <202507041823.564INDcX069916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: f74d99809359 - stable/14 - uftdi.4: Makeover! List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f74d998093596c09d6216c91b6435a590dcc14a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f74d998093596c09d6216c91b6435a590dcc14a0 commit f74d998093596c09d6216c91b6435a590dcc14a0 Author: Alexander Ziaee AuthorDate: 2025-05-30 01:54:15 +0000 Commit: Alexander Ziaee CommitDate: 2025-07-04 18:20:34 +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 (cherry picked from commit 7176e1e3b5474a209f54cfd5d567a523bce3b9f6) --- 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 .