You are looking at an old revision of the page I2C. This revision was created by Nikolaus Schaller.
Table of Content
I2C peripheral
I2C
Normally, I2C is used for communicating with various peripherals, and since the Power management, RTC and Audio involves communicating with an I2C peripheral, it is likely that support is needed to make that work on the Letux 400.
I2C Registers
Register | Offset | Purpose |
---|---|---|
DR | 0x00 | Data |
CR | 0x04 | Control |
SR | 0x08 | Status |
GR | 0x0c | Gate/divider |
DR
The data register (DR) is arranged as follows:
Bits | Purpose |
---|---|
7..0 | Data |
CR
The control register (CR) is arranged as follows:
Bits | Purpose |
---|---|
4 | Interrupt enable |
3 | Start |
2 | Stop |
1 | Acknowledge |
0 | Enable |
SR
The status register (SR) is arranged as follows:
Bits | Purpose |
---|---|
4 | STX |
3 | Busy |
2 | Transaction end |
1 | Data receive failure |
0 | Acknowledgement failure |
GR
The gate/divider register (GR) is arranged as follows:
Bits | Purpose |
---|---|
31..0 | Divider value |
Resources
In modern kernels, the following files are pertinent:
- drivers/i2c/busses/i2c-jz4730.c