[ARM] tegra: stingray: USB current drain reduction.
authorJames Wylder <james.wylder@motorola.com>
Mon, 9 Aug 2010 15:56:53 +0000 (10:56 -0500)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:39 +0000 (16:33 -0700)
At boot time the kernel should:
   USB_FORCEON_N (GPIO_TEGRA_PC5) should be initialized output high.
   ULPI_PHY_RESET_B (GPIO_TEGRA_PG2) should be initialized output low.

Signed-off-by: James Wylder <james.wylder@motorola.com>
Change-Id: I92a59c5fff4a9d3dd68a3ce3bd6a6c134241146d

arch/arm/mach-tegra/board-stingray.c

index c46b7060b61eaf773d3529ec8ea0e857eed1ec27..da91fa0a5cc01ffa9c74977b4e15401a7e1eeb93 100644 (file)
@@ -834,6 +834,22 @@ static void __init tegra_stingray_init(void)
        gpio_request(TEGRA_GPIO_PG3, "sys_restart_b");
        gpio_direction_output(TEGRA_GPIO_PG3, 1);
 
+       /* ULPI_PHY_RESET_B (TEGRA_GPIO_PG2) can be initialized as
+          output low when the kernel boots.
+          FIXME: This will need to be evaluated for datacard scenarios
+          separately. */
+       tegra_gpio_enable(TEGRA_GPIO_PG2);
+       gpio_request(TEGRA_GPIO_PG2, "ulpi_phy_reset_b");
+       gpio_direction_output(TEGRA_GPIO_PG2, 0);
+       gpio_export(TEGRA_GPIO_PG2, false);
+
+       /* USB_FORCEON_N (TEGRA_GPIO_PC5) should be forced high at boot
+          and will be pulled low by the hardware on attach */
+       tegra_gpio_enable(TEGRA_GPIO_PC5);
+       gpio_request(TEGRA_GPIO_PC5, "usb_forceon_n");
+       gpio_direction_output(TEGRA_GPIO_PC5, 1);
+       gpio_export(TEGRA_GPIO_PC5, false);
+
        /* Enable charging */
        tegra_gpio_enable(TEGRA_GPIO_PV5);
        gpio_request(TEGRA_GPIO_PV5, "chg_stat1");