All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Koller <clemens.koller@anagramm.de>
To: linuxppc-embedded@ozlabs.org
Subject: Are the I2C drivers on MPC8540 Kernel 2.6.10 working?
Date: Wed, 09 Feb 2005 18:48:35 +0100	[thread overview]
Message-ID: <420A4CF3.5090902@anagramm.de> (raw)

Hello,

My questions:
Is I2C and the Real Time Clock stuff working for the MPC8540
in Kernel 2.6.10?
Are there any hidden bugs/traps/features I need to tweak?
Does anybody work successfully with the I2C in
this configuration?

My problems:
I try to get a I2C Philips PCF8563 Real Time Clock working which
is connected to the I2C of my MPC8540 processor.
The chip should be sw-compatible with the Epson RTC8564 component
(according to the datasheets), so I tried to enable the MPC85xx
I2C bus, the EPSON RTC8564 and the Kernel RTC support.
I tried several configs - compiled i2c into the kernel or as a
modules to load and unload them with debug=1

I cannot access /dev/misc/rtc with the hwclock (latest version=2.23):
-----8<------------------------------------
hwclock -w
hwclock: ioctl() (RTC_SET_TIME) to /dev/misc/rtc to set time failed, 
errno = Invalid argument (22).
-----8<------------------------------------

Now I try to work with the modules and try to track down
the problem:

after a modprobe rtc8564:
-----8<------------------------------------
i2c_adapter i2c-0: examining adapter
i2c-core: driver unregistered: RTC8564
i2c-core: driver RTC8564 registered.
i2c_adapter i2c-0: found normal i2c entry for adapter 0, addr 51
i2c_adapter i2c-0: master_xfer: with 1 msgs.
Doing write 0 bytes to 0x51 - 1 of 1 messages
rtc8564_attach: client=c02c1e00
rtc8564_attach: client.id=61440
i2c_adapter i2c-0: master_xfer: with 1 msgs.
Doing write 2 bytes to 0x51 - 1 of 1 messages
I2C: No RXAK
rtc8564: cant init ctrl1
i2c-core: unregister_driver - looking for clients.
i2c_adapter i2c-0: examining adapter
i2c-core: driver unregistered: RTC8564
i2c_adapter i2c-0: adapter unregistered
i2c-core: driver RTC8564 registered.
-----8<------------------------------------
Module                  Size  Used by
rtc8564                 6660  0
i2c_core               25264  1 rtc8564
-----8<------------------------------------

and after a modprobe i2c-mpc I get:
-----8<------------------------------------
i2c_adapter i2c-0: found normal i2c entry for adapter 0, addr 51
i2c_adapter i2c-0: master_xfer: with 1 msgs.
Doing write 0 bytes to 0x51 - 1 of 1 messages
rtc8564_attach: client=c02c1200
rtc8564_attach: client.id=61440
i2c_adapter i2c-0: master_xfer: with 1 msgs.
Doing write 2 bytes to 0x51 - 1 of 1 messages
I2C: No RXAK
rtc8564: cant init ctrl1
i2c_adapter i2c-0: registered as adapter #0
-----8<------------------------------------
Module                  Size  Used by
i2c_mpc                 5376  0
rtc8564                 6660  0
i2c_core               25264  2 i2c_mpc,rtc8564
-----8<------------------------------------

So, the output looks basically fine, except of the

I2C: No RXAK
rtc8564: cant init ctrl1

Which means that I don't get an ACK from my RTC.
I connected an oscilloscope to the I2C - there
is a lot of traffic. So I believe that the problem
is more on the protocol side?

Does somebody have any suggestions before I dig into
the code?
Thank you in advance!

Best greets,

Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

             reply	other threads:[~2005-02-09 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-09 17:48 Clemens Koller [this message]
2005-02-09 18:57 ` Are the I2C drivers on MPC8540 Kernel 2.6.10 working? Eugene Surovegin
2005-02-09 19:26 ` Kumar Gala
2005-02-14  7:35 ` Babarovic Ivica

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=420A4CF3.5090902@anagramm.de \
    --to=clemens.koller@anagramm.de \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.