Attention is currently required from: Shelley Chen, Alexandru Stan, mturney mturney. Hello Shelley Chen, Alexandru Stan, mturney mturney,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/50504
to review the following change.
Change subject: trogdor: Add fingerprint GPIOs ......................................................................
trogdor: Add fingerprint GPIOs
Some Trogdor variants will include a fingerprint sensor that wants to be explicitly powered off every boot for security reasons. This patch drives the relevant GPIOs.
BRANCH=trogdor BUG=b:170284663
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: Iccd77e6e1c378110fca2b2b7ff1f534fce54f8ea --- M src/mainboard/google/trogdor/Kconfig M src/mainboard/google/trogdor/board.h M src/mainboard/google/trogdor/chromeos.c 3 files changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/50504/1
diff --git a/src/mainboard/google/trogdor/Kconfig b/src/mainboard/google/trogdor/Kconfig index b3ec4b5..dd9c4a6 100644 --- a/src/mainboard/google/trogdor/Kconfig +++ b/src/mainboard/google/trogdor/Kconfig @@ -8,6 +8,11 @@ def_bool y if BOARD_GOOGLE_TROGDOR def_bool n
+config TROGDOR_HAS_FINGERPRINT + bool + default y if BOARD_GOOGLE_COACHZ + default n + config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_8192 diff --git a/src/mainboard/google/trogdor/board.h b/src/mainboard/google/trogdor/board.h index ebce3b5..4dc5010 100644 --- a/src/mainboard/google/trogdor/board.h +++ b/src/mainboard/google/trogdor/board.h @@ -3,6 +3,7 @@ #ifndef _COREBOOT_SRC_MAINBOARD_GOOGLE_TROGDOR_BOARD_H_ #define _COREBOOT_SRC_MAINBOARD_GOOGLE_TROGDOR_BOARD_H_
+#include <assert.h> #include <boardid.h> #include <gpio.h> #include <soc/gpio.h> @@ -20,6 +21,18 @@ (CONFIG(BOARD_GOOGLE_COACHZ) ? (board_id() == 0 ? GPIO(52) : \ GPIO(67)) : GPIO(30)))
+/* Fingerprint-specific GPIOs. Only for fingerprint-enabled devices (e.g. CoachZ). */ +#if CONFIG(TROGDOR_HAS_FINGERPRINT) +#define GPIO_FPMCU_BOOT0 GPIO(10) +#define GPIO_FP_RST_L GPIO(22) +#define GPIO_EN_FP_RAILS GPIO(74) +#else +#define GPIO_FPMCU_BOOT0 dead_code_t(gpio_t) +#define GPIO_FP_RST_L dead_code_t(gpio_t) +#define GPIO_EN_FP_RAILS dead_code_t(gpio_t) +#endif + + void setup_chromeos_gpios(void);
#endif /* _COREBOOT_SRC_MAINBOARD_GOOGLE_TROGDOR_BOARD_H_ */ diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c index d6b1836..2136da3 100644 --- a/src/mainboard/google/trogdor/chromeos.c +++ b/src/mainboard/google/trogdor/chromeos.c @@ -12,9 +12,16 @@ gpio_input_pullup(GPIO_SD_CD_L); gpio_input_irq(GPIO_H1_AP_INT, IRQ_TYPE_RISING_EDGE, GPIO_PULL_UP); gpio_output(GPIO_AMP_ENABLE, 0); + gpio_output(GPIO_BACKLIGHT_ENABLE, 0); gpio_output(GPIO_EN_PP3300_DX_EDP, 0); gpio_output(GPIO_EDP_BRIDGE_ENABLE, 0); + + if (CONFIG(TROGDOR_HAS_FINGERPRINT)) { + gpio_output(GPIO_FPMCU_BOOT0, 0); + gpio_output(GPIO_FP_RST_L, 0); + gpio_output(GPIO_EN_FP_RAILS, 0); + } }
void fill_lb_gpios(struct lb_gpios *gpios)