Lurker News

Comments (99) 9 threads

jsmith452 replies#
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.

arcticbull3 replies#
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.

fcjr1 reply#
w/ the hub on the 2.0 lines, the usb3 device can drop down to 2 just fine
arcticbull3 replies#
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.
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.

Continue this thread — 3 replies

amelius1 reply#
> 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.

stkdump#
A disclaimer that would be missing from TFA.
gsich#
>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.

PaulHoule1 reply#
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.

pwdisswordfishq1 reply#
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.
PaulHoule1 reply#
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!

Continue this thread — 1 reply

Doohickey-d3 replies#
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

rtkwe#
Sounds like I'd always have to plug in twice to get what I want. Neat trick though.
fcjr#
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
bobsmooth#
That's really cool but I also hate how cursed it is.
riobard9 replies#
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?

drum554 replies#
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.
unrented7977#
> 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.

dspillett3 replies#
> 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_dos14 replies#
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.

Continue this thread — 4 replies

gregsadetsky3 replies#
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.

Continue this thread — 3 replies

xg151 reply#
That's probably the closest thing to troll physics we have in real life.

Continue this thread — 1 reply

cowlevel#
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.
mrheosuper#
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.
Rundstecker#
imagine something like spdif but laptop power plug sized with duplex fibre optic core
arcticbull1 reply#
> 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.

dataflow4 replies#
> Having multiple serial lanes generally doesn't make something a parallel bus.

What does make it a parallel bus?

xerxes901#
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

arcticbull#
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.

johntb861 reply#
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.

Continue this thread — 1 reply

mirmor234 replies#
> 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.
[1] https://en.wikipedia.org/wiki/Parallel_communication

Continue this thread — 4 replies

the__alchemist1 reply#
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.

dividedbyzero4 replies#
In practice it's not really reversible for USB 2.0 though, those devices/cables never seem to work in both orientations.
ianburrell6 replies#
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.

Continue this thread — 6 replies

the__alchemist#
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.
tverbeure#
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#
Where do you source your cables and devices? What are the brands, and from what retailers?
toast02 replies#
> 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.

cowlevel2 replies#
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.
17186274404 replies#
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.

Continue this thread — 4 replies

Continue this thread — 1 more reply

Continue this thread — 1 more reply

Continue this thread — 4 more replies

xnzakg#
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.

Load more comments