[U-Boot] soft-i2c and i2c-gpio issues with at91

Przemyslaw Marczak p.marczak at samsung.com
Wed May 27 13:32:11 CEST 2015


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


More information about the U-Boot mailing list