Skip to content

Commit 9040d47

Browse files
committed
mb/protectli/vault_cml: Enable FP_RST button signal GPIO input
The button sits on a single function pin of the IT8786. Enabled the chip's GPIO block in devicetree.cb, and configured the 0x80 pin as an input in bootblock. Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
1 parent 5e4b1fc commit 9040d47

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/mainboard/protectli/vault_cml/bootblock.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
/* SPDX-License-Identifier: GPL-2.0-only */
22

33
#include <bootblock_common.h>
4+
#include <device/pnp_ops.h>
45
#include <soc/gpio.h>
56
#include <superio/ite/common/ite.h>
7+
#include <superio/ite/common/ite_gpio.h>
68
#include <superio/ite/it8784e/it8784e.h>
79
#include "gpio.h"
810

911
#define UART_DEV PNP_DEV(0x2e, IT8784E_SP1)
1012
#define GPIO_DEV PNP_DEV(0x2e, IT8784E_GPIO)
1113

14+
static void ite_set_gpio_iobase(u16 iobase)
15+
{
16+
pnp_enter_conf_state(GPIO_DEV);
17+
pnp_set_logical_device(GPIO_DEV);
18+
pnp_set_iobase(GPIO_DEV, PNP_IDX_IO1, iobase);
19+
pnp_exit_conf_state(GPIO_DEV);
20+
}
21+
1222
void bootblock_mainboard_early_init(void)
1323
{
1424
/* CLKIN freq 24MHz, Ext CLKIN for Watchdog, Internal VCC_OK */
@@ -25,6 +35,8 @@ void bootblock_mainboard_early_init(void)
2535
ite_delay_pwrgd3(GPIO_DEV);
2636
ite_kill_watchdog(GPIO_DEV);
2737
ite_enable_serial(UART_DEV, CONFIG_TTYS0_BASE);
38+
ite_gpio_setup(GPIO_DEV, 80 , ITE_GPIO_INPUT, ITE_GPIO_SIMPLE_IO_MODE, ITE_GPIO_PULLUP_ENABLE);
39+
ite_set_gpio_iobase(0xa00);
2840
}
2941

3042
void bootblock_mainboard_init(void)

src/mainboard/protectli/vault_cml/devicetree.cb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ chip soc/intel/cannonlake
210210
end
211211
device pnp 2e.5 off end # Keyboard
212212
device pnp 2e.6 off end # Mouse
213-
device pnp 2e.7 off end # GPIO
213+
device pnp 2e.7 on
214+
io 0x62 = 0xa00
215+
end # GPIO
214216
device pnp 2e.a off end # CIR
215217
end
216218
chip drivers/pc80/tpm

0 commit comments

Comments
 (0)