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>
This commit is contained in:
Seunghwan Kim
2024-06-10 17:29:49 +09:00
committed by Felix Held
parent 08d7d31384
commit 99a190105f
2 changed files with 13 additions and 0 deletions

View File

@@ -5,4 +5,6 @@
#include <baseboard/gpio.h> #include <baseboard/gpio.h>
#define CAM_PWR GPP_A17
#endif #endif

View File

@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpigen.h>
#include <baseboard/variants.h> #include <baseboard/variants.h>
#include <variant/gpio.h>
#include <chip.h> #include <chip.h>
#include <fw_config.h> #include <fw_config.h>
#include <sar.h> #include <sar.h>
@@ -9,3 +11,12 @@ const char *get_wifi_sar_cbfs_filename(void)
{ {
return "wifi_sar_0.hex"; 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);
}