summaryrefslogtreecommitdiff
path: root/src/include/sar.h
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2024-10-30 11:26:27 -0700
committerJérémy Compostella <jeremy.compostella@intel.com>2024-11-27 21:28:28 +0000
commitc8ab1db0c65f4ffbdebd384abba455af005bd0a5 (patch)
tree3596a893fb98ec8ebd55fbfa22ea1e34e7578f19 /src/include/sar.h
parent386b5a9ddfab9c0a2855c4a9f90e9d5ecd0483b0 (diff)
drivers/wifi: Support Extended Bluetooth Regulatory Descriptor
Extended Bluetooth Regulatory Descriptor (EBRD) SAR/RFE are safety regulations for limiting antenna radiation near human contact. EBRD provides option to provide up to three sets of TX power limits and power restrictions. As the EBRD table is related to the revision 2 of the BRDS, this commit also adds support for this new revision. The implementation follows document 559910 Intel Connectivity Platforms BIOS Guideline revision 9.2 specification. BUG=b:346600091 TEST=EBRD method is added to the bluetooth companion device and return the data supplied by the SAR binary blob Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e250 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84947 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/sar.h')
-rw-r--r--src/include/sar.h46
1 files changed, 37 insertions, 9 deletions
diff --git a/src/include/sar.h b/src/include/sar.h
index 4643b24f86..44fcd1e322 100644
--- a/src/include/sar.h
+++ b/src/include/sar.h
@@ -9,9 +9,9 @@
#define MAX_DENYLIST_ENTRY 16
#define MAX_DSAR_SET_COUNT 3
#define MAX_GEO_OFFSET_REVISION 3
-#define MAX_PROFILE_COUNT 13
+#define MAX_PROFILE_COUNT 14
#define MAX_SAR_REVISION 2
-#define BSAR_REVISION 1
+#define MAX_BSAR_REVISION 2
#define WBEM_REVISION 0
#define BPAG_REVISION 2
#define BBFB_REVISION 1
@@ -19,6 +19,7 @@
#define BBSM_REVISION 1
#define BUCS_REVISION 1
#define BDMM_REVISION 1
+#define EBRD_REVISION 1
#define REVISION_SIZE 1
#define SAR_REV0_CHAINS_COUNT 2
#define SAR_REV0_SUBBANDS_COUNT 5
@@ -70,16 +71,32 @@ struct dsm_profile {
uint32_t rfi_mitigation;
};
+struct sar_power_table {
+ uint8_t restriction_for_2g4;
+ uint8_t restriction_for_5g2;
+ uint8_t restriction_for_5g8_5g9;
+ uint8_t restriction_for_6g1;
+ uint8_t restriction_for_6g3;
+} __packed;
+
struct bsar_profile {
uint8_t revision;
uint8_t increased_power_mode_limitation;
- uint8_t sar_lb_power_restriction;
- uint8_t br_modulation;
- uint8_t edr2_modulation;
- uint8_t edr3_modulation;
- uint8_t le_modulation;
- uint8_t le2_mhz_modulation;
- uint8_t le_lr_modulation;
+ union {
+ struct rev1 {
+ uint8_t sar_lb_power_restriction;
+ uint8_t br_modulation;
+ uint8_t edr2_modulation;
+ uint8_t edr3_modulation;
+ uint8_t le_modulation;
+ uint8_t le2_mhz_modulation;
+ uint8_t le_lr_modulation;
+ } rev1;
+ struct rev2 {
+ struct sar_power_table set_1_chain_a;
+ struct sar_power_table set_1_chain_b;
+ } rev2;
+ } revs;
} __packed;
struct wbem_profile {
@@ -117,6 +134,16 @@ struct bdmm_profile {
uint8_t dual_mac_enable;
} __packed;
+struct ebrd_profile {
+ uint8_t revision;
+ uint32_t dynamic_sar_enable;
+ uint32_t number_of_optional_sar;
+ struct {
+ struct sar_power_table chain_a;
+ struct sar_power_table chain_b;
+ } sar_table_sets[3];
+} __packed;
+
struct sar_header {
char marker[SAR_STR_PREFIX_SIZE];
uint8_t version;
@@ -139,6 +166,7 @@ union wifi_sar_limits {
struct bbsm_profile *bbsm;
struct bucs_profile *bucs;
struct bdmm_profile *bdmm;
+ struct ebrd_profile *ebrd;
};
void *profile[MAX_PROFILE_COUNT];
};