Initially I started researching the QC 2.0 technology, hoping that I could find an IC with simple interface that could be used to request the power supply to output selected voltage. Then I found out that doing those requests is easier than I thought and it could be done without any "QC 2.0 compatible magic ICs".
Warning!Information below worked in my case, but I cannot promise it will work in other cases. If it works, the USB-port starts outputting 9V or 12V, which may break devices connected to that port. If it doesn't work, voltages applied to D+ and D- lines may break something in the power supply. I don't recommend doing following things based on information I've shared, but if you are still going to do it, you are doing it at your own risk.
Quick Charge 2.0 HandshakeHandshaking between the power supply and the device is required before the power supply can take requests from the device.
Both the handshake and requests to change the output voltage happen by changing the voltages on D+ and D- lines. Handshaking has two simple steps:
- Device applies 0.325V-2V to D+ -line. During this time PSU may keep D+ and D- shorted.
- After D+'s voltage has stayed on above range for 1.25s, power supply discharges voltage on D- through a pull-down resistor. Device should allow the voltage on D- -line to drop below 0.325V, for example by keeping D- disconnected.
Requests to change the voltageAfter the hanshake has been done, device can request other output voltages by applying following voltages to D+ and D- lines:
|D+ voltage||D- voltage||Output|
If the voltage on D+ drops below 0.325V, the power supply will consider device as disconnected and go back to default mode of outputting 5V. Handshake is required in order to change the output voltage again.
DemonstrationI made simple test circuit out of 3.3V regulator, few resistors and three jumpers. Two resistors form a voltage divider that outputs 1.1V and first jumper connects that to D-.
Another two resistors form another similar voltage divider and second jumper connects the output to D+. Third jumper increases the output of the voltage divider that can be connected to D+ to above 2V.
I don't have a way to connect D- to ground, but disconnecting the D+ is another way to go back to 5V output.
Sources of informationThe simplest description of using QC2.0 including above table was found in pages 6 and 7 of this Texas Instruments' PDF:
That PDF references this datasheet, which contains same information in more technical form: