summaryrefslogtreecommitdiff
path: root/board/cr50/gpio.inc
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2017-08-23 14:40:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-30 16:13:16 -0700
commit17150b05ff20069198f009a7d48282013dcd02cf (patch)
tree19bf3444d1c2b3e258ae6e7b6993e71bf57a6279 /board/cr50/gpio.inc
parent8202ddaa95b853ae7a4b6893e06c85df7b2c947f (diff)
downloadchrome-ec-17150b05ff20069198f009a7d48282013dcd02cf.tar.gz
cr50: Split AP state machine into its own file
The device state machines aren't quite similar enough to use common code. Split the AP state machine out, the way we split out the EC state machine in the previous CL. BUG=b:35587387 BRANCH=cr50 TEST=manual, with Cr50 strapped (or hard-coded) not to use platform reset and not to use TPM reset to detect the AP: Pull CCD_MODE_L low, so Cr50 detects/enables CCD Pull AP_DETECT high. Pull INT_AP_L low (with resistor). Pull AP_DETECT low --> See 'AP off' message gpioget --> INT_AP_L=0 ccd --> AP UART disabled Pull AP_DETECT high --> See 'AP on' message gpioget --> INT_AP_L=1 ccd --> AP UART RX+TX Pull AP_DETECT low for <1 sec then back high (don't see AP off/on message) gpioget --> INT_AP_L=1 ccd --> AP UART RX+TX Reboot with AP_DETECT still low -> AP off at 1 second Reboot with AP_DETECT still low and then assert AP_DETECT within a second -> AP on immediately Repeat with Cr50 strapped/hard coded to use platform reset, but using TPM_RST_L instead of AP_DETECT. Note that this will also show TPM reset debugging output when TPM_RST_L is asserted. Change-Id: Ief9e4e5f2585ff925de1595cc8fbd5306c94a806 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/634248 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'board/cr50/gpio.inc')
-rw-r--r--board/cr50/gpio.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc
index 0bd90555af..dcf5b38561 100644
--- a/board/cr50/gpio.inc
+++ b/board/cr50/gpio.inc
@@ -56,7 +56,7 @@
* system resets.
*/
GPIO_INT(TPM_RST_L, PIN(1, 0), GPIO_INT_RISING, tpm_rst_deasserted)
-GPIO_INT(DETECT_AP, PIN(1, 1), GPIO_INT_HIGH, device_state_on)
+GPIO_INT(DETECT_AP, PIN(1, 1), GPIO_INT_HIGH, ap_detect_asserted)
GPIO_INT(DETECT_EC, PIN(1, 2), GPIO_INT_HIGH, ec_detect_asserted)
/*
* DETECT_SERVO and EC_TX_CR50_RX pins must NOT be changed without also changing