diff options
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/trogdor/Kconfig | 5 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/board.h | 13 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/chromeos.c | 7 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/mainboard.c | 5 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/romstage.c | 8 |
5 files changed, 38 insertions, 0 deletions
diff --git a/src/mainboard/google/trogdor/Kconfig b/src/mainboard/google/trogdor/Kconfig index b3ec4b59a4..dd9c4a6b35 100644 --- a/src/mainboard/google/trogdor/Kconfig +++ b/src/mainboard/google/trogdor/Kconfig @@ -8,6 +8,11 @@ config TROGDOR_REV0 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 ebce3b56c5..4dc5010e34 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 d6b1836f9d..2136da32e1 100644 --- a/src/mainboard/google/trogdor/chromeos.c +++ b/src/mainboard/google/trogdor/chromeos.c @@ -12,9 +12,16 @@ void setup_chromeos_gpios(void) 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) diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 7465c63627..9bf8507d64 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -110,6 +110,11 @@ static void display_startup(void) static void mainboard_init(struct device *dev) { + /* Take FPMCU out of reset. Power was already applied + in romstage and should have stabilized by now. */ + if (CONFIG(TROGDOR_HAS_FINGERPRINT)) + gpio_output(GPIO_FP_RST_L, 1); + setup_usb(); qi2s_configure_gpios(); load_qup_fw(); diff --git a/src/mainboard/google/trogdor/romstage.c b/src/mainboard/google/trogdor/romstage.c index 8b6f1dec8d..e110460a1b 100644 --- a/src/mainboard/google/trogdor/romstage.c +++ b/src/mainboard/google/trogdor/romstage.c @@ -5,6 +5,8 @@ #include <soc/qclib_common.h> #include <soc/watchdog.h> +#include "board.h" + static void prepare_usb(void) { /* @@ -22,4 +24,10 @@ void platform_romstage_main(void) /* QCLib: DDR init & train */ qclib_load_and_run(); + + /* This rail needs to be stable by the time we take the FPMCU out of + reset in ramstage, so already turn it on here. This needs to happen + at least 200ms after this pin was first driven low in the bootblock. */ + if (CONFIG(TROGDOR_HAS_FINGERPRINT)) + gpio_output(GPIO_EN_FP_RAILS, 1); } |