From: Sergey Lapin <slapin@ossfans.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [AT91] Problems configuring bit-banged I2C
Date: Fri, 30 May 2008 01:56:30 +0400 [thread overview]
Message-ID: <20080529215626.GA22362@fan.ossfans.org> (raw)
In-Reply-To: <20080524172400.4f4518e0@hskinnemo-gx745.norway.atmel.com>
On Sat, May 24, 2008 at 05:24:00PM +0200, Haavard Skinnemoen wrote:
> Sergey Lapin <slapin@fan.ossfans.org> wrote:
> > But I'm unable to read proper values from lines - they always
> > return 0s. Any ideas on fixing?
> > Linux i2c-gpio driver works perfectly.
>
> Please try this patch:
>
> http://www.nabble.com/-PATCH--soft_i2c%3A-Pull-SDA-high-before-reading-p17270563.html
>
> You shouldn't need to do anything in the I2C_ACTIVE and I2C_TRISTATE
> hooks since the PIO is properly configured in open drain mode.
Alas, I was unable to make bit-banged I2C to work
even with this patch applied. As I mentioned above, it works in
Linux, but I'd like to be able to set time to my RTC from u-boot.
I have checked that pins are configured properly from status registers
(pull-ups are enabled, multi-drive mode is enabled (open drain), etc.).
I could read only zeroes from SDA line in u-boot, and using
oscilloscope, I see data on line. I can't find differencies
in setup with i2c-gpio from Linux. Any ideas?
Thanks a lot,
S.
prev parent reply other threads:[~2008-05-29 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 23:36 [U-Boot-Users] [AT91] Problems configuring bit-banged I2C Sergey Lapin
2008-05-24 13:33 ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-30 21:58 ` Sergey Lapin
2008-05-24 15:24 ` Haavard Skinnemoen
2008-05-29 21:56 ` Sergey Lapin [this message]
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=20080529215626.GA22362@fan.ossfans.org \
--to=slapin@ossfans.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox