Matt Delco has uploaded this change for review. ( https://review.coreboot.org/27607
Change subject: ec/google/chromeec/acpi: Replace TBMC device with Intel Device
......................................................................
ec/google/chromeec/acpi: Replace TBMC device with Intel Device
The TBMC device has a subset of the functionality of Intel's
Virtual Buttons device. Replacing the former with the latter
will help to avoid the need to support a separate and dedicated
driver in the future.
I tested on eve that a change works with a kernel that contains
a driver for the device.
Change-Id: Id486c540ecbb4c0b7a045e05405ef589aebe03c8
Signed-off-by: Matt Delco <delco(a)chromium.org>
---
M src/ec/google/chromeec/acpi/ec.asl
D src/ec/google/chromeec/acpi/tbmc.asl
A src/ec/google/chromeec/acpi/vbtn.asl
3 files changed, 53 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/27607/1
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 94917dd..36cfcde 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -375,7 +375,11 @@
\_SB.DPTF.TPET()
#endif
#ifdef EC_ENABLE_TBMC_DEVICE
- Notify (TBMC, 0x80)
+ If (LEqual ((^TBMD), One)) {
+ Notify (VBTN, 0xCC)
+ } Else {
+ Notify (VBTN, 0xCD)
+ }
#endif
}
@@ -548,6 +552,6 @@
#endif
#ifdef EC_ENABLE_TBMC_DEVICE
- #include "tbmc.asl"
+ #include "vbtn.asl"
#endif
}
diff --git a/src/ec/google/chromeec/acpi/tbmc.asl b/src/ec/google/chromeec/acpi/tbmc.asl
deleted file mode 100644
index 25a27ef1b..0000000
--- a/src/ec/google/chromeec/acpi/tbmc.asl
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2017 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 (TBMC)
-{
- Name (_HID, "GOOG0006")
- Name (_UID, 1)
- Name (_DDN, "Tablet Motion Control")
- Method (TBMC)
- {
- If (LEqual (^^RCTM, One)) {
- Return (0x1)
- } Else {
- Return (0x0)
- }
- }
-}
diff --git a/src/ec/google/chromeec/acpi/vbtn.asl b/src/ec/google/chromeec/acpi/vbtn.asl
new file mode 100644
index 0000000..83eb092
--- /dev/null
+++ b/src/ec/google/chromeec/acpi/vbtn.asl
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2017 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.
+ */
+
+// VGBS reports 0x40 when NOT in tablet mode.
+// Device is sent event 0xCB/0xCC for tablet mode, 0xCA/0xCD for laptop mode
+Device (VBTN)
+{
+ Name (_HID, "INT33D6")
+ Name (_DDN, "Tablet Virtual Buttons")
+ Method (_STA, 0, Serialized)
+ {
+ Return (0x0f)
+ }
+ Method (VBDL, 0, Serialized)
+ {
+ }
+ Method (VGBS)
+ {
+ If (LEqual (^^RCTM, One)) {
+ Return (0x0)
+ } Else {
+ Return (0x40)
+ }
+ }
+}
+
+Device (VBTO)
+{
+ Name (_HID, "INT33D3")
+ Name (_CID, "PNP0C60")
+ Method (_STA, 0, Serialized)
+ {
+ Return (0x0f)
+ }
+}
--
To view, visit https://review.coreboot.org/27607
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id486c540ecbb4c0b7a045e05405ef589aebe03c8
Gerrit-Change-Number: 27607
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Matt Delco has uploaded this change for review. ( https://review.coreboot.org/27606
Change subject: mainboard/google: set type to convertible
......................................................................
mainboard/google: set type to convertible
A subsequent change will change which acpi device is used
to signal tablet mode changes. The intel-vbtn driver
on Linux has a workaround that checks that the type
is a chasis, so systems that will use this driver
need to specify they're a convertible.
Change-Id: I05772d9d822ea5756e9dd8bf5b478046c5de3c5f
Signed-off-by: Matt Delco <delco(a)chromium.org>
---
M src/mainboard/google/eve/Kconfig
M src/mainboard/google/octopus/Kconfig
M src/mainboard/google/poppy/Kconfig
M src/mainboard/google/reef/Kconfig
4 files changed, 46 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/27606/1
diff --git a/src/mainboard/google/eve/Kconfig b/src/mainboard/google/eve/Kconfig
index 7c98339..8da66fe 100644
--- a/src/mainboard/google/eve/Kconfig
+++ b/src/mainboard/google/eve/Kconfig
@@ -69,6 +69,11 @@
int
default 8
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
config INCLUDE_NHLT_BLOBS
bool "Include blobs for audio."
select NHLT_RT5514
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig
index dc58ec8..ebbcd4f 100644
--- a/src/mainboard/google/octopus/Kconfig
+++ b/src/mainboard/google/octopus/Kconfig
@@ -100,4 +100,22 @@
int
default 63 # GPE0_DW1_31 (GPIO_63)
+if BOARD_GOOGLE_PHASER
+
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
+endif # BOARD_GOOGLE_PHASER
+
+if BOARD_GOOGLE_YORP
+
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
+endif # BOARD_GOOGLE_YORP
+
endif # BOARD_GOOGLE_OCTOPUS
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index 06501f7..54622dd 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -118,6 +118,24 @@
string "OEM ID table"
default ""
+if BOARD_GOOGLE_NAUTILUS
+
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
+endif # BOARD_GOOGLE_NAUTILUS
+
+if BOARD_GOOGLE_NAMI
+
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
+endif # BOARD_GOOGLE_NAMI
+
config TPM_TIS_ACPI_INTERRUPT
int
default 64 # GPE0_DW2_00 (GPP_E0)
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 09b2e61..d1a0632 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -109,4 +109,9 @@
default 0xe00 if CHROMEOS
default 0xc00
+# This type is checked by Linux tablet mode driver (intel-vbtn)
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x1f # SMBIOS_ENCLOSURE_CONVERTIBLE
+
endif # BOARD_GOOGLE_REEF
--
To view, visit https://review.coreboot.org/27606
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I05772d9d822ea5756e9dd8bf5b478046c5de3c5f
Gerrit-Change-Number: 27606
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Lijian Zhao has posted comments on this change. ( https://review.coreboot.org/27605 )
Change subject: mainboard/google/nocturne: simplify camera power references
......................................................................
Patch Set 1:
Either one is fine, you can see ACPI spec chapter 19 for ASL 2.0 operator, that can make it more simple and closer to regular C
--
To view, visit https://review.coreboot.org/27605
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9c9f6c712b075450539d5b84ac5bb221b3cbb57e
Gerrit-Change-Number: 27605
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Gerrit-Assignee: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Lijian Zhao <lijian.zhao(a)intel.com>
Gerrit-Reviewer: Rajmohan Mani <rajmohan.mani(a)intel.com>
Gerrit-Reviewer: Tomasz Figa <tfiga(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 23 Jul 2018 18:19:30 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/27605 )
Change subject: mainboard/google/nocturne: simplify camera power references
......................................................................
Patch Set 1:
> Patch Set 1:
>
> +Rajmohan, +Tomasz to comment on the reference count and how the kernel driver is handling it.
Looking at the linux kernel side of implementation: https://github.com/torvalds/linux/blob/master/drivers/acpi/power.c#L280, I agree with Matt, that this is already handled by acpi_power_off_unlocked to ensure that the power resource doesn't get turned off before its refcount drops to 0. So, the check in coreboot ACPI table seems redundant.
--
To view, visit https://review.coreboot.org/27605
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9c9f6c712b075450539d5b84ac5bb221b3cbb57e
Gerrit-Change-Number: 27605
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Gerrit-Assignee: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Lijian Zhao <lijian.zhao(a)intel.com>
Gerrit-Reviewer: Rajmohan Mani <rajmohan.mani(a)intel.com>
Gerrit-Reviewer: Tomasz Figa <tfiga(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-Comment-Date: Mon, 23 Jul 2018 18:00:30 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/27605 )
Change subject: mainboard/google/nocturne: simplify camera power references
......................................................................
Patch Set 1:
+Rajmohan, +Tomasz to comment on the reference count and how the kernel driver is handling it.
--
To view, visit https://review.coreboot.org/27605
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9c9f6c712b075450539d5b84ac5bb221b3cbb57e
Gerrit-Change-Number: 27605
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Gerrit-Assignee: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Lijian Zhao <lijian.zhao(a)intel.com>
Gerrit-Reviewer: Rajmohan Mani <rajmohan.mani(a)intel.com>
Gerrit-Reviewer: Tomasz Figa <tfiga(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-Comment-Date: Mon, 23 Jul 2018 17:55:43 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No