diff options
author | Wai-Hong Tam <waihong@google.com> | 2022-03-04 16:12:38 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-08 19:13:11 +0000 |
commit | 70d68e11684da316bc1742a10e82d98b43ed2ed1 (patch) | |
tree | ac2c42dbd332a01ca6c1f3a75dfa663403c0b826 /zephyr/projects/herobrine | |
parent | a59bb5eafeca925babaf42fd62059ebaee755790 (diff) | |
download | chrome-ec-70d68e11684da316bc1742a10e82d98b43ed2ed1.tar.gz |
Herobrine: Add debug messages to show the HPD change
Show the HPD change message to help debugging issues.
BRANCH=None
BUG=b:170598152,b:209092452
TEST=Plug and unplug a Type-C monitor and check the messages.
Change-Id: I5ee5252ef7a50f976ee9ff0077aaa6df774f5013
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3503403
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'zephyr/projects/herobrine')
-rw-r--r-- | zephyr/projects/herobrine/src/usb_pd_policy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/projects/herobrine/src/usb_pd_policy.c b/zephyr/projects/herobrine/src/usb_pd_policy.c index 5fa44f211e..08a113bf12 100644 --- a/zephyr/projects/herobrine/src/usb_pd_policy.c +++ b/zephyr/projects/herobrine/src/usb_pd_policy.c @@ -229,9 +229,11 @@ __override int svdm_dp_attention(int port, uint32_t *payload) usleep(svdm_hpd_deadline[port] - now); /* Generate IRQ_HPD pulse */ + CPRINTS("C%d: Recv IRQ. HPD->0", port); gpio_pin_set_dt(hpd, 0); usleep(HPD_DSTREAM_DEBOUNCE_IRQ); gpio_pin_set_dt(hpd, 1); + CPRINTS("C%d: Recv IRQ. HPD->1", port); /* Set the minimum time delay (2ms) for the next HPD IRQ */ svdm_hpd_deadline[port] = get_time().val + @@ -240,6 +242,7 @@ __override int svdm_dp_attention(int port, uint32_t *payload) CPRINTF("ERR:HPD:IRQ&LOW\n"); return 0; } else { + CPRINTS("C%d: Recv lvl. HPD->%d", port, lvl); gpio_pin_set_dt(hpd, lvl); /* Set the minimum time delay (2ms) for the next HPD IRQ */ svdm_hpd_deadline[port] = get_time().val + @@ -251,6 +254,7 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { + CPRINTS("%s(%d)", __func__, port); if (is_dp_muxable(port)) { /* Disconnect the DP port selection mux. */ gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_dp_mux_oe_l), 1); @@ -259,6 +263,7 @@ __override void svdm_exit_dp_mode(int port) /* Signal AP for the HPD low event */ usb_mux_hpd_update(port, USB_PD_MUX_HPD_LVL_DEASSERTED | USB_PD_MUX_HPD_IRQ_DEASSERTED); + CPRINTS("C%d: DP exit. HPD->0", port); gpio_pin_set_dt( GPIO_DT_FROM_NODELABEL(gpio_dp_hot_plug_det_r), 0); } |