summaryrefslogtreecommitdiff
path: root/common/device_state.c
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2022-03-23 11:19:14 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-28 04:30:56 +0000
commitf421dae42d893c97fb41f8a2fb4731d2ba2c89c9 (patch)
tree1ddadd4327c9f563c225f658b51ab3ca06ea8bb2 /common/device_state.c
parent95d12b1d877b3c0ac61f361cb81ed30e6342c26f (diff)
downloadchrome-ec-f421dae42d893c97fb41f8a2fb4731d2ba2c89c9.tar.gz
tcpc/rt1718s: disable FRS until valid FRS VBUS drop
`rt1718s_set_frs_enable` does three things: 1. enable/disable FRS RX detection 2. enable/disable auto asserting EN_SRC when FRS happened 3. enable/disable EN_FRS RT1718S EN_SRC GPIO auto-enablement is only working when EN_FRS is asserted and the VBUS drop below Vsafe5VMax. However, some of the FRS hubs have a higher capacitance, and this makes the VBUS discharging slowly, and currently, EN_FRS is disabled after we got FRS RX signal on CC line, and it might happen before the VBUS discharged to Vsafe5VMax, and the FRS won't source in that case because EN_FRS was deasserted at the moment. Also, some of the PPC (e.g. nx20p348x and hl5099) requiring the EN_FRS asserting longer even after the EN_SRC asserted (power is sourcing), so that the VBUS can be maintained. To fix these issues, we defer deasserting the EN_FRS for 5ms after RT1718S reports VBUS valid low (4.75V), and EN_SRC is asserted. The 5ms is recommended by HL5099 vendor to maintain the VBUS. BUG=b:223086905 b/228422539 TEST=kingler C1 FRS works BRANCH=none Change-Id: Idc1fc8614b30275b825a655d7af821c1a1c99ee0 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3544748 Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'common/device_state.c')
0 files changed, 0 insertions, 0 deletions