1 /* This file is part of the coreboot project. */
2 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <boot/coreboot_tables.h>
8 int get_write_protect_state(void)
10 return !gpio_get(GPIO_WP_STATE
);
13 void setup_chromeos_gpios(void)
15 gpio_input_pullup(GPIO_EC_IN_RW
);
16 gpio_input_pullup(GPIO_AP_EC_INT
);
17 gpio_output(GPIO_AP_SUSPEND
, 1);
18 gpio_input(GPIO_WP_STATE
);
19 gpio_input_pullup(GPIO_H1_AP_INT
);
22 void fill_lb_gpios(struct lb_gpios
*gpios
)
24 struct lb_gpio chromeos_gpios
[] = {
25 {GPIO_EC_IN_RW
.addr
, ACTIVE_LOW
, gpio_get(GPIO_EC_IN_RW
),
27 {GPIO_AP_EC_INT
.addr
, ACTIVE_LOW
, gpio_get(GPIO_AP_EC_INT
),
29 {GPIO_H1_AP_INT
.addr
, ACTIVE_LOW
, gpio_get(GPIO_H1_AP_INT
),
33 lb_add_gpios(gpios
, chromeos_gpios
, ARRAY_SIZE(chromeos_gpios
));