Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/mainboard/protectli/vault_cml/bootblock.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <bootblock_common.h>
#include <device/pnp_ops.h>
#include <soc/gpio.h>
#include <superio/ite/common/ite.h>
#include <superio/ite/common/ite_gpio.h>
#include <superio/ite/it8784e/it8784e.h>
#include "gpio.h"

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

static void ite_set_gpio_iobase(u16 iobase)
{
pnp_enter_conf_state(GPIO_DEV);
pnp_set_logical_device(GPIO_DEV);
pnp_set_iobase(GPIO_DEV, PNP_IDX_IO1, iobase);
pnp_exit_conf_state(GPIO_DEV);
}

void bootblock_mainboard_early_init(void)
{
/* CLKIN freq 24MHz, Ext CLKIN for Watchdog, Internal VCC_OK */
Expand All @@ -25,6 +35,8 @@ void bootblock_mainboard_early_init(void)
ite_delay_pwrgd3(GPIO_DEV);
ite_kill_watchdog(GPIO_DEV);
ite_enable_serial(UART_DEV, CONFIG_TTYS0_BASE);
ite_gpio_setup(GPIO_DEV, 80 , ITE_GPIO_INPUT, ITE_GPIO_SIMPLE_IO_MODE, ITE_GPIO_PULLUP_ENABLE);
ite_set_gpio_iobase(0xa00);
}

void bootblock_mainboard_init(void)
Expand Down
4 changes: 3 additions & 1 deletion src/mainboard/protectli/vault_cml/devicetree.cb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ chip soc/intel/cannonlake
end
device pnp 2e.5 off end # Keyboard
device pnp 2e.6 off end # Mouse
device pnp 2e.7 off end # GPIO
device pnp 2e.7 on
io 0x62 = 0xa00
end # GPIO
device pnp 2e.a off end # CIR
end
chip drivers/pc80/tpm
Expand Down
Loading