1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <boot/coreboot_tables.h>
5 #include <device/mmio.h>
8 #include <vendorcode/google/chromeos/chromeos.h>
12 void fill_lb_gpios(struct lb_gpios
*gpios
)
14 struct lb_gpio chromeos_gpios
[] = {
15 {-1, ACTIVE_HIGH
, get_lid_switch(), "lid"},
16 {-1, ACTIVE_HIGH
, 0, "power"},
17 {-1, ACTIVE_HIGH
, gfx_get_init_done(), "oprom"},
19 lb_add_gpios(gpios
, chromeos_gpios
, ARRAY_SIZE(chromeos_gpios
));
22 int get_write_protect_state(void)
24 return !!gpio_get(WP_GPIO
);
27 static const struct cros_gpio cros_gpios
[] = {
28 CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL
, CROS_GPIO_DEVICE_NAME
),
29 CROS_GPIO_WP_AH(0x10013, CROS_GPIO_DEVICE_NAME
),
31 DECLARE_CROS_GPIOS(cros_gpios
);
33 int get_ec_is_trusted(void)
35 /* Do not have a Chrome EC involved in entering recovery mode;
36 Always return trusted. */