I agree that the whole USB PD stack is way over complicated, I still don't get why the electrical layer and the on-the-wire protocol is so complex. Wouldn't a 3.3 V bidir UART with a CRC at the end do a fine job?
I agree that the whole USB PD stack is way over complicated, I still don't get why the electrical layer and the on-the-wire protocol is so complex. Wouldn't a 3.3 V bidir UART with a CRC at the end do a fine job?
Screenshot from the standard: https://i.kane.cx/EI4HtM
Specifically, the sink has to detect vRd to determine how much current it can actually draw.
E: sorry, to clarify: 2 resistors is fine, but you also need line sensing. So that's at least a few comparators or an ADC or whatever. Or a dedicated IC.
The standard provides a way for simple devices (page 218, PSD), to just draw up to 500mA [0]. But TBH, legacy USB charging is such a mess, I'd just always assume 1.5A and hope for the best.
(for USB 3.0 900mA you at least need a USB Device to detect it, I'm not sure if a 3.0 device is needed).
[0]: 500mA in default current and the other options provide more current.
EDIT:
Mmh, you still need to detect above vRa voltage in "AttachWait.SNK", but you can assume default USB Current after that without specifically detecting it. I think no one cares about vRa.
Still better than USB 2.0 (where without being a USB device you could only pull 100mA) or not much different than USB BC for DCPs (detect 200 Ω or smaller resistor between D+ and D-).
Sometimes it's just fine to yolo it, but it adds to the confusion-- "I plugged in my device and it doesn't work??"