Meera Ravindranath has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69431 )
Change subject: src/drivers/usb: Add support for Bluetooth PPAG ......................................................................
src/drivers/usb: Add support for Bluetooth PPAG
Add support for BT PPAG ACPI bios configuration table as per 559910_Intel_Connectivity_Platforms_BIOS_Guidelines_Rev7_1.
BUG=b:232915103 TEST=Build,boot the platform and check if the below structure is is visible in the SSDT dump
Name (PPAG, Package (0x02) { 0x00000001, Package (0x02) { 0x00000012, 0x00000000 } })
Signed-off-by: Meera Ravindranath meera.ravindranath@intel.com Change-Id: Ie264edf188532fe6c260275edaa694cf3b3605d3 --- M src/drivers/usb/acpi/chip.h M src/drivers/usb/acpi/usb_acpi.c 2 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/69431/1
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h index 4adffcf..3d3bd0d 100644 --- a/src/drivers/usb/acpi/chip.h +++ b/src/drivers/usb/acpi/chip.h @@ -60,6 +60,9 @@ /* Delay to be inserted after device is disabled. */ unsigned int enable_off_delay_ms;
+ /* BT PPAG */ + bool bt_ppag_config; + unsigned int bt_ppag_mode; /* * Define a GPIO that shows the privacy status of the USB device. * E.g. On a camera: if it is one, it is recording black frames. diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index f72129c..dfd88e2 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -8,6 +8,9 @@ #include <device/path.h> #include "chip.h"
+#define DOMAIN_TYPE_BT 0x12 +#define PPAG_REVISION 1 + static bool usb_acpi_add_gpios_to_crs(struct drivers_usb_acpi_config *cfg) { if (cfg->privacy_gpio.pin_count) @@ -51,11 +54,34 @@ acpigen_write_name_string("_DDN", config->desc); acpigen_write_upc(config->type);
+ /* + * Name ("PPAG", Package () { + * Revision, + * Package () { + * Domain Type, // 0x12: BT Core + * PPAG Mode, // Defines the mode of ANT_gain control to be used + * } + * }) + */ + + if (config->bt_ppag_config == true) { + acpigen_write_name("PPAG"); + acpigen_write_package(2); + acpigen_write_dword(PPAG_REVISION); + acpigen_write_package(2); + acpigen_write_dword(DOMAIN_TYPE_BT); + acpigen_write_dword(config->bt_ppag_mode); + + acpigen_write_package_end(); + acpigen_write_package_end(); + } + if (usb_acpi_get_pld(dev, &pld)) acpigen_write_pld(&pld); else printk(BIOS_ERR, "Error retrieving PLD for %s\n", path);
+ /* Resources */ if (usb_acpi_add_gpios_to_crs(config) == true) { struct acpi_dp *dsd;