summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorLeo Chou <leo.chou@lcfc.corp-partner.google.com>2022-10-03 16:01:34 +0800
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-06 18:25:15 +0000
commit0fed078cecc54e9d73df4f74a9d2d3a71d063fa9 (patch)
treea1fb219bdb4e088b8d10ed38394ea55faa4c0828 /src/mainboard
parent291758ddbaa004f9ca2326b3d9f6b5e37bc663ec (diff)
mb/google/nissa/var/pujjo: Disable stylus GPIO pins based on fw_config
BUG=b:250470706 TEST=Boot to OS on pujjo and check that stylus GPIO are configured based on fw_config. Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com> Change-Id: I4218748cb06426a918d89f688599c652062ac78c Reviewed-on: https://review.coreboot.org/c/coreboot/+/68075 Reviewed-by: Reka Norman <rekanorman@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/variants/pujjo/fw_config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/pujjo/fw_config.c b/src/mainboard/google/brya/variants/pujjo/fw_config.c
index ee86e7485b..dfc70c5eef 100644
--- a/src/mainboard/google/brya/variants/pujjo/fw_config.c
+++ b/src/mainboard/google/brya/variants/pujjo/fw_config.c
@@ -27,6 +27,13 @@ static const struct pad_config sd_disable_pads[] = {
PAD_NC_LOCK(GPP_H13, NONE, LOCK_CONFIG),
};
+static const struct pad_config stylus_disable_pads[] = {
+ /* F13 : SOC_PEN_DETECT_R_ODL */
+ PAD_NC_LOCK(GPP_F13, NONE, LOCK_CONFIG),
+ /* F15 : SOC_PEN_DETECT_ODL */
+ PAD_NC_LOCK(GPP_F15, NONE, LOCK_CONFIG),
+};
+
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
if (!fw_config_probe(FW_CONFIG(LTE, LTE_PRESENT))) {
@@ -41,4 +48,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
ARRAY_SIZE(sd_disable_pads));
}
+ if (fw_config_probe(FW_CONFIG(STYLUS, STYLUS_ABSENT))) {
+ printk(BIOS_INFO, "Disable Stylus GPIO pins.\n");
+ gpio_padbased_override(padbased_table, stylus_disable_pads,
+ ARRAY_SIZE(stylus_disable_pads));
+ }
}