[<<][am335x][>>][..]
Tue Jun 12 09:14:20 EDT 2018

I2C

TRM Section 21

3 Instances: one connected to wakeup and PRU, the others to MPU.

Registers are at:

l4_wkup 44c00000
i2c0    44e0b000

l4_per  48000000
i2c1    4802a000
i2c2    4819c000

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:
https://e2e.ti.com/support/arm/sitara_arm/f/791/t/501656

  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;




[Reply][About]
[<<][am335x][>>][..]