Each port x has an associated HSIOM_PORT_SELx register to multiplex the pin and connect to a particular peripheral selected by the user. Value 0 configure the pin to be regular firmware-controlled I/O.
Suppose SCB UART Rx and Tx are routed to P1.4 and P1.5 respectively. Then, write 0 to the bits of HSIOM_PORT_SEL1 register corresponding to pins 4 and 5. Later you can set the drive mode to strong drive depending on application. Please find appended code snippet for reference.
CY_SET_REG32(CYREG_HSIOM_PORT_SEL1,CY_GET_REG32(CYREG_HSIOM_PORT_SEL1) & 0xFF00FFFF);
That works! Thanks!