ec/chromeec: Add Kconfig and asl for vendor tablet ACPI

Introduce EC_CHROMEEC_USE_VENDOR_TABLET_CONTROLS to control inclusion of
Intel VBTN and AMD VGBI ACPI devices used for tablet/convertible mode.
Default is y for non-ChromeOS builds when the board selects
SYSTEM_TYPE_CONVERTIBLE or SYSTEM_TYPE_DETACHABLE.

Add vbtn.asl (Intel INT33D6/INT33D3) and vgbi.asl (AMD AMD33D6/AMD33D3).
In ec.asl, gate VBTN/VGBI notify and these includes on the new config.

Boards that are convertibles or detachables will enable the vendor
tablet controls by selecting the appropriate SMBIOS enclosure type in
subsequent changes.

Change-Id: I208c1f1856a9223af5109464ecf316e76de3a976
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91742
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
This commit is contained in:
Matt DeVillier 2026-03-18 18:35:51 -05:00
commit ecab793650
4 changed files with 97 additions and 0 deletions

View file

@ -267,6 +267,14 @@ config EC_GOOGLE_CHROMEEC_LED_CONTROL
Enable manual AP control over ChromeEC LEDs/lightbars to ensure
visual continuity with AP-side boot animations.
config EC_CHROMEEC_USE_VENDOR_TABLET_CONTROLS
bool "Include vendor tablet mode controls (VBTN/VGBI) in ACPI"
default y if !CHROMEOS && (SYSTEM_TYPE_CONVERTIBLE || SYSTEM_TYPE_DETACHABLE)
help
Include ACPI devices for tablet mode / convertible controls (Intel VBTN,
AMD VGBI). Default is enabled for non-ChromeOS builds when the board
reports SMBIOS enclosure type convertible or detachable.
endif # EC_GOOGLE_CHROMEEC
source "src/ec/google/chromeec/*/Kconfig"

View file

@ -461,6 +461,18 @@ Device (EC0)
#ifdef EC_ENABLE_TBMC_DEVICE
Notify (^CREC.TBMC, 0x80)
#endif
#if CONFIG(EC_CHROMEEC_USE_VENDOR_TABLET_CONTROLS)
#if CONFIG(SOC_INTEL_COMMON)
If (^TBMD == 1) {
Notify (VBTN, 0xCC)
} Else {
Notify (VBTN, 0xCD)
}
#endif
#if CONFIG(SOC_AMD_COMMON)
Notify (VGBI, 0x81)
#endif
#endif
#if CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC)
If (CondRefOf (\_SB.DPTC)) {
\_SB.DPTC()
@ -667,4 +679,13 @@ Device (EC0)
#ifdef EC_ENABLE_KEYBOARD_BACKLIGHT
#include "keyboard_backlight.asl"
#endif
#if CONFIG(EC_CHROMEEC_USE_VENDOR_TABLET_CONTROLS)
#if CONFIG(SOC_INTEL_COMMON)
#include "vbtn.asl"
#endif
#if CONFIG(SOC_AMD_COMMON)
#include "vgbi.asl"
#endif
#endif
}

View file

@ -0,0 +1,38 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* VGBS reports 0x40 when NOT in tablet mode. */
/* Sent event 0xCC for tablet mode, 0xCD for laptop */
/* Linux driver expects SMBIOS_ENCLOSURE_TYPE=SMBIOS_ENCLOSURE_CONVERTIBLE */
Device (VBTN)
{
Name (_HID, "INT33D6")
Name (_DDN, "Tablet Virtual Buttons")
Method (VBDL, 0)
{
}
Method (VGBS)
{
If (^^RCTM == 1) {
Return (0x0)
} Else {
Return (0x40)
}
}
Method(_STA, 0)
{
Return (0xF)
}
}
Device (VBTO)
{
Name (_HID, "INT33D3")
Name (_CID, "PNP0C60")
Method (_STA, 0)
{
Return (0xF)
}
}

View file

@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-only */
Device (CIND)
{
Name (_HID, "AMD33D3") // _HID: Hardware ID
Name (_CID, "PNP0C60" /* Display Sensor Device */) // _CID: Compatible ID
Method (_STA, 0, Serialized) // _STA: Status
{
Return (0x0F)
}
}
Device (VGBI)
{
Name (_HID, "AMD33D6") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Method (AMWF, 0, Serialized)
{
If (^^RCTM == 1) {
Return (0)
} Else {
Return (1)
}
}
}