aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2023-11-17 12:46:46 -0800
committerFelix Held <felix-coreboot@felixheld.de>2023-11-20 14:34:33 +0000
commit0863f7cdb28cd201e7cd6f399fc90165c4600d7b (patch)
tree5fa31c893e355b6a6ea2a9de7929bedab56bb1ee /src
parent6615c60fd5ac5bb8a3ad9f86bbb1431332978a5d (diff)
mb/goog/brya/var/brya0/skolas: Disable HPS GPIOs if HPS_ABSENT
Check FW_CONFIG and disable gpios for HPS if HPS_ABSENT for skolas and brya0 variants. BUG=b:311740746 BRANCH=firmware-brya-14505.B TEST=`emerge-brya coreboot chromeos-bootimage`, flash and boot skolas to kernel and verify via "cbmem -c | grep HPS". Change-Id: I8cbe4f40c41f1d06e8f511c3e88c05984566d441 Signed-off-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79123 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/variants/brya0/fw_config.c14
-rw-r--r--src/mainboard/google/brya/variants/skolas/fw_config.c14
2 files changed, 28 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c
index e50c5e4159..cd595ac19a 100644
--- a/src/mainboard/google/brya/variants/brya0/fw_config.c
+++ b/src/mainboard/google/brya/variants/brya0/fw_config.c
@@ -123,6 +123,15 @@ static const struct pad_config lte_disable_pads[] = {
PAD_NC(GPD11, NONE),
};
+static const struct pad_config hps_disable_pads[] = {
+ /* E3 : PROC_GP0 ==> HPS_INT_ODL */
+ PAD_NC(GPP_E3, NONE),
+ /* E7 : PROC_GP1 ==> EN_HPS_PWR */
+ PAD_NC(GPP_E7, NONE),
+ /* F20 : EXT_PWR_GATE# ==> HPS_RST_R */
+ PAD_NC(GPP_F20, NONE),
+};
+
static void enable_i2s(void)
{
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
@@ -183,5 +192,10 @@ static void fw_config_handle(void *unused)
printk(BIOS_INFO, "Disable LTE related GPIO pins.\n");
gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads));
}
+
+ if (fw_config_probe(FW_CONFIG(HPS, HPS_ABSENT))) {
+ printk(BIOS_INFO, "Disable HPS related GPIO pins.\n");
+ gpio_configure_pads(hps_disable_pads, ARRAY_SIZE(hps_disable_pads));
+ }
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/skolas/fw_config.c b/src/mainboard/google/brya/variants/skolas/fw_config.c
index e50c5e4159..86246dbb2d 100644
--- a/src/mainboard/google/brya/variants/skolas/fw_config.c
+++ b/src/mainboard/google/brya/variants/skolas/fw_config.c
@@ -100,6 +100,15 @@ static const struct pad_config bt_i2s_disable_pads[] = {
PAD_NC(GPP_VGPIO_37, NONE),
};
+static const struct pad_config hps_disable_pads[] = {
+ /* E3 : PROC_GP0 ==> HPS_INT_ODL */
+ PAD_NC(GPP_E3, NONE),
+ /* E7 : PROC_GP1 ==> EN_HPS_PWR */
+ PAD_NC(GPP_E7, NONE),
+ /* F20 : EXT_PWR_GATE# ==> HPS_RST_R */
+ PAD_NC(GPP_F20, NONE),
+};
+
static const struct pad_config lte_disable_pads[] = {
/* A7 : WWAN_PCIE_WAKE_ODL */
PAD_NC(GPP_A7, NONE),
@@ -183,5 +192,10 @@ static void fw_config_handle(void *unused)
printk(BIOS_INFO, "Disable LTE related GPIO pins.\n");
gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads));
}
+
+ if (fw_config_probe(FW_CONFIG(HPS, HPS_ABSENT))) {
+ printk(BIOS_INFO, "Disable HPS related GPIO pins.\n");
+ gpio_configure_pads(hps_disable_pads, ARRAY_SIZE(hps_disable_pads));
+ }
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);