From ea7c727a9402ea0c9012538d3ba0962700e8a5d6 Mon Sep 17 00:00:00 2001 From: Ren Kuo Date: Fri, 11 Nov 2022 13:25:45 +0800 Subject: [PATCH] mb/google/brya/variants/volmar: Disable the unused FP pads Disable the unused fingerprinter(FP) gpio for zavala by fw_config FPMCU_MASK field. BUG=b:250807253 TEST=build firmware and veriify the FP function on volmar DUT Signed-off-by: Ren Kuo Change-Id: I0af1b7c3e4829ecab98525ead4f078c3eb6485d0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69465 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/brya/variants/volmar/fw_config.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mainboard/google/brya/variants/volmar/fw_config.c b/src/mainboard/google/brya/variants/volmar/fw_config.c index 375dca2e2a..38b9ace0c9 100644 --- a/src/mainboard/google/brya/variants/volmar/fw_config.c +++ b/src/mainboard/google/brya/variants/volmar/fw_config.c @@ -63,6 +63,12 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO_37, NONE), }; +static const struct pad_config fp_disable_pads[] = { + PAD_NC(GPP_D0, NONE), /* D0 : ISH_GP0 ==> PCH_FP_BOOT0 */ + PAD_NC(GPP_D1, NONE), /* D1 : ISH_GP1 ==> FP_RST_ODL */ + PAD_NC(GPP_D2, NONE), /* D2 : ISH_GP2 ==> EN_FP_PWR */ +}; + static void fw_config_handle(void *unused) { if (!fw_config_is_provisioned() || fw_config_probe(FW_CONFIG(AUDIO, AUDIO_UNKNOWN))) { @@ -83,5 +89,10 @@ static void fw_config_handle(void *unused) printk(BIOS_INFO, "Disabling BT offload\n"); gpio_configure_pads(bt_i2s_disable_pads, ARRAY_SIZE(bt_i2s_disable_pads)); } + + if (fw_config_probe(FW_CONFIG(FPMCU_MASK, FPMCU_DISABLED))) { + printk(BIOS_INFO, "Disabling FP pads\n"); + gpio_configure_pads(fp_disable_pads, ARRAY_SIZE(fp_disable_pads)); + } } BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);