TI E2E Community
Digital Signal Processors (DSP)
OMAP35x Processors Forum
[OMAP35xx] i2c bus, slave mode?
I need to use the I2C bus interface in slave mode, but I can't find any hint on how to proceed.Is there a Linux module or some demonstration software to use the I2C Bus in slave mode for OMAP35xx processorfamily?
Thanks for any suggestions.
I don't know if you're still waiting for an answer... I currently try to implement an I2C-slave-driver in linux (the easy way) - that means I take the standard I2c-master code for the OMAP3530 and expand it so that it can also operate in slave mode.
Oh Yes! I'm still looking for a i2c bus slave driver under Linux. I'd like to find something that could solve my problem. Can you tell me something when this driver is ready?
I'm currently running a test version of it and I already received many bytes ;-). One issue is that my driver has to extract the first databyte out of a stream to evaluate it. (this is due to a specific protocol that I have to implement). I should remove this feature for general purposes.
Another thing to be aware of is, that my driver isn't completely independent of the kernel version because it extends the available driver. I use kernel 2.6.32 (git://www.sakoman.com/git/linux-omap-2.6.git;branch=omap3-2.6.32) but an adaption to another kernel is possible of course.
If you don't have a more official solution to the i2c slave problem I could prepare a kernel patch that extends the standard i2c master driver for a specific kernel. My current version supports the open(), close(), read() and write()-systemcalls. I tested it at a single master bus and it seems to work so far.
Eventually one could include some more features, but this depends on the application.
I am waiting for your driver: as soon as possible I'll try it when it will be available. The version of my the kernel is "2.6.29-rc3-omap1. Thanks!!
spontaneously I haven't found the 2.6.29-rc3-omap1 kernel source code - so a driver patch might break because of little differences between your actual kernel and my version. I have adapted my current driver version to the interfaces provided by the 2.6.29-omap1 driver (which are probably / hopefully compatible to your rc3-version). You can download the driver file, a little application example and a readme from http://www-user.tu-chemnitz.de/~sebag/i2c_omap_slave.tar.gz . Just try whether it compiles without errors... If you notice a bug please post again
I am very happy today, finally some good news about this eagerly awaited driver! Thank you very much for your help and the attached explanations (all seems very clear). The eve of Easter does not allow me to test this driver immediately, Tuesday morning it will be my first priority! Happy Easter !!!
Thanks ;-) - I'm curious whether it will work for you. Two things that I forgot to write: the OMAPs I2C address is currently hardcoded in the driver (as a define, I think it's set to address 0x01). And before you connect the I2c-bus make sure that the voltage levels fit because the OMAP expects a 1,8V bus - voltage shifters might be necessary. Have some nice holidays...
Is Working!!!!!!! Really thanks for your help, everything works fine. Now I can proceed as I had decided from the beginning of the project. Still compliments for how you've changed the i2c bus Linux's driver.
Hey, that sounds great. Meanwhile I've just made a minor change in the driver so that it supports to send more than 200 bytes at once (write systemcall implementation). So don't wonder if the driver rejects sending more than 200 bytes at once in the older version. Everything else should work. Good luck with your project!
I recommend! keep me informed when is ready your new version.
Have a good day!
You can download the driver having the new write-systemcall integrated now. Either using the old link or from my TI profile, where uploads obviously should be located.
I'm using Kernel version 2.6.37, I need also slave mode driver of that version.
I compared your i2c-omap.c of 2.6.32 and 2.6.37 one, but there are many differences between your i2c-omap.c of 2.6.32 and 2.6.37.
Do you have i2c-omap.c of 2.6.37 with slave mode supported?
Sorry, but I don't adapt the driver any further for newer kernels because my field of work changed. You could try to extend the newer kernel on your own or -- if the interfaces to the I2C core didn't change -- use my old C-file together with the newer kernel. This way you would just have to check if the interfaces to the core still work and the hardware-specific part would stay old (and hopefully working as it did in 2.6.32)
I use Omap 3530 and my kernel version 2.6.32. And I need i2c slave mode driver. But I couldn't find your patch anywhere. Do you mind sending me your i2c slave mode patch for omap?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.