mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / cyan / chromeos.c
blob8afc599d687a4757f972138053c77f73dd3ec3f6
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootmode.h>
4 #include <boot/coreboot_tables.h>
5 #include <device/mmio.h>
6 #include <gpio.h>
7 #include <types.h>
8 #include <vendorcode/google/chromeos/chromeos.h>
10 #include "onboard.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. */
37 return 1;