summaryrefslogtreecommitdiff
path: root/board/plankton
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2015-05-28 10:34:26 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-29 01:37:38 +0000
commit14ba846eea9a16876df98802d9c0f192ae006ce0 (patch)
treed4e196c51225b478a24b4c8c71630dd792f19b08 /board/plankton
parente4cd9121a5aa27f58106b6fc6a089c92b67a9668 (diff)
downloadchrome-ec-14ba846eea9a16876df98802d9c0f192ae006ce0.tar.gz
pd: Refine HPD debounce values.
Change refines HPD debounce values into both upstream and downstream values for packetizing across the type-C link. For LVL, the upstream type-C device will packetize any HPD transition >=2ms as either HIGH or LOW. On the downstream side the value is driven immediately. Additional debouncing should be done by true upstream device according to specification. For IRQ, the upstream type-C device will packetize any HPD pulse >250usec as an IRQ. On the downstream side it will be de-packetized to create 750usec pulse. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:39717 TEST=samus|macbook(2015) + hoho|dingdong|apple HDMI type-C dongles still drive screens successfully. Change-Id: Ide58f3b2d675a82c12ca6afc2be53ca6e2561ace Reviewed-on: https://chromium-review.googlesource.com/273867 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'board/plankton')
-rw-r--r--board/plankton/board.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/board/plankton/board.c b/board/plankton/board.c
index 40b0c2b2d8..64f23549ec 100644
--- a/board/plankton/board.c
+++ b/board/plankton/board.c
@@ -41,16 +41,16 @@ static int sn75dp130_dpcd_init(void);
* 3. irq : downstream display sink signalling an interrupt.
*
* The debounce times for these various events are:
- * 100MSEC : min pulse width of level value.
- * 2MSEC : min pulse width of IRQ low pulse. Max is level debounce min.
+ * HPD_USTREAM_DEBOUNCE_LVL : min pulse width of level value.
+ * HPD_USTREAM_DEBOUNCE_IRQ : min pulse width of IRQ low pulse.
*
* lvl(n-2) lvl(n-1) lvl prev_delta now_delta event
* ----------------------------------------------------
- * 1 0 1 <2ms n/a low glitch (ignore)
- * 1 0 1 >2ms <100ms irq
- * x 0 1 n/a >100ms high
- * 0 1 0 <100ms n/a high glitch (ignore)
- * x 1 0 n/a >100ms low
+ * 1 0 1 <IRQ n/a low glitch (ignore)
+ * 1 0 1 >IRQ <LVL irq
+ * x 0 1 n/a >LVL high
+ * 0 1 0 <LVL n/a high glitch (ignore)
+ * x 1 0 n/a >LVL low
*/
void hpd_lvl_deferred(void)
@@ -84,14 +84,14 @@ void hpd_event(enum gpio_signal signal)
uint64_t cur_delta = now.val - hpd_prev_ts;
/* Record low pulse */
- if (cur_delta >= HPD_DEBOUNCE_IRQ && level)
+ if (cur_delta >= HPD_USTREAM_DEBOUNCE_IRQ && level)
hpd_possible_irq = 1;
/* store current time */
hpd_prev_ts = now.val;
/* All previous hpd level events need to be re-triggered */
- hook_call_deferred(hpd_lvl_deferred, HPD_DEBOUNCE_LVL);
+ hook_call_deferred(hpd_lvl_deferred, HPD_USTREAM_DEBOUNCE_LVL);
}
/* Debounce time for voltage buttons */