Skip to content

Commit 8d435d2

Browse files
committed
mb/protectli/vault_ehl: Enable RST1 button signal GPIO input
The button sits on a multi-function pin of the IT8613E. Enabled the chip's GPIO block in devicetree.cb, muxed the pin to GP12 (away from PCIRST1#), and turned on its internal pull-up to make the signal go back to 1 after the button is released. Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
1 parent 832c633 commit 8d435d2

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/mainboard/protectli/vault_ehl/bootblock.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,32 @@
44
#include <bootblock_common.h>
55
#include <superio/ite/common/ite.h>
66
#include <superio/ite/it8613e/it8613e.h>
7+
#include <device/pnp_ops.h>
8+
#include <superio/ite/common/ite_gpio.h>
9+
710

811
#define GPIO_DEV PNP_DEV(0x2e, IT8613E_GPIO)
912
#define UART_DEV PNP_DEV(0x2e, IT8613E_SP1)
1013

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+
22+
1123
void bootblock_mainboard_early_init(void)
1224
{
25+
ite_reg_write(GPIO_DEV, 0x25, 0x04); /* mux: GP12 instead of PCIRST1# */
1326
ite_reg_write(GPIO_DEV, 0x29, 0xc1);
1427
ite_reg_write(GPIO_DEV, 0x2a, 0x00); /* Disable FAN_CTL4 */
1528
ite_reg_write(GPIO_DEV, 0x2c, 0x41); /* disable k8 power seq */
1629
ite_reg_write(GPIO_DEV, 0x2d, 0x02); /* PCICLK=25MHz */
30+
ite_gpio_setup(GPIO_DEV, 12, ITE_GPIO_INPUT, ITE_GPIO_SIMPLE_IO_MODE, ITE_GPIO_PULLUP_ENABLE);
31+
ite_set_gpio_iobase(0xa00);
32+
1733
ite_kill_watchdog(GPIO_DEV);
1834
ite_enable_serial(UART_DEV, CONFIG_TTYS0_BASE);
1935
}

src/mainboard/protectli/vault_ehl/devicetree.cb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ chip soc/intel/elkhartlake
203203
end
204204
device pnp 2e.5 off end # Keyboard
205205
device pnp 2e.6 off end # Mouse
206-
device pnp 2e.7 off end # GPIO
206+
device pnp 2e.7 on # GPIO
207+
io 0x62 = 0xa00
208+
end
207209
device pnp 2e.a off end # CIR
208210
end
209211
chip drivers/pc80/tpm

0 commit comments

Comments
 (0)