public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] soft-i2c and i2c-gpio issues with at91
Date: Wed, 27 May 2015 13:32:11 +0200	[thread overview]
Message-ID: <5565AB3B.7070102@samsung.com> (raw)
In-Reply-To: <CADjezmbjpQZtS3xVjfRqpjtVfYkcmg2Jj-zkpx_+=O-MBR2UMQ@mail.gmail.com>

Hi all,

On 05/26/2015 07:23 PM, Matt Wood wrote:
> Thank you Simon.  Getting there, but now I get a data abort and system
> reset when trying to set the i2c bus.  I need to chase this down, but if
> you have any suggestions I'd appreciate it.
>
> Below is the output of dm tree and dm uclass.
>
> Thanks, Matt.
>
> U-Boot> i2c dev 3

...snip...

You should first be sure that dm gpio for your board is working properly.

Are you able to test the output state of some GPIOs on your board, e.g. 
by the LED?
If yes, then you can test it with gpio command or just using some 
dm_gpio..() calls for some GPIO with the LED.

And about your data abort.
I can't check your board config/driver at present but will try to give 
you a quick suggestion.

So, when you type i2c dev 3, then the i2c device:

"gpio-i2c at 1 @ 3fb58348, seq -1, (req 3)"

  with alias number 3 (as you requested) is probed.

One of the routine is calling the function:
  * i2c_gpio_ofdata_to_platdata() in gpio-i2c.c - probably succeeds.

Then,
* post_probe() of i2c uclass is called, and next:
* i2c_post_probe() - from drivers/i2c/i2c-uclass.c, this goes to:
* i2c_gpio_set_bus_speed() - from gpio-i2c.c

And here probably starts the magic which ends by data abort.
The driver just operates on GPIOs defined in your device tree.

If you enable the gpio command (CONFIG_CMD_GPIO), then you can easy 
test, that change state of some GPIO pins works properly, or you can 
make some test by printing the results of dm_gpio..() calls in somewhere.

Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

  parent reply	other threads:[~2015-05-27 11:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 14:35 [U-Boot] soft-i2c and i2c-gpio issues with at91 Matt Wood
2015-05-26  4:30 ` Heiko Schocher
2015-05-26 13:47   ` Simon Glass
2015-05-26 14:33     ` Matt Wood
2015-05-26 14:41       ` Simon Glass
2015-05-26 17:23         ` Matt Wood
2015-05-26 22:40           ` Simon Glass
2015-05-27 11:32           ` Przemyslaw Marczak [this message]
2015-05-27 19:21             ` Matt Wood

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=5565AB3B.7070102@samsung.com \
    --to=p.marczak@samsung.com \
    --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