summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/herobrine/chromeos.c
blob: a11667586bb87971518bbf8b82d5c3f14e2790af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-License-Identifier: GPL-2.0-only */

#include <boot/coreboot_tables.h>
#include <bootmode.h>
#include "board.h"

void setup_chromeos_gpios(void)
{
	gpio_input_pullup(GPIO_SD_CD_L);

	if (CONFIG(HEROBRINE_HAS_FINGERPRINT)) {
		gpio_output(GPIO_FPMCU_BOOT0, 0);
		gpio_output(GPIO_FP_RST_L, 0);
		gpio_output(GPIO_EN_FP_RAILS, 0);
	}
}

void fill_lb_gpios(struct lb_gpios *gpios)
{
	struct lb_gpio chromeos_gpios[] = {
		{GPIO_SD_CD_L.addr, ACTIVE_LOW, gpio_get(GPIO_SD_CD_L),
			"SD card detect"},
	};

	lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}