From 5f4ee47c6c6e9ed0b49f3c39192249a7ab5ceed2 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sat, 16 Jan 2016 17:43:16 -0800 Subject: ec: Add support for EC used on Purism Librem laptops This adds basic ACPI support for the EC used on Purism Librem laptops. The EC firmware appears to use the topstar laptop interface that has support in the linux kernel for handling the special keys. Supported functions: - Battery information - AC presence - Lid switch - Special keys (after loading topstar-laptop driver in linux) - EC events for turbo enable/disable when on AC power Things it does not do: - EC SMI handling - Fan is left under EC control This was developed and tested on a Librem 13 laptop, and has not been directly tested on an Librem 15. Change-Id: Ib85a24e4cc8ab09b14147060043cff372863c2d1 Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/13025 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Martin Roth --- src/ec/purism/librem/acpi/ac.asl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/ec/purism/librem/acpi/ac.asl (limited to 'src/ec/purism/librem/acpi/ac.asl') diff --git a/src/ec/purism/librem/acpi/ac.asl b/src/ec/purism/librem/acpi/ac.asl new file mode 100644 index 0000000000..99d17ee104 --- /dev/null +++ b/src/ec/purism/librem/acpi/ac.asl @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2016 Google Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +Device (AC) +{ + Name (_HID, "ACPI0003") + Name (_PCL, Package () { \_SB }) + + Method (_PSR) + { + Return (ACEX) + } + + Method (_STA) + { + Return (0x0F) + } +} -- cgit v1.2.3