summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya/variants
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/brya/variants')
-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);
+}