| 1 |
|
| 2 |
|
| 3 |
#include <baseboard/gpio.h> |
| 4 |
#include <bootmode.h> |
| 5 |
#include <boot/coreboot_tables.h> |
| 6 |
#include <gpio.h> |
| 7 |
#include <types.h> |
| 8 |
|
| 9 |
void fill_lb_gpios(struct lb_gpios *gpios) |
| 10 |
{ |
| 11 |
struct lb_gpio chromeos_gpios[] = { |
| 12 |
#if CONFIG(VBOOT_LID_SWITCH) |
| 13 |
{-1, ACTIVE_HIGH, get_lid_switch(), "lid"}, |
| 14 |
#else |
| 15 |
|
| 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"}, |
| 21 |
}; |
| 22 |
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); |
| 23 |
} |
| 24 |
|
| 25 |
int get_write_protect_state(void) |
| 26 |
{ |
| 27 |
return gpio_get(GPIO_PCH_WP); |
| 28 |
} |
| 29 |
|
| 30 |
int get_ec_is_trusted(void) |
| 31 |
{ |
| 32 |
|
| 33 |
return 0; |
| 34 |
} |