]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: tegra: Modify temperature margins for T12x
authorDiwakar Tundlam <dtundlam@nvidia.com>
Thu, 17 Oct 2013 22:25:07 +0000 (15:25 -0700)
committerDiwakar Tundlam <dtundlam@nvidia.com>
Tue, 22 Oct 2013 20:17:58 +0000 (13:17 -0700)
Temperature threshold Values taken from new tegra12x margining
spreadsheet.

Updated Shield-ERS and Loki board-files with thresholds for T580 SKU
and Laguna board-file with thresholds for T570 SKU.

Bug 1393423

Change-Id: I3044fc6e571f81d0ddc09a5ff14469c411e8dd1a
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/299048

arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-laguna-power.c
arch/arm/mach-tegra/board-loki-power.c

index a053190da3cde327474c05a92481701288b660d5..b8e41096cfa544955618f406148071cd9ab8d5a0 100644 (file)
@@ -1363,21 +1363,21 @@ static struct soctherm_platform_data ardbeg_soctherm_data = {
                        .trips = {
                                {
                                        .cdev_type = "tegra-shutdown",
-                                       .trip_temp = 98000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_CRITICAL,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-heavy",
-                                       .trip_temp = 96000,
+                                       .trip_temp = 99000,
                                        .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-balanced",
-                                       .trip_temp = 86000,
+                                       .trip_temp = 89000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
@@ -1393,14 +1393,14 @@ static struct soctherm_platform_data ardbeg_soctherm_data = {
                        .trips = {
                                {
                                        .cdev_type = "tegra-shutdown",
-                                       .trip_temp = 100000,
+                                       .trip_temp = 103000,
                                        .trip_type = THERMAL_TRIP_CRITICAL,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-balanced",
-                                       .trip_temp = 88000,
+                                       .trip_temp = 91000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
@@ -1408,14 +1408,14 @@ static struct soctherm_platform_data ardbeg_soctherm_data = {
 /*
                                {
                                        .cdev_type = "gk20a_cdev",
-                                       .trip_temp = 80000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-heavy",
-                                       .trip_temp = 98000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
index 72737d14a5bff621e7a444548f11303909ee6e1d..5f33320855e8d1ba8acd3889e8faf633ce98ebce 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/mfd/as3722-plat.h>
 #include <linux/gpio.h>
 #include <linux/regulator/userspace-consumer.h>
+#include <linux/pid_thermal_gov.h>
 
 #include <asm/mach-types.h>
 
@@ -842,6 +843,21 @@ int __init laguna_edp_init(void)
        return 0;
 }
 
+static struct pid_thermal_gov_params soctherm_pid_params = {
+       .max_err_temp = 9000,
+       .max_err_gain = 1000,
+
+       .gain_p = 1000,
+       .gain_d = 0,
+
+       .up_compensation = 20,
+       .down_compensation = 20,
+};
+
+static struct thermal_zone_params soctherm_tzp = {
+       .governor_name = "pid_thermal_gov",
+       .governor_params = &soctherm_pid_params,
+};
 
 static struct soctherm_platform_data laguna_soctherm_data = {
        .therm = {
@@ -852,27 +868,28 @@ static struct soctherm_platform_data laguna_soctherm_data = {
                        .num_trips = 3,
                        .trips = {
                                {
-                                       .cdev_type = "tegra-balanced",
-                                       .trip_temp = 90000,
-                                       .trip_type = THERMAL_TRIP_PASSIVE,
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 103000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-heavy",
-                                       .trip_temp = 100000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
-                                       .cdev_type = "tegra-shutdown",
-                                       .trip_temp = 102000,
-                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .cdev_type = "tegra-balanced",
+                                       .trip_temp = 91000,
+                                       .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                        },
+                       .tzp = &soctherm_tzp,
                },
                [THERM_GPU] = {
                        .zone_enable = true,
@@ -880,28 +897,38 @@ static struct soctherm_platform_data laguna_soctherm_data = {
                        .hotspot_offset = 6000,
                        .num_trips = 3,
                        .trips = {
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 104000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
                                {
                                        .cdev_type = "tegra-balanced",
-                                       .trip_temp = 90000,
+                                       .trip_temp = 92000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
+/*
                                {
-                                       .cdev_type = "tegra-heavy",
-                                       .trip_temp = 100000,
-                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .cdev_type = "gk20a_cdev",
+                                       .trip_temp = 102000,
+                                       .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
-                                       .cdev_type = "tegra-shutdown",
+                                       .cdev_type = "tegra-heavy",
                                        .trip_temp = 102000,
-                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
+*/
                        },
+                       .tzp = &soctherm_tzp,
                },
                [THERM_PLL] = {
                        .zone_enable = true,
@@ -909,9 +936,15 @@ static struct soctherm_platform_data laguna_soctherm_data = {
        },
        .throttle = {
                [THROTTLE_HEAVY] = {
+                       .priority = 100,
                        .devs = {
                                [THROTTLE_DEV_CPU] = {
-                                       .enable = 1,
+                                       .enable = true,
+                                       .depth = 80,
+                               },
+                               [THROTTLE_DEV_GPU] = {
+                                       .enable = false,
+                                       .throttling_depth = "heavy_throttling",
                                },
                        },
                },
@@ -922,7 +955,7 @@ int __init laguna_soctherm_init(void)
 {
        tegra_platform_edp_init(laguna_soctherm_data.therm[THERM_CPU].trips,
                        &laguna_soctherm_data.therm[THERM_CPU].num_trips,
-                       8000); /* edp temperature margin */
+                       7000); /* edp temperature margin */
        tegra_add_tj_trips(laguna_soctherm_data.therm[THERM_CPU].trips,
                        &laguna_soctherm_data.therm[THERM_CPU].num_trips);
        tegra_add_tgpu_trips(laguna_soctherm_data.therm[THERM_GPU].trips,
index a0fa5cf800beaa95510541c5743794fa8047b5a8..1a03d773d41d3b2cab1631b4ba14783d3a9239f9 100644 (file)
@@ -862,21 +862,21 @@ static struct soctherm_platform_data loki_soctherm_data = {
                        .trips = {
                                {
                                        .cdev_type = "tegra-shutdown",
-                                       .trip_temp = 98000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_CRITICAL,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-heavy",
-                                       .trip_temp = 96000,
+                                       .trip_temp = 99000,
                                        .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-balanced",
-                                       .trip_temp = 86000,
+                                       .trip_temp = 89000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
@@ -892,14 +892,14 @@ static struct soctherm_platform_data loki_soctherm_data = {
                        .trips = {
                                {
                                        .cdev_type = "tegra-shutdown",
-                                       .trip_temp = 100000,
+                                       .trip_temp = 103000,
                                        .trip_type = THERMAL_TRIP_CRITICAL,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-balanced",
-                                       .trip_temp = 88000,
+                                       .trip_temp = 91000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
@@ -907,14 +907,14 @@ static struct soctherm_platform_data loki_soctherm_data = {
 /*
                                {
                                        .cdev_type = "gk20a_cdev",
-                                       .trip_temp = 80000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
                                },
                                {
                                        .cdev_type = "tegra-heavy",
-                                       .trip_temp = 98000,
+                                       .trip_temp = 101000,
                                        .trip_type = THERMAL_TRIP_HOT,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
@@ -959,7 +959,5 @@ int __init loki_soctherm_init(void)
                        &loki_soctherm_data.therm[THERM_GPU].num_trips);
        }
 
-       /* Always do soctherm init here.
-        * Allowing access to raw soctherm regs for debugging purposes */
        return tegra11_soctherm_init(&loki_soctherm_data);
 }