mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / rex / chromeos.c
blob5ed041f52b7c7b226e4b8a832116769e2f720de4
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <bootmode.h>
5 #include <boot/coreboot_tables.h>
6 #include <gpio.h>
7 #include <types.h>
9 void fill_lb_gpios(struct lb_gpios *gpios)
11 struct lb_gpio chromeos_gpios[] = {
12 #if CONFIG(VBOOT_LID_SWITCH)
13 {-1, ACTIVE_HIGH, get_lid_switch(), "lid"},
14 #else
15 /* fake LID open to avoid shutdown in depthcharge */
16 {-1, ACTIVE_HIGH, 1, "lid"},
17 #endif
18 {-1, ACTIVE_HIGH, 0, "power"},
19 {-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"},
20 {-1, ACTIVE_HIGH, 0, "EC in RW"},
22 lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
25 int get_write_protect_state(void)
27 return gpio_get(GPIO_PCH_WP);
30 int get_ec_is_trusted(void)
32 /* VB2_CONTEXT_EC_TRUSTED should be set according to the Ti50 boot mode. */
33 return 0;