* [U-Boot] soft-i2c and i2c-gpio question with at91
@ 2015-05-23 17:54 Matt Wood
2015-05-25 3:45 ` Josh Wu
0 siblings, 1 reply; 2+ messages in thread
From: Matt Wood @ 2015-05-23 17:54 UTC (permalink / raw)
To: u-boot
Hi all, I am trying to get a bitbanged i2c port working with u-boot on an
Atmel SAMA5D3 platform. I have added DT bindings to support the I2C
drivers however when I try to select the bus on the u-boot command line I
consistently get an error in gpio-uclass:
_gpio_request_by_name_nodev: uclass_get_device_by_of_offset failed
_gpio_request_by_name_nodev: Node 'soft-i2c at 1', property 'gpios', failed to
request GPIO index 0: -19
Each driver always fails at the get_dev_by_offset routine.
I suspect some issue with the way the GPIO is defined or is not setup
correctly. Has anyone seen this or have any advice on where to look?
This is the relevant part of the device tree:
aliases {
i2c0 = "/soft-i2c at 1";
};
soft-i2c at 1 {
#address-cells = <1>;
#size-cells = <0>;
/* compatible = "soft-i2c"; */
compatible = "i2c-gpio";
/* clock-frequency = <100000>; */
/* pinctrl-names = "default";
pinctrl-0 = <&pinctrl_soft_i2c>; */
/* Define the proper GPIO pins */
/*
clock-pin = <&pioA 31 0>;
data-pin = <&pioA 30 0>; */
gpios = <&pioA 30 0 /* SDA */
&pioA 31 0>; /* SCL */
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us =<3>;
};
};
^ permalink raw reply [flat|nested] 2+ messages in thread* [U-Boot] soft-i2c and i2c-gpio question with at91
2015-05-23 17:54 [U-Boot] soft-i2c and i2c-gpio question with at91 Matt Wood
@ 2015-05-25 3:45 ` Josh Wu
0 siblings, 0 replies; 2+ messages in thread
From: Josh Wu @ 2015-05-25 3:45 UTC (permalink / raw)
To: u-boot
Hi, Matt
On 5/24/2015 1:54 AM, Matt Wood wrote:
> Hi all, I am trying to get a bitbanged i2c port working with u-boot on an
> Atmel SAMA5D3 platform. I have added DT bindings to support the I2C
> drivers however when I try to select the bus on the u-boot command line I
> consistently get an error in gpio-uclass:
>
> _gpio_request_by_name_nodev: uclass_get_device_by_of_offset failed
>
> _gpio_request_by_name_nodev: Node 'soft-i2c at 1', property 'gpios', failed to
> request GPIO index 0: -19
>
> Each driver always fails at the get_dev_by_offset routine.
>
> I suspect some issue with the way the GPIO is defined or is not setup
> correctly. Has anyone seen this or have any advice on where to look?
Since we didn't test the dt support for the sama5 boards in U-Boot, so
there must be something need to add for dt support.
The error seems like gpio dt support related. But for the moment we
don't have time to add the dt support.
But if you only want to support i2c, you can enable it by non-dt way,
see this for a reference:
https://github.com/linux4sam/u-boot-at91/commit/7ff618b526a04b7fb72df1a3e04a91fe40b6ccf3
Best Regards,
Josh Wu
>
> This is the relevant part of the device tree:
>
> aliases {
>
> i2c0 = "/soft-i2c at 1";
>
> };
>
>
> soft-i2c at 1 {
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
> /* compatible = "soft-i2c"; */
>
> compatible = "i2c-gpio";
>
> /* clock-frequency = <100000>; */
>
> /* pinctrl-names = "default";
>
> pinctrl-0 = <&pinctrl_soft_i2c>; */
>
> /* Define the proper GPIO pins */
>
>
> /*
>
>
> clock-pin = <&pioA 31 0>;
>
> data-pin = <&pioA 30 0>; */
>
> gpios = <&pioA 30 0 /* SDA */
>
> &pioA 31 0>; /* SCL */
>
>
> i2c-gpio,sda-open-drain;
>
> i2c-gpio,scl-open-drain;
>
> i2c-gpio,delay-us =<3>;
>
>
> };
>
> };
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-25 3:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-23 17:54 [U-Boot] soft-i2c and i2c-gpio question with at91 Matt Wood
2015-05-25 3:45 ` Josh Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox