From 622d408fea7af6d2ed778b546de346e90ea1a21f Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 27 Jun 2016 11:02:40 +0200 Subject: apalis/colibri_t30: vdd core pmic handling Just release TPS65911 GPIO1 (EN_CORE_DVFS_N) connected to TPS62362 VSEL1 to switch VDD_CORE back to boot set 1 defaulting to 1.200V. Signed-off-by: Marcel Ziswiler Acked-by: Max Krummenacher --- arch/arm/mach-tegra/tegra30/cpu.c | 10 ++++++++++ include/configs/apalis_t30.h | 5 ++++- include/configs/colibri_t30.h | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/tegra30/cpu.c b/arch/arm/mach-tegra/tegra30/cpu.c index c76e74c65f..a6fa5cd797 100644 --- a/arch/arm/mach-tegra/tegra30/cpu.c +++ b/arch/arm/mach-tegra/tegra30/cpu.c @@ -50,6 +50,8 @@ void tegra_i2c_ll_write_data(uint data, uint config) #define TPS62361B_SET3_DATA (0x4600 | TPS62361B_SET3_REG) #define TPS65911_I2C_ADDR 0x5A +#define TPS65911_GPIO1_REG 0x61 +#define TPS65911_GPIO1_DATA (0x0000 | TPS65911_GPIO1_REG) #define TPS65911_VDDCTRL_OP_REG 0x28 #define TPS65911_VDDCTRL_SR_REG 0x27 #define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) @@ -74,6 +76,14 @@ static void enable_cpu_power_rail(void) #ifdef CONFIG_TEGRA_VDD_CORE_TPS62361B_SET3 tegra_i2c_ll_write_addr(TPS62361B_I2C_ADDR, 2); tegra_i2c_ll_write_data(TPS62361B_SET3_DATA, I2C_SEND_2_BYTES); +#endif +#ifdef CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 + /* + * Just release TPS65911 GPIO1 (EN_CORE_DVFS_N) connected to TPS62362 + * VSEL1 to switch VDD_CORE back to boot set 1 defaulting to 1.200V + */ + tegra_i2c_ll_write_addr(TPS65911_I2C_ADDR, 2); + tegra_i2c_ll_write_data(TPS65911_GPIO1_DATA, I2C_SEND_2_BYTES); #endif udelay(1000); diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index ffc20237f7..600fcb42fa 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 Toradex, Inc. + * Copyright (c) 2012-2016 Toradex, Inc. * * Configuration settings for the Toradex Apalis T30 modules. * @@ -15,6 +15,9 @@ #define CONFIG_ARCH_MISC_INIT +/* VDD core PMIC */ +#define CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 + /* High-level configuration options */ #define V_PROMPT "Apalis T30 # " #define CONFIG_CUSTOM_BOARDINFO /* not from device-tree model node */ diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 9498f87d00..79c7a1a6ec 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 Toradex, Inc. + * Copyright (c) 2012-2016 Toradex, Inc. * * Configuration settings for the Toradex Colibri T30 modules. * @@ -15,6 +15,9 @@ #define CONFIG_ARCH_MISC_INIT +/* VDD core PMIC */ +#define CONFIG_TEGRA_VDD_CORE_TPS62362_SET_TPS65911_GPIO1 + /* High-level configuration options */ #define V_PROMPT "Colibri T30 # " #define CONFIG_CUSTOM_BOARDINFO /* not from device-tree model node */ -- cgit v1.2.3