Elyes HAOUAS | f50b662 | 2020-07-19 14:00:43 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Duncan Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 2 | |
Kyösti Mälkki | be7692a | 2021-11-03 17:54:14 +0200 | [diff] [blame] | 3 | #include <bootmode.h> |
Duncan Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 4 | #include <boot/coreboot_tables.h> |
Kyösti Mälkki | 9a3bde0 | 2021-11-06 16:13:15 +0200 | [diff] [blame] | 5 | #include <types.h> |
Duncan Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 6 | #include <vendorcode/google/chromeos/chromeos.h> |
Duncan Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 7 | |
| 8 | void 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 Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 19 | static const struct cros_gpio cros_gpios[] = { |
| 20 | CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, "QEMU"), |
| 21 | }; |
Kyösti Mälkki | 4ff218a | 2021-11-02 13:03:06 +0200 | [diff] [blame] | 22 | DECLARE_CROS_GPIOS(cros_gpios); |
Duncan Laurie | 14cf324 | 2020-03-17 18:54:39 -0700 | [diff] [blame] | 23 | |
Hsuan-ting Chen | 642508a | 2021-10-27 10:59:41 +0000 | [diff] [blame] | 24 | |
| 25 | int 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 | } |