treewide: replace GPLv2 long form headers with SPDX header
[coreboot.git] / src / mainboard / google / cheza / chromeos.c
blob12ee07f04cfd4ffcd27c6b58cdd3be302543056f
1 /* This file is part of the coreboot project. */
2 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <boot/coreboot_tables.h>
5 #include <bootmode.h>
6 #include "board.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),
26 "EC in RW"},
27 {GPIO_AP_EC_INT.addr, ACTIVE_LOW, gpio_get(GPIO_AP_EC_INT),
28 "EC interrupt"},
29 {GPIO_H1_AP_INT.addr, ACTIVE_LOW, gpio_get(GPIO_H1_AP_INT),
30 "TPM interrupt"},
33 lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));