FreeBSD USB4/TBT3 support
Contents
- FreeBSD USB4/TBT3 support
General Information
"USB4/TBT3 support" discussion on freebsd-hackers@ initiated by Joseph Mingrone (jrm@)
Standing on the shoulders of giants
Initial work by Scott Long (scottl@)
Handover work from Scott Long (scottl@) to Hans Petter Selasky - HPS (hselasky@)
Sadly Hans Petter Selasky - HPS (hselasky@) has died in a car accident in 2023 ... may he RIP
People Showed Interest
Shawn Webb <shawn.webb@hardenedbsd.org>
Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Mark Millard <marklmi@yahoo.com>
Yonas Yanfa <yonas.yanfa@gmail.com>
Aymeric Wibo <obiwac@freebsd.org>
Ed Maste <emaste@freebsd.org>
Tom Jones <thj@freebsd.org>
Jean-Sébastien Pédron <dumbbell@freebsd.org>
Olivier Certner <olce@freebsd.org>
General Reading and Watching Materials
https://en.wikipedia.org/wiki/USB_hardware#USB_Power_Delivery
Video - Hans Peter Selasky - The new USB stack in FreeBSD - MeetBSD, Krakow, Poland July 2010
General Notes
References and Specifications
Problem Reports to be Possibly Revisited
Bug 237666 - repeated messages of "uhub_reattach_port: giving up port reset - device vanished"
HW List
Hosts
Note
- BSD Hardware Probes are not mine they are used to show HW details
- Hosts Expected To Work
Spectre x360 Convertible 13-aw0xxx: Featuring an integrated Intel 10th Gen Ice Lake Thunderbolt 3 controller
Note
Just to try it out and see whether it works or not and what does work
- Hosts Not Expected To Work
Dell Precision 5550: Featuring a discrete JHL7540 Thunderbolt 3 (Titan Ridge) controller
Lenovo ThinkPad P52s: Featuring a discrete JHL6240 Thunderbolt 3 (Alpine Ridge) controller
Devices
Note
- List is intentionally chosen to cover support for TBT3/USB4, bus powered vs externally powered, daisy chaining support and different functions (ports adapter, docks, hubs, storage, etc ...) or a combination
- TBT3
- USB4
General or Recurring Action Items
Send an email with this page to freebsd-hackers@, freebsd-usb@ and freebsd-desktop@
Send periodical progress updates to freebsd-hackers@, freebsd-usb@ and freebsd-desktop@
- Create and curate a list of HW on which support has been tested and verified. Options:
- Document every detail as much as possible
General Scope and Plan of Actions
Scope
- The very main and ultimate goal is to fully support USB4 1.0 and 2.0 and later any newer versions/revisions to be published in the future
- If in the end a driver can be produced that does support both TBT3 and USB4, that would be great
- Whatever we will not (fully or at all) support for TBT3 has to be clearly written down, possibly in man pages, to manage the expectations of FreeBSD end users
Initial Phase
Run and test Initial commit for USB4/Thunderbolt3 on HW List
List found issues and add it to Technical Roadmap
Build and Finish Up Phase
Execute Technical Roadmap
Technical Roadmap
Note
General advice as per Scott Long (scottl@):
I'd totally stay away from spending time on supporting Falcon Ridge, Alpine Ridge, and Titan Ridge controllers. They're old, they're extremely difficult to work with, and they're not worth the headache. In fact, just ignore all TBT3 controllers, and remove the Internal Connection Manager code. The ICM module isn't code that I'm all that proud of anyways =-). Focus on writing an HCM, supporting PCIe and DP tunneling, and integrating IOMMU protections into both the NHI driver and the PCIe tunnel drivers.
Test the (mostly) completed work
- Debug/Trace framework
- NHI controller driver
- PCIe bridge driver
- WMI driver
- Integrated Connection Manager handshake and authentication handling
- Router and Config Space layer handling (in progress, almost complete)
- Finish up tbtconfig (userland tool)
- Finish up man pages (tbtconfig and nhi_wmi)
- Add or finish up Host Connection Manager (HCM)
- Remove Internal/Integrated Connection Manager (ICM) support (NOTE: To be evaluated for final decision)
- Add Cross/Inter Domain login (IDSP - Inter Domain Service Protocol - Inter-Domain Specification) handler
- Rework USB3 stack in order to work with USB4 (USB3 tunnel support)
- Add USB-PD driver
- Add GPUs and Display Crossbars integration
- DP tunnelling (USB4)
- DP-Alt mode (USB-PD)
- Add PCIe tunnelling
- Review and possibly finish up Thunderbolt security model implementation
- Add DMAR/IOMMU protections NHI driver integrations
- Add DMAR/IOMMU protections PCIe tunnelling driver integrations (PCIe tunnelling control support)
- Add support for resetting and firmware flashing on the NHI via out-of-band control
- Add support for ThunderboltIP