Nicholas Sudsgaard has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80264?usp=email )
Change subject: superio/ite/common: Add option to change clock source of WDT ......................................................................
superio/ite/common: Add option to change clock source of WDT
This option is necessary to get the serial port to work on some mainboards (e.g. Lenovo ThinkCentre M710s).
This option is present on all datasheets I could find: * IT8712F * IT8720F * IT8728F * IT8783EF
Change-Id: I64f43cad692c08d6f07eb981a990cf08db580575 Signed-off-by: Nicholas Sudsgaard devel+coreboot@nsudsgaard.com --- M src/superio/ite/common/early_serial.c M src/superio/ite/common/ite.h 2 files changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/80264/1
diff --git a/src/superio/ite/common/early_serial.c b/src/superio/ite/common/early_serial.c index 5ff403f..4f4e342 100644 --- a/src/superio/ite/common/early_serial.c +++ b/src/superio/ite/common/early_serial.c @@ -53,10 +53,14 @@ * and pass: CLKIN_DEV * ITE_UART_CLK_PREDIVIDE_24 * ITE_UART_CLK_PREDIVIDE_48 (default) + * + * ITE_CSSWDT_EXTERNAL_CLKIN + * ITE_CSSWDT_INTERNAL_CLKIN (default) */ -void ite_conf_clkin(pnp_devfn_t dev, u8 predivide) +void ite_conf_clkin(pnp_devfn_t dev, u8 reg) { - ite_reg_write(dev, ITE_CONFIG_REG_CLOCKSEL, (0x1 & predivide)); + const u8 mask = 0x09; + ite_reg_write(dev, ITE_CONFIG_REG_CLOCKSEL, (mask & reg)); }
/* Bring up early serial debugging output before the RAM is initialized. */ diff --git a/src/superio/ite/common/ite.h b/src/superio/ite/common/ite.h index 3e9b5028..9c55815 100644 --- a/src/superio/ite/common/ite.h +++ b/src/superio/ite/common/ite.h @@ -9,6 +9,9 @@ #define ITE_UART_CLK_PREDIVIDE_48 0x00 /* default */ #define ITE_UART_CLK_PREDIVIDE_24 0x01
+#define ITE_CSSWDT_INTERNAL_CLKIN 0x00 /* default */ +#define ITE_CSSWDT_EXTERNAL_CLKIN 0x08 + void ite_conf_clkin(pnp_devfn_t dev, u8 predivide); void ite_enable_serial(pnp_devfn_t dev, u16 iobase);