ec/lenovo/h8/ssdt: Add UWB ACPI interface
Add ACPI methods GUWB and SUWB for thinkpad_acpi. Required for power control of the UWB module. Change-Id: I8f9a56e45c0d765b0e06b8d3600bd3575dd09491 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/21003 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
6b7178aa10
commit
f281b6d175
|
@ -46,6 +46,9 @@ Device(EC)
|
|||
Offset (0x30),
|
||||
, 6,
|
||||
ALMT, 1, /* Audio Mute + LED */
|
||||
Offset (0x31),
|
||||
, 2,
|
||||
UWBE, 1, /* Ultra Wideband enable */
|
||||
Offset (0x3a),
|
||||
AMUT, 1, /* Audio Mute (internal use) */
|
||||
, 3,
|
||||
|
|
|
@ -20,6 +20,7 @@ Device (HKEY)
|
|||
External (\HBDC, IntObj)
|
||||
External (\HWAN, IntObj)
|
||||
External (\HKBL, IntObj)
|
||||
External (\HUWB, IntObj)
|
||||
|
||||
Name (_HID, EisaId ("IBM0068"))
|
||||
|
||||
|
@ -259,4 +260,35 @@ Device (HKEY)
|
|||
Store (And(Arg0, 1), \_SB.PCI0.LPCB.EC.WWEB)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the current state:
|
||||
* Bit 0: UWB HW present
|
||||
* Bit 1: UWB radio enabled
|
||||
*/
|
||||
Method (GUWB, 0)
|
||||
{
|
||||
If (HUWB) {
|
||||
Store (One, Local0)
|
||||
If(\_SB.PCI0.LPCB.EC.UWBE)
|
||||
{
|
||||
Or(Local0, 2, Local0)
|
||||
}
|
||||
Return (Local0)
|
||||
} Else {
|
||||
Return (0)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the current state:
|
||||
* Bit 1: UWB radio enabled
|
||||
*/
|
||||
Method (SUWB, 1)
|
||||
{
|
||||
If (HUWB) {
|
||||
ShiftRight (And(Arg0, 2), 1, Local0)
|
||||
Store (Local0, \_SB.PCI0.LPCB.EC.UWBE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ void h8_ssdt_generator(struct device *dev)
|
|||
acpigen_write_name_byte("HWAN", h8_has_wwan(dev) ? ONE_OP : ZERO_OP);
|
||||
acpigen_write_name_byte("HKBL", (conf && conf->has_keyboard_backlight) ?
|
||||
ONE_OP : ZERO_OP);
|
||||
acpigen_write_name_byte("HUWB", (conf && conf->has_uwb) ?
|
||||
ONE_OP : ZERO_OP);
|
||||
|
||||
acpigen_pop_len(); /* Scope HKEY */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue