summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2024-10-29 14:17:48 -0700
committerJérémy Compostella <jeremy.compostella@intel.com>2024-11-27 21:28:22 +0000
commit386b5a9ddfab9c0a2855c4a9f90e9d5ecd0483b0 (patch)
tree881db3cdfc7af261d7463d589d4bbbb24ed0fc82 /src/drivers
parent6e941f99dad04e6476059082ee6129f4788c1491 (diff)
drivers/wifi: Support Bluetooth Dual Mac Mode
This feature provides ability to set the Bluetooth Dual Mac Mode setting. The implementation follows document 559910 Intel Connectivity Platforms BIOS Guideline revision 9.2 specification. BUG=b:346600091 TEST=BDMM method is added to the bluetooth companion device and return the data supplied by the SAR binary blob Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e240 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84946 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/wifi/generic/acpi.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index 4a95b690b4..3cd55e36fe 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -841,6 +841,41 @@ static void sar_emit_bucs(const struct bucs_profile *bucs)
acpigen_write_package_end();
}
+static void sar_emit_bdmm(const struct bdmm_profile *bdmm)
+{
+ if (bdmm == NULL)
+ return;
+
+ /*
+ * Name ("BDMM", Package () {
+ * Revision,
+ * Package () {
+ * Domain Type, // 0x12:Bluetooth
+ * Dual Mac Enable
+ * }
+ * })
+ */
+ if (bdmm->revision != BDMM_REVISION) {
+ printk(BIOS_ERR, "Unsupported BDMM table revision: %d\n",
+ bdmm->revision);
+ return;
+ }
+
+ acpigen_write_name("BDMM");
+ acpigen_write_package(2);
+ acpigen_write_dword(bdmm->revision);
+
+ /*
+ * Emit 'Domain Type' + 'Dual Mac Enable'
+ */
+ acpigen_write_package(2);
+ acpigen_write_dword(DOMAIN_TYPE_BLUETOOTH);
+ acpigen_write_dword(bdmm->dual_mac_enable);
+
+ acpigen_write_package_end();
+ acpigen_write_package_end();
+}
+
static void emit_wifi_sar_acpi_structures(const struct device *dev,
union wifi_sar_limits *sar_limits)
{
@@ -978,6 +1013,7 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco
sar_emit_bdcm(sar_limits.bdcm);
sar_emit_bbsm(sar_limits.bbsm);
sar_emit_bucs(sar_limits.bucs);
+ sar_emit_bdmm(sar_limits.bdmm);
acpigen_write_scope_end();
} else {
printk(BIOS_ERR, "Failed to get %s Bluetooth companion ACPI path\n",