drivers/usb/acpi: Add a Power Resource for Intel Bluetooth
Add a Power Resource for Intel Bluetooth, that can reset the Bluetooth using the delay configured in the DSM. Change-Id: I3b25fd180e21100e3cb001fc6ba0da7f47b2ad12 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84146 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f0e1b8b149
commit
2ec9addc30
1 changed files with 67 additions and 0 deletions
|
|
@ -129,6 +129,73 @@ static void acpi_device_intel_bt(void)
|
|||
};
|
||||
|
||||
acpigen_write_dsm_uuid_arr(uuid_callbacks, ARRAY_SIZE(uuid_callbacks));
|
||||
/*
|
||||
* PowerResource (BTRT, 0x05, 0x0000)
|
||||
* {
|
||||
* Method (_STA, 0, NotSerialized)
|
||||
* {
|
||||
* Return (One)
|
||||
* }
|
||||
* Method (_ON, 0, NotSerialized)
|
||||
* {
|
||||
* }
|
||||
* Method (_OFF, 0, NotSerialized)
|
||||
* {
|
||||
* }
|
||||
* Method (_RST, 0, NotSerialized)
|
||||
* {
|
||||
* Local0 = Acquire (CNMT, 0x03E8)
|
||||
* If ((Local0 == Zero))
|
||||
* {
|
||||
* BTRK (Zero)
|
||||
* Sleep (RDLY)
|
||||
* BTRK (One)
|
||||
* Sleep (RDLY)
|
||||
* }
|
||||
* Release (CNMT)
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
acpigen_write_power_res("BTRT", 5, 0, NULL, 0);
|
||||
{
|
||||
acpigen_write_method("_STA", 0);
|
||||
{
|
||||
acpigen_write_return_integer(1);
|
||||
}
|
||||
acpigen_pop_len();
|
||||
|
||||
acpigen_write_method("_ON", 0);
|
||||
acpigen_pop_len();
|
||||
|
||||
acpigen_write_method("_OFF", 0);
|
||||
acpigen_pop_len();
|
||||
|
||||
acpigen_write_method("_RST", 0);
|
||||
{
|
||||
acpigen_write_store();
|
||||
acpigen_write_acquire("CNMT", 0x03e8);
|
||||
acpigen_emit_byte(LOCAL0_OP);
|
||||
|
||||
acpigen_write_if_lequal_op_int(LOCAL0_OP, 0);
|
||||
{
|
||||
acpigen_emit_namestring("BTRK");
|
||||
acpigen_emit_byte(0);
|
||||
|
||||
acpigen_emit_ext_op(SLEEP_OP);
|
||||
acpigen_emit_namestring("RDLY");
|
||||
|
||||
acpigen_emit_namestring("BTRK");
|
||||
acpigen_emit_byte(1);
|
||||
|
||||
acpigen_emit_ext_op(SLEEP_OP);
|
||||
acpigen_emit_namestring("RDLY");
|
||||
}
|
||||
acpigen_pop_len();
|
||||
acpigen_write_release("CNMT");
|
||||
}
|
||||
acpigen_pop_len();
|
||||
}
|
||||
acpigen_write_power_res_end();
|
||||
}
|
||||
|
||||
static bool usb_acpi_add_gpios_to_crs(struct drivers_usb_acpi_config *cfg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue