public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Konstantinos Margaritis <markos@freevec.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] i2c issues with efikamx and mainline uboot
Date: Tue, 19 Nov 2013 15:17:04 +0200	[thread overview]
Message-ID: <20131119151704.37872c8cb2304eb154252687@freevec.org> (raw)

(Disclaimer: u-boot newbie)

Hi all,

With Marek's huge help (thanks Marek!) I've tried to merge his tree [1]
that provides lcd support for the efikamx/efikasb with recent mainline
uboot. It boots, but I've hit some wall now and couldn't get passed it,
so I thought I'd ask for some expert advice, Marek suggested I mail
here and CC himself and Stefano as well.

So, I've migrated the structures to the iomux v3 coding conventions,
added some missing defines for iomuxes used, etc. I've forked the code
in github [2] and am doing all the changes there, in the hope that I can
at some point submit it back to mainline. I also want to to enable
multi-host USB support for the platform so that tftp booting will be at
last possible, but that's going to happen later, I want to be done with
LCD first.

The result boots, but in short it fails to initialise the LCD (for the
efikamx, didn't test efikasb yet). I noticed that amongst many changes,
in drivers/i2c/mxc_i2c.c, i2c_imx_bus_busy() in Marek's tree () got
sort of replaced with wait_for_sr_state(), which does the same
thing but is more generic -or so I understand, please correct me if I'm
wrong in my interpretation.

So what's the problem? Well, I2CR_MSTA (master mode) is set, but
I2SR_IBB fails to get set. In every case I get this result in the
I2SR register:

I2SR = 81 -> I2SR_ICF | I2SR_RX_NO_AK, ie. 

which according to the iMX515 Reference Manual corresponds to:

"Transfer is complete, and set by the falling edge of the ninth clock
of a byte transfer." + "A ?No acknowledge? signal was detected
at the ninth clock."

so a previous answer didn't send an acknowledge or rather the
opposite it sent a NACK. 

I'm at a loss here, attaching a boot log where I added some printfs
around. I'd appreciate any pointer as to what I'm doing wrong.

Thanks

Konstantinos

[1] git://git.denx.de/u-boot-marex.git branch: efikasb2
[2] https://github.com/markos/u-boot branch: efikamx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: efikamx-uboot-lcd.log
Type: application/octet-stream
Size: 51228 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131119/17e9e6ab/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131119/17e9e6ab/attachment.pgp>

             reply	other threads:[~2013-11-19 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 13:17 Konstantinos Margaritis [this message]
2013-11-19 15:37 ` [U-Boot] i2c issues with efikamx and mainline uboot Marek Vasut
2013-11-19 17:02   ` Benoît Thébaudeau
2013-11-20 23:15     ` Konstantinos Margaritis
2013-11-21  0:09       ` Benoît Thébaudeau
2013-11-19 17:02 ` Fabio Estevam

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=20131119151704.37872c8cb2304eb154252687@freevec.org \
    --to=markos@freevec.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