arm: tegra: board changes to enable hw throttling in soctherm
Diwakar Tundlam [Thu, 17 Jan 2013 23:23:09 +0000 (15:23 -0800)]
Bug 1200075

Change-Id: I407de39f60a65b55cf45fda25469b56b4fd3fccf
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/192262
(cherry picked from commit 69db11fde6c5478cedc95fa9d041b3337bade5e5)
Reviewed-on: http://git-master/r/197094
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/board-pismo-power.c
arch/arm/mach-tegra/board-pluto-power.c
arch/arm/mach-tegra/board-roth-power.c

index 64204df..b6e55d0 100644 (file)
@@ -1176,78 +1176,32 @@ int __init dalmore_edp_init(void)
 }
 
 static struct soctherm_platform_data dalmore_soctherm_data = {
-       .soctherm_clk_rate = 136000000,
-       .tsensor_clk_rate = 500000,
-       .sensor_data = {
-               [TSENSE_CPU0] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU1] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU2] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU3] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_GPU] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_PLLX] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-       },
        .therm = {
                [THERM_CPU] = {
                        .zone_enable = true,
-                       .thermtrip = 115,
                        .passive_delay = 1000,
-                       .num_trips = 1,
+                       .num_trips = 3,
                        .trips = {
-                               [0] = {
+                               {
                                        .cdev_type = "tegra-balanced",
                                        .trip_temp = 85000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
-                                       .hysteresis = 3000,
+                               },
+                               {
+                                       .cdev_type = "tegra-heavy",
+                                       .trip_temp = 95000,
+                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 105000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
                                },
                        },
                },
@@ -1258,6 +1212,15 @@ static struct soctherm_platform_data dalmore_soctherm_data = {
                        .zone_enable = true,
                },
        },
+       .throttle = {
+               [THROTTLE_HEAVY] = {
+                       .devs = {
+                               [THROTTLE_DEV_CPU] = {
+                                       .enable = 1,
+                               },
+                       },
+               },
+       },
 };
 
 int __init dalmore_soctherm_init(void)
index fdd50a3..4d6d039 100644 (file)
@@ -815,78 +815,32 @@ int __init pismo_edp_init(void)
 
 
 static struct soctherm_platform_data pismo_soctherm_data = {
-       .soctherm_clk_rate = 136000000,
-       .tsensor_clk_rate = 500000,
-       .sensor_data = {
-               [TSENSE_CPU0] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU1] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU2] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU3] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_GPU] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_PLLX] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-       },
        .therm = {
                [THERM_CPU] = {
                        .zone_enable = true,
-                       .thermtrip = 115,
                        .passive_delay = 1000,
-                       .num_trips = 1,
+                       .num_trips = 3,
                        .trips = {
-                               [0] = {
+                               {
                                        .cdev_type = "tegra-balanced",
                                        .trip_temp = 85000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
-                                       .hysteresis = 3000,
+                               },
+                               {
+                                       .cdev_type = "tegra-heavy",
+                                       .trip_temp = 95000,
+                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 105000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
                                },
                        },
                },
@@ -897,6 +851,15 @@ static struct soctherm_platform_data pismo_soctherm_data = {
                        .zone_enable = true,
                },
        },
+       .throttle = {
+               [THROTTLE_HEAVY] = {
+                       .devs = {
+                               [THROTTLE_DEV_CPU] = {
+                                       .enable = 1,
+                               },
+                       },
+               },
+       },
 };
 
 int __init pismo_soctherm_init(void)
index 86ca9be..6e15fd5 100644 (file)
@@ -717,78 +717,32 @@ int __init pluto_edp_init(void)
 }
 
 static struct soctherm_platform_data pluto_soctherm_data = {
-       .soctherm_clk_rate = 136000000,
-       .tsensor_clk_rate = 500000,
-       .sensor_data = {
-               [TSENSE_CPU0] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU1] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU2] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU3] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_GPU] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_PLLX] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-       },
        .therm = {
                [THERM_CPU] = {
                        .zone_enable = true,
-                       .thermtrip = 115,
                        .passive_delay = 1000,
-                       .num_trips = 1,
+                       .num_trips = 3,
                        .trips = {
-                               [0] = {
+                               {
                                        .cdev_type = "tegra-balanced",
                                        .trip_temp = 85000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
-                                       .hysteresis = 3000,
+                               },
+                               {
+                                       .cdev_type = "tegra-heavy",
+                                       .trip_temp = 95000,
+                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 105000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
                                },
                        },
                },
@@ -799,6 +753,15 @@ static struct soctherm_platform_data pluto_soctherm_data = {
                        .zone_enable = true,
                },
        },
+       .throttle = {
+               [THROTTLE_HEAVY] = {
+                       .devs = {
+                               [THROTTLE_DEV_CPU] = {
+                                       .enable = 1,
+                               },
+                       },
+               },
+       },
 };
 
 int __init pluto_soctherm_init(void)
index d83bfa0..eb8a681 100644 (file)
@@ -700,78 +700,32 @@ int __init roth_edp_init(void)
 }
 
 static struct soctherm_platform_data roth_soctherm_data = {
-       .soctherm_clk_rate = 136000000,
-       .tsensor_clk_rate = 500000,
-       .sensor_data = {
-               [TSENSE_CPU0] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU1] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU2] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_CPU3] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_GPU] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-               [TSENSE_PLLX] = {
-                       .sensor_enable = true,
-                       .zone_enable = false,
-                       .tall = 16300,
-                       .tiddq = 1,
-                       .ten_count = 1,
-                       .tsample = 163,
-                       .pdiv = 10,
-               },
-       },
        .therm = {
                [THERM_CPU] = {
                        .zone_enable = true,
-                       .thermtrip = 115,
                        .passive_delay = 1000,
-                       .num_trips = 1,
+                       .num_trips = 3,
                        .trips = {
-                               [0] = {
+                               {
                                        .cdev_type = "tegra-balanced",
                                        .trip_temp = 85000,
                                        .trip_type = THERMAL_TRIP_PASSIVE,
                                        .upper = THERMAL_NO_LIMIT,
                                        .lower = THERMAL_NO_LIMIT,
-                                       .hysteresis = 3000,
+                               },
+                               {
+                                       .cdev_type = "tegra-heavy",
+                                       .trip_temp = 95000,
+                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 105000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
                                },
                        },
                },
@@ -782,6 +736,15 @@ static struct soctherm_platform_data roth_soctherm_data = {
                        .zone_enable = true,
                },
        },
+       .throttle = {
+               [THROTTLE_HEAVY] = {
+                       .devs = {
+                               [THROTTLE_DEV_CPU] = {
+                                       .enable = 1,
+                               },
+                       },
+               },
+       },
 };
 
 int __init roth_soctherm_init(void)