summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHyongbin Kim <hyongbink@nvidia.com>2013-08-12 14:35:46 +0900
committerGabby Lee <galee@nvidia.com>2013-08-23 04:49:07 -0700
commit73fe77b1752b75f5cfdfd5d3d332856791f81ec1 (patch)
tree5d700c6d177591af781e7483e733716785955d8e /arch
parent1bdf265b37395389631c5d21fa2cfd9e5331b8bf (diff)
ARM: Tegra: TT-power: set current threshold
Set ina230 current threshold in low SOC. 1.8A under 4% SOC and 2.5A under 8% SOC. This change has trade off against performence drop at low SOC. Bug 1316595 Bug 1304204 Change-Id: I6e397277729f2570e29ee3f36170e9c6dfe08467 Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com> Reviewed-on: http://git-master/r/260356 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/tegra114-tegratab-common.dtsi5
-rw-r--r--arch/arm/mach-tegra/board-tegratab-power.c5
-rw-r--r--arch/arm/mach-tegra/board-tegratab-powermon.c2
-rw-r--r--arch/arm/mach-tegra/board-tegratab.h1
4 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/boot/dts/tegra114-tegratab-common.dtsi b/arch/arm/boot/dts/tegra114-tegratab-common.dtsi
index 2f8c0db425e9..bebcd27c0b78 100644
--- a/arch/arm/boot/dts/tegra114-tegratab-common.dtsi
+++ b/arch/arm/boot/dts/tegra114-tegratab-common.dtsi
@@ -853,6 +853,11 @@
0x70 0xC0 0x51 0x40 0x43 0xE0 0x43 0xC0
0x29 0xC0 0x2F 0xC0 0x17 0xE0 0x12 0xE0
0x1C 0x20 0x13 0x80 0x0E 0x00 0x0E 0x00>;
+ set_current_threshold = "ina230";
+ current_normal = <4500>; /* 4.5A */
+ current_threshold_num = <2>;
+ current_threshold_soc = <4 8>;
+ current_threshold = <1800 2500>;
};
};
diff --git a/arch/arm/mach-tegra/board-tegratab-power.c b/arch/arm/mach-tegra/board-tegratab-power.c
index dd3ada144d35..5b3d7738f9a5 100644
--- a/arch/arm/mach-tegra/board-tegratab-power.c
+++ b/arch/arm/mach-tegra/board-tegratab-power.c
@@ -123,6 +123,11 @@ struct max17048_battery_model tegratab_max17048_mdata = {
struct max17048_platform_data tegratab_max17048_pdata = {
.model_data = &tegratab_max17048_mdata,
+ .set_current_threshold = ina230_set_current_threshold,
+ .current_normal = TEGRATAB_BATTERY_MAX_CURRENT,
+ .current_threshold_num = 2,
+ .current_threshold_soc = {4, 8},
+ .current_threshold = {1800, 2500},
};
static struct i2c_board_info __initdata tegratab_max17048_boardinfo[] = {
diff --git a/arch/arm/mach-tegra/board-tegratab-powermon.c b/arch/arm/mach-tegra/board-tegratab-powermon.c
index 0c428c9ade9f..7a4cb683ec53 100644
--- a/arch/arm/mach-tegra/board-tegratab-powermon.c
+++ b/arch/arm/mach-tegra/board-tegratab-powermon.c
@@ -338,7 +338,7 @@ static struct ina230_platform_data power_mon_ina230_info[] = {
/* Current threshold for detect system overcurrent.
Yoku(4100mA/3.7V) suggest 4.5A for max continuous
discharge current. It is 6.5A in datasheet. */
- .current_threshold = 4500,
+ .current_threshold = TEGRATAB_BATTERY_MAX_CURRENT,
.shunt_polarity_inverted = 1,
}
};
diff --git a/arch/arm/mach-tegra/board-tegratab.h b/arch/arm/mach-tegra/board-tegratab.h
index 97516d0c3e94..e53790e25202 100644
--- a/arch/arm/mach-tegra/board-tegratab.h
+++ b/arch/arm/mach-tegra/board-tegratab.h
@@ -132,4 +132,5 @@ enum tegra_bb_type {
#define UTMI2_PORT_OWNER_XUSB 0x2
#define HSIC1_PORT_OWNER_XUSB 0x4
+#define TEGRATAB_BATTERY_MAX_CURRENT 4500
#endif