diff options
Diffstat (limited to 'src/drivers')
-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(); |