summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2015-04-14 18:31:02 +0200
committerMartin Roth <martinroth@google.com>2016-10-01 22:30:38 +0200
commitbbda950e1395683f1021c55a7336d620a4f8b19b (patch)
tree3457c5d26277a9bb4791be13ba0be2e4ee7593c1
parent2fc06c82034c48b8ae896a99601e50de9eb33256 (diff)
downloadcoreboot-bbda950e1395683f1021c55a7336d620a4f8b19b.tar.xz
sio/winbond/w83627dhg: Add ACPI function to control suspend LED
Change-Id: Ie2062672233141b6f34625e59cbb50238be0b5fa Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16726 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--src/superio/winbond/w83627dhg/acpi/superio.asl24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/superio/winbond/w83627dhg/acpi/superio.asl b/src/superio/winbond/w83627dhg/acpi/superio.asl
index 9307c1d3e1..e4d15dcc25 100644
--- a/src/superio/winbond/w83627dhg/acpi/superio.asl
+++ b/src/superio/winbond/w83627dhg/acpi/superio.asl
@@ -97,6 +97,9 @@ Device(SUPERIO_DEV) {
Offset (0x74),
PNP_DMA0, 8, /* DMA */
+
+ Offset (0xf3),
+ SULM, 8, /* Suspend LED Mode Register */
}
Method (_CRS)
@@ -139,6 +142,27 @@ Device(SUPERIO_DEV) {
EXIT_CONFIG_MODE ()
}
+ /* Suspend LED: Write given three-bit value into appropriate register.
+ From the datasheet:
+ 000 - drive pin constantly high
+ 001 - drive 0.5Hz pulses
+ 010 - drive pin constantly low
+ 011 - drive 2Hz pulses
+ 100 - drive 1Hz pulses
+ 101 - drive 4Hz pulses
+ 110 - drive 0.25Hz pulses
+ 111 - drive 0.25Hz pulses
+ (all pulses with 50% duty cycle) */
+ #define SUPERIO_SUSL_LDN 9
+ Method (SUSL, 1, Serialized) {
+ ENTER_CONFIG_MODE (SUPERIO_SUSL_LDN)
+ Store (SULM, Local0)
+ And (Local0, 0x1f, Local0)
+ Or (Local0, ShiftLeft (Arg0, 5), Local0)
+ Store (Local0, SULM)
+ EXIT_CONFIG_MODE ()
+ }
+
#ifdef W83627DHG_SHOW_UARTA
#undef SUPERIO_UART_LDN
#undef SUPERIO_UART_DDN