From 243777788c80b313d4bb57aa65e17536171c16cd Mon Sep 17 00:00:00 2001 From: Greg Meiste Date: Thu, 5 Aug 2010 10:38:12 -0500 Subject: [PATCH] [ARM] tegra: stingray: Configure Charge LED Configure GPIO_PZ5 to control the charge LED. For now, charge LEDs are enabled when device is powered up. GPIO is also exported to enable factory testing. Change-Id: I6bf7345cc795d57c1312c2c14ab1c74863a421ce Signed-off-by: Greg Meiste --- arch/arm/mach-tegra/board-stingray.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 949238cc4135..4312cbbcd0ad 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -861,6 +861,17 @@ static void __init tegra_stingray_init(void) gpio_export(TEGRA_GPIO_PI4, false); } + /* Enable charge LEDs */ + if (stingray_revision() >= STINGRAY_REVISION_P0) { + /* Set the SYS_CLK_REQ override bit to allow PZ5 to be used + as a GPIO. */ + writel(0, IO_TO_VIRT(TEGRA_PMC_BASE + 0x01C)); + tegra_gpio_enable(TEGRA_GPIO_PZ5); + gpio_request(TEGRA_GPIO_PZ5, "chg_led_disable"); + gpio_direction_output(TEGRA_GPIO_PZ5, 0); + gpio_export(TEGRA_GPIO_PZ5, false); + } + stingray_pinmux_init(); tegra_clk_init_from_table(stingray_clk_init_table); -- 2.34.1