Skip to contentSkip to conversation

how to use the i2c in mpc5200

DISCUSSION iida 2 participants 4 messages May 27, 2004 – May 28, 2004 1 message not in the archive

lore
Share & tools
lore

iida

author
#0 lore raw

i am using the linuxppc-2.4.25-denx and loaded
this modules

Module                  Size  Used by    Not tainted
i2c-icecube             1680   0 (unused)
i2c-algo-mpc5xxx        4048   0 [i2c-icecube]

i2c-core 18768 0 [i2c-algo-mpc5xxx]
when i loaded the i2c-icecube i recived the message

i2c-algo-5xxx.o: scanning bus Icecube I2C module #2 interface... ................................................................................(0x50)..............................................(0x7f) i2c-icecube.o: I2C module #2 installed

i created the i2c with
mknod /dev/i2c c 89 1

i am used the i2c-demo from bsp of the metrowerks
but i recived the message

*** Pass the write-string optionally as argument *** /dev/i2c open: No such device
eeprom_read: Illegal seek
/dev/i2c open: No such device
/dev/i2c open: No such device
eeprom_read: Illegal seek

what am i doing wrong ?

Thanks

Renato

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#2 lore raw

i2s is anoter i/o , but i read the source of i2c and i think that the minor number is correct Thanks for help

Quoted 17 lines · [email protected] wrote:
Quoted 2 lines · iida

i created the i2c with
mknod /dev/i2c c 89 1

This is just a hunch, but is that the proper minor device number? In my copy of the kernel sources, in the file arch/ppc/5xxx_io/i2s.c, I see this
definition:

#define I2S_MINOR 242

...which makes me wonder if "mknod /dev/i2c c 89 242" would work any better. Does your source tree include that same definition? Is that "minor number" the one you need to use with mknod?

Quoted 5 lines

I'm a novice at this Linux-on-embedded-PPC stuff, so please forgive me if this is useless advice--and please let me know how you resolved the problem when you find the "right" answer. :-)

Chris

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to iida
Quoted 3 lines · In message <[email protected]> you wrote:

i am using the linuxppc-2.4.25-denx and loaded
this modules

Which sort of hardware are you using? Is this by any chance an early IceCube board? I2C didn't work on some of these boards.

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Heavier than air flying machines are impossible.
-- Lord Kelvin, President, Royal Society, c. 1895

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#4 lore raw

i dont think it is the case . I am using a lite5200 version 2.0 with 16 mg of flash
And i think the uboot uses the i2c for store some information.

Quoted 13 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:

i am using the linuxppc-2.4.25-denx and loaded
this modules

Which sort of hardware are you using? Is this by any chance an early IceCube board? I2C didn't work on some of these boards.

Best regards,

Quoted 12 lines

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Heavier than air flying machines are impossible.
-- Lord Kelvin, President, Royal Society, c. 1895

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/