You can use the code I was attached in the threads.
But the Type-C port which is controlled by CCG3 is Power Source.
In my circuit the smart phone plugged in the Type-C port is a power sink. The external power supply charges the smart phone all the time.
Can both px_swap.h and px_swap.h be used in this case?
I think your design is target for Power source and DisplayPort sink on Type-C port. This is what I was designed.