From nobody Tue Jan 14 00:44:30 2025 X-Original-To: usb@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 4YX9PV6RGbz5l3Qw for ; Tue, 14 Jan 2025 00:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YX9PV5hFkz3BwR for ; Tue, 14 Jan 2025 00:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736815470; 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: in-reply-to:in-reply-to:references:references; bh=c5M1A/50fsekkMhbdtgf7rvPT+VjgexLBiPgo1imCm8=; b=FZhv72BAne/D2jEqdmwcwhCguQu/pYk9BTCmLaM2BRS9lLtlkf3Artk8iFju7qo3yLDGgP skdiZ9bVhxF0EzTuwcYLYRWKFrFxFFSmObtxFNTU628wacVHnIEP2jTsxU+LvwMN78j/su pGU6kdcEyvC9RyLYABqozPYscL0b/Rp9WfSJzKWuP3FYKfZODvWPGXlvyBYQfbSa90cy2d McEfDAihyAoeS0vKIm3XyISaaMPhEe7PZQ+7ABwQE9WuOhmtkz51U7C6W+5kx/eqco8keQ +VZs32WKPRkxsXIkspwYWlFBezHTVCKhun2TAKIRQI/I534+mTq+zAcicQc3DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736815470; 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: in-reply-to:in-reply-to:references:references; bh=c5M1A/50fsekkMhbdtgf7rvPT+VjgexLBiPgo1imCm8=; b=I2bRf6npp7ZUNXRv203FbTcnk8Fe0ixlE/E3PuN9g4p6kQzvdP1ijKV5wyc9bd6YgABcqA WbxdxYfxijpMhjXdstj0uLODtgx7AF2fRKEPcFqXN4MWEZigN5takK0+VTcCIa2/MQJII8 tqwa5ZBrNjDDE+jS4Gjndpe13XH9g0JBtTD0nQ0+CXatBEAcovYlcBf6B8cFvxqh3K11+W GQ1WOhmgWmUwds15lrBDIzleufK9b1kWghvDdIVSIcGcPlsg2s0Q9YwGNO/39ZvIilqBM5 JIlmYftsPhkg91bw66+TIor+5AATjIN+eCLtYVoGnnxt4n1JhzFIUEdDUPNfhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736815470; a=rsa-sha256; cv=none; b=xDPxUPYCuflSrQCGt8SuTbe1rKubUwRRY3/mGt+4yRnldUn0VzqRS7y2AvU3AEwFei6mq1 CCJsnwMaUZQJT3cDdlU+A+MVrbay36fzMLRzbSb2zLb8rTyr2X8EnG+6ZuJ5f2oPOaHjP+ TvTXi5pJVmndihgA9K27ZH/NIM63z709kZsSEY5xJyw+V9UZm+AgGxX1h07zmlQPqV4uTx iBVz467GvgsbT+H9sYhTOHK9AddeKtesJOMWNHqeD1YuhB/V11pxqAYp5U5v0a4DWNAAHW se0leaiMHDXe1yaZ/8W5N4tKo2NYTzLoRP4YSUfsWgOSo+gujjO/elTvRLYPcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4YX9PV4pnJztQr for ; Tue, 14 Jan 2025 00:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 50E0iURd065931 for ; Tue, 14 Jan 2025 00:44:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50E0iU9d065930 for usb@FreeBSD.org; Tue, 14 Jan 2025 00:44:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 284042] FTDI: UART breaks JTAG Date: Tue, 14 Jan 2025 00:44:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tomek@cedro.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-usb@freebsd.org Sender: owner-freebsd-usb@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284042 --- Comment #3 from Tomasz "CeDeROM" CEDRO --- (In reply to bsd from comment #2) > I have 2 interfaces after connecting FTDI: /dev/cuaU0 and /dev/cuaU1. Yup that seems to be the problem. I would try to exclude "JTAG" interface f= rom being attached by ucom driver (devd?) and only keep the uart port to be vis= ible as single /dev/cuaUn. Maybe also this can be set inside FTDI configuration? https://ftdichip.com/wp-content/uploads/2023/11/AN_551_FT4232HP_FT2232HP_FT= 232HP_Configuration_Guide.pdf I have KT-LINK FT2232H based interface and it only shows as single /dev/cua= U0: https://ia803401.us.archive.org/34/items/manualzilla-id-5664958/5664958.pdf Here is some history on how I added the KT-LINK to FreeBSD.. at first it was two UART ports (/dev/cuaUn) and these were also interfering with JTAG operations when used both at the same time but after UART was free then I w= as able to use JTAG again. Maybe it was exclusive I don't remember sorry. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D175893 As for today 14.2-RELEASE AMD64 I can see only one single UART port when attaching KT-LINK. Maybe there is some quick or JTAG channel is excluded somehow. You may use that as reference point. ugen0.7: at usbus0 uftdi: skipping JTAG interface #0 for 'KT-LINK' at 0.7 uftdi0 on uhub17 uftdi0: on usbus0 ugen0.7: at usbus0 (disconnected) uftdi0: at uhub17, port 1, addr 6 (disconnected) uftdi0: detached % ls /dev/cua* /dev/cuaU0 /dev/cuaU0.init /dev/cuaU0.lock Not that long ago I helped folks at AVRDUDE project to verify the FTDI driv= er + some new chip flashing method and I used and added KT-LINK configuration to flash some chips I could not flash otherwise: https://github.com/avrdudes/avrdude/issues/928 Looks like the "JTAG" part uses interface "A"? Maybe this KT-LINK stuff could be of help to you somehow? I am not sure if FT2232H can at all offer to work both with UART and JTAG at the same time when attached to uftdi/ucom driver and then operated with libftdi? Can you confirm this kind of operations on Linux or Windows as reference point? This might be possible but you would have to detach the uc= om driver first from the JTAG part and assuming there are two interfaces expos= ed that can be claimed independently at the same time. I know more modern "smart" debug probes (like DAPLink) use dedicated firmwa= re with RTOS that expose JTAG, UART, and MSC as separate USB interfaces of a single device and these are handled separately allowing simultaneous operat= ions (these are in fact exclusive too at some point). Alternatively if you work with ESP32 chips there is this new USB-Serial-JTAG stuff that allows both Serial and JTAG transport over the built-in USB devi= ce interface. From what I read once these signals can be re-routed to external GPIO and it should be possible to create a debug probe that way but I did n= ot have time to play with that: https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-guides/us= b-serial-jtag-console.html https://docs.espressif.com/projects/esp-iot-solution/en/latest/usb/usb_over= view/usb_serial_jtag.html --=20 You are receiving this mail because: You are the assignee for the bug.=