Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
mb/apple/macbookair4_2: Add ACPI support for EC

Add ACPI support for battery, AC and lid.

I don't have MacBook Air 4,2 to test, but:

- I tested it on 5,2;
- I found decompiled DSDT for 4,2 and compared registers and bits,
they are the same as on 5,2.

So it should work.

Change-Id: I592cb4501c878fe46684a524e729d32fb1d7920c
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M src/mainboard/apple/macbookair4_2/acpi/ec.asl
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mainboard/apple/macbookair4_2/acpi/ec.asl b/src/mainboard/apple/macbookair4_2/acpi/ec.asl
index 7ee0e29..75f766b 100644
--- a/src/mainboard/apple/macbookair4_2/acpi/ec.asl
+++ b/src/mainboard/apple/macbookair4_2/acpi/ec.asl
@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */

-Device(EC)
-{
- Name (_HID, EISAID("PNP0C09"))
- Name (_UID, 0)
- Name (_GPE, 23)
-/* FIXME: EC support */
-}
+#define LIDS_OFFSET 0x60
+#define HPAC_OFFSET 0x60
+#define WKLD_OFFSET 0x68
+
+#include <ec/apple/acpi/ec.asl>
+#include <ec/apple/acpi/ac.asl>
+#include <ec/apple/acpi/lid.asl>

To view, visit change 33103. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I592cb4501c878fe46684a524e729d32fb1d7920c
Gerrit-Change-Number: 33103
Gerrit-PatchSet: 12
Gerrit-Owner: Evgeny Zinoviev <me@ch1p.io>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Evgeny Zinoviev <me@ch1p.io>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged