superio/nuvoton/nct6791d: Add symbol to select COM port
Like the NCT6776, the NCT6791D has muxed COMA/GPIO8 functions. Since it requires setting different bits, add a new Kconfig symbol to do it. Change-Id: I62dc18810026f9b1550da19950f66af605600ec8 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33640 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maxim Polyakov <m.poliakov@yahoo.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
d26844ce82
commit
78fa372ec9
|
@ -64,9 +64,15 @@ void nuvoton_pnp_exit_conf_state(pnp_devfn_t dev)
|
||||||
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
|
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
|
||||||
{
|
{
|
||||||
nuvoton_pnp_enter_conf_state(dev);
|
nuvoton_pnp_enter_conf_state(dev);
|
||||||
|
|
||||||
if (CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A))
|
if (CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A))
|
||||||
/* Route GPIO8 pin group to COM A */
|
/* Route GPIO8 pin group to COM A */
|
||||||
pnp_write_config(dev, 0x2a, 0x40);
|
pnp_write_config(dev, 0x2a, 0x40);
|
||||||
|
|
||||||
|
if (CONFIG(SUPERIO_NUVOTON_NCT6791D_COM_A))
|
||||||
|
/* Route GPIO8 pin group to COM A */
|
||||||
|
pnp_write_config(dev, 0x2a, 0x00);
|
||||||
|
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
pnp_set_enable(dev, 0);
|
pnp_set_enable(dev, 0);
|
||||||
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
|
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
|
||||||
|
|
|
@ -16,3 +16,8 @@
|
||||||
config SUPERIO_NUVOTON_NCT6791D
|
config SUPERIO_NUVOTON_NCT6791D
|
||||||
bool
|
bool
|
||||||
select SUPERIO_NUVOTON_COMMON_PRE_RAM
|
select SUPERIO_NUVOTON_COMMON_PRE_RAM
|
||||||
|
|
||||||
|
config SUPERIO_NUVOTON_NCT6791D_COM_A
|
||||||
|
bool
|
||||||
|
depends on SUPERIO_NUVOTON_NCT6791D
|
||||||
|
default n
|
||||||
|
|
Loading…
Reference in New Issue