From abd7e7d5820c114dee87565b93d5d76c209b3361 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Thu, 24 Aug 2017 09:03:46 -0700 Subject: g: Change rdd 0.4V ref to 0.3V. On some boards, it was seen that SuzyQable wasn't detected by the rdd block. The voltage around 0.4V is marginal with a Vbus around 4.75V. This commit simply adjust the 0.4V comparator reference voltage to 0.3V in order to make the detection work. BUG=b:64847312 BRANCH=cr50 TEST=Find a soraka where SuzyQable didn't work. Verify with this patch, it does work. Additionally, verify that servo_v4 continues works. Change-Id: If54630ec469408031cd84ffb93ef5fea42bdee3b Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/633403 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Mary Ruthven --- chip/g/rdd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chip/g/rdd.c b/chip/g/rdd.c index 30ea671238..24388c02b6 100644 --- a/chip/g/rdd.c +++ b/chip/g/rdd.c @@ -204,6 +204,13 @@ void init_rdd_state(void) /* Configure to detect accessory connected */ GWRITE(RDD, PROG_DEBUG_STATE_MAP, DETECT_DEBUG); + /* + * Set the 0.4V comparator reference to 0.3V instead. The voltage is + * marginal near 0.4V for example with VBUS at 4.75V and a SuzyQable See + * b/64847312. + */ + GWRITE_FIELD(RDD, REF_ADJ, LVL0P4V, 0x2); + /* * Enable interrupt for detecting CC. This minimizes the time before * we transition to cable-detected at boot, and will cause us to wake -- cgit v1.2.1