blob: 0f29c843504958ed945f35b54403fa4d2c819418 [file] [log] [blame]
Elyes HAOUASf50b6622020-07-19 14:00:43 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Duncan Laurie14cf3242020-03-17 18:54:39 -07002
Kyösti Mälkkibe7692a2021-11-03 17:54:14 +02003#include <bootmode.h>
Duncan Laurie14cf3242020-03-17 18:54:39 -07004#include <boot/coreboot_tables.h>
Kyösti Mälkki9a3bde02021-11-06 16:13:15 +02005#include <types.h>
Duncan Laurie14cf3242020-03-17 18:54:39 -07006#include <vendorcode/google/chromeos/chromeos.h>
Duncan Laurie14cf3242020-03-17 18:54:39 -07007
8void fill_lb_gpios(struct lb_gpios *gpios)
9{
10 struct lb_gpio chromeos_gpios[] = {
11 {-1, ACTIVE_HIGH, 1, "lid"},
12 {-1, ACTIVE_HIGH, 0, "power"},
13 {-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"},
14 {-1, ACTIVE_HIGH, 0, "EC in RW"},
15 };
16 lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
17}
18
Duncan Laurie14cf3242020-03-17 18:54:39 -070019static const struct cros_gpio cros_gpios[] = {
20 CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, "QEMU"),
21};
Kyösti Mälkki4ff218a2021-11-02 13:03:06 +020022DECLARE_CROS_GPIOS(cros_gpios);
Duncan Laurie14cf3242020-03-17 18:54:39 -070023
Hsuan-ting Chen642508a2021-10-27 10:59:41 +000024
25int get_ec_is_trusted(void)
26{
27 /* Do not have a Chrome EC involved in entering recovery mode;
28 Always return trusted. */
29 return 1;
30}