coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chromeos.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <boot/coreboot_tables.h>
4 #include <bootmode.h>
5 #include "board.h"
6 #include <security/tpm/tis.h>
7 
9 {
16 
17  if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) {
22  } else {
27  }
28 
29  if (CONFIG(TROGDOR_HAS_FINGERPRINT)) {
33  }
34 }
35 
36 void fill_lb_gpios(struct lb_gpios *gpios)
37 {
38  struct lb_gpio chromeos_gpios[] = {
40  "EC in RW"},
42  "EC interrupt"},
44  "TPM interrupt"},
46  "SD card detect"},
48  "speaker enable"},
50  gpio_get(GPIO_BACKLIGHT_ENABLE), "backlight"},
51  };
52 
53  lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
54 }
55 
57 {
59 }
60 
62 {
63  /* EC is trusted if not in RW. This is active low. */
64  return !!gpio_get(GPIO_EC_IN_RW);
65 }
void fill_lb_gpios(struct lb_gpios *gpios)
Definition: chromeos.c:9
#define ARRAY_SIZE(a)
Definition: helpers.h:12
@ CONFIG
Definition: dsi_common.h:201
int get_ec_is_trusted(void)
Definition: chromeos.c:25
int tis_plat_irq_status(void)
Definition: chromeos.c:39
void setup_chromeos_gpios(void)
Definition: chromeos.c:10
#define ACTIVE_HIGH
Definition: chromeos.c:18
#define ACTIVE_LOW
Definition: chromeos.c:17
#define GPIO_SD_CD_L
Definition: board.h:24
#define GPIO_FP_RST_L
Definition: board.h:48
#define GPIO_FPMCU_BOOT0
Definition: board.h:47
#define GPIO_EN_FP_RAILS
Definition: board.h:49
#define GPIO_AP_EC_INT
Definition: board.h:20
#define GPIO_AMP_ENABLE
Definition: board.h:33
#define GPIO_VDD_RESET_1V8
Definition: board.h:36
#define GPIO_EN_PP3300_DX_EDP
Definition: board.h:39
#define GPIO_MIPI_1V8_ENABLE
Definition: board.h:33
#define GPIO_PS8640_EDP_BRIDGE_RST_L
Definition: board.h:46
#define GPIO_BACKLIGHT_ENABLE
Definition: board.h:18
#define GPIO_AVEE_LCD_ENABLE
Definition: board.h:35
#define GPIO_PS8640_EDP_BRIDGE_3V3_ENABLE
Definition: board.h:47
#define GPIO_EDP_BRIDGE_ENABLE
Definition: board.h:38
#define GPIO_AVDD_LCD_ENABLE
Definition: board.h:34
void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, size_t count)
int gpio_get(gpio_t gpio)
Definition: gpio.c:166
void gpio_output(gpio_t gpio, int value)
Definition: gpio.c:194
void gpio_input_pullup(gpio_t gpio)
Definition: gpio.c:184
#define GPIO_H1_AP_INT
Definition: gpio.h:12
@ IRQ_TYPE_RISING_EDGE
Definition: gpio_common.h:82
gpio_irq_status
Definition: gpio_common.h:49
void gpio_input_irq(gpio_t gpio, enum gpio_irq_type type, uint32_t pull)
Definition: gpio.c:65
#define GPIO_PULL_UP
Definition: gpio.h:24