diff options
author | Sean Rhodes <sean@starlabs.systems> | 2024-08-30 13:47:57 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-10-09 01:24:39 +0000 |
commit | 0b16bb85ebcd0b2238051daf9ab61508d722b7df (patch) | |
tree | 12a9c4cd9f2fab45f37ebaa5293479ef97a6ac2d /src/drivers/usb | |
parent | ac5d5172ab3c10567eaa71d8a8ca9891e6c492bd (diff) |
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>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r-- | src/drivers/usb/acpi/chip.h | 2 | ||||
-rw-r--r-- | src/drivers/usb/acpi/intel_bluetooth.c | 41 | ||||
-rw-r--r-- | src/drivers/usb/acpi/usb_acpi.c | 2 |
3 files changed, 42 insertions, 3 deletions
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h index 8d2ed919fa..5e41d24f50 100644 --- a/src/drivers/usb/acpi/chip.h +++ b/src/drivers/usb/acpi/chip.h @@ -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__ */ diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c index 38ef0bb390..773f1ad743 100644 --- a/src/drivers/usb/acpi/intel_bluetooth.c +++ b/src/drivers/usb/acpi/intel_bluetooth.c @@ -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) diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index 6d72fe7e56..f1622921c9 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -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(); |