I have looked through several documents, but I haven't find found a clear answer which pins on ESP32 support I2C communication.
Can the I2C be routed to almost any I/O pins?
Are there certain pins which support I2C?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
According to Section 4.2 the ESP32 datasheet, any GPIO pin can be configured as an I2C pin. There are two I2C interfaces (I2CEXT0 and I2CEXT1), and they can operate in either master or slave mode at up to 400kHz. Just make sure you don't use any pins that your module uses for another purpose. For instance, some ESP32 modules have status LEDs or external level-shifting circuitry.
As mentioned by @jDAQ, the IO_mux and GPIO_matrix registers can be used to "rewire" the peripherals.