summaryrefslogtreecommitdiff
path: root/board/spherion
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-03-31 15:13:25 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-08 08:08:33 +0000
commitc2e9a8b208387e50c480a3f9edc9c67f3088cf22 (patch)
tree7cae3c496450933177f82bbdfbfed72deaa77be3 /board/spherion
parent74b190af723b38f3766b0bab63cf9e26f8fa7be3 (diff)
downloadchrome-ec-c2e9a8b208387e50c480a3f9edc9c67f3088cf22.tar.gz
asurada : measure VBUS by ADC.
Dual VBUS ADC are supported since board revision >= 4. This is to address the inaccurate VBUS present detection on SYV682x. SYV682X assumes can only recognize VBUS equals Vsafe5V or Vsafe0V. If the VBUS is not falling at the both range, it assume the VBUS > vSafe5V and thus VBUS is presented. But if the votlage is fallint between Vsafe5V and Vsafe0V, it still thinks VBUS presented, and this is a false positive. BUG=b:181203590 TEST=ensure VBUS ADC reports reasonable value BRANCH=asurada Change-Id: I1b57395216f1d6788bcd09306b503bdd3b49ddc8 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793853 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/spherion')
-rw-r--r--board/spherion/gpio.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/board/spherion/gpio.inc b/board/spherion/gpio.inc
index 5794a456dc..369896f91f 100644
--- a/board/spherion/gpio.inc
+++ b/board/spherion/gpio.inc
@@ -108,7 +108,7 @@ ALTERNATE(PIN_MASK(E, 0x81), 1, MODULE_I2C, 0) /* I2C E */
ALTERNATE(PIN_MASK(B, 0x03), 1, MODULE_UART, 0) /* EC to Servo */
/* ADC */
-ALTERNATE(PIN_MASK(I, 0x4F), 0, MODULE_ADC, 0) /* ADC 0,1,2,3,6 */
+ALTERNATE(PIN_MASK(I, 0x6F), 0, MODULE_ADC, 0) /* ADC 0,1,2,3,5,6 */
/* SPI */
ALTERNATE(PIN_MASK(M, 0x33), 0, MODULE_SPI, 0) /* SPI */
@@ -133,11 +133,7 @@ GPIO(PG_MT6315_GPU_ODL, PIN(H, 6), GPIO_INPUT)
GPIO(EN_PP3000_SD_U, PIN(G, 1), GPIO_INPUT | GPIO_PULL_DOWN | GPIO_SEL_1P8V)
/* reserved for future use */
GPIO(CCD_MODE_ODL, PIN(C, 4), GPIO_INPUT)
-/*
- * ADC pins don't have internal pull-down capability,
- * so we set them as output low.
- */
-GPIO(NC_GPI5, PIN(I, 5), GPIO_OUT_LOW)
+
/* NC pins, enable internal pull-up/down to avoid floating state. */
GPIO(NC_GPM2, PIN(M, 2), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(NC_GPM3, PIN(M, 3), GPIO_INPUT | GPIO_PULL_DOWN)