Rendered at 13:01:54 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
jsmith45 2 days ago [-]
While this does largely work, there are a few complications.
The biggest one being power management, especially the cutting off of power to a specific port. If a host wants to cut off power to a 3.x device, it typically needs to know which 2.x port that device is connected to. The host internally can have some really wild mappings of 2.0 and 3.x hubs, controllers, etc, but the device tree or ACPI tables let it know exactly which ones are paired together for any port leaving the device. After that point it is assumed that the host can learn the topology from any hubs attached. The power management is tied to the 2.0 port. Unexpectedly splitting the topology could lead the host to instruct a hub to cut off power to the wrong port when trying to target a specific USB 3.x device.
Also, if a hub indicates that a device is drawing excessive current, and there is nothing communicating on the 2.0 lines, there is a risk of the wrong 3.x getting blamed by the host, possibly showing a warning popup to the user with the wrong device name, or similar.
This isn't to say this is always a problem, because it isn't but it is something to be aware of.
arcticbull 2 days ago [-]
It's also just straight up not permitted per USB3.2, as USB3 devices are supposed to, per spec, be able to drop down to USB2 speeds. OS support varies, it might work, it might not.
FTA: > If you are building an inline USB-C tool where your MCU only needs a slow control channel and the host just needs fast passthrough to the downstream device, you might not need a USB 3 hub. USB-C gives you two independent buses in the same port. The OS knows they're both peripherals are assigned to the same logical connector.
This is bad advice in general because USB-C does not actually give you two independent busses in the same port.
amelius 2 days ago [-]
> It's also just straight up not permitted per USB3.2
Who cares if it works? We're talking about a tool here that is used by experts, not a mass consumer product.
bigstrat2003 1 days ago [-]
Experts tend to be the ones who care the most if something is not to spec.
stkdump 2 days ago [-]
A disclaimer that would be missing from TFA.
fcjr 2 days ago [-]
w/ the hub on the 2.0 lines, the usb3 device can drop down to 2 just fine
arcticbull 2 days ago [-]
TI addressed this on their forum a while ago.
> Can you connect a USB 3.0 device and a USB 2.0 device to the same downstream port of a hub? We don't recommend it. The devices will enumerate and traffic will be routed correctly, but as noted above, the two devices would share a single port power control. Also, the USB specification requires all USB 3.0 devices have the ability to drop to USB 2.0 speeds. Since the USB specification does not allow for two different speed devices connected to the same USB port, TI cannot guarantee that all USB drivers / host controller would support that implementation.
Is it gonna work? Usually, but not properly, and it's not an approach I would recommend for any production devices.
If you are okay being non-compliant with the USB spec and hoping for the best, it's an option for some small run stuff you test. For this application it's probably fine because you know how your host controller behaves but it's not a good approach in general, and may stop working at some point in the future as the busses are not independent. They share a power control and the same logical port identifier, and this is not a support configuration per the USB spec.
For the record I do think this is very cool and the only thing I'd change about the blog post is mentioning that the busses are not actually independent and this is not a supported configuration.
fcjr 2 days ago [-]
yeah thats fair, thanks for the context and the ti link, super helpful to learn about all potential issues w/ this setup! planning to go through everyone's feedback here and updating the post. to be honest this was mostly an experiment, i had medium confidence that i'd even work, still unsure myself if this is a sku thats worth putting out into the world or if i should just go with the slightly higher cost spec compliant bom
arcticbull 2 days ago [-]
Just in case I came off as critical or snarky, this project is really cool, it's a great write-up and I'll be ordering one when available haha.
stephen_g 14 hours ago [-]
I think it's fine for such a niche application when the behaviour of all the hosts (Macs) and targets (Macs, iPhones and iPads) are so consistent and well-known. I've seen the standard abused in much worse ways!
I don't think port power control is even that important in the days of USB-C PD, since ports have to be tolarant to 20+ V and carry current both ways, the inbuilt port protection is way better than the days of USB-A. And even with USB-A, a lot of cheap hubs don't even bother with port power control, they might just have a resettable fuse or something on VBUS on the upstream port and then all the VBUS of the downstream ports are connected together!
johnwalkr 1 days ago [-]
The TI forum is really good, I was confident the link you posted would be an authoritative reference, and it was. If you ask a very technical question you will often also get follow-up questions that nail down a root cause quickly. Come to think of it, I don't think I've ever asked a question there because whenever I've searched for an error code or seemingly obscure problem, there's already an answer for me with enough detail to know that it also applies to my problem. TI also tends to send engineering samples without much fuss so as an engineer you can essentially bypass your procurement department when doing prototyping. My experience with this is as a grad student in Japan, so they must really have a policy to make engineers fans of the company.
arcticbull 18 hours ago [-]
TI's datasheets are also very very good.
gsich 2 days ago [-]
>It's also just straight up not permitted per USB3.2, as USB3 devices are supposed to, per spec, be able to drop down to USB2 speeds. OS support varies, it might work, it might not.
That does not mean that the host side has USB 2.0 pins for that. Lenovo (ab)uses this for some devices in their notebook.
PaulHoule 2 days ago [-]
In a lot of ways I experienced USB 3.0 as a regression.
Like the USB 1.0 spec described how you could hook up 128 devices or so devices to a port although it didn't promise it would work I can say I put together some pretty big USB 1.0 and USB 2.0 trees and they worked.
Back in the late 2010s I had numerous laptops which I would try to make a kind of "docking station" with USB audio and external storage and SD card readers and such and what I always found was that there was some resource limits somewhere in the system and at some point plugging in a new device would cause an old device to drop out which could possibly force the uncontrolled unmounting of a filesystem. Sure, today's commercial filesystems are robust against this, but I hate it.
I looked closely at the USB 3.0 spec and found it didn't make any promises at all about configurations involving hubs and came to the conclusion it didn't make sense to use hubs with 3.0 at all and if you didn't want to be miserable you should just plug in one device into one port on the host.
pwdisswordfishq 2 days ago [-]
Pretty weird given that it seems like back in USB 1.0 days, it would have been less of a problem to install extra USB ports directly in the host than now.
PaulHoule 2 days ago [-]
Well... Mac laptops have as few ports as they can get away with and I hear they are completely asymmetrical in capabilities. Windows laptops have more ports and they're all FUBAR. I do have a PC that I built a few years back which has about 15 or so USB/USB-C/Thunderbolt ports. That machine never has problems!
dcrazy 2 days ago [-]
This is not true in the age of Apple Silicon. All 3 ports on a MacBook Air or MacBook Pro have independent Thunderbolt controllers and can each operate at 40Gbps bidirectional (MacBook Air/Pro with M6, which has Thunderbolt 4) or 80Gbps bidirectional/120Gbps asymmetric (MacBook Pro with M5 Pro/Max, which has Thunderbolt 5).
The MacBook Neo is the odd one out: it has two USB-C ports, but one is a USB 3.2 gen 2 port (10Gbps) and the other is USB 2.0 only. The slower one is meant to be your charging port, since USB-PD only requires USB 2.0 and the Neo doesn’t have MagSafe.
Doohickey-d 2 days ago [-]
There's also another trick that you can do, to reduce BOM cost: a USB C port that changes functionality depending on which way you oriented the plug.
I designed a camera: with one orientation, you can have access to the device's SD card. With the other, you can have access to the live video. And it doesn't need a hub!
Like in the OP you can also expose one device on usb 3, and one device in usb 2, and it works, no cable flipping needed for that
bobsmooth 2 days ago [-]
That's really cool but I also hate how cursed it is.
fcjr 2 days ago [-]
thats wild and i love it! drum55 mentioned in a different part of the thread that sometimes motherboards use different controllers for each side so if you find the right computer maybe you can do both at the same time
rtkwe 2 days ago [-]
Sounds like I'd always have to plug in twice to get what I want. Neat trick though.
riobard 2 days ago [-]
Learning the details of USB-C connectors makes me really appreciate the simplicity of USB-A: just 4 pins/wires achieves up to 480Mbps of half duplex speed, which is more than enough for many use cases.
Reversible USB-C is very convenient, but the connector is really complicated and I am always amazed that it is able to transmit 40~120Gbps data while simultaneously conduct up to 240W of power with 24 very tiny pins in tight proximity.
edit: USB-C isn't even serial (the S in USB) anymore with many parallels pairs.
What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
drum55 2 days ago [-]
The complexity isn't even in the connector, it's in the insanity of the protocols used for negotiation. There's multiple protocols, over two different physical links, implementing what amounts to a network with negotiation between source and sink devices. You're supposed to be able to do things like connect two devices to a charger and have the devices dynamically work out how much power they can use, but I doubt anybody has ever completed support for any of it. The differing support for the protocols results in constant mysteries of "why isn't this charging", even with a cable analyzer and an inline protocol analyzer I'm often left head scratching.
dspillett 2 days ago [-]
> constant mysteries of "why isn't this charging"
Also, which device is responsible for what. I have a nice chunky battery that I sometimes charge my phone from while away from power. It it runs out of juice during this, it stops, comes back to life because the phone sees a device in its port and advertises itself as a potential power source, then the phone proceeds to drain power back into the external battery.
seba_dos1 2 days ago [-]
Nothing mysterious in there. When the battery runs out of power completely, its PD controller ends up advertising being a sink so the "dead battery charging" can work. The phone notices it and starts feeding it power, as it should. A well-designed power bank would cut the power out from the phone before the power for PD IC goes down too and would hold off with advertising being a sink until the cable is unplugged, but that requires a bit more consideration for the particular use-case than just sticking a few generic ICs together and hoping for the best.
superxpro12 2 days ago [-]
it would seem undesirable for the tiny battery to attempt to charge the big battery. you would be left with a phone at 10%, and a battery bank at like.... 5%
seba_dos1 2 days ago [-]
I've seen a video of someone kickstarting their car's battery with a phone; inferring user intention isn't always trivial. That said, the power bank case described above does not even require any such assumptions, I'd 100% expect the phone to start charging a power bank if it's dead while plugging it in, but that doesn't change the fact that it shouldn't do that if the power bank goes flat while charging the phone.
myself248 2 days ago [-]
The phone has a touchscreen the size of a dinnerplate (regrettably), it could just... oh, I don't know... ask the user?
seba_dos1 2 days ago [-]
It sure can. Or the device could just work in a way that makes sense in the first place, so there's no asking required. I can easily switch the power role on my phone, but being asked to anytime I plug something in would be rather annoying.
gregsadetsky 2 days ago [-]
I've dreamed of having a device that I could put between two batteries and be able to say which battery should charge which (e.g., laptop to battery or the reverse)
But obviously that'd be a crazy device to carry with me at all times?? But yeah, "charging" vs "charge me" usb-c antics are a bit wild.
It forces the charging role: The single end is always source, the split ends are always sinks.
It also allows the two sink ends to be at different voltages, which means there must be some ultra-tiny SMPS in the blob, which blows my mind. (Though in my testing, it will pass 20v through to a single laptop, but when I plug in a 5v sink, the cable drops and renegotiates 15v from the source, so the laptop now gets 15v instead of 20. With two laptops connected, both get 20v and the source shows 20v.)
I carry this cable and a single Haribo AC charger when I travel, and it serves every need I've thrown at it.
drum55 2 days ago [-]
That sort of exists, lots of the USB-C analyzer things can force the direction with a switch.
gregsadetsky 2 days ago [-]
For sure, I have an Acroname on my desk and it's fantastic - I just want a female-female usb-c diode with a button & a light in my pocket :-) haha
xg15 2 days ago [-]
That's probably the closest thing to troll physics we have in real life.
Hackbraten 2 days ago [-]
Probably the slowest oscillator ever built!
unrented7977 2 days ago [-]
> You're supposed to be able to do things like connect two devices to a charger and have the devices dynamically work out how much power they can use, but I doubt anybody has ever completed support for any of it.
You can buy an off the shelf solution for this. Several IC vendors sell auto-negotiating power sharing USB-PD source controllers. It's not that hard to implement and it's a feature you never notice when it works correctly.
Mainly this shows up in power banks and higher end AC adapters.
mrheosuper 2 days ago [-]
It's complex because it's "Universal", they have to design so that it fits in almost every usecase, from $1 toys, to thousands-dollar high end laptop.
cowlevel 2 days ago [-]
This is called "design by committee" btw, the inevitable result of trying to make a product do everything. Good designs know what's in scope and what's out of scope and they aggressively prune extra use cases that would make the main ones more complicated.
arcticbull 2 days ago [-]
> Learning the details of USB-C connectors makes me really appreciate the simplicity of USB-A: just 4 pins/wires achieves up to 480Mbps of half duplex speed, which is more than enough for many use cases.
You're welcome to do that with USB-C, it has the VCC/GND/D+/D- wires and USB 2.0 support as a minimum requirement.
> edit: USB-C isn't even serial (the S in USB) anymore with many parallels pairs.
USB-C is not the same as USB the protocol, it's a connector standard that supports many different transmission methods. It supports USB 2, USB 3, Thunderbolt, DisplayPort, etc.
PCIe is generally considered a serial bus too, yet has many parallel lanes, each of which is hooked up behind a SerDes (serializer/deserializer).
Having multiple serial lanes generally doesn't make something a parallel bus.
dataflow 2 days ago [-]
> Having multiple serial lanes generally doesn't make something a parallel bus.
What does make it a parallel bus?
arcticbull 2 days ago [-]
Generally a parallel bus transmits an entire N-bit message at once, as N separate wires, with a single shared clock.
PCI has 32 address/data wires, and a whole 32 bit message is output at once on the bus and a clock is toggled when the data is valid along with some contextual information.
PCIe for example has many lanes, each lane has a shift register that turns an N-bit message into N 1-bit messages, which are shifted back in on the other end and turned back into an N-bit message. There's no shared clock, each lane operates essentially independently, and the clock is recovered from the signals on the differential pair. The controller then turns each part of the message each serial lane transmits into one word.
mirmor23 2 days ago [-]
> What does make it a parallel bus?
The basic difference between a parallel and a serial communication channel is the number of electrical conductors used at the physical layer to convey bits. [1]
In usb, each differential pair (dp/dm) is driven by a serial interface engine (sie); and even though it is a pair, it is effectively half duplex and serial. Multiple dp/dm pairs does not make it parallel.
I mean how do define which bus is "serial" or "parallel".
mirmor23 1 days ago [-]
> I mean how do define which bus is "serial" or "parallel"
As the wiki article says, look at how is the data (say a byte) carried over the wire; how many data lines are present? in SPI (assume 4 wire) - there is only one line per direction, so data is sent bitwise. In case of QSPI even though there are 4x the lines, each line still sends one bit at a time.
Parallel interfaces like ULPI have 8 data lines, so they send byte at a time. Others like DDR4 have 64 lines, so 64 bits are sent at once.
mrheosuper 1 days ago [-]
Well, there is octal SPI, that uses...you guess it, 8 data lines, and can transfer 1 byte(or 2 if ddr) in 1 clock edge.
mirmor23 22 hours ago [-]
> Well, there is octal SPI, that uses...you guess it, 8 data lines, and can transfer 1 byte(or 2 if ddr) in 1 clock edge.
So? does that change the answer to quad-spi?
mrheosuper 11 hours ago [-]
Well, if OSPI is parallel, i don't see how qspi is not.
johntb86 2 days ago [-]
A parallel bus has a single clock and fixed timings between all signals (ideally sampled at the same time, but in practice there's skew compensation nowadays). For multiple serial lanes they each have their own clock, and they're combined together at a higher level.
dataflow 2 days ago [-]
Thanks!
xerxes901 2 days ago [-]
At a guess… that the meaning of a high/low level on one of the pins is not independent of the high/low level of the other pins?
I.e. you have 8 wires which together give a single number between 0-256 per clock cycle, rather than 8 independent channels each with its own independent stream of 1’s and 0’s on it
the__alchemist 2 days ago [-]
USB-C to me is the best power/data connector we've had for most electronics. This consolidates some points you made, and in sibling comments.
- Reversible
- Small
- You can still use the same wiring as USB 2.0/A, with the addition of 2 passives on the CC pins to ground. Or wire up all the USB 3.0 data lines, configure for high power draw etc.
- Universal
Replacing the mismatched pile of barrel plugs and competing USB standards we used to have. (Micro, Mini, A, B)
Many uses fall within the USB 2.0 data limit (480Mbit/s?) and power reqwuirements. So USB-C wired for USB 2.0 is a fantastic connector. Exceptions are charging Li-Ion batteries quickly, and data storage devices.
dividedbyzero 2 days ago [-]
In practice it's not really reversible for USB 2.0 though, those devices/cables never seem to work in both orientations.
ianburrell 2 days ago [-]
Those devices are broken. There are lots of cheap devices that left off the resistors to work with USB-C cables or only wired up one direction.
cowlevel 2 days ago [-]
Assignation of blame doesn't actually result in a solved problem.
lxgr 2 days ago [-]
Nor does blaming the standard for shitty implementations.
I guess you could argue that the more complex a standard is, the higher the chance that somebody will take cheap shortcuts, but I don't really buy that logic, as you could then just as well e.g. blame the USB-A spec for a non-compliant charger exposing 230 V on GND.
cowlevel 1 days ago [-]
Actually we judge things by their real world consequences, instead of their stated goals, all the time. That's why most of us aren't fans of communism for example.
lxgr 1 days ago [-]
Sure, let's do that. Then I'd say USB-C has achieved two real world consequences: A large ecosystem of interoperable cables and devices (including finally being able to charge iOS and Android phones using the same cables/chargers, with a little bit of help of the EU), and a couple of poorly behaved implementations threatening to "ruin USB's good name".
This might actually be the optimal outcome, and it might not possible to get the former without the latter: Limit complexity, and vendors will be incentivized to make proprietary extensions to the standard (see e.g. all the mutually incompatible ways to do "fast charging" on USB-A/B); allow for complexity, and you'll see more broken implementations due to mistakes and cost-cutting.
Try to make it iron-clad by requiring paid certification to even use the plug at all, and you'll probably increase the gap between expensive "official" and cheap and spec-violating devices even further.
cowlevel 16 hours ago [-]
Micro usb cables are all interoperable. USBC cables decidedly are not.
the__alchemist 2 days ago [-]
Is it a problem though? What is the provenance of devices which have this problem? I suspect we can help ameliorate this by confining the problem to a smaller set. The implication above is "USB C 2.0 connectors or cables have unreliable reversibility". An actionable change may be "USB C 2.0 connectors or cables from new brands at low prices sourced from Ali Express and Amazon have unreliable reversibility"
toast0 2 days ago [-]
The devices may be broken, but thankfully USB-A trained us to try it, flip it, try it, flip it, try it. Usually works. Except for the devices with a usb-c charge port that can only charge from a usb-a to usb-c cable. :P
Thankfully, no device manufacturers label their products as broken by design... and you usually don't notice until way after the return period.
tverbeure 2 days ago [-]
That’s weird. For the USB 2.0 devices that I’ve designed, I literally only needed to connect the 2 DP and 2 DN pins at the connector and it just worked?
the__alchemist 2 days ago [-]
This is not consistent with my observations. The most obvious cause would be only wiring one pair of pins on one of of the device's, or the cables.
the__alchemist 2 days ago [-]
Where do you source your cables and devices? What are the brands, and from what retailers?
toast0 2 days ago [-]
> the simplicity of USB-A: just 4 pins/wires achieves up to 480Mbps of half duplex speed, which is more than enough for many use cases.
USB-A is 4 or 9 pins. USB-3 added 5 more for two differential pairs and a signal ground.
> What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
Depends on how crazy you want to go. Tip/Ring/Ring/Ring/Sleve is mass produced, so you could have 5 conductors if you want.
TRRS gives you four conductors. If you cut down 40GBase-T to two pair, you should be able to do 20 Gbps on a twisted pair trrs cable... and you can send power over that too. USB 4 Gen 4 does 40 Gbps per pair, but uses one pair per direction. If you wanted just tip and ring, there's 10Gbase-T1 which is single pair, with optional power delivery.
You would need to make special twisted pair cables with the phone jacks. If you use 1/4" jacks, the connectors could probably manage a few amps. But disconnecting is going to be pretty gnarly as the sleeve tends to short across multiple jack connectors as it's pulled out.
15155 2 days ago [-]
> If you cut down 40GBase-T to two pair, you should be able to do 20 Gbps on a twisted pair trrs cable
What you are describing is electrically impossible for any USB specified cable length due to capacitance and inductance as a result of poor ground ties. 20Gb/s line rate is barely possible on connectors designed for it.
Maybe with a magical twinaxial cable, but I still doubt it because of the size of the connector contacts.
toast0 2 days ago [-]
> What you are describing is electrically impossible for any USB specified cable length due to capacitance and inductance as a result of poor ground ties
USB 4 Gen 3 runs at 20 gbps per pair (unidirectional), and USB 4 2.0 Gen 4 [1] is specced for 40 gbps per pair unidirectional.
Ethernet 10G-base-T is real and works without a shared ground. 40G-base-T doesn't seem to really exist, but I don't think it has a shared ground either.
[1] thanks USB Promoter Group. If ever I have trouble with naming things, I can always say I did better than USB. :P
15155 2 days ago [-]
> USB 4 Gen 3 runs at 20 gbps per pair (unidirectional), and USB 4 2.0 Gen 4 [1] is specced for 40 gbps per pair unidirectional.
Connectors are the issue: you have a 0.5pF capacitance budget. TRRS has massive contacts and a distant shared ground. 0.5pF on a normal 3.5mm TRRS is impossible. Not to mention the impedance discontinuities inherent to that arrangement. The face contact between the plug and receptacle is also extremely imperfect.
> Ethernet 10G-base-T is real and works without a shared ground.
Because it's galvanically isolated via a transformer and the connectors are small and designed for it? I thought we were talking about USB here.
toast0 2 days ago [-]
The origin of the thread is:
> What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
So I'd assume galvanic isolation is available as it falls under modern tech (although it could also fall under ancient tech :P).
Phono connections have too much capacitance is a good objection --- but I was responding more to the question of lengths.
15155 2 days ago [-]
Galvanic isolation is really shitty if you don't need it - those transceivers use an enormous amount of power.
A round WDM optical connection with two outer power pins is probably what you want. Toslink + 2 pins. Or just coax.
With high-speed differential pairs, you pretty much end up at USB Type-C no matter how you slice it.
cowlevel 2 days ago [-]
The basic problem with T/R/S connectors is that all the contacts short circuit to each other while the plug's going in or out. For audio it "just" makes a pop (that may be extremely loud depending on what you've connected downstream), but you wouldn't want to be carrying significant power.
15155 2 days ago [-]
> all the contacts short circuit to each other while the plug's going in or out.
Which isn't an issue for current-mode AC coupled differential pairs and the ground connection being the final mate.
The actual issues here are electrical infeasibility at these speeds.
1718627440 2 days ago [-]
Couldn't you make the contacts only connect when it is fully plugged in? I believe there is a already a spring in a lot of connectors.
cowlevel 2 days ago [-]
No, how would you do that?
1718627440 2 days ago [-]
Route all connecting cables through a switch controlled by the spring being pressed in fully, the spring being at the end of the tip.
cowlevel 1 days ago [-]
That sounds complicated when you could use a different connector.
1718627440 1 days ago [-]
But operating systems seem already to be able to do something similar in software, since they do cut the sound to HDMI once the headphones are fully plugged in.
cowlevel 1 days ago [-]
That's being able to detect if the plug is in. That's not the same thing as preventing a short circuit.
15155 2 days ago [-]
> just 4 pins/wires achieves up to 480Mbps of half duplex speed
*With an incredibly large, complicated analog PHY
> USB-C isn't even serial (the S in USB) anymore with many parallels pairs
Only one of the pairs (each, for TX/RX) is used except for 2x2 configurations, and both are still serial links (which are then reassembled using an elastic buffer, like PCIe.)
Parallel means "clocked in parallel" - USB-C 2x2 is mesochronously clocked serial, the edges need not land in the same phase.
johnwalkr 1 days ago [-]
Most of the frustration people have with usb-c boils down to 2 things. 1: devices that only charge with usb-a-c cables because they've been updated from an older micro-usb device without much care. 2: In a hub or adapter with downstream ports, you cannot possibly get all capabilities on all ports because you can't really have one port capable of 15W and 40Gbps (for example) break out into 4 more ports, each capable of 15W and 40Gbps. It's also a bit weird that laptops generally have very impressive capabilities with multiple usb-c ports that can do so many things, but desktops for the most part have fewer and less capable usb-c ports.
The connector is complicated, but not from the user's perspective aside from the above limitations. Maybe there could be a bit of colour coding or connector keying for low power and data rate devices to clear things up. But all things considered, usb-c is really good and better than the alternate history where we ended up with 10 different connectors, some of them optical and some not.
jedbrooke 2 days ago [-]
> What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
Reminds me of the old GoPros that could do composite video out of their headphone jack (actually a 2.5mm rather than the standard 3.5). This was a somewhat common arrangement for camcorders from the era.
And theres also the cursed ipod shuffle that CHARGED through its headphone port. It could even do USB 2.0 data over it too.
Tuna-Fish 1 days ago [-]
If you want to do a circular plug with modern tech, you make it optical. Single led/laser in the center, barrel plug for power. As much data throughput as you want, scale up with WDMA.
Rundstecker 2 days ago [-]
imagine something like spdif but laptop power plug sized with duplex fibre optic core
xnzakg 2 days ago [-]
fun fact: this is why you can buy some super cheap usb hubs with 3x 2.0 ports and one 3.x port, where technically a device you plug into the 3.x port sits on a different level of the tree based on whether it supports USB 2.0 or 3.x.
xg15 2 days ago [-]
Always found the USB forum's approach to backwards compatibility "interesting": Instead of extending the protocol, just require a completely separate implementation of the old protocol in addition to the new one.
It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
Out of curiosity, does that mean that in "normal" operation of USB3 or 4 only one of the two internal ports is ever used at a time? Or are there devices that already make use of both the USB2 and 3 lanes when plugged in?
drum55 2 days ago [-]
It gets even weirder with some USBC ports, rather than implement the flipping connector support they wire a different USB port to each side of the plug, meaning the device tree is literally different depending on connector orientation. Lots of motherboards with 2 USBA and one USB C do that with a 4 port hub.
jmgao 2 days ago [-]
What the fuck. Thanks, I think you just solved a bug that's been on my TODO list for like 6 months.
I wrote a library [1] that lets you use CSS selectorish syntax to select USB devices (e.g. "any device that's on port 3 of a hub that also has a Logitech device connected on port 4" -> "(!hub > device[vid=046d, port=4]) > device[port=3]") so I could do automations for things like plugging in my laptop at one desk vs another, but one of my selectors I use on my desktop for a USB-C cable would rarely fail to trigger despite the device definitely being connected and working. I'll have to check this when I get home...
“Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (differential quadrature phase-shift keying) and 8-DPSK modulation may also be used between compatible devices.
[…]
In 2019, Apple published an extension called HDR which supports data rates of 4 (HDR4) and 8 (HDR8) Mbit/s using π/4-DQPSK modulation on 4 MHz channels with forward error correction (FEC)
[…]
The above excludes Bluetooth Low Energy, introduced in the 4.0 specification,[30] which uses the same spectrum but somewhat differently.”
The various network standards (2G, 3G, 4G, 5G) similarly have little to do with each other, technically.
lxgr 2 days ago [-]
It's really only USB 2 and 3 that essentially ship two wirings and protocols in one device/cable.
USB 2 is a pretty straightforward extension of 1, and USB 4 is, in many ways, actually just a standardization of Thunderbolt 3, which in turn are alternate modes of USB-C, i.e., a completely different protocol running on the physical wires that would normally be used for USB 3 data.
> It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
That seems like a bad comparison, since POP and IMAP solve pretty different problems (mail retrieval vs. remote mailbox access and management).
And this is in fact exactly how HTTP 3 and 2 maintain backwards compatibility to HTTP 1 :)
cowlevel 2 days ago [-]
actually POP and IMAP and webmail solve exactly the same problem, of "gimme my mails dammit", in different ways.
lxgr 1 days ago [-]
In that sense, SMTP and even HTTP (it can carry webmail, after all!) could be considered mail access protocols too.
cowlevel 1 days ago [-]
No, they don't let you access your emails
lxgr 1 days ago [-]
I'd be willing to bet that more people access their emails over HTTP than over IMAP and POP combined these days.
cowlevel 16 hours ago [-]
Then atoms are the ultimate email provider
jsmith45 2 days ago [-]
Hubs or devices that contain an internal hub are the main use cases where both will be in use at once.
You can often get away with splitting the two within a single physical device, as many hosts tend to treat the buses independently except for certain power management related tasks, but officially if you are doing that you need an internal hub. An internal hub is allowed to have 3.x-only devices on it, (although this may be confusing to users).
mirmor23 2 days ago [-]
> Always found the USB forum's approach to backwards compatibility "interesting": Instead of extending the protocol, just require a completely separate implementation of the old protocol in addition to the new one.
The word 'protocol' there is doing heavy lifting. It is more like a bunch of electrical engineers fancied themselves to be protocol designers, and there we have it - a usb 'protocol' - no layering, no symmetry - just a bunch of structs to dump on the wire.
To be fair, the original problem they were trying to address (keyboard, mouse, serial, printer ports, phone lines etc replaced by a single interface), they did solve in a very comprehensive way, and it benefited the consumers immensely, however the developer side of it is/was really awful. vendor + hardware controller specific asymmetric host/device stacks, no comprehensive 'protocol' other than bit twiddling, incompatible power negotiations (config descriptor up to 2.0, and cc hardware channel for type-c), no OS metadata, and the list goes on..
We have not even started on the 'beautiful' forest of descriptors to manage; and comprehending some of these would leave you wondering if you really understood at all (e.g. hid report descriptor). All in all, great way to age prematurely without having learnt anything worthwhile about protocols.
With all this said, it is really good that they maintained backward compatibility. Otherwise the list of books needed to grok usb would be something like 'Effective USB', 'More effective USB', 'Exceptional USB', 'Modern USB', 'Performant USB' ;)
unrented7977 2 days ago [-]
Usually there's no need to use both the 2.0 and 3.x links at the same time, but it's possible to do so and not that unheard-of. I've seen some USB hubs that break out into a USB3 hub with a native USB2 hub tacked on the side.
It's just that there's little use for a 480Mbps link on top of however many gigabits you get from USB3.
arcticbull 2 days ago [-]
It's actually explicitly forbidden for a single peripheral to use the USB 2.0 and 3.0 links at the same time as of USB 3.2, and there's no way to split endpoints across the links.
In order for it to work you'd have to basically expose two full separate peripherals, one on the USB2 bus and one on USB3 bus, and they'd require their own descriptors and OS-side host contexts.
This works sometimes, operating systems are not required to support this mode of operation because the OS knows that both devices are attached to the same physical connector. It can mess up enumeration. It also prevents USB3 devices from being able to fall back to USB2 as required in the spec.
A USB3 hub likely has a separate USB2 controller attached, if it doesn't it's non-compliant and not guaranteed to work.
cowlevel 2 days ago [-]
Most compatibility works that way. E.g. Windows NT is compatible with Windows 95 because it contains a reimplementation of Windows 95.
Also all speeds of ethernet are independent, and GNU's Not Unix.
tverbeure 2 days ago [-]
The fact that the original USB protocol is a hybrid of differential but actually not quite, shows how terminally brain dead those engineers were.
And then Intel decided to make one of them the figurehead of one of the ad campaigns…
1718627440 2 days ago [-]
I mean that's how binary backward-compatibility works too. You basically have completely different symbols and then the linker just links the right version at runtime.
pzb 2 days ago [-]
Could you switch the end that connects to the target Mac to use a USB Type-C plug instead of receptacle to both reduce BOM cost and improve signal integrity?
That could also allow you to have a 'this side up' which would remove the need for one MUX on the USB3 pairs, right?
fcjr 2 days ago [-]
Yeah I definitely debated switching to a plug instead, this would also cut down on the need for two usb3 cables, I should give this a go!
re the removing of a mux, yeah, i think that'd work, but i'm sure i'd find a way to still plug it in upside-down
shadowpho 2 days ago [-]
What’s even crazier is that oftentimes you even get 2x usb3 ports as well! (Typical on desktop motherboards that have cpu with lots of usb lanes but few usb ports).
ktm5j 2 days ago [-]
Cool write up! I really dig the application, great idea for a product.
The biggest one being power management, especially the cutting off of power to a specific port. If a host wants to cut off power to a 3.x device, it typically needs to know which 2.x port that device is connected to. The host internally can have some really wild mappings of 2.0 and 3.x hubs, controllers, etc, but the device tree or ACPI tables let it know exactly which ones are paired together for any port leaving the device. After that point it is assumed that the host can learn the topology from any hubs attached. The power management is tied to the 2.0 port. Unexpectedly splitting the topology could lead the host to instruct a hub to cut off power to the wrong port when trying to target a specific USB 3.x device.
Also, if a hub indicates that a device is drawing excessive current, and there is nothing communicating on the 2.0 lines, there is a risk of the wrong 3.x getting blamed by the host, possibly showing a warning popup to the user with the wrong device name, or similar.
This isn't to say this is always a problem, because it isn't but it is something to be aware of.
FTA: > If you are building an inline USB-C tool where your MCU only needs a slow control channel and the host just needs fast passthrough to the downstream device, you might not need a USB 3 hub. USB-C gives you two independent buses in the same port. The OS knows they're both peripherals are assigned to the same logical connector.
This is bad advice in general because USB-C does not actually give you two independent busses in the same port.
Who cares if it works? We're talking about a tool here that is used by experts, not a mass consumer product.
> Can you connect a USB 3.0 device and a USB 2.0 device to the same downstream port of a hub? We don't recommend it. The devices will enumerate and traffic will be routed correctly, but as noted above, the two devices would share a single port power control. Also, the USB specification requires all USB 3.0 devices have the ability to drop to USB 2.0 speeds. Since the USB specification does not allow for two different speed devices connected to the same USB port, TI cannot guarantee that all USB drivers / host controller would support that implementation.
https://e2e.ti.com/support/interface-group/interface/f/inter...
Is it gonna work? Usually, but not properly, and it's not an approach I would recommend for any production devices.
If you are okay being non-compliant with the USB spec and hoping for the best, it's an option for some small run stuff you test. For this application it's probably fine because you know how your host controller behaves but it's not a good approach in general, and may stop working at some point in the future as the busses are not independent. They share a power control and the same logical port identifier, and this is not a support configuration per the USB spec.
For the record I do think this is very cool and the only thing I'd change about the blog post is mentioning that the busses are not actually independent and this is not a supported configuration.
I don't think port power control is even that important in the days of USB-C PD, since ports have to be tolarant to 20+ V and carry current both ways, the inbuilt port protection is way better than the days of USB-A. And even with USB-A, a lot of cheap hubs don't even bother with port power control, they might just have a resettable fuse or something on VBUS on the upstream port and then all the VBUS of the downstream ports are connected together!
That does not mean that the host side has USB 2.0 pins for that. Lenovo (ab)uses this for some devices in their notebook.
Like the USB 1.0 spec described how you could hook up 128 devices or so devices to a port although it didn't promise it would work I can say I put together some pretty big USB 1.0 and USB 2.0 trees and they worked.
Back in the late 2010s I had numerous laptops which I would try to make a kind of "docking station" with USB audio and external storage and SD card readers and such and what I always found was that there was some resource limits somewhere in the system and at some point plugging in a new device would cause an old device to drop out which could possibly force the uncontrolled unmounting of a filesystem. Sure, today's commercial filesystems are robust against this, but I hate it.
I looked closely at the USB 3.0 spec and found it didn't make any promises at all about configurations involving hubs and came to the conclusion it didn't make sense to use hubs with 3.0 at all and if you didn't want to be miserable you should just plug in one device into one port on the host.
The MacBook Neo is the odd one out: it has two USB-C ports, but one is a USB 3.2 gen 2 port (10Gbps) and the other is USB 2.0 only. The slower one is meant to be your charging port, since USB-PD only requires USB 2.0 and the Neo doesn’t have MagSafe.
I designed a camera: with one orientation, you can have access to the device's SD card. With the other, you can have access to the live video. And it doesn't need a hub!
Like in the OP you can also expose one device on usb 3, and one device in usb 2, and it works, no cable flipping needed for that
Reversible USB-C is very convenient, but the connector is really complicated and I am always amazed that it is able to transmit 40~120Gbps data while simultaneously conduct up to 240W of power with 24 very tiny pins in tight proximity.
edit: USB-C isn't even serial (the S in USB) anymore with many parallels pairs.
What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
Also, which device is responsible for what. I have a nice chunky battery that I sometimes charge my phone from while away from power. It it runs out of juice during this, it stops, comes back to life because the phone sees a device in its port and advertises itself as a potential power source, then the phone proceeds to drain power back into the external battery.
But obviously that'd be a crazy device to carry with me at all times?? But yeah, "charging" vs "charge me" usb-c antics are a bit wild.
https://www.amazon.com/dp/B0CRZ6JJ6D
It forces the charging role: The single end is always source, the split ends are always sinks.
It also allows the two sink ends to be at different voltages, which means there must be some ultra-tiny SMPS in the blob, which blows my mind. (Though in my testing, it will pass 20v through to a single laptop, but when I plug in a 5v sink, the cable drops and renegotiates 15v from the source, so the laptop now gets 15v instead of 20. With two laptops connected, both get 20v and the source shows 20v.)
I carry this cable and a single Haribo AC charger when I travel, and it serves every need I've thrown at it.
You can buy an off the shelf solution for this. Several IC vendors sell auto-negotiating power sharing USB-PD source controllers. It's not that hard to implement and it's a feature you never notice when it works correctly.
Mainly this shows up in power banks and higher end AC adapters.
You're welcome to do that with USB-C, it has the VCC/GND/D+/D- wires and USB 2.0 support as a minimum requirement.
> edit: USB-C isn't even serial (the S in USB) anymore with many parallels pairs.
USB-C is not the same as USB the protocol, it's a connector standard that supports many different transmission methods. It supports USB 2, USB 3, Thunderbolt, DisplayPort, etc.
PCIe is generally considered a serial bus too, yet has many parallel lanes, each of which is hooked up behind a SerDes (serializer/deserializer).
Having multiple serial lanes generally doesn't make something a parallel bus.
What does make it a parallel bus?
PCI has 32 address/data wires, and a whole 32 bit message is output at once on the bus and a clock is toggled when the data is valid along with some contextual information.
PCIe for example has many lanes, each lane has a shift register that turns an N-bit message into N 1-bit messages, which are shifted back in on the other end and turned back into an N-bit message. There's no shared clock, each lane operates essentially independently, and the clock is recovered from the signals on the differential pair. The controller then turns each part of the message each serial lane transmits into one word.
The basic difference between a parallel and a serial communication channel is the number of electrical conductors used at the physical layer to convey bits. [1]
In usb, each differential pair (dp/dm) is driven by a serial interface engine (sie); and even though it is a pair, it is effectively half duplex and serial. Multiple dp/dm pairs does not make it parallel.
[1] https://en.wikipedia.org/wiki/Parallel_communication
It's not clear what your question is trying to imply or query. What does SPI got to do with USB?
https://onlinedocs.microchip.com/oxy/GUID-450989FA-38E4-4D68...
As the wiki article says, look at how is the data (say a byte) carried over the wire; how many data lines are present? in SPI (assume 4 wire) - there is only one line per direction, so data is sent bitwise. In case of QSPI even though there are 4x the lines, each line still sends one bit at a time.
Parallel interfaces like ULPI have 8 data lines, so they send byte at a time. Others like DDR4 have 64 lines, so 64 bits are sent at once.
So? does that change the answer to quad-spi?
I.e. you have 8 wires which together give a single number between 0-256 per clock cycle, rather than 8 independent channels each with its own independent stream of 1’s and 0’s on it
Many uses fall within the USB 2.0 data limit (480Mbit/s?) and power reqwuirements. So USB-C wired for USB 2.0 is a fantastic connector. Exceptions are charging Li-Ion batteries quickly, and data storage devices.
I guess you could argue that the more complex a standard is, the higher the chance that somebody will take cheap shortcuts, but I don't really buy that logic, as you could then just as well e.g. blame the USB-A spec for a non-compliant charger exposing 230 V on GND.
This might actually be the optimal outcome, and it might not possible to get the former without the latter: Limit complexity, and vendors will be incentivized to make proprietary extensions to the standard (see e.g. all the mutually incompatible ways to do "fast charging" on USB-A/B); allow for complexity, and you'll see more broken implementations due to mistakes and cost-cutting.
Try to make it iron-clad by requiring paid certification to even use the plug at all, and you'll probably increase the gap between expensive "official" and cheap and spec-violating devices even further.
Thankfully, no device manufacturers label their products as broken by design... and you usually don't notice until way after the return period.
USB-A is 4 or 9 pins. USB-3 added 5 more for two differential pairs and a signal ground.
> What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
Depends on how crazy you want to go. Tip/Ring/Ring/Ring/Sleve is mass produced, so you could have 5 conductors if you want.
TRRS gives you four conductors. If you cut down 40GBase-T to two pair, you should be able to do 20 Gbps on a twisted pair trrs cable... and you can send power over that too. USB 4 Gen 4 does 40 Gbps per pair, but uses one pair per direction. If you wanted just tip and ring, there's 10Gbase-T1 which is single pair, with optional power delivery.
You would need to make special twisted pair cables with the phone jacks. If you use 1/4" jacks, the connectors could probably manage a few amps. But disconnecting is going to be pretty gnarly as the sleeve tends to short across multiple jack connectors as it's pulled out.
What you are describing is electrically impossible for any USB specified cable length due to capacitance and inductance as a result of poor ground ties. 20Gb/s line rate is barely possible on connectors designed for it.
Maybe with a magical twinaxial cable, but I still doubt it because of the size of the connector contacts.
USB 4 Gen 3 runs at 20 gbps per pair (unidirectional), and USB 4 2.0 Gen 4 [1] is specced for 40 gbps per pair unidirectional.
Ethernet 10G-base-T is real and works without a shared ground. 40G-base-T doesn't seem to really exist, but I don't think it has a shared ground either.
[1] thanks USB Promoter Group. If ever I have trouble with naming things, I can always say I did better than USB. :P
Connectors are the issue: you have a 0.5pF capacitance budget. TRRS has massive contacts and a distant shared ground. 0.5pF on a normal 3.5mm TRRS is impossible. Not to mention the impedance discontinuities inherent to that arrangement. The face contact between the plug and receptacle is also extremely imperfect.
> Ethernet 10G-base-T is real and works without a shared ground.
Because it's galvanically isolated via a transformer and the connectors are small and designed for it? I thought we were talking about USB here.
> What would be possible with a circular (thus omnidirectional) simple data plug (with a few pins as possible) given modern tech?
So I'd assume galvanic isolation is available as it falls under modern tech (although it could also fall under ancient tech :P).
Phono connections have too much capacitance is a good objection --- but I was responding more to the question of lengths.
A round WDM optical connection with two outer power pins is probably what you want. Toslink + 2 pins. Or just coax.
With high-speed differential pairs, you pretty much end up at USB Type-C no matter how you slice it.
Which isn't an issue for current-mode AC coupled differential pairs and the ground connection being the final mate.
The actual issues here are electrical infeasibility at these speeds.
*With an incredibly large, complicated analog PHY
> USB-C isn't even serial (the S in USB) anymore with many parallels pairs
Only one of the pairs (each, for TX/RX) is used except for 2x2 configurations, and both are still serial links (which are then reassembled using an elastic buffer, like PCIe.)
Parallel means "clocked in parallel" - USB-C 2x2 is mesochronously clocked serial, the edges need not land in the same phase.
The connector is complicated, but not from the user's perspective aside from the above limitations. Maybe there could be a bit of colour coding or connector keying for low power and data rate devices to clear things up. But all things considered, usb-c is really good and better than the alternate history where we ended up with 10 different connectors, some of them optical and some not.
Reminds me of the old GoPros that could do composite video out of their headphone jack (actually a 2.5mm rather than the standard 3.5). This was a somewhat common arrangement for camcorders from the era.
And theres also the cursed ipod shuffle that CHARGED through its headphone port. It could even do USB 2.0 data over it too.
It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
Out of curiosity, does that mean that in "normal" operation of USB3 or 4 only one of the two internal ports is ever used at a time? Or are there devices that already make use of both the USB2 and 3 lanes when plugged in?
I wrote a library [1] that lets you use CSS selectorish syntax to select USB devices (e.g. "any device that's on port 3 of a hub that also has a Logitech device connected on port 4" -> "(!hub > device[vid=046d, port=4]) > device[port=3]") so I could do automations for things like plugging in my laptop at one desk vs another, but one of my selectors I use on my desktop for a USB-C cable would rarely fail to trigger despite the device definitely being connected and working. I'll have to check this when I get home...
1: https://github.com/jmgao/usbselector
https://en.wikipedia.org/wiki/Bluetooth#Implementation:
“Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (differential quadrature phase-shift keying) and 8-DPSK modulation may also be used between compatible devices.
[…]
In 2019, Apple published an extension called HDR which supports data rates of 4 (HDR4) and 8 (HDR8) Mbit/s using π/4-DQPSK modulation on 4 MHz channels with forward error correction (FEC)
[…]
The above excludes Bluetooth Low Energy, introduced in the 4.0 specification,[30] which uses the same spectrum but somewhat differently.”
The various network standards (2G, 3G, 4G, 5G) similarly have little to do with each other, technically.
USB 2 is a pretty straightforward extension of 1, and USB 4 is, in many ways, actually just a standardization of Thunderbolt 3, which in turn are alternate modes of USB-C, i.e., a completely different protocol running on the physical wires that would normally be used for USB 3 data.
> It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
That seems like a bad comparison, since POP and IMAP solve pretty different problems (mail retrieval vs. remote mailbox access and management).
And this is in fact exactly how HTTP 3 and 2 maintain backwards compatibility to HTTP 1 :)
You can often get away with splitting the two within a single physical device, as many hosts tend to treat the buses independently except for certain power management related tasks, but officially if you are doing that you need an internal hub. An internal hub is allowed to have 3.x-only devices on it, (although this may be confusing to users).
The word 'protocol' there is doing heavy lifting. It is more like a bunch of electrical engineers fancied themselves to be protocol designers, and there we have it - a usb 'protocol' - no layering, no symmetry - just a bunch of structs to dump on the wire.
To be fair, the original problem they were trying to address (keyboard, mouse, serial, printer ports, phone lines etc replaced by a single interface), they did solve in a very comprehensive way, and it benefited the consumers immensely, however the developer side of it is/was really awful. vendor + hardware controller specific asymmetric host/device stacks, no comprehensive 'protocol' other than bit twiddling, incompatible power negotiations (config descriptor up to 2.0, and cc hardware channel for type-c), no OS metadata, and the list goes on..
We have not even started on the 'beautiful' forest of descriptors to manage; and comprehending some of these would leave you wondering if you really understood at all (e.g. hid report descriptor). All in all, great way to age prematurely without having learnt anything worthwhile about protocols.
With all this said, it is really good that they maintained backward compatibility. Otherwise the list of books needed to grok usb would be something like 'Effective USB', 'More effective USB', 'Exceptional USB', 'Modern USB', 'Performant USB' ;)
It's just that there's little use for a 480Mbps link on top of however many gigabits you get from USB3.
In order for it to work you'd have to basically expose two full separate peripherals, one on the USB2 bus and one on USB3 bus, and they'd require their own descriptors and OS-side host contexts.
This works sometimes, operating systems are not required to support this mode of operation because the OS knows that both devices are attached to the same physical connector. It can mess up enumeration. It also prevents USB3 devices from being able to fall back to USB2 as required in the spec.
A USB3 hub likely has a separate USB2 controller attached, if it doesn't it's non-compliant and not guaranteed to work.
Also all speeds of ethernet are independent, and GNU's Not Unix.
And then Intel decided to make one of them the figurehead of one of the ad campaigns…
That could also allow you to have a 'this side up' which would remove the need for one MUX on the USB3 pairs, right?
re the removing of a mux, yeah, i think that'd work, but i'm sure i'd find a way to still plug it in upside-down