The USB spec says Hosts should pull CC to 5v with a 56k resistor, and USB Devices should pull CC down to GND with a 5.1k resistor.
Edit: I've since found out about a feature called "Usb-C Dead Battery Mode", and this question can be summarized as "How do you reliably implement Usb-C Dead Battery Mode?" -- End of edit.If you need to do USB OTG (i.e. select-ably switch Host or Device), the spec says you should use 2 Mosfets, perhaps like this:
Why the 1M pullup? My device has no battery power so by default I want it to enable the 5.1k RD1 resistor to request power when plugged into a host.
The Problem:How can I have a predictable USB_CC voltage when in USB Host unconnected state? (RD1 disabled, RP1 enabled, USB_CC floating) In my testing when no usb device is connected and my device is powered from an external power supply (5v rail), USB_CC is at 2.1v and 2.9v are dropped across QRP1. This is not great, as ideally the transistors would drop nothing.
I came up with a simplified design that will always leave USB_CC at a well defined voltage:
but this is definitely not "to spec". There should only be a single pull-up / pull-down, and never both at the same time.
There must be a solution to this problem. How can I have a predictable voltage at USB_CC, default to Usb Power Sink, and stay within spec?