From 2cf4269683c78c88a4cd3c211770816ecf55f5d2 Mon Sep 17 00:00:00 2001 From: Kevin K Wong Date: Fri, 2 Oct 2015 22:53:14 -0700 Subject: kunimitsu: Correct ADC calculation for VBUS. According to MEC1322 datasheet, ADC VREF is 3V. With the voltage divider on Kunimitsu, R1=180K and R2=20K, so full ADC is equal to 30V if ADC VREF is 3V. BUG=none BRANCH=none TEST=Checked value returned by adc console cmd. 20xxx mV is returned by Zinger. 14xxx mV is returned by Apple charger. Change-Id: I155ce03e3c840740c1dc3a985a1d5cfcf3b40c30 Signed-off-by: Kevin K Wong Reviewed-on: https://chromium-review.googlesource.com/304192 Reviewed-by: Shawn N --- board/kunimitsu/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/kunimitsu/board.c b/board/kunimitsu/board.c index 580c5b13a8..a487b6418c 100644 --- a/board/kunimitsu/board.c +++ b/board/kunimitsu/board.c @@ -98,8 +98,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, 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}, /* -- cgit v1.2.1