Pavlushka has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33842
Change subject: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D ......................................................................
src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D
src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D
src/superio/nuvoton: Add support for NCT5539D
Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/1
diff --git a/src/superio/nuvoton/Makefile.inc b/src/superio/nuvoton/Makefile.inc index de4e99c..7306242 100644 --- a/src/superio/nuvoton/Makefile.inc +++ b/src/superio/nuvoton/Makefile.inc @@ -24,3 +24,4 @@ subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT6779D) += nct6779d subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT6791D) += nct6791d subdirs-$(CONFIG_SUPERIO_NUVOTON_NPCD378) += npcd378 +subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d diff --git a/src/superio/nuvoton/common/early_serial.c b/src/superio/nuvoton/common/early_serial.c index eaa3c5a..aaa0c63 100644 --- a/src/superio/nuvoton/common/early_serial.c +++ b/src/superio/nuvoton/common/early_serial.c @@ -73,6 +73,10 @@ /* Route COM A to GPIO8 pin group */ pnp_write_config(dev, 0x2a, 0x00);
+ if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A)) + /* Route COM A to GPIO8 pin group */ + pnp_write_config(dev, 0x2a, 0x40); + pnp_set_logical_device(dev); pnp_set_enable(dev, 0); pnp_set_iobase(dev, PNP_IDX_IO0, iobase); diff --git a/src/superio/nuvoton/nct5539d/Kconfig b/src/superio/nuvoton/nct5539d/Kconfig new file mode 100644 index 0000000..0dd1402 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/Kconfig @@ -0,0 +1,23 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +config SUPERIO_NUVOTON_NCT5539D + bool + select SUPERIO_NUVOTON_COMMON_PRE_RAM + +config SUPERIO_NUVOTON_NCT5539D_COM_A + bool + depends on SUPERIO_NUVOTON_NCT5539D + default n diff --git a/src/superio/nuvoton/nct5539d/Makefile.inc b/src/superio/nuvoton/nct5539d/Makefile.inc new file mode 100644 index 0000000..6e3fdf2 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/Makefile.inc @@ -0,0 +1,16 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += superio.c diff --git a/src/superio/nuvoton/nct5539d/nct5539d.h b/src/superio/nuvoton/nct5539d/nct5539d.h new file mode 100644 index 0000000..f34660c --- /dev/null +++ b/src/superio/nuvoton/nct5539d/nct5539d.h @@ -0,0 +1,56 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef SUPERIO_NUVOTON_NCT5539D_H +#define SUPERIO_NUVOTON_NCT5539D_H + +/* Logical Device Numbers (LDN). */ +#define NCT5539D_SP1 0x02 /* UART A */ +#define NCT5539D_KBC 0x05 /* Keyboard Controller */ +#define NCT5539D_CIR 0x06 /* Consumer IR */ +#define NCT5539D_GPIO78 0x07 /* GPIO 7 & 8 */ +#define NCT5539D_WDT1_WDT3_GPIO0 0x08 /* WDT1, WDT3, GPIO 0 & KBC P20 */ +#define NCT5539D_GPIO2345 0x09 /* GPIO 2, 3, 4 & 5 */ +#define NCT5539D_ACPI 0x0A /* ACPI */ +#define NCT5539D_HWM_FPLED 0x0B /* HW Monitor, Front Panel LED */ +#define NCT5539D_BCLK_WDT2 0x0D /* BCLK, WDT2 */ +#define NCT5539D_CIRWUP 0x0E /* CIR Wake-Up */ +#define NCT5539D_GPIO_PP_OD 0x0F /* GPIO Push-Pull/Open-Drain */ +#define NCT5539D_GPIO_PSO 0x11/*GPIO, RI PSOUT Wake-Up Status*/ +#define NCT5539D_SWEC 0x12/*SW Error Control*/ +#define NCT5539D_FLED 0x15 /* Fading LED */ +#define NCT5539D_DS 0x16 /* Deep Sleep */ + +/* Virtual LDNs */ +#define NCT5539D_WDT1 ((0 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_WDT3 ((4 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIOBASE ((3 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIO0 ((1 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIO2 ((0 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO3 ((1 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO4 ((2 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO5 ((3 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO7 ((1 << 8) | NCT5539D_GPIO78) +#define NCT5539D_GPIO8 ((2 << 8) | NCT5539D_GPIO78) +#define NCT5539D_DS5 ((0 << 8) | NCT5539D_DS) +#define NCT5539D_DS3 ((1 << 8) | NCT5539D_DS) +#define NCT5539D_PCHDSW ((3 << 8) | NCT5539D_DS) +#define NCT5539D_DSWWOPT ((4 << 8) | NCT5539D_DS) +#define NCT5539D_DS3OPT ((5 << 8) | NCT5539D_DS) +#define NCT5539D_DSDSS ((6 << 8) | NCT5539D_DS) +#define NCT5539D_DSPU ((7 << 8) | NCT5539D_DS) + +#endif /* SUPERIO_NUVOTON_NCT5539D_H */ diff --git a/src/superio/nuvoton/nct5539d/superio.c b/src/superio/nuvoton/nct5539d/superio.c new file mode 100644 index 0000000..4cec976 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/superio.c @@ -0,0 +1,97 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011 Advanced Micro Devices, Inc. + * Copyright (C) 2014 Felix Held felix-coreboot@felixheld.de + * Copyright (C) 2014 Edward O'Callaghan eocallaghan@alterapraxis.com + * Copyright (C) 2015 Matt DeVillier matt.devillier@gmail.com + * Copyright (C) 2016 Omar Pakker omarpakker+coreboot@gmail.com +* Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <device/device.h> +#include <device/pnp.h> +#include <pc80/keyboard.h> +#include <stdlib.h> +#include <superio/conf_mode.h> + +#include "nct5539d.h" + + +static void nct5539d_init(struct device *dev) +{ + if (!dev->enabled) + return; + + switch (dev->path.pnp.device) { + case NCT5539D_KBC: + pc_keyboard_init(NO_AUX_DEVICE); + break; + } +} + +static struct device_operations ops = { + .read_resources = pnp_read_resources, + .set_resources = pnp_set_resources, + .enable_resources = pnp_enable_resources, + .enable = pnp_alt_enable, + .init = nct5539d_init, + .ops_pnp_mode = &pnp_conf_mode_8787_aa, +}; + +static struct pnp_info pnp_dev_info[] = { + { NULL, NCT5539D_SP1, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, + 0x0fff, 0x0fff, }, + { NULL, NCT5539D_CIR, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_ACPI}, + { NULL, NCT5539D_HWM_FPLED, PNP_IO0 | PNP_IO1 | PNP_IRQ0, + 0x0ffe, 0x0ffe, }, + { NULL, NCT5539D_BCLK_WDT2}, + { NULL, NCT5539D_CIRWUP, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_GPIO_PP_OD}, + { NULL, NCT5539D_WDT1}, + { NULL, NCT5539D_WDT3}, + { NULL, NCT5539D_GPIOBASE, PNP_IO0, + 0x0ff8, }, + { NULL, NCT5539D_GPIO0}, + { NULL, NCT5539D_GPIO2}, + { NULL, NCT5539D_GPIO3}, + { NULL, NCT5539D_GPIO4}, + { NULL, NCT5539D_GPIO5}, + { NULL, NCT5539D_GPIO7}, + { NULL, NCT5539D_GPIO8}, + { NULL, NCT5539D_GPIO_PSO}, + { NULL, NCT5539D_SWEC}, + { NULL, NCT5539D_FLED}, + { NULL, NCT5539D_DS5}, + { NULL, NCT5539D_DS3}, + { NULL, NCT5539D_PCHDSW}, + { NULL, NCT5539D_DSWWOPT}, + { NULL, NCT5539D_DS3OPT}, + { NULL, NCT5539D_DSDSS}, + { NULL, NCT5539D_DSPU}, +}; + +static void enable_dev(struct device *dev) +{ + pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); +} + +struct chip_operations superio_nuvoton_nct5539d_ops = { + CHIP_NAME("NUVOTON NCT5539D Super I/O") + .enable_dev = enable_dev, +};
Pavlushka has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D ......................................................................
src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D
src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#3).
Change subject: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D ......................................................................
src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D
src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D ......................................................................
Patch Set 3:
(4 comments)
Will check against the datasheet later. What did you base this on?
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@7 PS3, Line 7: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D : : src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D Remove these lines
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@11 PS3, Line 11: src/superio/nuvoton: Add support for NCT5539D Keep this line
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc File src/superio/nuvoton/Makefile.inc:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc@27 PS3, Line 27: subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d While the order does not matter, I would prefer to keep this list's numerical order. Please move this between nct5104d and nct5572d
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... File src/superio/nuvoton/nct5539d/nct5539d.h:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... PS3, Line 32: /*GPIO, RI PSOUT Wake-Up Status*/ missing spacing on this comment and the next one
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#4).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/4
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#5).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/5
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#6).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/6
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#7).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/7
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#8).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 197 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/8
Pavel Sayekat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 8:
(4 comments)
Patch Set 3:
(4 comments)
Will check against the datasheet later. What did you base this on?
NCT6791D used as reference.
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@7 PS3, Line 7: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D : : src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D
Remove these lines
Ack
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@11 PS3, Line 11: src/superio/nuvoton: Add support for NCT5539D
Keep this line
Done
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc File src/superio/nuvoton/Makefile.inc:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc@27 PS3, Line 27: subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d
While the order does not matter, I would prefer to keep this list's numerical order. […]
Done
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... File src/superio/nuvoton/nct5539d/nct5539d.h:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... PS3, Line 32: /*GPIO, RI PSOUT Wake-Up Status*/
missing spacing on this comment and the next one
Done
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 8:
(5 comments)
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... PS8, Line 70: 0x40 0x00
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... File src/superio/nuvoton/nct5539d/nct5539d.h:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... PS8, Line 29: BCLK bclk?
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... PS8, Line 50: #define NCT5539D_PCHDSW ((3 << 8) | NCT5539D_DS) : #define NCT5539D_DSWWOPT ((4 << 8) | NCT5539D_DS) : #define NCT5539D_DS3OPT ((5 << 8) | NCT5539D_DS) : #define NCT5539D_DSDSS ((6 << 8) | NCT5539D_DS) : #define NCT5539D_DSPU ((7 << 8) | NCT5539D_DS) haven't seen those in the datasheet
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... File src/superio/nuvoton/nct5539d/superio.c:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... PS8, Line 60: PNP_IO1 I don't see a corresponding resource in the datasheet
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... PS8, Line 82: { NULL, NCT5539D_PCHDSW}, : { NULL, NCT5539D_DSWWOPT}, : { NULL, NCT5539D_DS3OPT}, : { NULL, NCT5539D_DSDSS}, : { NULL, NCT5539D_DSPU}, see the comment in the header file
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... PS8, Line 70: 0x40
0x00
the table in the datasheet is a bit weird; so 0x40 is indeed probably the correct value here
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#9).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c M util/superiotool/nuvoton.c 7 files changed, 190 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/9
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#10).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c M util/superiotool/nuvoton.c 7 files changed, 190 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/10
Pavel Sayekat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 10:
(9 comments)
Thanks for being with me so far :)
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@7 PS3, Line 7: src/superio/nuvoton/common/early_serial.c: Add symbol to select COM port for NCT5539D : : src/superio/nuvoton/Makefile.inc: Add definition for NCT5539D
Ack
Done
https://review.coreboot.org/#/c/33842/3//COMMIT_MSG@11 PS3, Line 11: src/superio/nuvoton: Add support for NCT5539D
Done
Done
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc File src/superio/nuvoton/Makefile.inc:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/Makefile.inc@27 PS3, Line 27: subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d
Done
Done
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/common/early_ser... PS8, Line 70: 0x40
0x00
The default value of 2a is c0 for nct5539, the bin equivalent is 11000000, for SINA, the 7th bit is 0 and that makes it 10000000, taking into account the first 7 bits, the equivalent hex becomes 40 and the NCT6776F-D datasheet also suggests that because of the similar values, also according to hellsenberg/ Angel Pons' suggestion.
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... File src/superio/nuvoton/nct5539d/nct5539d.h:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... PS8, Line 29: BCLK
bclk?
Done
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/nct5539... PS8, Line 50: #define NCT5539D_PCHDSW ((3 << 8) | NCT5539D_DS) : #define NCT5539D_DSWWOPT ((4 << 8) | NCT5539D_DS) : #define NCT5539D_DS3OPT ((5 << 8) | NCT5539D_DS) : #define NCT5539D_DSDSS ((6 << 8) | NCT5539D_DS) : #define NCT5539D_DSPU ((7 << 8) | NCT5539D_DS)
haven't seen those in the datasheet
Done
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... File src/superio/nuvoton/nct5539d/nct5539d.h:
https://review.coreboot.org/#/c/33842/3/src/superio/nuvoton/nct5539d/nct5539... PS3, Line 32: /*GPIO, RI PSOUT Wake-Up Status*/
Done
Done
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... File src/superio/nuvoton/nct5539d/superio.c:
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... PS8, Line 60: PNP_IO1
I don't see a corresponding resource in the datasheet
Done
https://review.coreboot.org/#/c/33842/8/src/superio/nuvoton/nct5539d/superio... PS8, Line 82: { NULL, NCT5539D_PCHDSW}, : { NULL, NCT5539D_DSWWOPT}, : { NULL, NCT5539D_DS3OPT}, : { NULL, NCT5539D_DSDSS}, : { NULL, NCT5539D_DSPU},
see the comment in the header file
Done
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 10: Code-Review-1
(2 comments)
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... PS10, Line 78: 0x40 this would break serial console for the nct6791
https://review.coreboot.org/#/c/33842/10/util/superiotool/nuvoton.c File util/superiotool/nuvoton.c:
https://review.coreboot.org/#/c/33842/10/util/superiotool/nuvoton.c@597 PS10, Line 597: {0x06, "Consumer IR", please put the changes to this file in a separate patch
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#11).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/11
Pavel Sayekat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 11:
(2 comments)
Please take a look at.
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... PS10, Line 78: 0x40
this would break serial console for the nct6791
NCT6776F-D, NCT6791D and NCT5539D has the same set of values for this, so the switch code supposed to be the same as deduction indicates.
https://review.coreboot.org/#/c/33842/10/util/superiotool/nuvoton.c File util/superiotool/nuvoton.c:
https://review.coreboot.org/#/c/33842/10/util/superiotool/nuvoton.c@597 PS10, Line 597: {0x06, "Consumer IR",
please put the changes to this file in a separate patch
Will do.
Pavel Sayekat has removed Nico Huber from this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Removed reviewer Nico Huber.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 11: Code-Review-1
(1 comment)
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/#/c/33842/10/src/superio/nuvoton/common/early_se... PS10, Line 78: 0x40
NCT6776F-D, NCT6791D and NCT5539D has the same set of values for this, so the switch code supposed t […]
no, this is simply not true. see patch set 33640
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#12).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/12
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 12: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 12:
Please add the datasheet name and version to the commit message and/or as a comment in the source.
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#13).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/13
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 13: -Code-Review
(1 comment)
FYI: the build bot can only say if new device support compiles or not when there's a patch using the new device support and then it'll fail on the patch using the device support and not the patch adding the support
https://review.coreboot.org/#/c/33842/13/src/superio/nuvoton/nct5539d/superi... File src/superio/nuvoton/nct5539d/superio.c:
https://review.coreboot.org/#/c/33842/13/src/superio/nuvoton/nct5539d/superi... PS13, Line 62: BCLK remove _BCLK here; this patch doesn't compile in its current state
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#14).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 212 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/14
Hello Felix Held, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#15).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/15
Pavel Sayekat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/#/c/33842/13/src/superio/nuvoton/nct5539d/superi... File src/superio/nuvoton/nct5539d/superio.c:
https://review.coreboot.org/#/c/33842/13/src/superio/nuvoton/nct5539d/superi... PS13, Line 62: BCLK
remove _BCLK here; this patch doesn't compile in its current state
Done
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 15: Code-Review+1
Looks good to me. I'll wait with merging this until the patch adding the board using this SIO chip is on the review system and the build bot is happy with that patch. Only put a +1 and not a +2 so that it won't accidentally get merged before the mainboard is sort-of ready; the patch is now in a state where I'm happy with it though
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 16: Code-Review+1
Patch Set 15: Code-Review+1
Looks good to me. I'll wait with merging this until the patch adding the board using this SIO chip is on the review system and the build bot is happy with that patch. Only put a +1 and not a +2 so that it won't accidentally get merged before the mainboard is sort-of ready; the patch is now in a state where I'm happy with it though
Agreed. Gave a +1 for the same reason.
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#18).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
src/mainboard/asus: Add h110m-e_m2 mainboard support
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- A src/mainboard/asus/h110m-e_m2/Kconfig A src/mainboard/asus/h110m-e_m2/Kconfig.name A src/mainboard/asus/h110m-e_m2/Makefile.inc A src/mainboard/asus/h110m-e_m2/acpi/dptf.asl A src/mainboard/asus/h110m-e_m2/acpi/ec.asl A src/mainboard/asus/h110m-e_m2/acpi/mainboard.asl A src/mainboard/asus/h110m-e_m2/acpi/superio.asl A src/mainboard/asus/h110m-e_m2/acpi_tables.c A src/mainboard/asus/h110m-e_m2/board_info.txt A src/mainboard/asus/h110m-e_m2/bootblock.c A src/mainboard/asus/h110m-e_m2/cmos.default A src/mainboard/asus/h110m-e_m2/cmos.layout A src/mainboard/asus/h110m-e_m2/data.vbt A src/mainboard/asus/h110m-e_m2/devicetree.cb A src/mainboard/asus/h110m-e_m2/dsdt.asl A src/mainboard/asus/h110m-e_m2/gma-mainboard.ads A src/mainboard/asus/h110m-e_m2/hda_verb.c A src/mainboard/asus/h110m-e_m2/include/gpio.h A src/mainboard/asus/h110m-e_m2/mainboard.c A src/mainboard/asus/h110m-e_m2/ramstage.c A src/mainboard/asus/h110m-e_m2/romstage.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 25 files changed, 1,455 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/18
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 18:
(3 comments)
https://review.coreboot.org/c/coreboot/+/33842/18/src/mainboard/asus/h110m-e... File src/mainboard/asus/h110m-e_m2/romstage.c:
https://review.coreboot.org/c/coreboot/+/33842/18/src/mainboard/asus/h110m-e... PS18, Line 28: {0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC, 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00}}; space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/33842/18/src/mainboard/asus/h110m-e... PS18, Line 35: const u8 dqs_map[2][8] = {{0, 1, 3, 2, 4, 5, 6, 7}, {1, 0, 4, 5, 2, 3, 6, 7}}; space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/33842/18/src/mainboard/asus/h110m-e... PS18, Line 58: { that open brace { should be on the previous line
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#19).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
src/mainboard/asus: Add h110m-e_m2 mainboard support
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- A src/mainboard/asus/h110m-e_m2/Kconfig A src/mainboard/asus/h110m-e_m2/Kconfig.name A src/mainboard/asus/h110m-e_m2/Makefile.inc A src/mainboard/asus/h110m-e_m2/acpi/dptf.asl A src/mainboard/asus/h110m-e_m2/acpi/ec.asl A src/mainboard/asus/h110m-e_m2/acpi/mainboard.asl A src/mainboard/asus/h110m-e_m2/acpi/superio.asl A src/mainboard/asus/h110m-e_m2/acpi_tables.c A src/mainboard/asus/h110m-e_m2/board_info.txt A src/mainboard/asus/h110m-e_m2/bootblock.c A src/mainboard/asus/h110m-e_m2/cmos.default A src/mainboard/asus/h110m-e_m2/cmos.layout A src/mainboard/asus/h110m-e_m2/data.vbt A src/mainboard/asus/h110m-e_m2/devicetree.cb A src/mainboard/asus/h110m-e_m2/dsdt.asl A src/mainboard/asus/h110m-e_m2/gma-mainboard.ads A src/mainboard/asus/h110m-e_m2/hda_verb.c A src/mainboard/asus/h110m-e_m2/include/gpio.h A src/mainboard/asus/h110m-e_m2/mainboard.c A src/mainboard/asus/h110m-e_m2/ramstage.c A src/mainboard/asus/h110m-e_m2/romstage.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 25 files changed, 1,455 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/19
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 19:
(3 comments)
https://review.coreboot.org/c/coreboot/+/33842/19/src/mainboard/asus/h110m-e... File src/mainboard/asus/h110m-e_m2/romstage.c:
https://review.coreboot.org/c/coreboot/+/33842/19/src/mainboard/asus/h110m-e... PS19, Line 28: {0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC, 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00}}; space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/33842/19/src/mainboard/asus/h110m-e... PS19, Line 35: const u8 dqs_map[2][8] = {{0, 1, 3, 2, 4, 5, 6, 7}, {1, 0, 4, 5, 2, 3, 6, 7}}; space required after that close brace '}'
https://review.coreboot.org/c/coreboot/+/33842/19/src/mainboard/asus/h110m-e... PS19, Line 58: { that open brace { should be on the previous line
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#20).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 4 files changed, 182 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/20
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#21).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/21
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#22).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/22
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#23).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/23
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#24).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/24
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#25).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/25
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#26).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/26
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#27).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/27
Hello Felix Held, Angel Pons, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33842
to look at the new patch set (#28).
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/33842/28
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 28: Code-Review+2
(2 comments)
all issues are addressed and buildbot is happy with the board using this SIO
https://review.coreboot.org/c/coreboot/+/33842/10/src/superio/nuvoton/common... File src/superio/nuvoton/common/early_serial.c:
https://review.coreboot.org/c/coreboot/+/33842/10/src/superio/nuvoton/common... PS10, Line 78: 0x40
no, this is simply not true. […]
Done
https://review.coreboot.org/c/coreboot/+/33842/10/util/superiotool/nuvoton.c File util/superiotool/nuvoton.c:
https://review.coreboot.org/c/coreboot/+/33842/10/util/superiotool/nuvoton.c... PS10, Line 597: {0x06, "Consumer IR",
Will do.
Done
Felix Held has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
src/superio/nuvoton: Add support for NCT5539D
Values taken from NCT5539D datasheet V1.1 (June 30th, 2015).
Change-Id: I7e979bde53ce3dac1a4f74e7e51a3c6a0149051c Signed-off-by: Pavel Sayekat pavelsayekat@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/33842 Reviewed-by: Felix Held felix-coreboot@felixheld.de Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/superio/nuvoton/Makefile.inc M src/superio/nuvoton/common/early_serial.c A src/superio/nuvoton/nct5539d/Kconfig A src/superio/nuvoton/nct5539d/Makefile.inc A src/superio/nuvoton/nct5539d/nct5539d.h A src/superio/nuvoton/nct5539d/superio.c 6 files changed, 187 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
diff --git a/src/superio/nuvoton/Makefile.inc b/src/superio/nuvoton/Makefile.inc index de4e99c..eae0f63 100644 --- a/src/superio/nuvoton/Makefile.inc +++ b/src/superio/nuvoton/Makefile.inc @@ -19,6 +19,7 @@
subdirs-$(CONFIG_SUPERIO_NUVOTON_WPCM450) += wpcm450 subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5104D) += nct5104d +subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5572D) += nct5572d subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT6776) += nct6776 subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT6779D) += nct6779d diff --git a/src/superio/nuvoton/common/early_serial.c b/src/superio/nuvoton/common/early_serial.c index eaa3c5a..29418db 100644 --- a/src/superio/nuvoton/common/early_serial.c +++ b/src/superio/nuvoton/common/early_serial.c @@ -65,6 +65,10 @@ { nuvoton_pnp_enter_conf_state(dev);
+ if (CONFIG(SUPERIO_NUVOTON_NCT5539D_COM_A)) + /* Route COM A to GPIO8 pin group */ + pnp_write_config(dev, 0x2a, 0x40); + if (CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A)) /* Route COM A to GPIO8 pin group */ pnp_write_config(dev, 0x2a, 0x40); diff --git a/src/superio/nuvoton/nct5539d/Kconfig b/src/superio/nuvoton/nct5539d/Kconfig new file mode 100644 index 0000000..0dd1402 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/Kconfig @@ -0,0 +1,23 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +config SUPERIO_NUVOTON_NCT5539D + bool + select SUPERIO_NUVOTON_COMMON_PRE_RAM + +config SUPERIO_NUVOTON_NCT5539D_COM_A + bool + depends on SUPERIO_NUVOTON_NCT5539D + default n diff --git a/src/superio/nuvoton/nct5539d/Makefile.inc b/src/superio/nuvoton/nct5539d/Makefile.inc new file mode 100644 index 0000000..6e3fdf2 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/Makefile.inc @@ -0,0 +1,16 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += superio.c diff --git a/src/superio/nuvoton/nct5539d/nct5539d.h b/src/superio/nuvoton/nct5539d/nct5539d.h new file mode 100644 index 0000000..d4e8d08 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/nct5539d.h @@ -0,0 +1,51 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef SUPERIO_NUVOTON_NCT5539D_H +#define SUPERIO_NUVOTON_NCT5539D_H + +/* Logical Device Numbers (LDN). */ +#define NCT5539D_SP1 0x02 /* UART A */ +#define NCT5539D_KBC 0x05 /* Keyboard Controller */ +#define NCT5539D_CIR 0x06 /* Consumer IR */ +#define NCT5539D_GPIO78 0x07 /* GPIO 7 & 8 */ +#define NCT5539D_WDT1_WDT3_GPIO0 0x08 /* WDT1, WDT3, GPIO 0 & KBC P20 */ +#define NCT5539D_GPIO2345 0x09 /* GPIO 2, 3, 4 & 5 */ +#define NCT5539D_ACPI 0x0A /* ACPI */ +#define NCT5539D_HWM_FPLED 0x0B /* HW Monitor, Front Panel LED */ +#define NCT5539D_WDT2 0x0D /* WDT2 */ +#define NCT5539D_CIRWUP 0x0E /* CIR Wake-Up */ +#define NCT5539D_GPIO_PP_OD 0x0F /* GPIO Push-Pull/Open-Drain */ +#define NCT5539D_GPIO_PSO 0x11 /* GPIO, RI PSOUT Wake-Up Status */ +#define NCT5539D_SWEC 0x12 /* SW Error Control */ +#define NCT5539D_FLED 0x15 /* Fading LED */ +#define NCT5539D_DS 0x16 /* Deep Sleep */ + +/* Virtual LDNs */ +#define NCT5539D_WDT1 ((0 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_WDT3 ((4 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIOBASE ((3 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIO0 ((1 << 8) | NCT5539D_WDT1_WDT3_GPIO0) +#define NCT5539D_GPIO2 ((0 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO3 ((1 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO4 ((2 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO5 ((3 << 8) | NCT5539D_GPIO2345) +#define NCT5539D_GPIO7 ((1 << 8) | NCT5539D_GPIO78) +#define NCT5539D_GPIO8 ((2 << 8) | NCT5539D_GPIO78) +#define NCT5539D_DS5 ((0 << 8) | NCT5539D_DS) +#define NCT5539D_DS3 ((1 << 8) | NCT5539D_DS) + +#endif /* SUPERIO_NUVOTON_NCT5539D_H */ diff --git a/src/superio/nuvoton/nct5539d/superio.c b/src/superio/nuvoton/nct5539d/superio.c new file mode 100644 index 0000000..e38f845 --- /dev/null +++ b/src/superio/nuvoton/nct5539d/superio.c @@ -0,0 +1,92 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011 Advanced Micro Devices, Inc. + * Copyright (C) 2014 Felix Held felix-coreboot@felixheld.de + * Copyright (C) 2014 Edward O'Callaghan eocallaghan@alterapraxis.com + * Copyright (C) 2015 Matt DeVillier matt.devillier@gmail.com + * Copyright (C) 2016 Omar Pakker omarpakker+coreboot@gmail.com +* Copyright (C) 2019 Pavel Sayekat pavelsayekat@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <device/device.h> +#include <device/pnp.h> +#include <pc80/keyboard.h> +#include <stdlib.h> +#include <superio/conf_mode.h> + +#include "nct5539d.h" + + +static void nct5539d_init(struct device *dev) +{ + if (!dev->enabled) + return; + + switch (dev->path.pnp.device) { + case NCT5539D_KBC: + pc_keyboard_init(NO_AUX_DEVICE); + break; + } +} + +static struct device_operations ops = { + .read_resources = pnp_read_resources, + .set_resources = pnp_set_resources, + .enable_resources = pnp_enable_resources, + .enable = pnp_alt_enable, + .init = nct5539d_init, + .ops_pnp_mode = &pnp_conf_mode_8787_aa, +}; + +static struct pnp_info pnp_dev_info[] = { + { NULL, NCT5539D_SP1, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, + 0x0fff, 0x0fff, }, + { NULL, NCT5539D_CIR, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_ACPI}, + { NULL, NCT5539D_HWM_FPLED, PNP_IO0 | PNP_IRQ0, + 0x0ffe, 0x0ffe, }, + { NULL, NCT5539D_WDT2}, + { NULL, NCT5539D_CIRWUP, PNP_IO0 | PNP_IRQ0, + 0x0ff8, }, + { NULL, NCT5539D_GPIO_PP_OD}, + { NULL, NCT5539D_WDT1}, + { NULL, NCT5539D_WDT3}, + { NULL, NCT5539D_GPIOBASE, PNP_IO0, + 0x0ff8, }, + { NULL, NCT5539D_GPIO0}, + { NULL, NCT5539D_GPIO2}, + { NULL, NCT5539D_GPIO3}, + { NULL, NCT5539D_GPIO4}, + { NULL, NCT5539D_GPIO5}, + { NULL, NCT5539D_GPIO7}, + { NULL, NCT5539D_GPIO8}, + { NULL, NCT5539D_GPIO_PSO}, + { NULL, NCT5539D_SWEC}, + { NULL, NCT5539D_FLED}, + { NULL, NCT5539D_DS5}, + { NULL, NCT5539D_DS3}, +}; + +static void enable_dev(struct device *dev) +{ + pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); +} + +struct chip_operations superio_nuvoton_nct5539d_ops = { + CHIP_NAME("NUVOTON NCT5539D Super I/O") + .enable_dev = enable_dev, +};
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33842 )
Change subject: src/superio/nuvoton: Add support for NCT5539D ......................................................................
Patch Set 29:
Since there's no board in tree that is using this SIO code, the SIO cleanup patch 35428 would remove this; since you're working on a board using this chip, please comment on the patch I mentioned that it doesn't get removed