summaryrefslogtreecommitdiff
path: root/baseboard/trogdor/usb_pd_policy.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-09-02 18:20:52 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-04 00:25:49 +0000
commit5a0919d5d2bc4ed9cd2655181aa1024dfe46d83f (patch)
tree02446d5f9fbaff772a023320e991e5787374818a /baseboard/trogdor/usb_pd_policy.c
parent61ee794d31b4429b8991043ad35e983adf776701 (diff)
downloadchrome-ec-5a0919d5d2bc4ed9cd2655181aa1024dfe46d83f.tar.gz
lazor: Fix turning switchcap off when sysjump to RW
The polarity of the enable pins of DA9313 and LN9310 are different. DA9313 is active-high while LN9310 is active-low. For power saving, the enable pin of LN9310 has an external pull-up; so EC should configure it open-drain. The existing code causes an issue that the switchcap is turned off when sysjump to RW. We should configure the enable pin properly. DA9313 is GPIO-controlled without needing any configuration. So the default setting in gpio.inc should favors DA9313, i.e. GPIO_OUT_LOW; otherwise, DA9313 may turn on unexpectedly. In the board init, should not set the level; otherwise, it will override its level and shutdown the switchcap when sysjump to RW. LN9313 is similar but a bit tricky. As the gpio.inc configures it GPIO_OUT_LOW. When sysjump to RW, will output push-pull a short period of time. As it outputs LOW, should be fine. The GPIO changes like: (1) EC boots from RO -> high-Z (2) GPIO init according to gpio.inc -> push-pull LOW (3) This function configures it -> open-drain HIGH (4) Power sequence turns on the switchcap -> open-drain LOW (5) EC sysjumps to RW (6) GPIO init according to gpio.inc -> push-pull LOW (7) This function configures it -> open-drain LOW BRANCH=None BUG=b:163867792, b:151393598 TEST=Tested on Lazor: when sysjump to RW, switchcap not off. Change-Id: Iec8ea7e16f525fa431230546d712c3e081fdab5c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391830 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'baseboard/trogdor/usb_pd_policy.c')
0 files changed, 0 insertions, 0 deletions