summaryrefslogtreecommitdiff
path: root/src/drivers/usb/acpi/intel_bluetooth.c
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-08-30 13:47:57 +0100
committerMartin L Roth <gaumless@gmail.com>2024-10-09 01:24:39 +0000
commit0b16bb85ebcd0b2238051daf9ab61508d722b7df (patch)
tree12a9c4cd9f2fab45f37ebaa5293479ef97a6ac2d /src/drivers/usb/acpi/intel_bluetooth.c
parentac5d5172ab3c10567eaa71d8a8ca9891e6c492bd (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/acpi/intel_bluetooth.c')
-rw-r--r--src/drivers/usb/acpi/intel_bluetooth.c41
1 files changed, 40 insertions, 1 deletions
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)