{josuah.net} | {panoramix-labs.fr}
 (DIR)  • {josuah.net}
 (DIR)  • {panoramix-labs.fr}
       
        {git} | {cv} | {links} | {quotes} | {ascii} | {mail}
 (DIR)  • {git}
 (BIN)  • {cv}
 (DIR)  • {links}
 (DIR)  • {quotes}
 (DIR)  • {ascii}
       
       ━━━━━━━━━━━━━
       USB Standards
       ━━━━━━━━━━━━━
        The latest changes in the USB ecosystem can look confusing.
       
        Every new generation of connectors is a burden for hardware engineers, firmware
        authors, and users, and requires efforts for adoption.
       
        Why introducing USB-C? What are the Alternate Modes? What has Thunderbolt to do
        with it? What is that USB4 thing?
       
 (IMG)  {{the various usb logos}}
       
       USB, the Star Wars connector?
       ─────────────────────────────
        For those of us who saw any of the Star Wars movies, series, and whatnot they
        do of it today, one detail could have catched the eye of the tech-enthusiast
        which is very close to USB.
       
        Star Wars has droids: human looking droids, kettle looking droids, ball looking
        droids...
       
        Protocol droid mostly communicate to humans and other living beings like Z6-PO;
        but others mostly communicate to machines, and only produce beeps sounds that
        characters seems to understand, like R2D2.
       
        To communicate with machines, like a space ship, an access terminal for
        servers, a door controller, a storage computer... there is always this same
        circular-shaped plug, regardless of what he had to communicate with:
       
 (IMG)  {{R2-D2-plug}}
       
        Is it not an illustration of what USB strives to be? Unifying the connectors
        onto a single plug has always been the motive of the Universal Serial Bus.
       
       Merging connectors over and again
       ─────────────────────────────────
        Quite a few protocols were absorbed by the ubiquitous USB octopus as early as
        USB 1.0:
       
 (HTM)  • {COM ports} for serial consoles, goodbye bulky DB-9 plugs at the back of
          the laptop, a usb-to-serial adapter is now what to use for accessing routers
          serial console.
       
 (HTM)  • {PS/2} mice and keyboard
       
 (HTM)  • {parallel printer port}, which used an even bulkier DB25 connector.
       
 (HTM)  • {Ethernet ports} as some manufacturers have the audacity to ommit including
          actual ethernet connector for laptops.
       
        The list goes on.
       
 (IMG)  {{Back Panel Connectors PCChips M925LR Motherboard}}
       
        I do like these many sturdy old plugs though!
       
       USB Type-C connector
       ────────────────────
        It was a great relief to many when the USB Type-C connectors was unveiled:
        finally a connector that could be plugged on either direction!
       
        The USB Type-C connector did not introduce an upgrade to the USB protocol: it
        is a mere connector specification, which might be used for any purpose, but is
        most often used for USB.
       
        In fact, the USB Type-C connector is used for many more protocols that are
        *not* USB in any kind of way!
       
        A lot of protocol work groups were attracted by this convenient connector, and
        many decided to adopt it for their own wire protocol.
       
        USB was a standard *protocol* that aimed to unify protocols onto a common BUS,
        with USB Type-C, it becomes a standard *connector* that unify connectors for
        *different protocols*!
       
        For the end-user, that means fewer time looking for the right cable and right
        socket, but since the connector is used for different protocols, how to be sure
        the cable is plugged at the right place? One may now plug a Type-C printer to a
        Type-C display port of a computer.
       
 (TXT)  {{USB Type-C pinout}}
       
       USB Type-C Alternate Mode
       ─────────────────────────
        Since the same plug carries many protocols directly with their own way to use
        the many pins of the Type-C connector, there has to be a way to make the
        computer select the right protocol once the cable is plugged.
       
 (HTM)  This is what {Alternate Mode} is for. It is not a feature of USB 3.2 or any
        protocol version, it is a feature of the Type-C connector.
       
        • If you plug an **USB** device (any version) to a Type-C port, the port will
          talk USB protocol and let you use i.e. your mice or keyboard.
       
        • If you plug a **DisplayPort** device to a Type-C port, the port will talk
          DisplayPort language and stream the screen content.
       
        • If you plug a **Thunderbolt 3** device to a Type-C port, the port will talk
          Thunderbolt language and i.e. connect an NVMe storage disk to the computer.
       
 (HTM)  These are the three main {Alternate Mode available}.
       
        This shows by and large that the USB Type-C connector has nothing to do with
        USB anymomre, and its use for the USB protocol is only one of its purposes.
       
 (IMG)  {{one does not simply connect a displayport screen via usb 3.2, one plugs a displayport screen to a displayport type-c connector}}
       
        While connecting a DisplayPort screen in Alternate Mode, there is not a single
        bit of USB transmitted.
       
       USB 1.0, USB 2.0, USB 3.0, USB 3.1, USB 3.2
       ───────────────────────────────────────────
        The other versions of USB are mostly incremental improvement over USB 1.0,
        improving speed without changing the basics.
       
        Each version can use any of the USB connectors, Type-A, Type-B, Type-C, without
        adaptation. The various USB X.Y are the logical protocols, and the various
        Type-? are the physical port specifications.
       
 (HTM)  Although, the USB 3.2 started to {use an extra pin} of the Type-C connector in
        order to reach higher speeds.
       
       And Thunderbolt in all that?
       ────────────────────────────
        Thunderbolt is another take on plugging anything to a computer, and was also
        around since long. Instead of defining communication modes, it focuses on
        tunneling two existing protocols:
       
        **PCIe**, for plugging graphic, network, storage, or other extension cards to
        the processor.
       
        **DisplayPort**, for plugging 4k displays.
       
        Oops! Two ways to plug a screen through DisplayPort on a Type-C connector:
        Directly with DisplayPort Alternate Mode; or via Thunderbolt Alternate Mode
        which further encapsulates DisplayPort.
       
        Reminder: Alternate Mode is not an encapsulation: it is a way to select which
        protocol to talk directly over Type-C. Thunderbolt is an encapsulation: a
        wrapping protocol onto which is encoded another protocol.
       
        By comparing with TCP/IP Thunderbolt is like ethernet and PCIe is like IP.
        whereas using DisplayPort Alternate Mode is like putting IP packets through a
        wire without ethernet headers.
       
        **Thunderbolt {1} and {2}** did not introduce their own connector type, and
 (HTM)  • {1}
 (HTM)  • {2}
        instead are borrowing the Mini DisplayPort *connector*.
       
        **Thunderbolt {3} and {4}** also avoid using yet another connector type, and
 (HTM)  • {3}
 (HTM)  • {4}
        instead use the Type-C *connector*.
       
        How convenient: the Type-C connector has the Alternate Mode for letting the
        computer know that it is Thunderbolt talking over the wire instead of USB.
       
        This means that a lot more of computers are going to have an external PCIe
        port, through the Thunderbolt encapsulation, through the Type-C connector. For
        instance, we can already find adapters that lets you plug regular PCIe devices
        like a graphic card over a cable!
       
 (IMG)  {{Radeon external GPU over Thunderbolt over Type-C connector}}
       
 (HTM)  Yes, that means {serious gaming} on laptop.
       
       USB4: the revenge of Thunderbolt
       ────────────────────────────────
        Over the years, USB had quite a few approaches for sharing a single port for
        many devices:
       
        • Since USB 1.0, defining new standard protocol replacing the existing
          protocols: new generic data types (isochronous, interrupt, bulk) for as many
          use-cases as needed.
       
        • Through the new USB Type-C connector with Alternate Modes, various protocol
          use the physical Type-C port, but keep their existing wire protocol, directly
          over the electric pins of the Type-C connector without conversion or
          encapsulation.
       
        • The new USB4 follows the strategy of Thunderbolt: encapsulation of the
          other protocols inside a ethernet-like packet format.
       
        In fact, USB4 *is* Thunderbolt 3. USB and Thunderbolt are now a same and single
        protocol.
       
        USB4 only is an encapsulation protocol, and cannot connect anything like a
        mouse or a hard drive. After all, it *is* Thunderbolt 3, and not an evolution
        of USB 3.
       
        For that, USB4 encapsulates USB 1.0 (or any other version) onto USB4 packets
        that are transmitted over a Type-C .
       
        For making things more clear:
       
        • Instead of USB Type-C, we can say Type-C connector.
       
        • Instead of USB4, we can say Thunderbolt 3.
       
        With the advent of Thunderbolt 3:
       
        We do not have "yet another USB protocol", instead USB is adopting Thunderbolt
        3.
       
        We do not have "yet another thing to negociate before to talk", as Thunderbolt
        3 is using the existing Alternate Mode of the Type-C connector to let the
        computer know what to use.
       
        In fact, the only change is that in addition of PCIe and DisplayPort,
        Thunderbolt is now able to encapsulate USB (1.0, 2.0 and 3.x).
       
        This has practical advantages, such as allowing a high-speed device like an
        external NVMe or Screen, as well as a slow-speed device like a keyboard,
        without limiting everyone at the slow speed.
       
 (IMG)  {{Thunderbolt logo}}
       
        Thunderbolt already tried to merge with USB in the past, but the USB
        Implementation Forum did refuse. It looks like USB-IF changed their mind...
       
       Conclusion
       ──────────
        The way of the past was replacing various protocols by USB.
       
        The way of the present is using Alternate Mode for talking various protocols
        over the same physical port.
       
        The way of the future is using Thunderbolt 3 for encapsulating various
        protocols on a same packet format.
       
       Links and Quotes
       ────────────────
        Resources that helped me understand how these standards play together.
       
 (HTM)  {https://en.wikipedia.org/wiki/USB-C}
       
 (HTM)  {https://en.wikipedia.org/wiki/USB}
       
 (HTM)  {https://en.wikipedia.org/wiki/Thunderbolt_(interface)}
       
 (HTM)  {https://eestalktech.com/usb4/}
       
 (HTM)  {https://news.ycombinator.com/item?id=20447741}
       
        ┊ What you quote is not related at all to what Thunderbolt cables support
        ┊ beside Thunderbolt. It just states that you can use Thunderbolt to transmit
        ┊ DisplayPort signals. By that you're utilizing the Thunderbolt alternate
        ┊ mode to tunnel DisplayPort signals, instead of using the DisplayPort
 (DIR)  ┊ alternate mode {{{josuah.net}}}. Using Thunderbolt to transmit DisplayPort
        ┊ signals only works with devices which support Thunderbolt, not with screens
        ┊ supporting "just" DisplayPort. To make confusion even worse: All existing
        ┊ Thunderbolt controllers also support the DisplayPort alternate mode, so a
        ┊ lot of people who believe they're using Thunderbolt are probably just using
        ┊ the DisplayPort alternate mode instead. Afaik Thunderbolt cables usually
 (DIR)  ┊ support both, but I'm not sure if that's mandated somehow.  {{{josuah.net}}} 
        ┊ 33]
       
 (HTM)  {https://jcs.org/2021/07/19/desktop}
       
        ┊ After some testing with the monitor once I got it, I realized that using it
        ┊ with a desktop system might be difficult because it uses a single USB-C
        ┊ (non-Thunderbolt) cable for its display and audio, but it also has a 3-port
        ┊ USB-C hub on the back of it and its brightness controls and ambient light
        ┊ sensor also connect over that single USB-C cable.  This all works by using
        ┊ the USB-C cable for data as usual but it sends the screen data over
        ┊ DisplayPort using dedicated pins of the USB-C cable (“Alt Mode”). This
        ┊ requires that the computer it’s connecting to have a USB-C port that can
        ┊ break out those pins and route them to the DisplayPort signal of the GPU
        ┊ while also handling the data devices of the USB-C connection. Using an
        ┊ external GPU (“video card” back in my day) would be difficult because
        ┊ even if it had a USB-C connector (most just have HDMI and/or DisplayPort),
        ┊ it would need to somehow route the data from that cable back to the
        ┊ computer as USB data since the GPU is only talking DisplayPort.
       
 (HTM)  {https://learn.adafruit.com/understanding-usb-type-c-cable-types-pitfalls-and-more}
       
 (HTM)  {https://overengineer.dev/blog/2021/04/25/usb-c-hub-madness.html}
       
 (HTM)  {https://fabiensanglard.net/nousb/index.html}
       
 (HTM)  {https://stderr.nl/Blog/Hardware/Thunderbolt/TechnologyOverview.html}