From d96cc8d2df38d1850e38da909cb7e00c2d6c50a4 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Fri, 17 May 2024 15:35:54 +0800 Subject: mb/google/rauru: Configure the fingerprint pins There is no powering-on control in the fingerprint kernel driver. The fingerprint team of ChromeOS suggests powering-on FP MCU in the FW. Follow trogdor to pull down FP_RST_1V8_S3_L, AP_FP_FW_UP_STRAP, EN_PWR_FP and pull up EN_PWR_FP in ramstage for power rail to be stable. BUG=b:340401582 TEST=measure waveform and the fingerprint works on ChromeOS Change-Id: I05600d90fdf922faeb778a36d8a08f68c1bb4125 Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/84692 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- src/mainboard/google/rauru/chromeos.c | 3 +++ src/mainboard/google/rauru/gpio.h | 3 +++ src/mainboard/google/rauru/mainboard.c | 11 +++++++++++ 3 files changed, 17 insertions(+) (limited to 'src/mainboard/google/rauru') diff --git a/src/mainboard/google/rauru/chromeos.c b/src/mainboard/google/rauru/chromeos.c index b6aaefbead..35bbcd67f0 100644 --- a/src/mainboard/google/rauru/chromeos.c +++ b/src/mainboard/google/rauru/chromeos.c @@ -7,6 +7,9 @@ void setup_chromeos_gpios(void) { + 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); gpio_output(GPIO_XHCI_INIT_DONE, 0); } diff --git a/src/mainboard/google/rauru/gpio.h b/src/mainboard/google/rauru/gpio.h index f05a3779fe..9d0c722a65 100644 --- a/src/mainboard/google/rauru/gpio.h +++ b/src/mainboard/google/rauru/gpio.h @@ -6,6 +6,9 @@ #include #define GPIO_XHCI_INIT_DONE GPIO(EINT28) +#define GPIO_FP_RST_1V8_S3_L GPIO(EINT26) +#define GPIO_AP_FP_FW_UP_STRAP GPIO(EINT27) +#define GPIO_EN_PWR_FP GPIO(PERIPHERAL_EN3) void setup_chromeos_gpios(void); diff --git a/src/mainboard/google/rauru/mainboard.c b/src/mainboard/google/rauru/mainboard.c index 195ce67e5a..f15dd312f0 100644 --- a/src/mainboard/google/rauru/mainboard.c +++ b/src/mainboard/google/rauru/mainboard.c @@ -1,11 +1,22 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include +#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) { setup_usb_host(); + power_on_fpmcu(); } static void mainboard_enable(struct device *dev) -- cgit v1.2.3