diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h index a27ce4468c..f5edba4f58 100644 --- a/src/drivers/usb/acpi/chip.h +++ b/src/drivers/usb/acpi/chip.h @@ -91,6 +91,7 @@ bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld); void acpi_device_intel_bt(unsigned int reset_gpio, unsigned int enable_gpio, bool audio_offload); -void acpi_device_intel_bt_common(unsigned int enable_gpio); +void acpi_device_intel_bt_common(unsigned int enable_gpio, + unsigned int reset_gpio); #endif /* __USB_ACPI_CHIP_H__ */ diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c index 978d6ee10e..56f31aedf4 100644 --- a/src/drivers/usb/acpi/intel_bluetooth.c +++ b/src/drivers/usb/acpi/intel_bluetooth.c @@ -117,9 +117,9 @@ void acpi_device_intel_bt(unsigned int reset_gpio, unsigned int enable_gpio, boo * Local0 = Acquire (\_SB.PCI0.CNMT, 1000) * If ((Local0 == Zero)) * { - * BTRK (Zero) + * \_SB.PCI0.BTRK (Zero) * Sleep (RDLY) - * BTRK (One) + * \_SB.PCI0.BTRK (One) * Sleep (RDLY) * Release (\_SB.PCI0.CNMT) } @@ -169,13 +169,13 @@ void acpi_device_intel_bt(unsigned int reset_gpio, unsigned int enable_gpio, boo acpigen_write_if_lequal_op_int(LOCAL0_OP, 0); { - acpigen_emit_namestring("BTRK"); + acpigen_emit_namestring("\\_SB.PCI0.BTRK"); acpigen_emit_byte(0); acpigen_emit_ext_op(SLEEP_OP); acpigen_emit_namestring("RDLY"); - acpigen_emit_namestring("BTRK"); + acpigen_emit_namestring("\\_SB.PCI0.BTRK"); acpigen_emit_byte(1); acpigen_emit_ext_op(SLEEP_OP); @@ -190,31 +190,6 @@ void acpi_device_intel_bt(unsigned int reset_gpio, unsigned int enable_gpio, boo } 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) * { @@ -283,7 +258,7 @@ void acpi_device_intel_bt(unsigned int reset_gpio, unsigned int enable_gpio, boo acpigen_pop_len(); } -void acpi_device_intel_bt_common(unsigned int enable_gpio) +void acpi_device_intel_bt_common(unsigned int enable_gpio, unsigned int reset_gpio) { acpigen_write_scope("\\_SB.PCI0"); /* @@ -335,5 +310,30 @@ void acpi_device_intel_bt_common(unsigned int enable_gpio) } acpigen_pop_len(); +/* + * 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(); + acpigen_pop_len(); } diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index 8960e3d05b..6408a88189 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -119,7 +119,8 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev) * other code to access it i.e. CNVi driver. */ if (config->is_intel_bluetooth) - acpi_device_intel_bt_common(config->enable_gpio.pins[0]); + acpi_device_intel_bt_common(config->enable_gpio.pins[0], + config->reset_gpio.pins[0]); printk(BIOS_INFO, "%s: %s at %s\n", path, config->desc ? : dev->chip_ops->name, dev_path(dev)); diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c index 591dfd8857..b995ef38eb 100644 --- a/src/soc/intel/common/block/cnvi/cnvi.c +++ b/src/soc/intel/common/block/cnvi/cnvi.c @@ -131,7 +131,7 @@ static void cnvw_fill_ssdt(const struct device *dev) * Local2 = Zero * If ((GBTE() == One)) * { - * BTRK (Zero) + * \_SB.PCI0.BTRK (Zero) * Sleep (105) * Local2 = One * } @@ -143,7 +143,7 @@ static void cnvw_fill_ssdt(const struct device *dev) * PRRS = CNVI_PLDR_COMPLETE * If ((Local2 == One)) * { - * BTRK (One) + * \_SB.PCI0.BTRK (One) * Sleep (105) * } * } @@ -211,7 +211,7 @@ static void cnvw_fill_ssdt(const struct device *dev) acpigen_write_store_int_to_op(0, LOCAL2_OP); acpigen_write_if_lequal_namestr_int("\\_SB.PCI0.GBTE", 1); { - acpigen_emit_namestring("BTRK"); + acpigen_emit_namestring("\\_SB.PCI0.BTRK"); acpigen_emit_byte(0); acpigen_write_sleep(105); @@ -251,7 +251,7 @@ static void cnvw_fill_ssdt(const struct device *dev) acpigen_write_if_lequal_op_int(LOCAL2_OP, 1); { - acpigen_emit_namestring("BTRK"); + acpigen_emit_namestring("\\_SB.PCI0.BTRK"); acpigen_emit_byte(1); acpigen_write_sleep(105); }