Maxim Polyakov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36380 )
Change subject: src/superio/nuvoton/nct5539d: use SuperIO acpigen ......................................................................
src/superio/nuvoton/nct5539d: use SuperIO acpigen
Adds the code needed to use apcigen[1] for the nct5539d SuperIO chip.
[1] https://review.coreboot.org/c/coreboot/+/33033
Not tested on real hardware
Change-Id: If9fd56efd40ee0f860e206882418c8bdc7c16802 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/superio/nuvoton/nct5539d/Makefile.inc M src/superio/nuvoton/nct5539d/superio.c 2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/36380/1
diff --git a/src/superio/nuvoton/nct5539d/Makefile.inc b/src/superio/nuvoton/nct5539d/Makefile.inc index 6e3fdf2..a6f3a02 100644 --- a/src/superio/nuvoton/nct5539d/Makefile.inc +++ b/src/superio/nuvoton/nct5539d/Makefile.inc @@ -14,3 +14,5 @@ ##
ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += superio.c +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += ../../common/ssdt.c +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += ../../common/generic.c diff --git a/src/superio/nuvoton/nct5539d/superio.c b/src/superio/nuvoton/nct5539d/superio.c index e38f845..4f2a4a5 100644 --- a/src/superio/nuvoton/nct5539d/superio.c +++ b/src/superio/nuvoton/nct5539d/superio.c @@ -40,6 +40,26 @@ } }
+#if CONFIG(HAVE_ACPI_TABLES) +/* Provide ACPI HIDs for generic Super I/O SSDT */ +static const char *nct5539d_acpi_hid(const struct device *dev) +{ + if ((dev->path.type != DEVICE_PATH_PNP) || + (dev->path.pnp.port == 0) || + ((dev->path.pnp.device & 0xff) > NCT5539D_DS)) + return NULL; + + switch (dev->path.pnp.device & 0xff) { + case NCT5539D_SP1: + return ACPI_HID_COM; + case NCT5539D_KBC: + return ACPI_HID_KEYBOARD; + default: + return ACPI_HID_PNP; + } +} +#endif + static struct device_operations ops = { .read_resources = pnp_read_resources, .set_resources = pnp_set_resources, @@ -47,6 +67,11 @@ .enable = pnp_alt_enable, .init = nct5539d_init, .ops_pnp_mode = &pnp_conf_mode_8787_aa, +#if CONFIG(HAVE_ACPI_TABLES) + .acpi_fill_ssdt_generator = superio_common_fill_ssdt_generator, + .acpi_name = superio_common_ldn_acpi_name, + .acpi_hid = nct5539d_acpi_hid, +#endif };
static struct pnp_info pnp_dev_info[] = {
Maxim Polyakov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36380 )
Change subject: src/superio/nuvoton/nct5539d: use SuperIO acpigen ......................................................................
Patch Set 1:
This change is ready for review.
Hello Felix Held, build bot (Jenkins), Pavel Sayekat, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36380
to look at the new patch set (#2).
Change subject: [WIP] src/superio/nuvoton/nct5539d: use SuperIO acpigen ......................................................................
[WIP] src/superio/nuvoton/nct5539d: use SuperIO acpigen
Adds the code needed to use apcigen[1] for the nct5539d SuperIO chip.
[1] https://review.coreboot.org/c/coreboot/+/33033
Not tested on real hardware
Change-Id: If9fd56efd40ee0f860e206882418c8bdc7c16802 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/superio/nuvoton/nct5539d/Makefile.inc M src/superio/nuvoton/nct5539d/superio.c 2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/36380/2
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36380 )
Change subject: [WIP] src/superio/nuvoton/nct5539d: use SuperIO acpigen ......................................................................
Patch Set 2: Code-Review+1
only had a brief look, but looks good to me
Hello Felix Held, build bot (Jenkins), Pavel Sayekat, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36380
to look at the new patch set (#3).
Change subject: superio/nuvoton/nct5539d: use SuperIO ACPI generator ......................................................................
superio/nuvoton/nct5539d: use SuperIO ACPI generator
Adds SuperIO SSDT ACPI generator[1] support. Not tested on real hardware.
[1] https://review.coreboot.org/c/coreboot/+/33033
Change-Id: If9fd56efd40ee0f860e206882418c8bdc7c16802 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com --- M src/superio/nuvoton/nct5539d/Makefile.inc M src/superio/nuvoton/nct5539d/superio.c 2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/36380/3
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36380 )
Change subject: superio/nuvoton/nct5539d: use SuperIO ACPI generator ......................................................................
Patch Set 3: Code-Review+2
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36380 )
Change subject: superio/nuvoton/nct5539d: use SuperIO ACPI generator ......................................................................
superio/nuvoton/nct5539d: use SuperIO ACPI generator
Adds SuperIO SSDT ACPI generator[1] support. Not tested on real hardware.
[1] https://review.coreboot.org/c/coreboot/+/33033
Change-Id: If9fd56efd40ee0f860e206882418c8bdc7c16802 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/36380 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/superio/nuvoton/nct5539d/Makefile.inc M src/superio/nuvoton/nct5539d/superio.c 2 files changed, 27 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/superio/nuvoton/nct5539d/Makefile.inc b/src/superio/nuvoton/nct5539d/Makefile.inc index 6e3fdf2..a6f3a02 100644 --- a/src/superio/nuvoton/nct5539d/Makefile.inc +++ b/src/superio/nuvoton/nct5539d/Makefile.inc @@ -14,3 +14,5 @@ ##
ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += superio.c +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += ../../common/ssdt.c +ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += ../../common/generic.c diff --git a/src/superio/nuvoton/nct5539d/superio.c b/src/superio/nuvoton/nct5539d/superio.c index e38f845..4f2a4a5 100644 --- a/src/superio/nuvoton/nct5539d/superio.c +++ b/src/superio/nuvoton/nct5539d/superio.c @@ -40,6 +40,26 @@ } }
+#if CONFIG(HAVE_ACPI_TABLES) +/* Provide ACPI HIDs for generic Super I/O SSDT */ +static const char *nct5539d_acpi_hid(const struct device *dev) +{ + if ((dev->path.type != DEVICE_PATH_PNP) || + (dev->path.pnp.port == 0) || + ((dev->path.pnp.device & 0xff) > NCT5539D_DS)) + return NULL; + + switch (dev->path.pnp.device & 0xff) { + case NCT5539D_SP1: + return ACPI_HID_COM; + case NCT5539D_KBC: + return ACPI_HID_KEYBOARD; + default: + return ACPI_HID_PNP; + } +} +#endif + static struct device_operations ops = { .read_resources = pnp_read_resources, .set_resources = pnp_set_resources, @@ -47,6 +67,11 @@ .enable = pnp_alt_enable, .init = nct5539d_init, .ops_pnp_mode = &pnp_conf_mode_8787_aa, +#if CONFIG(HAVE_ACPI_TABLES) + .acpi_fill_ssdt_generator = superio_common_fill_ssdt_generator, + .acpi_name = superio_common_ldn_acpi_name, + .acpi_hid = nct5539d_acpi_hid, +#endif };
static struct pnp_info pnp_dev_info[] = {