diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-04-20 15:33:04 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-05-29 14:10:55 -0700 |
commit | d240529a27efe3f3aad679070c47ad98867a09d5 (patch) | |
tree | 776bba5ad2a6b52e28c52ce58895b3d202030eb3 | |
parent | 60021a4daa9720ae89e31def9483a09a78ead049 (diff) |
apalis/colibri_t30: improve vdd core pmic handling
Make sure TPS62362 set 0 defaults to 1.200V as the Linux kernel may
switch to set 0 using TPS65911 GPIO1 (EN_CORE_DVFS_N) connected to
TPS62362 VSEL1 prior to actually setting it to a sane value dependent on
the current CPU frequency.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r-- | arch/arm/mach-tegra/tegra30/cpu.c | 12 | ||||
-rw-r--r-- | include/configs/apalis_t30.h | 1 | ||||
-rw-r--r-- | include/configs/colibri_t30.h | 1 | ||||
-rw-r--r-- | scripts/config_whitelist.txt | 1 |
4 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra30/cpu.c b/arch/arm/mach-tegra/tegra30/cpu.c index e0c99842a0a..b0923fabbbb 100644 --- a/arch/arm/mach-tegra/tegra30/cpu.c +++ b/arch/arm/mach-tegra/tegra30/cpu.c @@ -31,6 +31,10 @@ void tegra_i2c_ll_write_data(uint data, uint config) writel(config, ®->cnfg); } +#define TPS62362_I2C_ADDR 0xC0 /* Linux 0x60 */ +#define TPS62362_SET0_REG 0x00 +#define TPS62362_SET0_DATA (0x2B00 | TPS62362_SET0_REG) + #define TPS62366A_I2C_ADDR 0xC0 #define TPS62366A_SET1_REG 0x01 #define TPS62366A_SET1_DATA (0x4600 | TPS62366A_SET1_REG) @@ -39,7 +43,7 @@ void tegra_i2c_ll_write_data(uint data, uint config) #define TPS62361B_SET3_REG 0x03 #define TPS62361B_SET3_DATA (0x4600 | TPS62361B_SET3_REG) -#define TPS65911_I2C_ADDR 0x5A +#define TPS65911_I2C_ADDR 0x5A /* Linux 0x2d */ #define TPS65911_GPIO1_REG 0x61 #define TPS65911_GPIO1_DATA (0x0000 | TPS65911_GPIO1_REG) #define TPS65911_VDDCTRL_OP_REG 0x28 @@ -59,6 +63,12 @@ static void enable_cpu_power_rail(void) writel(reg, &pmc->pmc_cntrl); /* Set VDD_CORE to 1.200V. */ +#ifdef CONFIG_TEGRA_VDD_CORE_TPS62362_SET0 + udelay(1000); + tegra_i2c_ll_write_addr(TPS62362_I2C_ADDR, 2); + tegra_i2c_ll_write_data(TPS62362_SET0_DATA, I2C_SEND_2_BYTES); + udelay(1000); +#endif #ifdef CONFIG_TEGRA_VDD_CORE_TPS62366A_SET1 tegra_i2c_ll_write_addr(TPS62366A_I2C_ADDR, 2); tegra_i2c_ll_write_data(TPS62366A_SET1_DATA, I2C_SEND_2_BYTES); diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 3b9c434d4c1..ba4ffb70bec 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -16,6 +16,7 @@ #define CONFIG_ARCH_MISC_INIT /* VDD core PMIC */ +#define CONFIG_TEGRA_VDD_CORE_TPS62362_SET0 #define CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 /* High-level configuration options */ diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 71bbc823fd2..0cd16f004ac 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -16,6 +16,7 @@ #define CONFIG_ARCH_MISC_INIT /* VDD core PMIC */ +#define CONFIG_TEGRA_VDD_CORE_TPS62362_SET0 #define CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 /* High-level configuration options */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 482b075ef30..fc6fca8bb8f 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -7928,6 +7928,7 @@ CONFIG_TEGRA_UARTA_GPU CONFIG_TEGRA_UARTA_SDIO1 CONFIG_TEGRA_UARTA_UAA_UAB CONFIG_TEGRA_VDD_CORE_TPS62361B_SET3 +CONFIG_TEGRA_VDD_CORE_TPS62362_SET0 CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 CONFIG_TEGRA_VDD_CORE_TPS62366A_SET1 CONFIG_TESTPIN_MASK |