I2C for uCLinux on ARM926EJ (with AMBA bus)
Hi. I am working on a custom design that is based on ARM926EJ and AMBA bus. OS of choice is uCLinux, patched with RTAI for RT performance. I have to implement now I2C support, but looking at the existing driver things seem a bit unclear for me.
Here is what I unserstood:i2c-core.c is independent of the bus and is kernel module. This should be working. But what about AMBA bus? Is it supported? Is this file for support of AMBA located in 'busses' directory? What are algos files? As I undersand, these are bus dependent. Is AMBA supported by these?
If there are not, does anyone have idea how these can be written?
How can a proper working of I2C be tested? Can some dummy I2C peripheral be created in Linux?
Any information will be more than helpful.
Thanks,
Signature · 11 lines
Drasko DRASKOVIC Software Developer Elsys-DESIGN Belgrade, Serbia Tel. +381.11.311.5252 Fax. +381.11.311.5251 www.elsys-design.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060801/a2a5d0e8/attachment.html
Quoted 13 lines · Drasko Draskovic
Hi. I am working on a custom design that is based on ARM926EJ and AMBA bus. OS of choice is uCLinux, patched with RTAI for RT performance. I have to implement now I2C support, but looking at the existing driver things seem a bit unclear for me.
Here is what I unserstood:
i2c-core.cis independent of the bus and is kernel module. This should be working. But what about AMBA bus? Is it supported? Is this file for support of AMBA located in 'busses' directory? What are algos files? As I undersand, these are bus dependent. Is AMBA supported by these?
Quoted 8 lines
If there are not, does anyone have idea how these can be written?
How can a proper working of I2C be tested? Can some dummy I2C peripheral be created in Linux?
Any information will be more than helpful.
I also want to ask following things:
ARM has Amba Peripheral I2C Bus Controller (ApI2c), which I guess is a bridge between Amba and I2C (which comes out of the chip on two pins). So, can you tell me:
1) what abot 'buses' part? It has to be dependeant on Amba?
2) what about 'chips part? Does it have to depend on ApI2c?
3) Do I have to write only adapter part -- is this the peice of code that is ApI2c dependant, and not 'chips' part?
I am still not clear which part of driver ('algos', 'busses', and
'chips') depends on what... And waht of existing I can use from existing and
what I
have to write by myself.
Cheers,
Drasko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060801/54d45e92/attachment.html
Quoted 62 lines · Mark M. Hoffman
Hi:
(Again... moving to i2c list)
* Drasko Draskovic <drasko.draskovic at gmail.com> [2006-08-01 17:35:11 +0200]:
Quoted 19 lines · Drasko Draskovic
Quoted 18 lines
Hi. I am working on a custom design that is based on ARM926EJ and AMBA bus. OS of choice is uCLinux, patched with RTAI for RT performance. I have to implement now I2C support, but looking at the existing driver things seem a bit unclear for me.
Here is what I unserstood:
i2c-core.cis independent of the bus and is kernel module. This should be working. But what about AMBA bus? Is it supported? Is this file for support of AMBA located in 'busses' directory? What are algos files? As I undersand, these are bus dependent. Is AMBA supported by these?If there are not, does anyone have idea how these can be written?
How can a proper working of I2C be tested? Can some dummy I2C peripheral be created in Linux?
Quoted 6 lines
Quoted 3 lines
Any information will be more than helpful.
I also want to ask following things:
ARM has Amba Peripheral I2C Bus Controller (ApI2c), which I guess is a bridge between Amba and I2C (which comes out of the chip on two pins).Ah, OK. That's the thing for which you want to write an "adapter" driver.
Quoted 2 lines
So, can you tell me:
1) what abot 'buses' part? It has to be dependeant on Amba?You will need a driver in
drivers/i2c/bussesthat supports the API2C.Quoted 1 line
2) what about 'chips part? Does it have to depend on ApI2c?
You may (or may not) need a driver in driver/i2c/chips to support whatever it is that you plan to connect to your I2C bus. Drivers in this directory are independent of the I2C bus/adapter drivers.
Or, you could drive your I2C slave devices completely from userspace using the i2c-dev mechanism.
Quoted 2 lines
3) Do I have to write only adapter part -- is this the peice of code that is ApI2c dependant, and not 'chips' part?
I don't know what you "have" to do. In your first message you mention "implement now I2C support". This probably means (at least) writing an API2C bus/adapter driver.
Quoted 2 lines
I am still not clear which part of driver ('algos', 'busses', and 'chips') depends on what... And waht of existing I can use from existing
and
Quoted 2 lines
what I
have to write by myself.
Quoted 9 lines
Read
Documentation/i2c/*please.Regards,
--
Mark M. Hoffman
mhoffman at lightlink.com
Hi,
thank you all very much for your time, especially Mark.
So, it looks like I'll have to investigate bus/adapter for ApI2c. As I understand, since AMBA is supported in kernel, if adapter part of i2c driver code is writen for ApI2c, than I2C on this architecture would be functional (if I for example use eeprom as a pripheral, which is already supposrtd chip by lm code). Is this right?
Also, I wanted to ask the question what about algos? Do I have to worry about that? I mean - is just writing adapter part enogh, so I can transmit and receive messages?
I am wondering -- how come that so popular architecture as ARM (adn AMBA ApI2c interface) is not already supported by lm code...
Cheers,
Signature · 11 lines
Drasko DRASKOVIC Software Developer Elsys-DESIGN Belgrade, Serbia Tel. +381.11.311.5252 Fax. +381.11.311.5251 www.elsys-design.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060802/88c387b3/attachment-0001.html