The [AM1808 SoC](EV3 Processor) has 2 hardware Inter-Integrated Circuit (I2C) controllers. Additionally, there are 4 software controllers implemented using [fast interrupts](EV3 FIQ) (FIQs).
I2C0: [Boot EEPROM](EV3 EEPROM) @400kHz
I2C1: Not used/connected
[FIQ](EV3 FIQ) I2C: Input ports 1-4 @10kHz
The Linux kernel has a well established framework for I2C drivers.
The SoC I2C uses the existing driver at drivers/i2c/busses/i2c-davinci.c as a backend.
Since there are not enough I2C controllers on the SoC, LEGO chose to implement the I2C buses for the four input ports using GPIOs. A secondary reason for this is that the NXT Ultrasonic sensors does not work well with standard I2C masters. It requires an extra clock pulse between the stop and the next start. (TODO: add references here.)
This Linux kernel has an existing GPIO i2c driver, but in order to get the performance needed, we have to use [fast interrupts](EV3 FIQ) (FIQs). (Be sure to follow the link for some interesting reading.) So, the really low level stuff is done in arch/arm/mach-davinci/legoev3-fiq.c and the rest is in drivers/i2c/busses/i2c-legoev3.c.
See [[I2C Sensor Addressing]].