Dmitry Torokhov has uploaded this change for review. ( https://review.coreboot.org/28260
Change subject: google/chromeec: Add support for "base attached switch" device ......................................................................
google/chromeec: Add support for "base attached switch" device
On some detachables, the mere presence of attached base is not enough to determine whether the device is in tablet mode or not, so we introducing a new "switch" in EC, separate from "Tablet Mode" switch, to signal whether the base is attached or not.
We also want the driver to be separate from cros_ec_keyb, so we create a new ACPI device, C(hrome)B(ase)A(ttached)S(witch), with HID GOOG0010, and guard it with EC_ENABLE_CBAS_DEVICE.
Also enable this option on Nocturne.
Change-Id: Id73a12f04a1a48f7fbd9365c2a501afadf3878fa Signed-off-by: Dmitry Torokhov dtor@chromium.org --- M src/ec/google/chromeec/acpi/cros_ec.asl M src/mainboard/google/poppy/variants/nocturne/include/variant/ec.h 2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/28260/1
diff --git a/src/ec/google/chromeec/acpi/cros_ec.asl b/src/ec/google/chromeec/acpi/cros_ec.asl index b246fe3..4699397 100644 --- a/src/ec/google/chromeec/acpi/cros_ec.asl +++ b/src/ec/google/chromeec/acpi/cros_ec.asl @@ -30,4 +30,13 @@ Name (_DDN, "EC MKBP Device") } #endif + +#ifdef EC_ENABLE_CBAS_DEVICE + Device (CBAS) + { + Name (_HID, "GOOG0010") + Name (_UID, 1) + Name (_DDN, "EC Base Switch Device") + } +#endif } diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/ec.h b/src/mainboard/google/poppy/variants/nocturne/include/variant/ec.h index 92c7467..7e16801 100644 --- a/src/mainboard/google/poppy/variants/nocturne/include/variant/ec.h +++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/ec.h @@ -77,5 +77,6 @@ #define SIO_EC_HOST_ENABLE /* EC Host Interface Resources */
#define EC_ENABLE_MKBP_DEVICE /* Enable cros_ec_keyb device */ +#define EC_ENABLE_CBAS_DEVICE /* Enable "Base Attached Switch" device */
#endif /* __MAINBOARD_EC_H__ */