How to configure GPIO pin as an I2C pin?

Have you got pull-up resistors?