Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62609 )
Change subject: ec/starlabs: Write the correct value for KLBE when suspending ......................................................................
ec/starlabs: Write the correct value for KLBE when suspending
The current code will write the raw value from the CMOS, which doesn't match the respective setting in EC.
Switch argument will write the correct value, and prevent the setting being reset.
Signed-off-by: Sean Rhodes sean@starlabs.systems Change-Id: I40dc78c743f4201a11ea0c26a8af716cab42b805 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62609 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/ec/starlabs/merlin/acpi/suspend.asl 1 file changed, 23 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl index c65ca6d..70a9bda 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -113,5 +113,27 @@ } }
- _SB.PCI0.LPCB.EC.KLBE = _SB.PCI0.LPCB.KLBC + Switch (ToInteger (_SB.PCI0.LPCB.KLBC)) + { + // 0x00 == On == 0xdd + // 0x01 == Off == 0xcc + // 0x02 == Low == 0xbb + // 0x03 == High == 0xaa + Case (0x00) + { + _SB.PCI0.LPCB.EC.KLBE = 0xdd + } + Case (0x01) + { + _SB.PCI0.LPCB.EC.KLBE = 0xcc + } + Case (0x02) + { + _SB.PCI0.LPCB.EC.KLBE = 0xbb + } + Case (0x03) + { + _SB.PCI0.LPCB.EC.KLBE = 0xaa + } + } }