Greetings, I'm porting X-Loader (from https://gitorious.org/x-loader/x-loader) to an OMAP3630 phone. While X-Loader boots fine, I cannot seem to manage to use I2C3.
The code shipped in that X-Loader version comes from an old U-Boot version and handles I2C1 at 100Mhz speed correctly. For instance, I can access the TWL5030 registers that way. However, when changing the I2C base address from 0x48070000 (I2C1) to 0x48060000 (I2C3), it doesn't work anymore and I cannot probe the chip I'm interested in, not to mention perform read/write. During these, it times out waiting for I2C_STAT, which stays at 0x00.
Here is some complementary information:
- CM_FCLKEN1_CORE and CM_ICLKEN1_CORE have the I2C3 bits set
- CM_IDLEST1_CORE confirms that I2C3 can be accessed
- I2C3 pins (SCL and SDA) are muxed properly (IEN | PTU | EN | M0)
- The slave I2C device's datasheet reports a max speed of 400Mhz so I'm assuming it should work fine at 100Mhz
- The slave I2C device is powered on and should have its I2C connection ready
- There are external pullup resistors on the I2C3 SCL and SDA lines with 4.7K resistors (connected to 1.8V_VIO)
- CONTROL_PROG_IO2 confirms that internal pullup on I2C3 is disabled
- It all works with the Linux kernel, so this is not a hardware issue
It addition, I have tried code from newer mainline U-Boot versions, where the prescalar, scll and sclh are calculated differently and it works on I2C1 at 400Mhz (not at 100Mhz though) but still doesn't work with the I2C3 base address (same time out with 0x00 on I2C_STAT).
I would really appreciate some help sorting out what I could possibly have missed here. Thanks in advance!