ARM: tegra11x: Define ncpu residency for 2 clusters
[linux-3.10.git] / arch / arm / mach-tegra / board-dalmore-power.c
index c322f36..fe6084a 100644 (file)
@@ -53,6 +53,7 @@
 #include "devices.h"
 #include "tegra11_soctherm.h"
 #include "iomap.h"
+#include "tegra3_tsensor.h"
 
 #define PMC_CTRL               0x0
 #define PMC_CTRL_INTR_LOW      (1 << 17)
@@ -205,7 +206,7 @@ static struct regulator_consumer_supply max77663_sd2_supply[] = {
        REGULATOR_SUPPLY("avdd_usb_pll", "tegra-udc.0"),
        REGULATOR_SUPPLY("avdd_usb_pll", "tegra-ehci.0"),
        REGULATOR_SUPPLY("avdd_usb_pll", "tegra-ehci.1"),
-       REGULATOR_SUPPLY("vddio_cam", "tegra_camera"),
+       REGULATOR_SUPPLY("vddio_cam", "vi"),
        REGULATOR_SUPPLY("pwrdet_cam", NULL),
        REGULATOR_SUPPLY("avdd_osc", NULL),
        REGULATOR_SUPPLY("vddio_sys", NULL),
@@ -253,7 +254,7 @@ static struct regulator_consumer_supply max77663_ldo0_supply[] = {
        REGULATOR_SUPPLY("avdd_pllu", NULL),
        REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.0"),
        REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.1"),
-       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegra_camera"),
+       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "vi"),
 };
 
 static struct regulator_consumer_supply max77663_ldo1_supply[] = {
@@ -280,7 +281,7 @@ static struct regulator_consumer_supply max77663_ldo4_supply[] = {
 static struct regulator_consumer_supply max77663_ldo5_supply[] = {
        REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.0"),
        REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.1"),
-       REGULATOR_SUPPLY("avdd_dsi_csi", "tegra_camera"),
+       REGULATOR_SUPPLY("avdd_dsi_csi", "vi"),
        REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.1"),
        REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.2"),
        REGULATOR_SUPPLY("vddio_hsic", "tegra-xhci"),
@@ -565,7 +566,7 @@ static struct regulator_consumer_supply palmas_smps8_supply[] = {
        REGULATOR_SUPPLY("avdd_plle", NULL),
        REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.0"),
        REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.1"),
-       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegra_camera"),
+       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "vi"),
        REGULATOR_SUPPLY("avdd_hdmi_pll", "tegradc.1"),
        REGULATOR_SUPPLY("avdd_usb_pll", "tegra-ehci.2"),
        REGULATOR_SUPPLY("avddio_usb", "tegra-ehci.2"),
@@ -992,8 +993,7 @@ static struct tegra_suspend_platform_data dalmore_suspend_data = {
        .corereq_high   = true,
        .sysclkreq_high = true,
        .cpu_lp2_min_residency = 1000,
-       .min_residency_noncpu = 2000,
-       .min_residency_crail = 8000,
+       .min_residency_crail = 20000,
 };
 #ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS
 /* board parameters for cpu dfll */
@@ -1176,6 +1176,26 @@ int __init dalmore_edp_init(void)
        return 0;
 }
 
+static struct tegra_tsensor_pmu_data tpdata_palmas = {
+       .reset_tegra = 1,
+       .pmu_16bit_ops = 0,
+       .controller_type = 0,
+       .pmu_i2c_addr = 0x58,
+       .i2c_controller_id = 4,
+       .poweroff_reg_addr = 0xa0,
+       .poweroff_reg_data = 0x0,
+};
+
+static struct tegra_tsensor_pmu_data tpdata_max77663 = {
+       .reset_tegra = 1,
+       .pmu_16bit_ops = 0,
+       .controller_type = 0,
+       .pmu_i2c_addr = 0x3c,
+       .i2c_controller_id = 4,
+       .poweroff_reg_addr = 0x41,
+       .poweroff_reg_data = 0x80,
+};
+
 static struct soctherm_platform_data dalmore_soctherm_data = {
        .therm = {
                [THERM_CPU] = {
@@ -1222,10 +1242,18 @@ static struct soctherm_platform_data dalmore_soctherm_data = {
                        },
                },
        },
+       .tshut_pmu_trip_data = &tpdata_palmas,
 };
 
 int __init dalmore_soctherm_init(void)
 {
+       struct board_info board_info;
+
+       tegra_get_board_info(&board_info);
+       if (!(board_info.board_id == BOARD_E1611 ||
+               board_info.board_id == BOARD_P2454))
+               dalmore_soctherm_data.tshut_pmu_trip_data = &tpdata_max77663;
+
        tegra_platform_edp_init(dalmore_soctherm_data.therm[THERM_CPU].trips,
                        &dalmore_soctherm_data.therm[THERM_CPU].num_trips);
        tegra_add_tj_trips(dalmore_soctherm_data.therm[THERM_CPU].trips,