summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya
diff options
context:
space:
mode:
authorTyler Wang <tyler.wang@quanta.corp-partner.google.com>2022-11-01 15:12:57 +0800
committerEric Lai <eric_lai@quanta.corp-partner.google.com>2022-11-10 07:31:39 +0000
commit21f52c8af87bad32f139f06f2a74543020249741 (patch)
tree088b6f01c017d3a2ca67d12396c7f35ebb5e2ebb /src/mainboard/google/brya
parentf346a17ce3f3a876e1ac2479b637aa99aa73824c (diff)
mb/google/nissa/var/craask: Disable stylus GPIO pins based on fw_config
BUG=b:257879909 Test:Boot to OS on craask and check stylus GPIO pins Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com> Change-Id: I7e3a2583187c8a8e2616a5272b5a7a61debe982b Reviewed-on: https://review.coreboot.org/c/coreboot/+/69138 Reviewed-by: Tarun Tuli <taruntuli@google.com> Reviewed-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r--src/mainboard/google/brya/variants/craask/fw_config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/craask/fw_config.c b/src/mainboard/google/brya/variants/craask/fw_config.c
index 602eeabfe1..5b8f05859b 100644
--- a/src/mainboard/google/brya/variants/craask/fw_config.c
+++ b/src/mainboard/google/brya/variants/craask/fw_config.c
@@ -42,6 +42,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(DB_USB, DB_1C_LTE))) {
@@ -62,4 +69,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));
+ }
}