summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-12-27 22:30:20 -0800
committerMandar Padmawar <mpadmawar@nvidia.com>2013-01-07 04:47:24 -0800
commit62a951a69f6a6683ff5e43e85b9c8b8432fcf1dc (patch)
treeb4c4dee829ec910bcd47aec93743cbbdb6625906 /arch
parent2d098d7164d42c1afa841bfa4aeba441f285ce29 (diff)
ARM: tegra11: dvfs: Add CPU rail cooling device
Added CPU rail trip-points and cooling device to limit minimum CPU voltage at cold temperature in pll mode. Bug 1177204 Change-Id: Ia9293141998587f53cb42d5284b42cea938e4248 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/187372 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-dalmore-sensors.c1
-rw-r--r--arch/arm/mach-tegra/board-pluto-sensors.c1
-rw-r--r--arch/arm/mach-tegra/board-roth-sensors.c1
-rw-r--r--arch/arm/mach-tegra/dvfs.c7
-rw-r--r--arch/arm/mach-tegra/dvfs.h1
-rw-r--r--arch/arm/mach-tegra/tegra11_dvfs.c7
6 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-dalmore-sensors.c b/arch/arm/mach-tegra/board-dalmore-sensors.c
index eb3911acdb1e..aa2d2e9cd9fc 100644
--- a/arch/arm/mach-tegra/board-dalmore-sensors.c
+++ b/arch/arm/mach-tegra/board-dalmore-sensors.c
@@ -605,6 +605,7 @@ static int dalmore_nct1008_init(void)
#endif
nct1008_add_cdev_trips(data, tegra_core_edp_get_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_dfll_cdev());
+ nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_pll_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_core_cdev());
dalmore_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
diff --git a/arch/arm/mach-tegra/board-pluto-sensors.c b/arch/arm/mach-tegra/board-pluto-sensors.c
index 74927ef96158..07bb289e8a15 100644
--- a/arch/arm/mach-tegra/board-pluto-sensors.c
+++ b/arch/arm/mach-tegra/board-pluto-sensors.c
@@ -796,6 +796,7 @@ static int pluto_nct1008_init(void)
#endif
nct1008_add_cdev_trips(data, tegra_core_edp_get_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_dfll_cdev());
+ nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_pll_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_core_cdev());
pluto_i2c4_nct1008_board_info[0].irq =
diff --git a/arch/arm/mach-tegra/board-roth-sensors.c b/arch/arm/mach-tegra/board-roth-sensors.c
index ec13f7291c7c..d9437df05230 100644
--- a/arch/arm/mach-tegra/board-roth-sensors.c
+++ b/arch/arm/mach-tegra/board-roth-sensors.c
@@ -247,6 +247,7 @@ static int roth_nct1008_init(void)
nct1008_add_cdev_trips(data, tegra_core_edp_get_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_dfll_cdev());
+ nct1008_add_cdev_trips(data, tegra_dvfs_get_cpu_pll_cdev());
nct1008_add_cdev_trips(data, tegra_dvfs_get_core_cdev());
roth_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c
index d91d9a07c410..76fc72275d76 100644
--- a/arch/arm/mach-tegra/dvfs.c
+++ b/arch/arm/mach-tegra/dvfs.c
@@ -821,6 +821,13 @@ struct tegra_cooling_device *tegra_dvfs_get_cpu_dfll_cdev(void)
return NULL;
}
+struct tegra_cooling_device *tegra_dvfs_get_cpu_pll_cdev(void)
+{
+ if (tegra_cpu_rail)
+ return tegra_cpu_rail->pll_mode_cdev;
+ return NULL;
+}
+
struct tegra_cooling_device *tegra_dvfs_get_core_cdev(void)
{
if (tegra_core_rail)
diff --git a/arch/arm/mach-tegra/dvfs.h b/arch/arm/mach-tegra/dvfs.h
index 6c63ac2e550b..b3e718cf8a47 100644
--- a/arch/arm/mach-tegra/dvfs.h
+++ b/arch/arm/mach-tegra/dvfs.h
@@ -201,6 +201,7 @@ int tegra_cpu_dvfs_alter(int edp_thermal_index, const cpumask_t *cpus,
int tegra_dvfs_dfll_mode_set(struct dvfs *d, unsigned long rate);
int tegra_dvfs_dfll_mode_clear(struct dvfs *d, unsigned long rate);
struct tegra_cooling_device *tegra_dvfs_get_cpu_dfll_cdev(void);
+struct tegra_cooling_device *tegra_dvfs_get_cpu_pll_cdev(void);
struct tegra_cooling_device *tegra_dvfs_get_core_cdev(void);
#ifndef CONFIG_ARCH_TEGRA_2x_SOC
diff --git a/arch/arm/mach-tegra/tegra11_dvfs.c b/arch/arm/mach-tegra/tegra11_dvfs.c
index e7fbde8da237..809229ddeeff 100644
--- a/arch/arm/mach-tegra/tegra11_dvfs.c
+++ b/arch/arm/mach-tegra/tegra11_dvfs.c
@@ -45,6 +45,12 @@ static struct tegra_cooling_device cpu_dfll_cdev = {
.trip_temperatures_num = ARRAY_SIZE(dvfs_temperatures),
};
+static struct tegra_cooling_device cpu_pll_cdev = {
+ .cdev_type = "cpu_pll",
+ .trip_temperatures = dvfs_temperatures,
+ .trip_temperatures_num = ARRAY_SIZE(dvfs_temperatures),
+};
+
static struct tegra_cooling_device core_cdev = {
.cdev_type = "core",
.trip_temperatures = dvfs_temperatures,
@@ -59,6 +65,7 @@ static struct dvfs_rail tegra11_dvfs_rail_vdd_cpu = {
.jmp_to_zero = true,
.min_millivolts_cold = 1000,
.dfll_mode_cdev = &cpu_dfll_cdev,
+ .pll_mode_cdev = &cpu_pll_cdev,
};
static struct dvfs_rail tegra11_dvfs_rail_vdd_core = {