summaryrefslogtreecommitdiff
path: root/src/superio/nuvoton
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio/nuvoton')
-rw-r--r--src/superio/nuvoton/nct5539d/Makefile.inc2
-rw-r--r--src/superio/nuvoton/nct5539d/superio.c25
2 files changed, 27 insertions, 0 deletions
diff --git a/src/superio/nuvoton/nct5539d/Makefile.inc b/src/superio/nuvoton/nct5539d/Makefile.inc
index 6e3fdf25a2..a6f3a022fe 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 e38f845042..4f2a4a5c16 100644
--- a/src/superio/nuvoton/nct5539d/superio.c
+++ b/src/superio/nuvoton/nct5539d/superio.c
@@ -40,6 +40,26 @@ static void nct5539d_init(struct device *dev)
}
}
+#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 @@ static struct device_operations ops = {
.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[] = {