This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Looking for I2C multi-master driver for OMAP4460 running Linux 3.4.0

Greetings,

I am interfacing an SMB battery charger to an OMAP4460 based system and suspect that the I2C driver is not multi-master compliant. While I can read the battery when attached directly to my I2C bus (tried 25kHz to 100Khz bus speed), when I place it in the charger which is also a Master, the data returned from the battery is all 1's. The manufacturer of the battery and the changer indicate that I must be able to support multi-master SMB transactions.  While the OMAP appears capable, my investigations indicate that the Linux kernel driver has not implemented multi-master mode.

Can someone confirm that the I2C driver in Linux 3.4.0 is not multi-master?  If so, is there a driver available for it?

I am using an OMAP4460 mobile processor. My platform is a third party System On Module.  My operating system revision is constrained to 3.4.0 as that is the latest my vendor supports for this platform.

Thank you very much for your assistance,


Tom

  • Hey Tom,

    I'm also working on a similar subject: a SMB battery for ebikes

    But in the Bike-Mode the bike brain seems not to support a multimaster-mode. I'm thinking about Multiplexing the signal. there are bords out there. Have you tried something like that?

    Sven

  • Hi Sven,

    We have not tried the multiplexers, but a quick look indicates they extend the bus for either connectivity or redundancy. To solve the problem, the multiplexer would have to be able to monitor the bus for activity and prevent a would-be master from writing to it, as well as recognize other master requests on an idle bus and properly handle arbitration. In our experience, the single master on a multimaster bus presents itself as a data integrity issue.  When a single-master steps on the active bus, the data becomes unreliable. There are lost arbitration messages in the kernel, but data is delivered, although it is corrupt.

    We are using the OMAP4460 and it's TRM indicates that the Multimaster High-Speed I2C Controller supports Multimaster and bus arbitration. I have been unable to solidly confirm that Linux does not support Multimaster I2C, but this article in 2012 indicates this is the case:

    http://home.deib.polimi.it/bellasi/lib/exe/fetch.php?media=students:giginghelli_finalreport.pdf

    We are also dealing with a space constrained environment so I was trying to see if the Linux OS could solve this for us. The version we are on is Linux 3.4.0 provided by our board vendor with significant contributions from TI for its arm and omap variations.

    Thank you for the idea.  I'd like to hear how it turns out.

    Tom




  • > Can someone confirm that the I2C driver in Linux 3.4.0 is not multi-master?

    >If so, is there a driver available for it?

    Yes, the Linux i2c drivers are single master. No collision detection, nor retransmissions.

    Also there is a difference between a multimaster and multimaster.

    The first case is if several masters address slaves on the i2c.

    This case you can manage yourself: just retry i2c accesses until success. No special driver required.

    The second is if master-to-master communication is a requirement. Linux drivers exist but all which I know of are proprietory.