diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-11-05 17:01:18 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-09 12:49:44 -0800 |
commit | 20562ac025d8b65fe252a9a9232f70011cf052b3 (patch) | |
tree | 90c1de3daa5e8a5f45c27340f6b2fec771756712 | |
parent | 006d2ad3a6a39ea1be56137ca17fbc2b998b5c4c (diff) | |
download | chrome-ec-20562ac025d8b65fe252a9a9232f70011cf052b3.tar.gz |
mec1322: adjust mec adc channels for analog reference of 3.0V
Change ADC channels on mec1322 boards to use scaling based on ADC
reference voltage of 3.0V instead of 3.3V. Also, setup the scaling
for AMON_BMON which reads the adapter input current or battery
current in mA.
BUG=none
BRANCH=none
TEST=tested on glados. use adc console command and verify it
roughly matches twinkie voltage and current.
Change-Id: Id6ed72012ebb1c23cf98a14ee6c156ec0f5fb586
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/311302
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/chell/board.c | 6 | ||||
-rw-r--r-- | board/glados/board.c | 6 | ||||
-rw-r--r-- | board/kunimitsu/board.c | 2 | ||||
-rw-r--r-- | board/lars/board.c | 2 | ||||
-rw-r--r-- | board/strago/board.c | 4 | ||||
-rw-r--r-- | board/wheatley/board.c | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/board/chell/board.c b/board/chell/board.c index 4706474487..52af086498 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -92,10 +92,10 @@ BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); /* ADC channels */ const struct adc_t adc_channels[] = { - /* Vbus sensing. Converted to mV, full ADC is equivalent to 33V. */ - [ADC_VBUS] = {"VBUS", 33000, 1024, 0, 1}, + /* Vbus sensing. Converted to mV, full ADC is equivalent to 30V. */ + [ADC_VBUS] = {"VBUS", 30000, 1024, 0, 1}, /* Adapter current output or battery discharging current */ - [ADC_AMON_BMON] = {"AMON_BMON", 1, 1, 0, 3}, + [ADC_AMON_BMON] = {"AMON_BMON", 25000, 3072, 0, 3}, /* System current consumption */ [ADC_PSYS] = {"PSYS", 1, 1, 0, 4}, diff --git a/board/glados/board.c b/board/glados/board.c index 2681c49f94..a71441bde5 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -111,10 +111,10 @@ BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); /* ADC channels */ const struct adc_t adc_channels[] = { - /* Vbus sensing. Converted to mV, full ADC is equivalent to 33V. */ - [ADC_VBUS] = {"VBUS", 33000, 1024, 0, 1}, + /* Vbus sensing. Converted to mV, full ADC is equivalent to 30V. */ + [ADC_VBUS] = {"VBUS", 30000, 1024, 0, 1}, /* Adapter current output or battery discharging current */ - [ADC_AMON_BMON] = {"AMON_BMON", 1, 1, 0, 3}, + [ADC_AMON_BMON] = {"AMON_BMON", 25000, 3072, 0, 3}, /* System current consumption */ [ADC_PSYS] = {"PSYS", 1, 1, 0, 4}, diff --git a/board/kunimitsu/board.c b/board/kunimitsu/board.c index 7344656908..c960cb263e 100644 --- a/board/kunimitsu/board.c +++ b/board/kunimitsu/board.c @@ -104,7 +104,7 @@ const struct adc_t adc_channels[] = { /* Vbus sensing. Converted to mV, full ADC is equivalent to 30V. */ [ADC_VBUS] = {"VBUS", 30000, 1024, 0, 1}, /* Adapter current output or battery discharging current */ - [ADC_AMON_BMON] = {"AMON_BMON", 1, 1, 0, 3}, + [ADC_AMON_BMON] = {"AMON_BMON", 25000, 3072, 0, 3}, /* * System current consumption. Converted to mV, * full ADC is equivalent to 100W diff --git a/board/lars/board.c b/board/lars/board.c index 67342480ea..59c5482913 100644 --- a/board/lars/board.c +++ b/board/lars/board.c @@ -98,7 +98,7 @@ const struct adc_t adc_channels[] = { /* Vbus sensing. Converted to mV, full ADC is equivalent to 30V. */ [ADC_VBUS] = {"VBUS", 30000, 1024, 0, 1}, /* Adapter current output or battery discharging current */ - [ADC_AMON_BMON] = {"AMON_BMON", 1, 1, 0, 3}, + [ADC_AMON_BMON] = {"AMON_BMON", 25000, 3072, 0, 3}, /* * System current consumption. Converted to mV, * full ADC is equivalent to 100W diff --git a/board/strago/board.c b/board/strago/board.c index 441835b0ea..4ef295f50c 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -91,8 +91,8 @@ BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); /* ADC channels */ const struct adc_t adc_channels[] = { - /* Vbus sensing. Converted to mV, full ADC is equivalent to 33V. */ - [ADC_VBUS] = {"VBUS", 33000, 1024, 0, 4}, + /* Vbus sensing. Converted to mV, full ADC is equivalent to 30V. */ + [ADC_VBUS] = {"VBUS", 30000, 1024, 0, 4}, }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); diff --git a/board/wheatley/board.c b/board/wheatley/board.c index 247edea7d0..c4561d7347 100644 --- a/board/wheatley/board.c +++ b/board/wheatley/board.c @@ -108,7 +108,7 @@ const struct adc_t adc_channels[] = { /* Vbus sensing. Converted to mV, full ADC is equivalent to 33V. */ [ADC_VBUS] = {"VBUS", NPCX_ADC_CH1, ADC_MAX_VOLT, ADC_READ_MAX+1, 0}, /* Adapter current output or battery discharging current */ - [ADC_AMON_BMON] = {"AMON_BMON", NPCX_ADC_CH4, 1, 1, 0}, + [ADC_AMON_BMON] = {"AMON_BMON", NPCX_ADC_CH4, 55000, 6144, 0}, /* System current consumption */ [ADC_PSYS] = {"PSYS", NPCX_ADC_CH3, 1, 1, 0}, }; |