How do I determine if I'm a DFP or an UFP?

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
MaKe_4459911
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

I need to drive the ID pin into my system processor (iMX8) to a value based on whether or not I'm a Downward Facing Port or an Upward Facing Port.  How can a determine this in software?

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

Hello,

You could check the port role using the dpm_get_info() API in the CCGx firmware and read the current port type.

Example usage:

                 const dpm_status_t* status = dpm_get_info(port);

                 port_type_t type = dpm_stat->cur_port_type;

                    if (type == PRT_TYPE_UFP)

                      //drive ID pin to a value;

                   else if (PRT_TYPE_DFP)

                      //drive ID pin to another value;

Best Regards,

Sananya

View solution in original post

2 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

You could check the port role using the dpm_get_info() API in the CCGx firmware and read the current port type.

Example usage:

                 const dpm_status_t* status = dpm_get_info(port);

                 port_type_t type = dpm_stat->cur_port_type;

                    if (type == PRT_TYPE_UFP)

                      //drive ID pin to a value;

                   else if (PRT_TYPE_DFP)

                      //drive ID pin to another value;

Best Regards,

Sananya

Thanks for the fast response and great information!

0 Likes