arm: tegra12: enable gpu edp capping for jetson
Bibek Basu [Mon, 27 Oct 2014 08:34:43 +0000 (13:34 +0530)]
Enable GPU edp capping for jetson-tk1.Also
update the max_cpu_current and max_gpu_current for
PM375

Bug 1563635

Change-Id: I165440959ba0f23d102f1d89a6c6e9191329305d
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/590332
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

arch/arm/configs/tegra12_defconfig
arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/edp.c

index f4432b7..88f370f 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_TEGRA_EMC_SCALING_ENABLE=y
 CONFIG_TEGRA_CLOCK_DEBUG_WRITE=y
 CONFIG_TEGRA_PREINIT_CLOCKS=y
 CONFIG_TEGRA_EDP_LIMITS=y
+CONFIG_TEGRA_GPU_EDP=y
 CONFIG_TEGRA_GADGET_BOOST_CPU_FREQ=1400
 CONFIG_TEGRA_PREPOWER_WIFI=y
 CONFIG_TEGRA_DYNAMIC_PWRDET=y
index df6a9ae..684a950 100644 (file)
@@ -391,6 +391,8 @@ int __init ardbeg_edp_init(void)
                        regulator_mA = 16800;
                else if (pmu_board_info.board_id == BOARD_PM374)
                        regulator_mA = 32000;
+               else if (pmu_board_info.board_id == BOARD_PM375)
+                       regulator_mA = 11000;
                else
                        regulator_mA = 14000;
        }
@@ -403,6 +405,8 @@ int __init ardbeg_edp_init(void)
                regulator_mA = 11200;
        else if (pmu_board_info.board_id == BOARD_PM374)
                regulator_mA = 16000;
+       else if (pmu_board_info.board_id == BOARD_PM375)
+               regulator_mA = 10500;
        else
                regulator_mA = 12000;
 
index 9b997dd..9d1da7f 100644 (file)
@@ -1290,7 +1290,6 @@ static void __init edp_init(void)
                        break;
        case BOARD_PM358:
        case BOARD_PM359:
-       case BOARD_PM375:
        case BOARD_PM377:
                        laguna_edp_init();
                        break;
@@ -1298,6 +1297,7 @@ static void __init edp_init(void)
        case BOARD_E2548:
                        loki_edp_init();
                        break;
+       case BOARD_PM375:
        default:
                        ardbeg_edp_init();
                        break;
index e7d9744..df8c8dc 100644 (file)
@@ -113,7 +113,7 @@ static struct tegra_edp_gpu_limits gpu_edp_default_limits[] = {
 };
 
 static const int gpu_temperatures[] = { /* degree celcius (C) */
-       20, 50, 70, 75, 80, 85, 90, 95, 100, 105,
+       0, 20, 50, 70, 75, 80, 85, 90, 95, 100, 105,
 };
 #endif
 
@@ -866,7 +866,10 @@ static int init_gpu_edp_limits_calculated(void)
        for (i = 0; i < ARRAY_SIZE(gpu_temperatures); i++) {
                gpu_edp_calculated_limits[i].temperature =
                        gpu_temperatures[i];
-               limit = gpu_edp_calculate_maxf(params,
+               if (gpu_temperatures[i] == 0 && tegra_gpu_speedo_id() == 5)
+                       limit = 708000;
+               else
+                       limit = gpu_edp_calculate_maxf(params,
                                               gpu_temperatures[i],
                                               gpu_iddq_ma);
                if (limit == -EINVAL) {