EVQ4242-VE-00B and USB Data Role Swap

Hi everyone,

I’m working on a project where I want to charge a tablet or smartphone with high power (up to 12 V, 3 A)** while **also configuring the device’s USB port to operate in DFP (Downstream Facing Port) mode, so that it can act as a host and control an external USB hub with a USB-to-serial converter attached.

I’ve been testing with the EVQ4242-VE-00B evaluation board, and I was able to charge the tablet at the desired power level. However, I haven’t been able to find a way to trigger a role swap on the tablet/smartphone’s USB port to switch it into DFP mode.

I’ve tried modifying the HOST_SET (0x02) register, setting the PRODUCT_TYPE_DFP to either PD_USB_HUB or PD_USB_HOST, but it doesn’t seem to have any effect.

My questions are:

  1. Is it possible to achieve this behavior with the MPQ4242 IC?
  2. Can I build a system that both charges an Android tablet or smartphone and sets its USB port to DFP mode at the same time?

Thanks in advance for any help or suggestions!
Giorgio

Hello Giorgio,

Welcome to the MPS Forums!

The MPQ4242 is a USB Power Delivery controller that focuses on power negotiation and delivery, so it can source/sink roles for power but cannot control the USB data role directly in the way you are suggesting.

DR_SWAP (Data Role Swap, which is what you are trying to suggest in operation from how you’ve described your desired operation) and PR_SWAP (Power Role Swap, just sourcing and sinking) are different operations within USB PD. From the perspective of the MPQ4242 controller, you are fully able to request a DR_SWAP PD message. However, the phone/tablet must also accept that request.

The issue here is that many Android tablets and phones don’t accept DR_SWAP requests UNLESS they are already configured to allow them. Some Android devices even completely ignore DR_SWAP requests altogether as they would prioritize charging.

Here are some suggestions:

  1. Check if the phone/tablet supports USB OTG and DR_SWAP requests.

  2. Use a USB cable that is able to force OTG mode (cables like this are ones where the ID pin is shorted to GND, which tricks the device into DFP mode upon plugging it in). You can combine this “feature” that also still delivers power.

  3. You can also try manually triggering a DR_SWAP request using the MPQ4242 itself. This would of course only work if the device you are charging accepts the request. Otherwise, I’d just defer to option 2 as I’ve outlined.

I used to run my own business where fixing iPhones and Android devices was something I did all the time, so I hope those bits of knowledge actually help and give you some insight. Let me know if there are any updates.

Best,
Krishan

Hi Krichan,
Regarding your reply to point number three,
what is the correct way to require a DR_SWAP request using the MPQ4242?
Do you have any suggestions?

Hello again Giorgio,

You would use the MPQ4242 by sending a control message through I2C. The MPQ4242 can only send a DR_SWAP under the following conditions, so ensure these are the case:

  • USB PD contact has been established between IC and target device.
  • The connected device actually supports DR_SWAP, which is per USB PD spec.

However, it looks like there is no direct access to a DR_SWAP command directly via I2C after looking through the datasheet.

What it does allow, however, is setting PRODUCT_TYPE_DFP and HOST_SET in the following register:


Try writing 0x02 to the HOST_SET register to suggest DFP behavior. But the role swap must be initiated or accepted by the partner device (ie the Android/tablet you have). Even with these settings in place, the MPQ4242 can’t force the tablet or smartphone to switch to UFP. I would also use a cable that forces OTG mode allowing DFP mode for the device on plug in.

Hopefully this helps.

Best,
Krishan