Tue Jun 12 09:14:20 EDT 2018
TRM Section 21
3 Instances: one connected to wakeup and PRU, the others to MPU.
Registers are at:
For now, focus on one of them.
Apart from initial setup, the I2C interrupts are most important to set
up. There are 12 types described in 21.3.11.
Section 21.3.15 How to Program I2C
It is clear that modifying the linux driver is probably the way to go.
There is already a lot of setup in there.
There was the ti message:
The i2c driver does not support the slave mode functionality. It
configures the Sitara I2C controller as a master. In order to set
sitara i2c as slave, you must set OMAP_I2C_CON_MST = 0x0; for this
you need to modify the omap-i2c driver, specifically the i2c init
function & omap_i2c_xfer_msg() function.
Grepping for OMAP_I2C_CON_MST
tom@buildroot:/i/buildroot/home/tom/gw_buildroot/bbb-linux$ grep -re OMAP_I2C_CON_MST *
drivers/i2c/busses/i2c-omap.c:#define OMAP_I2C_CON_MST (1 << 10) /* Master/slave mode */
drivers/i2c/busses/i2c-omap.c: w = OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CON_STT;