diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-02-28 07:39:12 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-07 18:07:32 -0800 |
commit | ffd1ee934f310a644c03b88fa2ae3e66ec847a04 (patch) | |
tree | 8b3598d6cc35c4e84663082098a29dd4d3072fbe /chip/g/rdd.h | |
parent | ee263101a9b3b9b1c6133235aeb1a9801df685a1 (diff) | |
download | chrome-ec-ffd1ee934f310a644c03b88fa2ae3e66ec847a04.tar.gz |
cr50: Only drive CCD_MODE_L when in CCD mode.
This commit changes the behaviour of handling the CCD_MODE_L pin. When
Cr50 is not in CCD mode, it will stop driving the pin and turn it into
an input. This allows the pin to be driven by the EC. Cr50 will then
poll the CCD_MODE_L pin to see when it is pulled low and then enter CCD
mode. Once the pin is deasserted, CCD mode is disabled.
However, when Cr50 itself makes the decision to enter CCD mode, it
changes the pin from an input to an output and drives the pin low.
NOTE: The rdd interrupt does not directly trigger CCD mode, but now
drives the pin low. A side-effect of the pin going low is that CCD is
enabled. Once Cr50 decides to leave CCD mode, it then reconfigures the
pin to be setup as an input again.
CQ-DEPEND=CL:448988
BUG=b:35804738
BRANCH=cr50
TEST=Flash dev board, use `ccd` console command to both enable and
disable CCD. Verify that when CCD is enabled, the state of DIOM1 does
not disable CCD. Verify that when CCD is disabled, pulling DIOM1 low
enables CCD. Letting it float disables CCD.
TEST=Verify that CCD mode is reflected in the device state.
Change-Id: I44645f28b362977ca6a502b646e4f4ff1a7430c7
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/448161
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip/g/rdd.h')
-rw-r--r-- | chip/g/rdd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/g/rdd.h b/chip/g/rdd.h index 1f19ee9b3e..a71ace3895 100644 --- a/chip/g/rdd.h +++ b/chip/g/rdd.h @@ -13,6 +13,14 @@ void rdd_detached(void); void rdd_attached(void); /* + * Called by the device state module when the state of the CCD mode pin changes + * and will either enable or disable case closed debugging. + * + * @param pin_level: The level of the CCD_MODE_L pin. + */ +void ccd_mode_pin_changed(int pin_level); + +/* * USB is only used for CCD, so only enable UTMI wakeups when RDD detects that * a debug accessory is attached and disable it as a wakeup source when the * cable is detached. |