diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-05-09 22:47:15 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-10 07:08:28 -0700 |
commit | 57bcc097f1c9e9eb12f00916f9bacb74848950e5 (patch) | |
tree | efc7d9801e0eca90242314c6bd6ec4f73bac760e | |
parent | 80d50a59199eece9ca979e9266805772274e843e (diff) | |
download | chrome-ec-57bcc097f1c9e9eb12f00916f9bacb74848950e5.tar.gz |
poppy: Update detection values for rev1
rev1 uses 604K pull-up on lid, 30.1K pull-down, 1% tolerance, so
we can just reuse rev0 detection interval. We can consider narrowing
the interval as rev1 should have tighter tolerance.
BRANCH=none
BUG=b:35582031
TEST=make BOARD=poppy; make BOARD=soraka
TEST=Soraka (rev1): Base is detected.
Change-Id: I7c3950a0b4c0bd0e1140e4a51447a3483cccc603
Reviewed-on: https://chromium-review.googlesource.com/500014
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r-- | board/poppy/board.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/board/poppy/board.c b/board/poppy/board.c index 510f0b8489..762b2a2d2f 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -128,21 +128,14 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal) */ #define BASE_DETECT_DEBOUNCE_US (5 * MSEC) -#ifdef POPPY_REV0 /* * rev0: Lid has 100K pull-up, base has 5.1K pull-down, so the ADC * value should be around 5.1/(100+5.1)*3300 = 160. + * >=rev1: Lid has 604K pull-up, base has 30.1K pull-down, so the + * ADC value should be around 30.1/(604+30.1)*3300 = 156 */ #define BASE_DETECT_MIN_MV 140 #define BASE_DETECT_MAX_MV 200 -#else -/* - * >=rev1: Lid has 600K pull-up, base has 10K pull-down, 1% tolerance, so the - * ADC value should be around 10.0/(604+10.0)*3300 = 54 - */ -#define BASE_DETECT_MIN_MV 50 -#define BASE_DETECT_MAX_MV 60 -#endif /* * Base EC pulses detection pin for 100 us to signal out of band USB wake (that |