4
\$\begingroup\$

I'm designing a device, that will be connected to various Android devices with either microUSB B or USB C receptables (in order to make it futureproof) and will be exposing some irrevelant ICs to the phone via USB 2.0 OTG. The most crucial thing however is that my device should be able to charge the phone while attached. I have learned, that with microUSB B the ability to charge while connected to OTG depends heavily on the phone itself. Some phones require specific resistor on ID pin pulled to the ground (e.g. Samsung Galaxy S3, Galaxy Note 8.0 - AFAIK they jump to one of docking modes, that orders them to accept power and be USB host at the same time), some do not require any resistor, but instead attaching the power source to the OTG cable before plugging into the phone (e.g. all Xiaomi phones I tried) and some didn't work for me at all (e.g. Samsung Galaxy S5 - has anyone succeded?).

For now I think of just simply putting two receptables in my device, both microUSB B and USB C and make either of them disabling the other on connection. The idea for microUSB B is that I will use 5-wire microUSB B plug - microUSB B plug cable (possibly custom, found only 4-wired so far) to be able to manage ID line connection to ground with some digital resistor on my device (the device will be configurable).

But the real struggle begins with phones that have USB C connector. I have read some documentation and found out that the decision about setting host and slave in USB C - USB C connection is made based on CC pin pulling up/down with specific resistors. The same resistors also seem to resolve power delivery roles.

My question is: do I have to use USB Power Delivery protocol (so a specialized IC) in order to achieve a state in which the slave (my device - UFP) is powering the host (phone - DFP) or is it achievable with some pulling resistors setting/swapping?

\$\endgroup\$
  • \$\begingroup\$ Welcome to EE.SE. In a word-yes, at least from an official 'charging' device. By default they supply only 5 volts at 500 mA max unless a smart phone or tablet request 9 volts or 12 volts via the protocol. Others here may be able to elaborate on this. \$\endgroup\$ – user105652 Feb 4 '18 at 23:57
3
\$\begingroup\$

This is a pretty good question. The USB Type-C specifications gives a vague answer.

In Section 2.3.3, it describes two functions, Dual-Role-Power, and Dual-Role-Data, which are established upon examining the status of one of CC lines on both sides of a link. The bottom of Page 23 reads:

Once initially established, the Source supplies VBUS and behaves as a DFP, and the Sink consumes VBUS and behaves as a UFP

Then the paragraph continues:

USB PD, when supported by both ports, may then be used to independently swap both the power and data roles of the ports.

In other words, the initial pull-up/pull-down mechanism always associates USB host functionality with supply of VBUS, and device is always associated with consuming VBUS. Only the additional Power Delivery mechanism can swap the role of data.

But the following paragraph, p.24, reads:

Two independent set of mechanisms are defined to allow a USB Type-C DRP to functionally swap power and data roles. When USB PD is supported, power and data role swapping is performed as a subsequent step following the initial connection process. For non-PD implementations, power/data role swapping can optionally be dealt with as part of the initial connection process.

However, the Specifications do not provide any explanations nor guidance how the data role "can optionally be dealt with" in non-PD implementations.

On the other side, Sections 4.8.3 and 4.8.4, when describing "sinking host" and "sourcing device", both refer to mandatory support of Power Delivery if one wants the data role swap.

So, the answer to your question is: in order to support data role swap, both link partners must implement Power Delivery protocol with "DR_swap" function. Sorry.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Actually I meant power delivery swap, as my device will not be able to act as a host, it can only be sourcing device, as you explained. Nevertheless thank you, you helped me a lot. \$\endgroup\$ – transfer1992 Feb 6 '18 at 12:59
  • \$\begingroup\$ Ok, so after more research I can confirm, that this answer is correct, you can achieve Sourcing Device and Sinking Host only using USB PD. USB Type-C State-Machine-Based Role Swapping (the method that utilises only pulling resistors at connection) is described (misleadingly) as power/data role swapping mechanism, but in fact it is limited to only two final states: either Sourcing host or Sinking device (taken from USB Type-C Specification Release 1.3, 4.5.1.4.1). \$\endgroup\$ – transfer1992 Feb 13 '18 at 12:59
  • \$\begingroup\$ @transfer1992, you probably should re-phrase the title of your question to have wider exposure, something like "Can Type-C device be configured as "Sourcing Device" without Power Delivery protocol?", or something like that. \$\endgroup\$ – Ale..chenski Feb 13 '18 at 20:39
  • \$\begingroup\$ +1 This is correct. I spent a lot of time looking into doing this for a project, and it cannot be done without PD support. It is annoying because the Micro-USB port does support such a scheme with a simple resistor. PD is not that complicated (well, relative to other things USB), but there is still very little support for it in available uCs and stand alone chips. \$\endgroup\$ – Jon Feb 14 '18 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.