Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/72089 )
Change subject: mb/google/brya/var/marasov: Turn off camera power during S0ix ......................................................................
mb/google/brya/var/marasov: Turn off camera power during S0ix
Turn off camera power during S0ix to improve power consumption.
BUG=b:265754302 BRANCH=firmware-brya-14505.B TEST=emerge-brya coreboot chromeos-bootimage
Signed-off-by: Frank Chu Frank_Chu@pegatron.corp-partner.google.com Change-Id: Ie2b300783adfc1cab30bc897d086a3674436724a Reviewed-on: https://review.coreboot.org/c/coreboot/+/72089 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Frank Chu frank_chu@pegatron.corp-partner.google.com Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com --- M src/mainboard/google/brya/variants/marasov/Makefile.inc M src/mainboard/google/brya/variants/marasov/include/variant/gpio.h A src/mainboard/google/brya/variants/marasov/variant.c 3 files changed, 39 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Frank Chu: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved Eric Lai: Looks good to me, approved
diff --git a/src/mainboard/google/brya/variants/marasov/Makefile.inc b/src/mainboard/google/brya/variants/marasov/Makefile.inc index 4d25f34e..70f6401 100644 --- a/src/mainboard/google/brya/variants/marasov/Makefile.inc +++ b/src/mainboard/google/brya/variants/marasov/Makefile.inc @@ -7,3 +7,5 @@ romstage-y += memory.c
ramstage-y += gpio.c + +ramstage-y += variant.c diff --git a/src/mainboard/google/brya/variants/marasov/include/variant/gpio.h b/src/mainboard/google/brya/variants/marasov/include/variant/gpio.h index c4fe342..f62197d 100644 --- a/src/mainboard/google/brya/variants/marasov/include/variant/gpio.h +++ b/src/mainboard/google/brya/variants/marasov/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/marasov/variant.c b/src/mainboard/google/brya/variants/marasov/variant.c new file mode 100644 index 0000000..dad8a3c --- /dev/null +++ b/src/mainboard/google/brya/variants/marasov/variant.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <acpi/acpigen.h> +#include <baseboard/variants.h> +#include <variant/gpio.h> + +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); +}