soc/intel/ptl: Update ME specification version to 21
[coreboot.git] / src / mainboard / google / veyron_mickey / chromeos.c
blobc4cd6c64c3cb706ceffb34e4e5e55de87c41ae32
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootmode.h>
4 #include <boot/coreboot_tables.h>
5 #include <gpio.h>
7 #include "board.h"
9 #define GPIO_WP GPIO(7, A, 6)
10 #define GPIO_RECOVERY GPIO(0, B, 1)
12 void setup_chromeos_gpios(void)
14 gpio_input(GPIO_WP);
15 gpio_input_pullup(GPIO_RECOVERY);
18 void fill_lb_gpios(struct lb_gpios *gpios)
20 struct lb_gpio chromeos_gpios[] = {
21 {GPIO_RECOVERY.raw, ACTIVE_LOW,
22 !get_recovery_mode_switch(), "presence"},
23 {GPIO_RESET.raw, ACTIVE_HIGH, -1, "reset"},
25 lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
28 int get_recovery_mode_switch(void)
30 return !gpio_get(GPIO_RECOVERY);
33 int get_write_protect_state(void)
35 return !gpio_get(GPIO_WP);
38 int get_ec_is_trusted(void)
40 /* Do not have a Chrome EC involved in entering recovery mode;
41 Always return trusted. */
42 return 1;