summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya
diff options
context:
space:
mode:
authorSeunghwan Kim <sh_.kim@samsung.corp-partner.google.com>2023-09-18 13:22:05 +0900
committerEric Lai <ericllai@google.com>2023-10-05 10:20:51 +0000
commit7de7f9ab4422b0c137e73e19da9b31124074cb78 (patch)
tree03deaf8a19714004d34ede11377504952347d940 /src/mainboard/google/brya
parent85710cbe4058165a4eeaf97ba7b33e15a7ab9995 (diff)
mb/google/nissa/var/pirrha: Turn off SD card power signal in s0ix
Turn off GPP_H13 (EN_PP3300_SD_X) in s0ix for power saving. It reduces about 3mW of power consumption in s0ix on pirrha proto board. BUG=b:300845527 TEST=Built and verified GPP_H13 voltage was 0V in s0ix. Also verified SD card worked after s0ix for 20 times. Change-Id: I5ec53820276e50f5b8b01584595118cf2dc4c95c Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77998 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Derek Huang <derekhuang@google.com> Reviewed-by: Eric Lai <ericllai@google.com>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r--src/mainboard/google/brya/variants/pirrha/Makefile.inc1
-rw-r--r--src/mainboard/google/brya/variants/pirrha/include/variant/gpio.h2
-rw-r--r--src/mainboard/google/brya/variants/pirrha/variant.c16
3 files changed, 19 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/pirrha/Makefile.inc b/src/mainboard/google/brya/variants/pirrha/Makefile.inc
index bc560b8f1d..c74104c60e 100644
--- a/src/mainboard/google/brya/variants/pirrha/Makefile.inc
+++ b/src/mainboard/google/brya/variants/pirrha/Makefile.inc
@@ -4,4 +4,5 @@ bootblock-y += gpio.c
romstage-y += memory.c
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c
+ramstage-$(CONFIG_FW_CONFIG) += variant.c
ramstage-y += gpio.c
diff --git a/src/mainboard/google/brya/variants/pirrha/include/variant/gpio.h b/src/mainboard/google/brya/variants/pirrha/include/variant/gpio.h
index c4fe342621..b98b09d2e2 100644
--- a/src/mainboard/google/brya/variants/pirrha/include/variant/gpio.h
+++ b/src/mainboard/google/brya/variants/pirrha/include/variant/gpio.h
@@ -5,4 +5,6 @@
#include <baseboard/gpio.h>
+#define SD_CARD_POWER GPP_H13
+
#endif
diff --git a/src/mainboard/google/brya/variants/pirrha/variant.c b/src/mainboard/google/brya/variants/pirrha/variant.c
new file mode 100644
index 0000000000..1b8c263bd6
--- /dev/null
+++ b/src/mainboard/google/brya/variants/pirrha/variant.c
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <chip.h>
+#include <baseboard/variants.h>
+#include <variant/gpio.h>
+#include <acpi/acpigen.h>
+
+void variant_generate_s0ix_hook(enum s0ix_entry entry)
+{
+ return;
+
+ if (entry == S0IX_ENTRY)
+ acpigen_soc_clear_tx_gpio(SD_CARD_POWER);
+ else if (entry == S0IX_EXIT)
+ acpigen_soc_set_tx_gpio(SD_CARD_POWER);
+}