Skip to content
Snippets Groups Projects
Commit 5aff021c authored by Wei Ni's avatar Wei Ni Committed by Albert ARIBAUD
Browse files

tegra: Turn off power detect in board init


Tegra core power rail has leakage voltage around 0.2V while system in
suspend mode. The source of the leakage should be coming from PMC power
detect logic for IO rails power detection.
That can be disabled by writing a '0' to PWR_DET_LATCH followed by writing '0'
to PWR_DET (APBDEV_PMC_PWR_DET_0).

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
parent 67ac5797
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,21 @@ void __pin_mux_usb(void) ...@@ -61,6 +61,21 @@ void __pin_mux_usb(void)
void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb"))); void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb")));
/*
* Routine: power_det_init
* Description: turn off power detects
*/
static void power_det_init(void)
{
#if defined(CONFIG_TEGRA2)
struct pmc_ctlr *const pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE;
/* turn off power detects */
writel(0, &pmc->pmc_pwr_det_latch);
writel(0, &pmc->pmc_pwr_det);
#endif
}
/* /*
* Routine: board_init * Routine: board_init
* Description: Early hardware init. * Description: Early hardware init.
...@@ -79,6 +94,9 @@ int board_init(void) ...@@ -79,6 +94,9 @@ int board_init(void)
#endif #endif
/* boot param addr */ /* boot param addr */
gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100); gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100);
power_det_init();
#ifdef CONFIG_TEGRA_I2C #ifdef CONFIG_TEGRA_I2C
#ifndef CONFIG_SYS_I2C_INIT_BOARD #ifndef CONFIG_SYS_I2C_INIT_BOARD
#error "You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards" #error "You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment