Contribute
Register

[HOW TO] USB ports map for macOS with USBToolBox

I remember recalling certain ports take up "2 ports". Is that right? I just want to make sure before buying my motherboard that has 11 USB 3.2 Gen 2 ports (USB-A). Asking whether that means only half are used?
Yes, USB3 requires 2 ports, depending on the motherboard it may also require one for and led light control, one more for sound depending (on the device) and if you want to use Bluetooth one more to enable that.
 
@srodd14
To count the ports, you must take into account that each USB2 port counts as 1 but each USB3 port (classic or type C) counts as 2, the USB2 part and the USB3 part.
USB2 ports are shown as HSxx (HighSpeed) and USB3 as SS (SuperSpeed).
On-board USB2 hubs are displayed as PRxx or USRxx (omitted on macOS).
 
(Edited to correct and expand)

USB 3 and USB 2 (+USB 1) are separate circuits in the same socket and appear as distinct "ports" for mapping, each counting against the 15 max per root hub controller. When mapping, these are sometimes referred to as companions because they share a socket. You can enable either companion or both.

For example, 7 back-panel sockets with 2 & 3 enabled are 14. But there are also internal ports on the same root hub, like BT, LED, plus typically 2 ports (USB 2 & 3) that connect to an another onboard hub that fans out to the front-panel.

So you'll have to make some compromises about which of these to enable to get a fit. For example maybe only enable USB 2 on a couple of sockets.

USB via Thunderbolt is on its own root, so these don't count. Ports on add in cards don't count. I think gen 2x2 is usually front-panel which is sourced by the internal hub hanging off the back-panel root.

So the only challenge is getting the backpanel plus internal that hang off the backpanel root to fit into 15. This will become clear with via toolbox.



As an aside..

All devices on a root controller share the PCIe lanes for that controller. So the total amount of USB port bandwidth presented at sockets tends to exceed the PCIe bandwidth for the root controller.

This matters for some use cases.



Further aside...

USB2 was a CPU-polled I/O not DMA, so it's relatively compute expensive to run at high load.

USB 3 greatly improved bus dynamics with DMA and events to get a 10x bandwidth gain (450M to 5G) while not growing CPU workload.

3.1 gen 1 doubled USB 3 signaling to 10G.

USB 3.2 gen 2x2 is two 3.1 gen 1 ports married into a type-C socket to get 20G.

Apple wisely punted this gen2x2 nonsense and went to Thunderbolt which is actually scalable.



Heading out to orbit...

Above USB, chipset topology and bandwidth sharing plays out again at PCIe bus as devices are ganged onto lanes and share those lanes' bandwidth.

In a modern desktop board, there are typically 28 lanes (at whatever generation mix) where 20 are direct CPU lanes (what used to be called northbridge) for traditional first-class PCI, including GPU and add-in cards, and 8 more CPU lanes feed the "chipset" via DMI (what used to be called southbridge) that fan out into many 20 logical lanes, allowing more slots, and devices.

IMG_5609.png


If you carefully read the mainboard documentation, the topology details are spelled out by a bunch of feature conditions.

For the z590 ROG Hero I use, the docs reads as follows:
  • M.2_1 - CPU, PCIe 4.0, disabled except for 11th Gen
  • M.2_2 - CPU, PCIe 4.0 or PCIe 3.0 (when in use, PCIEX16_1 @ x8 and PCIEX16_2 @ x4)
  • M.2_3 - Chipset, PCIe 3.0 or SATA
  • M.2_4 - Chipset, PCIe 3.0 or SATA (when in use, SATA6G_56 disabled)
  • PCIe x16_3 [chipset implied] - when @ x2 SATA6G_34 is disabled, when @ x4 SATA6G_12 & SATA6G_34 is disabled
When you read between the lines these conditions say that with 10th gen, only one m.2 slot gets first class x4 connection to CPU and this prevents a x16 GPU because otherwise there are not enough lanes to serve all the slots.

Note that when the third PCI3 x16 slot is populated at x4, all onboard SATA are disabled.

The generational advance for 11th gen was that PCIe 4.0 signaling doubled over 10th gen so 11th gen x8 GPU has same bus performance as 10th gen x16. When you carefully read the board specs, the proper generational charges become evident, including important details left out of the marketing hype.

The fanout for lanes and bandwidth is well thought out in the mainboard topology, and to be sure there's not as much bandwidth as slots.

These are factors to be aware of if you are building high-end AV kit. Topology limits may lead to problems for certain workflows where nerds overload their kit not understanding the internals, especially for DAW where "artists" keep piling on until camel's back breaks..

Lanes and allocations are one of the primary distinctions between "desktop", "high-end desktop" and "server". The other is ECC RAM which is critical for engineering and high value media.

In Intel parlance, desktop (Z) is about peak gaming and user media experience

High-end desktop (X) adds more ports via DMI lanes via chipset, and tradeoff to peak gaming.

Workstation is a variety of Xeon with more CPU lanes and ECC.

Server is another kind of Xeon for racks.



Deep space...

The OSX USB 15 port limit represents a historical feature of Apple's system software awareness of chipset topology.

But the bigger picture is Apple is always re-designing its kit with all these tradeoffs in mind.

Plus, Intel started building a licensing model into Xeon sub units, which Apple looked at, along with many other architecture aspects, and said "No."

For hackers, Apple can now evolve the entire architecture faster at a price-point than value-oriented nerds can keep up with the details in the mainboard manuals.

Such are these times.
 
Last edited:
Some motherboards might have an internal USB hub.
USB ports via USB hub only count as 1 (USB 2.0) or 2 (USB 3.x + USB 2.0).
 
If a port is USB 3.0 or 3.1 gen 1 it is backward compatible with USB 2.0! This means it is 2 ports before mapping. The port can be mapped out if you desire. I.E., you can map the 2.0 or the 3.0 out, (not included in your map), and reduce your map count. 3.1 Gen 2 ports sometimes are only one port but this is rare. Type E internal is 2 ports. 20-pin internal is usually 4 ports. USB 2.0 internal is a single PORT per 4 PINS OF THE 9 PIN TOTAL AND ON SOME boards the USB 2.0 or 3.0 ports have "internal and external" hubbed so they are all tied together to either one or two. You will not be able to separate 2 and 3 companions unless companion detection in the tool settings is turned off as noted by @miliuco.
 
Back
Top