CYPD6125 SBU support

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
widget
Level 1
Level 1
5 sign-ins First reply posted First question asked

I am working with a CYPD6125 and am trying to use the SBU1 and SBU2 pins as a side band communications channel between two devices.  I see a few mentions in the CYPD6125 TRM that the chip contains an SBU mux that can be set so that the AUX_P and AUX_N pins are connected to the SBU pins.  However, I have not been able to find any support or examples showing how to configure that mux.

What functions or registers should I be using to set the SBU pins to be driven by the AUX pins, and is there a document or sample project that details how to use them?

0 Likes
1 Solution
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

As you have pointed out, mux_ctrl_set_cfg() is in turn called by set_mux() function. This set_mux() function is used to configure the mux at multiple places.

You can disable mux control by changing the MUX_TYPE macro present in solution.h to value other than DP_MUX. This will disable the control of this message through all parts of code.

PranavaYN_0-1650627936689.png

 

>> For port value, you can use this macro - TYPEC_PORT_0_IDX

If so, where should this invocation take place?  Should I be manually adding it to the initialization section of my main.c?

>> Yes

 

Best regards,
Pranava

View solution in original post

0 Likes
3 Replies
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

I believe you are using CYPD6125-40LQXI_notebook project from CCGx Host SDK.

You can refer to mux_ctrl_init() and mux_ctrl_set_cfg() functions present in solution.c file. By default, all necessary MUX switching is taken care by the SDK code. May I know why you would want to use this MUX manually?

Best regards,
Pranava
0 Likes

 May I know why you would want to use this MUX manually?

I don't plan to use this connection for DisplayPort or Thunderbolt, so I intend to use the SBU pin as a GPIO for sideband communication to a microcontroller connected to AUX_N of my downstream CCG6.

I have two devices, each of which has a CCG6 on board.  My goal is for my upstream device to set the AUX_N/P of the upstream CCG6 high when it needs to the downstream device to enter a special operation mode, which will then cause the downstream CCG6's AUX_N/P pin to go high.  My downstream MCU will see the AUX_N/P pin go high, and enter its special operation mode.

 > You can refer to mux_ctrl_init() and mux_ctrl_set_cfg() functions present in solution.c file.

Thank you for pointing me in the right location for this function.  The documentation seems rather lacking for the mux_ctrl_set_cfg() function.  In order to set my system up to always have the AUX_P/N pins connected to SBU1/2, am I correct that I should be invoking it as:

retval = mux_ctrl_set_cfg (port, MUX_CONFIG_DP_4_LANE, dpm_get_polarity (port));

If so, where should this invocation take place?  Should I be manually adding it to the initialization section of my main.c?  If so, what value should I be passing in for the uint8_t port argument to mux_ctrl_set_cfg and dpm_get_polarity?

Are there any options in my config.h that I will need to disable to ensure that app_event_handler won't overwrite the mux settings that I give via my invocation to mux_ctrl_set_cfg when a new connection is detected?  Or will I need to make any direct modifications to app_event_handler to ensure that my mux config isn't overwritten?

Thank you for your response.

0 Likes
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

As you have pointed out, mux_ctrl_set_cfg() is in turn called by set_mux() function. This set_mux() function is used to configure the mux at multiple places.

You can disable mux control by changing the MUX_TYPE macro present in solution.h to value other than DP_MUX. This will disable the control of this message through all parts of code.

PranavaYN_0-1650627936689.png

 

>> For port value, you can use this macro - TYPEC_PORT_0_IDX

If so, where should this invocation take place?  Should I be manually adding it to the initialization section of my main.c?

>> Yes

 

Best regards,
Pranava
0 Likes