summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2019-05-31 16:50:23 +0000
committerCommit Bot <commit-bot@chromium.org>2019-06-01 05:15:01 +0000
commit3e00d5d078d35601dd1ff7d3968b95cb8cc12461 (patch)
tree0b187aa501f00a63e04100f2d1c4053a074d28ff
parentc9f7f374aef372bbc4cabb7af0ea643581b3ee6d (diff)
downloadchrome-ec-3e00d5d078d35601dd1ff7d3968b95cb8cc12461.tar.gz
Revert "servo_v4: Enable VBUS voltage and current measurement"
This reverts commit 2fa7472da15a402ba8649344016ab5351cb768e7. Reason for revert: Use servo I2C driver to access the INA's instead. Don't need the INA driver and the console command in servo v4 firmware. Original change's description: > servo_v4: Enable VBUS voltage and current measurement > > Enable the INA functions on the VBUS of the DUT port (PP_DUT) and the > VBUS of the CHG port (PP_CHG). > > BUG=b:132807223 > BRANCH=servo > TEST=Typed the console command "ina 0" and returned: > > ina 0 > Configuration: 4127 > Shunt voltage: 10d9 => 10782 uV > Bus voltage : 3d3a => 19592 mV > Power : 069b => 42275 mW > Current : 086d => 2157 mA > Calibration : 0400 > Mask/Enable : 0008 > Alert limit : 0000 > > Used a multimeter to measure the VBUS on the DUT port. The measured > voltage and current are close to the above values. > > Did the same thing on the CHG port. > > Change-Id: I1d49540b4685f299437821251cd6422b1c0ac0b8 > Signed-off-by: Wai-Hong Tam <waihong@google.com> > Reviewed-on: https://chromium-review.googlesource.com/1613805 > Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> > Reviewed-by: Scott Collyer <scollyer@chromium.org> Bug: b:132807223 Change-Id: If8517ceb5255e38bb2824e6cb9fe1848142950c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1638718 Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
-rw-r--r--board/servo_v4/board.c5
-rw-r--r--board/servo_v4/board.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c
index 690e67b5fc..d0e1bd08be 100644
--- a/board/servo_v4/board.c
+++ b/board/servo_v4/board.c
@@ -12,7 +12,6 @@
#include "gpio.h"
#include "hooks.h"
#include "i2c.h"
-#include "ina2xx.h"
#include "queue_policies.h"
#include "registers.h"
#include "spi.h"
@@ -440,10 +439,6 @@ static void board_init(void)
*/
pd_set_max_voltage(PD_MIN_MV);
- /* Calibrate INA0 (PP_DUT) and INA1 (PP_CHG) */
- ina2xx_init(0, 0x8000 /* Reset */, INA2XX_CALIB_1MA(5 /* mOhm */));
- ina2xx_init(1, 0x8000 /* Reset */, INA2XX_CALIB_1MA(5 /* mOhm */));
-
hook_call_deferred(&ccd_measure_sbu_data, 1000 * MSEC);
}
diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h
index ff2ae855b7..3db2478ae4 100644
--- a/board/servo_v4/board.h
+++ b/board/servo_v4/board.h
@@ -90,7 +90,6 @@
/* PD features */
#define CONFIG_ADC
-#define CONFIG_INA231
#define CONFIG_BOARD_PRE_INIT
/*
* If task profiling is enabled then the rx falling edge detection interrupts