From 99a190105fc280f4935f8eb2d377b02d8f19128e Mon Sep 17 00:00:00 2001 From: Seunghwan Kim Date: Mon, 10 Jun 2024 17:29:49 +0900 Subject: mb/google/brya/var/xol: Turn off camera power during s0ix Turn off camera power during s0ix to improve power consumption. BUG=None BRANCH=brya TEST=built and verified GPP_A17 went to low during s0ix with a scope. [Measurement of s0ix power consumption - 1 hour avg] Before this: 301.4 mW After this: 299.8 mW Change-Id: Iae02d06e9f5a5988563b2b7ae36d153aecedb9d7 Signed-off-by: Seunghwan Kim Reviewed-on: https://review.coreboot.org/c/coreboot/+/83029 Reviewed-by: Eric Lai Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: YH Lin --- src/mainboard/google/brya/variants/xol/include/variant/gpio.h | 2 ++ src/mainboard/google/brya/variants/xol/variant.c | 11 +++++++++++ 2 files changed, 13 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/brya/variants/xol/include/variant/gpio.h b/src/mainboard/google/brya/variants/xol/include/variant/gpio.h index c4fe342621..f62197dfe6 100644 --- a/src/mainboard/google/brya/variants/xol/include/variant/gpio.h +++ b/src/mainboard/google/brya/variants/xol/include/variant/gpio.h @@ -5,4 +5,6 @@ #include +#define CAM_PWR GPP_A17 + #endif diff --git a/src/mainboard/google/brya/variants/xol/variant.c b/src/mainboard/google/brya/variants/xol/variant.c index 26ced214d4..8d14715a67 100644 --- a/src/mainboard/google/brya/variants/xol/variant.c +++ b/src/mainboard/google/brya/variants/xol/variant.c @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include +#include #include #include #include @@ -9,3 +11,12 @@ const char *get_wifi_sar_cbfs_filename(void) { return "wifi_sar_0.hex"; } + +void variant_generate_s0ix_hook(enum s0ix_entry entry) +{ + /* Add board-specific MS0X entries */ + if (entry == S0IX_ENTRY) + acpigen_soc_clear_tx_gpio(CAM_PWR); + if (entry == S0IX_EXIT) + acpigen_soc_set_tx_gpio(CAM_PWR); +} -- cgit v1.2.3