diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2013-07-03 17:55:38 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-12-12 22:02:35 +0100 |
commit | ccb12fbb58c13af46e2275fd50cd8b171fdd169a (patch) | |
tree | 8da22f44789848ec55c83d99c3280fd6046f6eeb /src/mainboard/google | |
parent | 041dae191409ef715e0100a5c63bff7f7feb2aaa (diff) |
peppy: Disable audio codec enable GPIO in S3 + S5.
To save power, disable audio codec in S3 + S5.
Also, refactor Lynxpoint GPIO code slightly to allow usage in SMM
binary.
Change-Id: I55c4248c89a258b5e4cecf8579eb58f1c15430c0
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60950
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/4339
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/peppy/smihandler.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainboard/google/peppy/smihandler.c b/src/mainboard/google/peppy/smihandler.c index 7b7dd69beb..16e8f64d4e 100644 --- a/src/mainboard/google/peppy/smihandler.c +++ b/src/mainboard/google/peppy/smihandler.c @@ -32,6 +32,9 @@ #include <ec/google/chromeec/ec.h> #include "ec.h" +/* Codec enable: GPIO45 */ +#define GPIO_PP3300_CODEC_EN 45 + int mainboard_io_trap_handler(int smif) { switch (smif) { @@ -98,6 +101,8 @@ void mainboard_smi_sleep(u8 slp_typ) if (smm_get_gnvs()->s3u1 == 0) google_chromeec_set_usb_charge_mode( 1, USB_CHARGE_MODE_DISABLED); + + set_gpio(GPIO_PP3300_CODEC_EN, 0); break; case 5: if (smm_get_gnvs()->s5u0 == 0) @@ -106,6 +111,8 @@ void mainboard_smi_sleep(u8 slp_typ) if (smm_get_gnvs()->s5u1 == 0) google_chromeec_set_usb_charge_mode( 1, USB_CHARGE_MODE_DISABLED); + + set_gpio(GPIO_PP3300_CODEC_EN, 0); break; } |