diff options
author | Todd Broch <tbroch@chromium.org> | 2015-05-28 10:34:26 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-29 01:37:38 +0000 |
commit | 14ba846eea9a16876df98802d9c0f192ae006ce0 (patch) | |
tree | d4e196c51225b478a24b4c8c71630dd792f19b08 /board/hoho/board.c | |
parent | e4cd9121a5aa27f58106b6fc6a089c92b67a9668 (diff) | |
download | chrome-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/hoho/board.c')
-rw-r--r-- | board/hoho/board.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/board/hoho/board.c b/board/hoho/board.c index 19f0cc2f7c..8e0a370bf3 100644 --- a/board/hoho/board.c +++ b/board/hoho/board.c @@ -36,16 +36,16 @@ void hpd_event(enum gpio_signal signal); * 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_irq_deferred(void) @@ -79,14 +79,15 @@ void hpd_event(enum gpio_signal signal) hook_call_deferred(hpd_lvl_deferred, -1); /* It's a glitch. Previous time moves but level is the same. */ - if (cur_delta < HPD_DEBOUNCE_IRQ) + if (cur_delta < HPD_USTREAM_DEBOUNCE_IRQ) return; - if ((!hpd_prev_level && level) && (cur_delta < HPD_DEBOUNCE_LVL)) + if ((!hpd_prev_level && level) && + (cur_delta < HPD_USTREAM_DEBOUNCE_LVL)) /* It's an irq */ hook_call_deferred(hpd_irq_deferred, 0); - else if (cur_delta >= HPD_DEBOUNCE_LVL) - hook_call_deferred(hpd_lvl_deferred, HPD_DEBOUNCE_LVL); + else if (cur_delta >= HPD_USTREAM_DEBOUNCE_LVL) + hook_call_deferred(hpd_lvl_deferred, HPD_USTREAM_DEBOUNCE_LVL); hpd_prev_level = level; } |