From ab5eb89a6f272bf0af49737cb8a4392f566e7b13 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 30 May 2019 05:28:56 +0300 Subject: ec/apple: Add ACPI code for Apple MacBooks - Move ACPI code for Apple MacBooks to a separate directory to avoid its duplication in mainboards - Add AC and lid implementations for newer generations - Rewrite old code using the new ASL syntax Tested on MBA 5,2, MBP 8,1 and MBP 10,1. Change-Id: I3d4585aac8e3ebbfed6ce4d4e39fbc33ac983069 Signed-off-by: Evgeny Zinoviev Reviewed-on: https://review.coreboot.org/c/coreboot/+/33102 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/ec/apple/acpi/ac.asl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/ec/apple/acpi/ac.asl (limited to 'src/ec/apple/acpi/ac.asl') diff --git a/src/ec/apple/acpi/ac.asl b/src/ec/apple/acpi/ac.asl new file mode 100644 index 0000000000..0103229936 --- /dev/null +++ b/src/ec/apple/acpi/ac.asl @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +Scope(\_SB.PCI0.LPCB.EC) +{ + Field(ERAM, ByteAcc, NoLock, Preserve) + { + Offset(HPAC_OFFSET), + , 1, + HPAC, 1, /* AC status */ + } + + Device(AC) + { + Name(_HID, "ACPI0003") + Name(_UID, 0x00) + Name(_PCL, Package() { \_SB } ) + + Method(_PSR, 0, NotSerialized) + { + Return(HPAC) + } + + Method(_STA, 0, NotSerialized) + { + Return(0x0f) + } + } +} -- cgit v1.2.3