Lean Sheng Tan has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84992?usp=email )
Change subject: drivers/usb/intel_bluetooth: Add GBTR Method ......................................................................
drivers/usb/intel_bluetooth: Add GBTR Method
Add GBTR Method, which gets the state of the RF Kill pin. Unlike the VGPIO, this can be used for both CNVi and full PCI wireless cards.
Change-Id: I8d025f63192218399b8d5e60e847853e54a8353c Signed-off-by: Sean Rhodes sean@starlabs.systems Reviewed-on: https://review.coreboot.org/c/coreboot/+/84992 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nicholas Sudsgaard devel+coreboot@nsudsgaard.com --- M src/drivers/usb/acpi/intel_bluetooth.c M src/soc/intel/common/block/cnvi/cnvi.c 2 files changed, 19 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Nicholas Sudsgaard: Looks good to me, approved
diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c index 56f31ae..4cefcf2 100644 --- a/src/drivers/usb/acpi/intel_bluetooth.c +++ b/src/drivers/usb/acpi/intel_bluetooth.c @@ -335,5 +335,22 @@ } acpigen_pop_len();
+/* + * Method (GBTR, 0, NotSerialized) + * { + * Return (GTXS (reset_gpio)) + * } + */ + acpigen_write_method("GBTR", 0); + { + if (reset_gpio) { + acpigen_soc_get_tx_gpio(reset_gpio); + acpigen_write_return_op(LOCAL0_OP); + } else { + acpigen_write_return_op(0); + } + } + acpigen_pop_len(); + acpigen_pop_len(); } diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c index d50913f..93f0cae 100644 --- a/src/soc/intel/common/block/cnvi/cnvi.c +++ b/src/soc/intel/common/block/cnvi/cnvi.c @@ -129,7 +129,7 @@ * If (((PCRR (CNVI_SIDEBAND_ID, CNVI_ABORT_PLDR) & CNVI_ABORT_REQUEST) == Zero)) * { * Local2 = Zero - * If ((_SB.PCI0.GBTE() == One)) + * If ((_SB.PCI0.GBTR() == One)) * { * _SB.PCI0.BTRK (Zero) * Sleep (105) @@ -209,7 +209,7 @@ acpigen_write_if_lequal_op_int(LOCAL0_OP, 0); { acpigen_write_store_int_to_op(0, LOCAL2_OP); - acpigen_write_if_lequal_namestr_int("\_SB.PCI0.GBTE", 1); + acpigen_write_if_lequal_namestr_int("\_SB.PCI0.GBTR", 1); { acpigen_emit_namestring("\_SB.PCI0.BTRK"); acpigen_emit_byte(0);