Charging the USB while this USB is working as a host

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SummerXPC
Level 1
Level 1
First reply posted First question asked Welcome!

As shown in attached picture: the original dock is very simple.

Now the dock would be modified for accessing Ethernet via an USB to Ethernet controller and being charged simultaneously. Is it possible to make it happen? Because I am worrying about that Android device is sourcing current when it is working with USB to Ethernet controller as a host,  if there is current from charging adaptor/computer/tablet, will  they be conflict? Any IC could solve this?

Question.png

Thanks.

0 Likes
1 Solution
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

As per my understanding, in your original dock, the dock was fixed as a DFP and it was used to charge the Android device and hence act as a DFP, source with external Rp termination.  But in the modified design, you would like the dock to be a UFP, source so that the Android device can get charged but act as a host for the USB-to-ethernet controller. This would be possible with a Type-C PD controller since USB PD allows a role swap from the default Type-C role that is assumed based on the terminations.

Please refer to CCG4 Dock design which uses a data or power role swap to implement the above configuration. You could refer to all our controllers at-https://www.cypress.com/products/usb-type-c-and-power-delivery

Best Regards,
Sananya

View solution in original post

0 Likes
6 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

As per my understanding, in your original dock, the dock was fixed as a DFP and it was used to charge the Android device and hence act as a DFP, source with external Rp termination.  But in the modified design, you would like the dock to be a UFP, source so that the Android device can get charged but act as a host for the USB-to-ethernet controller. This would be possible with a Type-C PD controller since USB PD allows a role swap from the default Type-C role that is assumed based on the terminations.

Please refer to CCG4 Dock design which uses a data or power role swap to implement the above configuration. You could refer to all our controllers at-https://www.cypress.com/products/usb-type-c-and-power-delivery

Best Regards,
Sananya

0 Likes

Hi Sananya,

 

Thanks a lot for your confirmation.

About the PD controller in CCG4 Dock design, do you mean EZ-PD CCG4? It looks that it needs to be programmed, right?

Does Cypress have any stand-alone PD controllers?

Thanks.

 

 

0 Likes

Should the adapter work in both Phone-powered mode and with external power source from the USB 2.0 cable? 

If it should support both mode of operation you need to have a logic to trigger the power swap when there is powered provided from the USB 2.0 cable. Then you can get inspiration from the dock SDK. The magic lines are (but you need to replace the condition check with information if you have 5V from the external source).

if (dpm_get_info(port)->cur_port_role == PRT_ROLE_SINK)
{
us_initiate_pr_swap(port);
}

and 

dpm_pd_command (port, DPM_CMD_SEND_PR_SWAP, NULL, us_pr_swap_cb);

 

If you always will power the adapter with the external adapter you can just configure the firmware with the EZ-PD Configuration Utility and set power role to Source. Then no coding is needed, but you will need a custom firmware.

/Olof

0 Likes

That's super helpful. Really appreciated!

0 Likes
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Yes, CCG4 could be a PD controller that you could use in our design. Please refer to the link above for the other PD controllers offered by us.

Yes, by default CCG4 only has the I2C bootloader programmed. You can refer to the CCGx Dock SDK which includes the firmware project as well as pre-compiled binaries for the part which can be directly programmed.

Since you would need to issue a PD role swap request, you would have to modify the firmware for any of the parts you select. For e.g. we have BCR, which is our PD sink only controller with fixed firmware but it will always be fixed to a sink, UFP role and allow only the sink PDO configuration. Hence, I suggested CCG4 since it has a Dock SDK that includes the firmware project to handle your use case.

Best Regards,
Sananya

0 Likes

Really appreciated! I will look into CCG4.

0 Likes