From dcf403e43a5c20b8684801f9b1e01cc6770ab65e Mon Sep 17 00:00:00 2001 From: Wen Zhang Date: Fri, 7 Mar 2025 14:37:05 +0800 Subject: [PATCH] mb/google/skywalker: Configure fingerprint pins There is no powering-on control in the fingerprint kernel driver. Follow Rauru to power-on FP MCU in the FW. BUG=b:401396071 BRANCH=none TEST=ectool --name=cros_fp version can get the FP FW version. Signed-off-by: Haikun Zhou Change-Id: I20ff175ee4874c4188b7d07ee57330a9275dcb3d Reviewed-on: https://review.coreboot.org/c/coreboot/+/87852 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu Reviewed-by: Yidi Lin --- src/mainboard/google/skywalker/chromeos.c | 3 +++ src/mainboard/google/skywalker/gpio.h | 3 +++ src/mainboard/google/skywalker/mainboard.c | 9 +++++++++ 3 files changed, 15 insertions(+) diff --git a/src/mainboard/google/skywalker/chromeos.c b/src/mainboard/google/skywalker/chromeos.c index 02abb5f899..c5b9f8ee16 100644 --- a/src/mainboard/google/skywalker/chromeos.c +++ b/src/mainboard/google/skywalker/chromeos.c @@ -28,6 +28,9 @@ void setup_chromeos_gpios(void) gpio_output(GPIO_XHCI_INIT_DONE, 0); gpio_output(GPIO_AP_SUSPEND_L, 1); gpio_output(GPIO_AP_HDMI_RST_ODL, 0); + gpio_output(GPIO_AP_FP_FW_UP_STRAP, 0); + gpio_output(GPIO_EN_PWR_FP, 0); + gpio_output(GPIO_FP_RST_1V8_S3_L, 0); } void fill_lb_gpios(struct lb_gpios *gpios) diff --git a/src/mainboard/google/skywalker/gpio.h b/src/mainboard/google/skywalker/gpio.h index 5bd8744126..8a1925a635 100644 --- a/src/mainboard/google/skywalker/gpio.h +++ b/src/mainboard/google/skywalker/gpio.h @@ -11,6 +11,9 @@ #define GPIO_AP_EC_WARM_RST_REQ GPIO(GBE_AUX_PPS0) #define GPIO_GSC_AP_INT_ODL GPIO(GBE_AUX_PPS1) #define GPIO_AP_SUSPEND_L GPIO(CONN_TOP_DATA) +#define GPIO_FP_RST_1V8_S3_L GPIO(GBE_RXER) +#define GPIO_AP_FP_FW_UP_STRAP GPIO(GBE_TXER) +#define GPIO_EN_PWR_FP GPIO(GPIO12) #define GPIO_HP_INT_ODL GPIO(GPIO04) #define GPIO_SPKR_INT_ODL GPIO(GPIO08) #define GPIO_SAR_INT_ODL GPIO(GPIO09) diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index 686fd55e2e..af27c8268c 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ #include +#include #include #include #include @@ -8,11 +9,19 @@ #include "gpio.h" +static void power_on_fpmcu(void) +{ + /* Power on the fingerprint MCU */ + gpio_output(GPIO_EN_PWR_FP, 1); + gpio_output(GPIO_FP_RST_1V8_S3_L, 1); +} + static void mainboard_init(struct device *dev) { dpm_init(); setup_usb_host(); spm_init(); + power_on_fpmcu(); if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE)) register_reset_to_bl31(GPIO_AP_EC_WARM_RST_REQ.id, true);