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

USB EZ-PD™ Type-C Forum Discussions

MaKe_4459911
Level 1
5 questions asked 10 sign-ins 5 replies posted
Level 1

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 750 replies posted 500 replies posted 250 solutions authored
Moderator

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 750 replies posted 500 replies posted 250 solutions authored
Moderator

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

MaKe_4459911
Level 1
5 questions asked 10 sign-ins 5 replies posted
Level 1

Thanks for the fast response and great information!

0 Likes