summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rambi/chromeos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/rambi/chromeos.c')
-rw-r--r--src/mainboard/google/rambi/chromeos.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c
index 773a807f95..d76c5e4c57 100644
--- a/src/mainboard/google/rambi/chromeos.c
+++ b/src/mainboard/google/rambi/chromeos.c
@@ -9,6 +9,9 @@
/* The WP status pin lives on GPIO_SSUS_6 which is pad 36 in the SUS well. */
#define WP_STATUS_PAD 36
+/* The EC_IN_RW lives on SCGPIO59 */
+#define EC_IN_RW_PAD 59
+
void fill_lb_gpios(struct lb_gpios *gpios)
{
struct lb_gpio chromeos_gpios[] = {
@@ -44,3 +47,9 @@ void mainboard_chromeos_acpi_generate(void)
{
chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
}
+
+int get_ec_is_trusted(void)
+{
+ /* EC is trusted if not in RW. */
+ return !score_get_gpio(EC_IN_RW_PAD);
+}