summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya/variants/yaviks
diff options
context:
space:
mode:
authorWisley Chen <wisley.chen@quanta.corp-partner.google.com>2023-08-02 17:43:40 +0600
committerMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-08-17 15:03:39 +0000
commitdd50567579d248fb3d10c01b0c7ba739084b03de (patch)
treece83bfcdf216e189a06b26fc8281fa97d079b866 /src/mainboard/google/brya/variants/yaviks
parent76653f638f8b1c0689307a8a58d63b2a1b126862 (diff)
mb/google/nissa/var/yaviks: Disable SD card based on fw_config
Disable pins for SD card based on fw_config. BUG=b:294456574 BRANCH=firmware-nissa-15217.B TEST=emerge-nissa coreboot Change-Id: I0b383d1b00056a69ba925bb5203dc4ca026b9d8e Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77105 Reviewed-by: Derek Huang <derekhuang@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/brya/variants/yaviks')
-rw-r--r--src/mainboard/google/brya/variants/yaviks/fw_config.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/yaviks/fw_config.c b/src/mainboard/google/brya/variants/yaviks/fw_config.c
index b3de0fd642..c0f0d8ca5e 100644
--- a/src/mainboard/google/brya/variants/yaviks/fw_config.c
+++ b/src/mainboard/google/brya/variants/yaviks/fw_config.c
@@ -50,6 +50,17 @@ static const struct pad_config stylus_disable_pads[] = {
PAD_NC_LOCK(GPP_F15, NONE, LOCK_CONFIG),
};
+static const struct pad_config sd_disable_pads[] = {
+ /* D8 : SD_CLKREQ_ODL */
+ PAD_NC(GPP_D8, NONE),
+ /* D17 : SD_WAKE_N */
+ PAD_NC_LOCK(GPP_D17, NONE, LOCK_CONFIG),
+ /* H12 : SD_PERST_L */
+ PAD_NC_LOCK(GPP_H12, NONE, LOCK_CONFIG),
+ /* H13 : EN_PP3300_SD_X */
+ PAD_NC_LOCK(GPP_H13, NONE, LOCK_CONFIG),
+};
+
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
@@ -67,4 +78,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
gpio_padbased_override(padbased_table, stylus_disable_pads,
ARRAY_SIZE(stylus_disable_pads));
}
+ if (fw_config_probe(FW_CONFIG(SD_CARD, SD_ABSENT))) {
+ printk(BIOS_INFO, "Disable SD card GPIO pins.\n");
+ gpio_padbased_override(padbased_table, sd_disable_pads,
+ ARRAY_SIZE(sd_disable_pads));
+ }
}