jack-greenberg / 2sb

Framework double USB-C expansion card
0 stars 0 forks source link

schematic review #1

Open kiram9 opened 1 year ago

kiram9 commented 1 year ago

The current design has two issues around power output and CC pin pulldowns.

  1. It looks like 5V will be output even when a device is not attached. It would be best to implement CC detection to enable/disable vbus on the output ports, and prevent backpowering the device if something were plugged in, not critical.

  2. The output ports J102 and J103 have CC pulldown resistors. This makes them power sinks. So if someone plugged them into a charger or DRP device, the other device will backpower these ports.

At a bare minimum you should make these pullups following the usb type-c port spec so that this device will identify as a power source to other DRP devices.

jack-greenberg commented 1 year ago

Hey Kieran, thanks for the review! I implemented 2. Do you have any advice on implementing 1.? The hub IC I am using has an enable signal that I am using for the load switches (U302 and U402) but I assume that the enable just comes from the upstream VBUS detect, which, since this will always be plugged in, will cause the hub IC to always enable the load switches.

kiram9 commented 1 year ago

For 1, this would require a cc controller. At a minimum you need to detect when CC drops below a threshold voltage to turn on the port Vbus. You could leave your vbus power as is, and it is ok.

For 2. Your pullup resistor needs to be different. I would suggest setting it to "Default USB Power" to prevent the port in the laptop from having an over current condition. Take a look at section 4.11.1 of the USB Type-c spec R2.0 image

jack-greenberg commented 1 year ago

I added a TUSB320 USB Type-C CC logic controller as well as a load switch to enable VBUS on the output pins. I'm not 100% my implementation is correct. Specifically, I believe that the TUSB320 handles setting the current level on the CC pins so I marked the pull-up resistors as DNP. Is this correct? Or do I still need the resistors?

As a result of the changes, there are now two parts to the output stage: a current-limiting IC and a load switch. I'm not sure if it makes more sense to look for an IC that can do both, but the current configuration works because the hub IC is designed to interface with the current-limiting IC and the CC logic controller is designed to interface with the load switch. I'm open to any architectural changes though!