Skip to contentSkip to conversation

I2C RTC with MPC8xx?

DISCUSSION Steven Scholz 2 participants 4 messages Jan 29, 2003 – Jan 30, 2003

lore
Share & tools
lore
#0 lore raw

Hi there,

what do I have to do to use an I2C RTC (like Dallas DS1337) within LinuxPPC?

I know there're drivers for PPCBoot / U-Boot.

But how could I access them from Linux?

drivers/char/rtc_8xx.c is not suitable.

Thanks,

Steven

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

#1 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

what do I have to do to use an I2C RTC (like Dallas DS1337) within LinuxPPC?

Use drivers/i2c/i2c-algo-8xx.c and add your own version of drivers/i2c/i2c-ds1337.c ?

Quoted 1 line

I know there're drivers for PPCBoot / U-Boot.

There are also drivers for Linux.

Quoted 1 line

But how could I access them from Linux?

You cannot access or use any U-Boot code from LInux.

Viele Grüße,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] The only thing necessary for the triumph of evil is for good men to
do nothing. - Edmund Burke

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

#2 lore raw
Quoted 6 lines · Wolfgang Denk
Quoted 1 line · In message <[email protected]> you wrote:

what do I have to do to use an I2C RTC (like Dallas DS1337) within LinuxPPC?

Use drivers/i2c/i2c-algo-8xx.c and add your own version of drivers/i2c/i2c-ds1337.c ?

Hmm. But there must be at least one excample!?
Someone must have done that before!?
After all I don't want to reinvent the wheel... (Ooh, how much I love that phrase!) :o)

Quoted 4 lines
Quoted 1 line

I know there're drivers for PPCBoot / U-Boot.

There are also drivers for Linux.

I bet there are drivers for Linux!
How else should all the people using PPCBoot/U-Boot and I2C RTCs on MPC8xx platforms access them from Linux...

But where could I find one? Isn't LWMON using an I2C RTC? But I just can't find the driver...

Thanks,

Steven

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

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

Use drivers/i2c/i2c-algo-8xx.c and add your own version of drivers/i2c/i2c-ds1337.c ?

Hmm. But there must be at least one excample!?

Of course there are examples. Just look in drivers/i2c/

Quoted 5 lines

How else should all the people using PPCBoot/U-Boot and I2C RTCs on MPC8xx platforms access them from Linux...

But where could I find one? Isn't LWMON using an I2C RTC? But I just can't find the driver...

LWMON uses a Philips PCF8563 RTC, but the LWMON board uses a special (lean, non-standard) I2C driver (drivers/i2c/i2c-simple.c) so the driver as used on LWMON ("drivers/char/pcf8563_rtc.c") will not help you much. But there is also a standard drivers fopr other RTC chips in our source tree.

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]
Let's say the docs present a simplified view of reality... :-)
- Larry Wall in <[email protected]>

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