summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2017-08-24 09:03:46 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-24 17:20:41 -0700
commitabd7e7d5820c114dee87565b93d5d76c209b3361 (patch)
tree4e029a939298f7622b8509dbb4bf1a6c9c65b677
parent1029239bc18c1a8e1bff5f7aad040cdfe421dbd2 (diff)
downloadchrome-ec-abd7e7d5820c114dee87565b93d5d76c209b3361.tar.gz
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 <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/633403 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r--chip/g/rdd.c7
1 files changed, 7 insertions, 0 deletions
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
@@ -205,6 +205,13 @@ void init_rdd_state(void)
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
* from deep sleep if a cable is plugged in.