diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-07-21 17:06:34 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-22 13:35:46 -0700 |
commit | e9a1e9eb41143a30eae75b408fc85d5c652a8652 (patch) | |
tree | 02613815bff43d510abd79f2ffce1a26d9dc9445 | |
parent | fac4f79fc5aac4c90c9026cf750d9157684cdc0a (diff) | |
download | chrome-ec-e9a1e9eb41143a30eae75b408fc85d5c652a8652.tar.gz |
g: deactivate the PHY during usb_release
The USB controller should disable the PHY itself when usb is released,
but from the power tests I ran it does not. This change adds a call in
usb_release to deactivate the PHY.
It looks like having the AP on vs off also makes a difference in power
consumption. I am looking into that now, but until that is resolved turn
of the AP off while testing this USB change to see the effects on power.
BUG=chrome-os-partner:54331
BRANCH=none
TEST=manual
Without deactivating the PHY put cr50 into deep sleep on gru.
run 'reboot ap-off'
measure pp3300_haven_mw and it is around 4.5mW
Add deactivating the PHY during usb_release.
Put cr50 into deep sleep
run 'reboot ap-off'
measure the power and the average should be around 2mW
Change-Id: I16e6885a4e40c78e81d9bbc42c9af79e5f55047e
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/362159
Commit-Ready: Dan Shi <dshi@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | chip/g/usb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c index 0acacb8fa2..b5dc8f08bc 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -1360,6 +1360,9 @@ void usb_release(void) /* disable interrupt handlers */ task_disable_irq(GC_IRQNUM_USB0_USBINTR); + /* Deactivate the PHY */ + GR_USB_GGPIO = GGPIO_WRITE(USB_CUSTOM_CFG_REG, 0); + /* disable clocks */ clock_enable_module(MODULE_USB, 0); /* TODO: pin-mux */ |