payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / google / jecht / led.c
blob8a6a30465b835ea99cb2ced9de46044aba19d068
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <superio/ite/it8772f/it8772f.h>
4 #include "onboard.h"
6 void set_power_led(int state)
8 int polarity;
10 if (CONFIG(BOARD_GOOGLE_TIDUS)) {
11 polarity = state == LED_OFF ? 0x00 : 0x01;
12 } else {
13 polarity = state == LED_BLINK ? 0x01 : 0x00;
16 it8772f_gpio_led(IT8772F_GPIO_DEV,
17 1, /* set */
18 0x01, /* select */
19 polarity, /* polarity */
20 state == LED_BLINK ? 0x01 : 0x00, /* pullup/pulldown */
21 0x01, /* output */
22 state == LED_BLINK ? 0x00 : 0x01, /* I/O function */
23 SIO_GPIO_BLINK_GPIO10,
24 IT8772F_GPIO_BLINK_FREQUENCY_1_HZ);