29.4.5 SDA and SCL Pins

Selection of any I2C mode with the SSPEN bit set forces the SCL and SDA pins to be open-drain. These pins may be set by the user to inputs by setting the appropriate TRIS bits.

Note:
  1. SDA is tied to output zero when an I2C mode is enabled.
  2. Any device pin can be selected for SDA and SCL functions with the PPS peripheral. These functions are bidirectional. The SDA input is selected with the SSPxDATPPS registers. The SCL input is selected with the SSPxCLKPPS registers. Outputs are selected with the RxyPPS registers. It is the user’s responsibility to make the selections so that both the input and the output for each function are on the same pin.