diff options
author | Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com> | 2024-06-10 17:29:49 +0900 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-06-14 12:36:00 +0000 |
commit | 99a190105fc280f4935f8eb2d377b02d8f19128e (patch) | |
tree | c19c70dfd9a7f1e4bf6bb49c56767807b0746619 | |
parent | 08d7d31384e94cb4972206cc37b7c8accd55209c (diff) |
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 <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83029
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
-rw-r--r-- | src/mainboard/google/brya/variants/xol/include/variant/gpio.h | 2 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/xol/variant.c | 11 |
2 files changed, 13 insertions, 0 deletions
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 <baseboard/gpio.h> +#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 <acpi/acpigen.h> #include <baseboard/variants.h> +#include <variant/gpio.h> #include <chip.h> #include <fw_config.h> #include <sar.h> @@ -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); +} |