drivers/usb/acpi: Add _PRR Method for Intel Bluetooth

Since version 6.6, Linux has warned about the lack of a
_PRR Method being available for Intel Bluetooth. Add one
that follows the recommendations from Intel in their
connectivity integrated guide, that uses the reset
delay set by the DSM.

Change-Id: I9c7fd286e8630d77d79d1d7cd113ce3a3d3d0fe3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84145
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes 2024-08-30 13:47:57 +01:00 committed by Martin L Roth
commit 0b16bb85eb
3 changed files with 42 additions and 3 deletions

View file

@ -87,7 +87,7 @@ struct drivers_usb_acpi_config {
bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld);
/* Intel Bluetooth */
void acpi_device_intel_bt(void);
void acpi_device_intel_bt(unsigned int reset_gpio);
void acpi_device_intel_bt_common(void);
#endif /* __USB_ACPI_CHIP_H__ */

View file

@ -53,7 +53,7 @@ static void get_feature_flag(void *arg)
void (*uuid_callbacks1[])(void *) = { check_reset_delay, set_reset_delay };
void (*uuid_callbacks2[])(void *) = { get_feature_flag };
void acpi_device_intel_bt(void)
void acpi_device_intel_bt(unsigned int reset_gpio)
{
/*
* Name (RDLY, 0x69)
@ -192,6 +192,45 @@ void acpi_device_intel_bt(void)
acpigen_pop_len();
}
acpigen_write_power_res_end();
/*
* Method (BTRK, 1, Serialized)
* {
* If (Arg0 == 1)
* {
* STXS (reset_gpio)
* } Else {
* CTXS (reset_gpio)
* }
* }
*/
acpigen_write_method_serialized("BTRK", 1);
{
acpigen_write_if_lequal_op_int(ARG0_OP, 1);
{
acpigen_soc_set_tx_gpio(reset_gpio);
}
acpigen_write_else();
{
acpigen_soc_clear_tx_gpio(reset_gpio);
}
acpigen_pop_len();
}
acpigen_pop_len();
/*
* Name (_PRR, Package (0x01)
* {
* BTRT
* })
*/
acpigen_write_name("_PRR");
{
acpigen_write_package(1);
acpigen_emit_namestring("BTRT");
}
acpigen_pop_len();
}
void acpi_device_intel_bt_common(void)

View file

@ -108,7 +108,7 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev)
}
if (config->is_intel_bluetooth)
acpi_device_intel_bt();
acpi_device_intel_bt(config->reset_gpio.pins[0]);
acpigen_pop_len();