[PATCH 5/7] usb: phy: tegra: get ULPI reset GPIO info using DT.
Stephen Warren
swarren at wwwdotorg.org
Wed Mar 20 07:03:55 EST 2013
On 03/18/2013 06:29 AM, Venu Byravarasu wrote:
> As GPIO information is avail through DT, used it to get Tegra ULPI
> reset GPIO number. Added a new member to tegra_usb_phy structure to
> store this number.
> diff --git a/drivers/usb/phy/tegra_usb_phy.c b/drivers/usb/phy/tegra_usb_phy.c
> - gpio_direction_output(config->reset_gpio, 0);
> + gpio_direction_output(phy->reset_gpio, 0);
> msleep(5);
> - gpio_direction_output(config->reset_gpio, 1);
> + gpio_direction_output(phy->reset_gpio, 1);
That implies that the PHY reset signal is active-low. This should be
represented in the GPIO flags in the device tree. In other words,
instead of e.g.:
nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
you want:
nvidia,phy-reset-gpio = <&gpio 169 1>; /* gpio PV1 */
Flag 1 means active-low. See
Documentation/devicetree/bindings/gpio/nvidia,tegra20-gpio.txt. This is
a bug in the current device tree content, although it has no effect
since no code currently uses the GPIO flags from DT. I suggest creating
a separate patch to fix this, and inserting it between patch 1 and 2 of
the series.
More information about the devicetree-discuss
mailing list