summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-03-23 23:41:53 -0700
committerMartin Roth <martinroth@google.com>2017-03-27 03:03:16 +0200
commit5029a1668e0ca99ac64210967e22c971b0395efa (patch)
treef67df6c276760e91bdb49a4aab393b6894f81408 /src
parent3795b03b69129367d57c93033785d7877aabc2cc (diff)
ec: Use EC_ENABLE_LID_SWITCH for all mainboards with LID using chromeec
Instead of defining a separate LID device for mainboards using chromeec, define EC_ENABLE_LID_SWITCH for these boards. Change-Id: Iac58847c2055fa27c19d02b2dbda6813d6dec3ec Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/18964 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/chromeec/acpi/ec.asl11
-rw-r--r--src/mainboard/google/auron/acpi/ec.asl8
-rw-r--r--src/mainboard/google/auron/acpi/mainboard.asl14
-rw-r--r--src/mainboard/google/chell/acpi/ec.asl4
-rw-r--r--src/mainboard/google/chell/acpi/mainboard.asl11
-rw-r--r--src/mainboard/google/cyan/acpi/ec.asl3
-rw-r--r--src/mainboard/google/cyan/acpi/mainboard.asl10
-rw-r--r--src/mainboard/google/glados/acpi/ec.asl4
-rw-r--r--src/mainboard/google/glados/acpi/mainboard.asl11
-rw-r--r--src/mainboard/google/lars/acpi/ec.asl4
-rw-r--r--src/mainboard/google/lars/acpi/mainboard.asl11
-rw-r--r--src/mainboard/google/link/acpi/ec.asl6
-rw-r--r--src/mainboard/google/link/acpi/mainboard.asl13
-rw-r--r--src/mainboard/google/link/acpi/platform.asl2
-rw-r--r--src/mainboard/google/rambi/acpi/ec.asl6
-rw-r--r--src/mainboard/google/rambi/acpi/mainboard.asl11
-rw-r--r--src/mainboard/google/slippy/acpi/ec.asl8
-rw-r--r--src/mainboard/google/slippy/acpi/mainboard.asl14
-rw-r--r--src/mainboard/google/slippy/acpi/platform.asl2
-rw-r--r--src/mainboard/intel/kblrvp/acpi/ec.asl5
-rw-r--r--src/mainboard/intel/kblrvp/acpi/mainboard.asl13
-rw-r--r--src/mainboard/intel/kunimitsu/acpi/ec.asl4
-rw-r--r--src/mainboard/intel/kunimitsu/acpi/mainboard.asl13
-rw-r--r--src/mainboard/intel/strago/acpi/ec.asl3
-rw-r--r--src/mainboard/intel/strago/acpi/mainboard.asl10
25 files changed, 57 insertions, 144 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 67cee27adf..43520f7545 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -26,9 +26,6 @@ External (\_SB.DPTF.TEVT, MethodObj)
External (\_SB.DPTF.TCHG, DeviceObj)
#endif
External (\_SB.DPTF.TPET, MethodObj)
-#ifndef EC_ENABLE_LID_SWITCH
-External (\_SB.LID0, DeviceObj)
-#endif
Device (EC0)
{
@@ -171,10 +168,6 @@ Device (EC0)
Store (LIDS, \LIDS)
#ifdef EC_ENABLE_LID_SWITCH
Notify (LID0, 0x80)
-#else
- If (CondRefOf (\_SB.LID0)) {
- Notify (\_SB.LID0, 0x80)
- }
#endif
}
@@ -185,10 +178,6 @@ Device (EC0)
Store (LIDS, \LIDS)
#ifdef EC_ENABLE_LID_SWITCH
Notify (LID0, 0x80)
-#else
- If (CondRefOf (\_SB.LID0)) {
- Notify (\_SB.LID0, 0x80)
- }
#endif
}
diff --git a/src/mainboard/google/auron/acpi/ec.asl b/src/mainboard/google/auron/acpi/ec.asl
index e25cd295a3..5740c27d32 100644
--- a/src/mainboard/google/auron/acpi/ec.asl
+++ b/src/mainboard/google/auron/acpi/ec.asl
@@ -19,5 +19,13 @@
/* variant configuration */
#include <variant/acpi/ec.asl>
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+/*
+ * There is no GPIO for LID, the EC pulses WAKE# pin instead.
+ * There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE.
+ */
+#define EC_ENABLE_WAKE_PIN 0x69
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/auron/acpi/mainboard.asl b/src/mainboard/google/auron/acpi/mainboard.asl
index c5b9a83219..7910b6ee3f 100644
--- a/src/mainboard/google/auron/acpi/mainboard.asl
+++ b/src/mainboard/google/auron/acpi/mainboard.asl
@@ -18,20 +18,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name(_HID, EisaId("PNP0C0D"))
- Method(_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
-
- // There is no GPIO for LID, the EC pulses WAKE# pin instead.
- // There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE
- Name (_PRW, Package(){ 0x69, 5 }) // PCI_EXP
- }
-
Device (PWRB)
{
Name(_HID, EisaId("PNP0C0C"))
diff --git a/src/mainboard/google/chell/acpi/ec.asl b/src/mainboard/google/chell/acpi/ec.asl
index e4a35c8b42..3f5a4ac71f 100644
--- a/src/mainboard/google/chell/acpi/ec.asl
+++ b/src/mainboard/google/chell/acpi/ec.asl
@@ -23,5 +23,9 @@
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/chell/acpi/mainboard.asl b/src/mainboard/google/chell/acpi/mainboard.asl
index f2503a89d7..8817ea7217 100644
--- a/src/mainboard/google/chell/acpi/mainboard.asl
+++ b/src/mainboard/google/chell/acpi/mainboard.asl
@@ -17,17 +17,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Return (\_SB.PCI0.LPCB.EC0.LIDS)
- }
-
- Name (_PRW, Package () { GPE_EC_WAKE, 5 })
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/google/cyan/acpi/ec.asl b/src/mainboard/google/cyan/acpi/ec.asl
index d2de7755a1..ab89841f3d 100644
--- a/src/mainboard/google/cyan/acpi/ec.asl
+++ b/src/mainboard/google/cyan/acpi/ec.asl
@@ -17,5 +17,8 @@
/* mainboard configuration */
#include <ec.h>
+/* Enable LID switch */
+#define EC_ENABLE_LID_SWITCH
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/cyan/acpi/mainboard.asl b/src/mainboard/google/cyan/acpi/mainboard.asl
index c9f4017b99..ff73be34bc 100644
--- a/src/mainboard/google/cyan/acpi/mainboard.asl
+++ b/src/mainboard/google/cyan/acpi/mainboard.asl
@@ -19,16 +19,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/google/glados/acpi/ec.asl b/src/mainboard/google/glados/acpi/ec.asl
index b012827e7a..d90d87d189 100644
--- a/src/mainboard/google/glados/acpi/ec.asl
+++ b/src/mainboard/google/glados/acpi/ec.asl
@@ -26,5 +26,9 @@
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/glados/acpi/mainboard.asl b/src/mainboard/google/glados/acpi/mainboard.asl
index f2503a89d7..8817ea7217 100644
--- a/src/mainboard/google/glados/acpi/mainboard.asl
+++ b/src/mainboard/google/glados/acpi/mainboard.asl
@@ -17,17 +17,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Return (\_SB.PCI0.LPCB.EC0.LIDS)
- }
-
- Name (_PRW, Package () { GPE_EC_WAKE, 5 })
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/google/lars/acpi/ec.asl b/src/mainboard/google/lars/acpi/ec.asl
index b012827e7a..d90d87d189 100644
--- a/src/mainboard/google/lars/acpi/ec.asl
+++ b/src/mainboard/google/lars/acpi/ec.asl
@@ -26,5 +26,9 @@
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/lars/acpi/mainboard.asl b/src/mainboard/google/lars/acpi/mainboard.asl
index 4fe3365508..7f62637599 100644
--- a/src/mainboard/google/lars/acpi/mainboard.asl
+++ b/src/mainboard/google/lars/acpi/mainboard.asl
@@ -18,17 +18,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Return (\_SB.PCI0.LPCB.EC0.LIDS)
- }
-
- Name (_PRW, Package () { GPE_EC_WAKE, 5 })
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/google/link/acpi/ec.asl b/src/mainboard/google/link/acpi/ec.asl
index 2e898ede14..f94d8caccb 100644
--- a/src/mainboard/google/link/acpi/ec.asl
+++ b/src/mainboard/google/link/acpi/ec.asl
@@ -19,5 +19,11 @@
/* Enable EC backed Keyboard Backlight in ACPI */
#define EC_ENABLE_KEYBOARD_BACKLIGHT
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+
+/* EC_LID_OUT is GPIO15 */
+#define EC_ENABLE_WAKE_PIN 0x1f
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/link/acpi/mainboard.asl b/src/mainboard/google/link/acpi/mainboard.asl
index 01e99fa60d..aa33d14468 100644
--- a/src/mainboard/google/link/acpi/mainboard.asl
+++ b/src/mainboard/google/link/acpi/mainboard.asl
@@ -17,19 +17,6 @@
#include <mainboard/google/link/onboard.h>
Scope (\_SB) {
- Device (LID0)
- {
- Name(_HID, EisaId("PNP0C0D"))
- Method(_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
-
- // EC_LID_OUT is GPIO15
- Name(_PRW, Package(){0x1f, 0x05})
- }
-
Device (PWRB)
{
Name(_HID, EisaId("PNP0C0C"))
diff --git a/src/mainboard/google/link/acpi/platform.asl b/src/mainboard/google/link/acpi/platform.asl
index c84736a7e1..5c4a6da6c9 100644
--- a/src/mainboard/google/link/acpi/platform.asl
+++ b/src/mainboard/google/link/acpi/platform.asl
@@ -38,7 +38,7 @@ Method(_WAK,1)
Store (\_SB.PCI0.LPCB.EC0.LIDS, Local0)
if (LNotEqual (Local0, \LIDS)) {
Store (Local0, \LIDS)
- Notify (\_SB.LID0, 0x80)
+ Notify (\_SB.PCI0.LPCB.EC0.LID0, 0x80)
}
Return(Package(){0,0})
diff --git a/src/mainboard/google/rambi/acpi/ec.asl b/src/mainboard/google/rambi/acpi/ec.asl
index 93745b42ff..febe102c17 100644
--- a/src/mainboard/google/rambi/acpi/ec.asl
+++ b/src/mainboard/google/rambi/acpi/ec.asl
@@ -16,5 +16,11 @@
/* mainboard configuration */
#include <mainboard/google/rambi/ec.h>
+#include <variant/onboard.h>
+
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN BOARD_PCH_WAKE_GPIO
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/rambi/acpi/mainboard.asl b/src/mainboard/google/rambi/acpi/mainboard.asl
index 520f3e13ab..84136d9bda 100644
--- a/src/mainboard/google/rambi/acpi/mainboard.asl
+++ b/src/mainboard/google/rambi/acpi/mainboard.asl
@@ -18,17 +18,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Name (_PRW, Package() { BOARD_PCH_WAKE_GPIO, 0x5 })
- Method (_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/google/slippy/acpi/ec.asl b/src/mainboard/google/slippy/acpi/ec.asl
index 58b9a55cc4..d4f62c4c91 100644
--- a/src/mainboard/google/slippy/acpi/ec.asl
+++ b/src/mainboard/google/slippy/acpi/ec.asl
@@ -16,5 +16,13 @@
/* mainboard configuration */
#include "../ec.h"
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+/*
+ * There is no GPIO for LID, the EC pulses WAKE# pin instead.
+ * There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE.
+ */
+#define EC_ENABLE_WAKE_PIN 0x69
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/google/slippy/acpi/mainboard.asl b/src/mainboard/google/slippy/acpi/mainboard.asl
index 35bc1b4ca5..7605e9e57c 100644
--- a/src/mainboard/google/slippy/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/acpi/mainboard.asl
@@ -16,20 +16,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name(_HID, EisaId("PNP0C0D"))
- Method(_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
-
- // There is no GPIO for LID, the EC pulses WAKE# pin instead.
- // There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE
- Name (_PRW, Package(){ 0x69, 5 }) // PCI_EXP
- }
-
Device (PWRB)
{
Name(_HID, EisaId("PNP0C0C"))
diff --git a/src/mainboard/google/slippy/acpi/platform.asl b/src/mainboard/google/slippy/acpi/platform.asl
index 1bd054da06..7074336fa2 100644
--- a/src/mainboard/google/slippy/acpi/platform.asl
+++ b/src/mainboard/google/slippy/acpi/platform.asl
@@ -75,7 +75,7 @@ Method(_WAK,1)
Store (\_SB.PCI0.LPCB.EC0.LIDS, Local0)
if (LNotEqual (Local0, \LIDS)) {
Store (Local0, \LIDS)
- Notify (\_SB.LID0, 0x80)
+ Notify (\_SB.PCI0.LPCB.EC0.LID0, 0x80)
}
Return(Package(){0,0})
diff --git a/src/mainboard/intel/kblrvp/acpi/ec.asl b/src/mainboard/intel/kblrvp/acpi/ec.asl
index 01fa75c6ff..a9a61ddc2c 100644
--- a/src/mainboard/intel/kblrvp/acpi/ec.asl
+++ b/src/mainboard/intel/kblrvp/acpi/ec.asl
@@ -23,6 +23,11 @@
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
+
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
#endif
diff --git a/src/mainboard/intel/kblrvp/acpi/mainboard.asl b/src/mainboard/intel/kblrvp/acpi/mainboard.asl
index 4764372778..0041ee6e1d 100644
--- a/src/mainboard/intel/kblrvp/acpi/mainboard.asl
+++ b/src/mainboard/intel/kblrvp/acpi/mainboard.asl
@@ -14,22 +14,9 @@
* GNU General Public License for more details.
*/
-#include <variant/gpio.h>
-
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Return (\_SB.PCI0.LPCB.EC0.LIDS)
- }
-
- Name (_PRW, Package () { GPE_EC_WAKE, 5 })
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/intel/kunimitsu/acpi/ec.asl b/src/mainboard/intel/kunimitsu/acpi/ec.asl
index 2203e2f7f0..4599e1266f 100644
--- a/src/mainboard/intel/kunimitsu/acpi/ec.asl
+++ b/src/mainboard/intel/kunimitsu/acpi/ec.asl
@@ -23,5 +23,9 @@
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
+/* Enable LID switch and provide wake pin for EC */
+#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/intel/kunimitsu/acpi/mainboard.asl b/src/mainboard/intel/kunimitsu/acpi/mainboard.asl
index 4fe3365508..c615dc3ea3 100644
--- a/src/mainboard/intel/kunimitsu/acpi/mainboard.asl
+++ b/src/mainboard/intel/kunimitsu/acpi/mainboard.asl
@@ -14,21 +14,8 @@
* GNU General Public License for more details.
*/
-#include "../gpio.h"
-
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Return (\_SB.PCI0.LPCB.EC0.LIDS)
- }
-
- Name (_PRW, Package () { GPE_EC_WAKE, 5 })
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
diff --git a/src/mainboard/intel/strago/acpi/ec.asl b/src/mainboard/intel/strago/acpi/ec.asl
index f4ac2956bd..e023f3ba2b 100644
--- a/src/mainboard/intel/strago/acpi/ec.asl
+++ b/src/mainboard/intel/strago/acpi/ec.asl
@@ -17,5 +17,8 @@
/* mainboard configuration */
#include "ec.h"
+/* Enable LID switch */
+#define EC_ENABLE_LID_SWITCH
+
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
diff --git a/src/mainboard/intel/strago/acpi/mainboard.asl b/src/mainboard/intel/strago/acpi/mainboard.asl
index 0353eede4e..17c83bf09e 100644
--- a/src/mainboard/intel/strago/acpi/mainboard.asl
+++ b/src/mainboard/intel/strago/acpi/mainboard.asl
@@ -19,16 +19,6 @@
Scope (\_SB)
{
- Device (LID0)
- {
- Name (_HID, EisaId ("PNP0C0D"))
- Method (_LID, 0)
- {
- Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
- Return (\LIDS)
- }
- }
-
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))