From bbda950e1395683f1021c55a7336d620a4f8b19b Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 14 Apr 2015 18:31:02 +0200 Subject: sio/winbond/w83627dhg: Add ACPI function to control suspend LED Change-Id: Ie2062672233141b6f34625e59cbb50238be0b5fa Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/16726 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- src/superio/winbond/w83627dhg/acpi/superio.asl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 -- cgit v1.2.3