summaryrefslogtreecommitdiffstats
path: root/src/mainboard/system76/lemp9/acpi/s76.asl
diff options
context:
space:
mode:
authorJeremy Soller <jeremy@system76.com>2020-07-20 12:31:07 -0600
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2020-07-23 09:30:22 +0000
commit0de0fe110468cfd609a0aaa42ea9a4c29740e507 (patch)
treed44cc7211e9e44a6fd2712cfaf25b0db761ed6a0 /src/mainboard/system76/lemp9/acpi/s76.asl
parentb8d6af9569632745966199a21833f0ad426ca140 (diff)
downloadcoreboot-0de0fe110468cfd609a0aaa42ea9a4c29740e507.tar.gz
coreboot-0de0fe110468cfd609a0aaa42ea9a4c29740e507.tar.bz2
coreboot-0de0fe110468cfd609a0aaa42ea9a4c29740e507.zip
ec/system76_ec: add support for System76 EC
This adds ACPI code for System76 EC and converts system76/lemp9 to use EC_SYSTEM76_EC. Tested on system76/lemp9. Signed-off-by: Jeremy Soller <jeremy@system76.com> Change-Id: I1f693268d94b693b6764e4a3baf4c3180689f3be Reviewed-on: https://review.coreboot.org/c/coreboot/+/43612 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Michael Niewöhner
Diffstat (limited to 'src/mainboard/system76/lemp9/acpi/s76.asl')
-rw-r--r--src/mainboard/system76/lemp9/acpi/s76.asl84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/mainboard/system76/lemp9/acpi/s76.asl b/src/mainboard/system76/lemp9/acpi/s76.asl
deleted file mode 100644
index 399e56973426..000000000000
--- a/src/mainboard/system76/lemp9/acpi/s76.asl
+++ /dev/null
@@ -1,84 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-// Notifications:
-// 0x80 - hardware backlight toggle
-// 0x81 - backlight toggle
-// 0x82 - backlight down
-// 0x83 - backlight up
-// 0x84 - backlight color change
-Device (S76D) {
- Name (_HID, "17761776")
- Name (_UID, 0)
-
- Method (RSET, 0, Serialized) {
- Debug = "S76D: RSET"
- SAPL(0)
- SKBL(0)
- }
-
- Method (INIT, 0, Serialized) {
- Debug = "S76D: INIT"
- RSET()
- If (^^PCI0.LPCB.EC0.ECOK) {
- // Set flags to use software control
- ^^PCI0.LPCB.EC0.ECOS = 2
- Return (0)
- } Else {
- Return (1)
- }
- }
-
- Method (FINI, 0, Serialized) {
- Debug = "S76D: FINI"
- RSET()
- If (^^PCI0.LPCB.EC0.ECOK) {
- // Set flags to use hardware control
- ^^PCI0.LPCB.EC0.ECOS = 1
- Return (0)
- } Else {
- Return (1)
- }
- }
-
- // Get Airplane LED
- Method (GAPL, 0, Serialized) {
- If (^^PCI0.LPCB.EC0.ECOK) {
- If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
- Return (1)
- }
- }
- Return (0)
- }
-
- // Set Airplane LED
- Method (SAPL, 1, Serialized) {
- If (^^PCI0.LPCB.EC0.ECOK) {
- If (Arg0) {
- ^^PCI0.LPCB.EC0.AIRP |= 0x40
- } Else {
- ^^PCI0.LPCB.EC0.AIRP &= 0xBF
- }
- }
- }
-
- // Get KB LED
- Method (GKBL, 0, Serialized) {
- Local0 = 0
- If (^^PCI0.LPCB.EC0.ECOK) {
- ^^PCI0.LPCB.EC0.FDAT = One
- ^^PCI0.LPCB.EC0.FCMD = 0xCA
- Local0 = ^^PCI0.LPCB.EC0.FBUF
- ^^PCI0.LPCB.EC0.FCMD = Zero
- }
- Return (Local0)
- }
-
- // Set KB Led
- Method (SKBL, 1, Serialized) {
- If (^^PCI0.LPCB.EC0.ECOK) {
- ^^PCI0.LPCB.EC0.FDAT = Zero
- ^^PCI0.LPCB.EC0.FBUF = Arg0
- ^^PCI0.LPCB.EC0.FCMD = 0xCA
- }
- }
-}