Skip to content

Commit

Permalink
espi: it8xxx2: reset PLTRST# virtual wire signal during eSPI reset
Browse files Browse the repository at this point in the history
The PLTRST# virtual wire signal's reset signal is eSPI Reset#.
But it8xxx2 didn't enable the feature by default. This change
will enable the feature at default.

Signed-off-by: Dino Li <[email protected]>
  • Loading branch information
Dino-Li authored and carlescufi committed Nov 7, 2022
1 parent 9054435 commit 8665db1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/espi/espi_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ LOG_MODULE_REGISTER(espi, CONFIG_ESPI_LOG_LEVEL);
#define IT8XXX2_ESPI_VW_INTERRUPT_ENABLE BIT(7)
#define IT8XXX2_ESPI_INTERRUPT_PUT_PC BIT(7)

/*
* VWCTRL2 register:
* bit4 = 1b: Refers to ESPI_RESET# for PLTRST#.
*/
#define IT8XXX2_ESPI_VW_RESET_PLTRST BIT(4)

#define IT8XXX2_ESPI_UPSTREAM_ENABLE BIT(7)
#define IT8XXX2_ESPI_UPSTREAM_GO BIT(6)
#define IT8XXX2_ESPI_UPSTREAM_INTERRUPT_ENABLE BIT(5)
Expand Down Expand Up @@ -1870,6 +1876,9 @@ static int espi_it8xxx2_init(const struct device *dev)
DEVICE_DT_INST_GET(0), 0);
irq_enable(IT8XXX2_ESPI_VW_IRQ);

/* Reset PLTRST# virtual wire signal during eSPI reset */
vw_reg->VWCTRL2 |= IT8XXX2_ESPI_VW_RESET_PLTRST;

#ifdef CONFIG_ESPI_OOB_CHANNEL
espi_it8xxx2_oob_init(dev);
#endif
Expand Down

0 comments on commit 8665db1

Please sign in to comment.