From c1e2bd770a3180fc43dd4857837383ccad323ce7 Mon Sep 17 00:00:00 2001 From: James Wylder Date: Mon, 9 Aug 2010 10:56:53 -0500 Subject: [PATCH] [ARM] tegra: stingray: USB current drain reduction. 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 Change-Id: I92a59c5fff4a9d3dd68a3ce3bd6a6c134241146d --- arch/arm/mach-tegra/board-stingray.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index c46b7060b61e..da91fa0a5cc0 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -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"); -- 2.34.1