Skip to content

Commit c3d1fd9

Browse files
kirankrishnappa-intelVudentz
authored andcommitted
Bluetooth: btintel: Add DSBR support for BlazarIW, BlazarU and GaP
Add DSBR support for BlazarIW, BlazarU and Gale Peak2 cores. Refer commit eb9e749 ("Bluetooth: btintel: Allow configuring drive strength of BRI") for details about DSBR. Signed-off-by: Kiran K <kiran.k@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent 7902a76 commit c3d1fd9

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

drivers/bluetooth/btintel.c

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,20 +2747,32 @@ static int btintel_set_dsbr(struct hci_dev *hdev, struct intel_version_tlv *ver)
27472747

27482748
struct btintel_dsbr_cmd cmd;
27492749
struct sk_buff *skb;
2750+
u32 dsbr, cnvi;
27502751
u8 status;
2751-
u32 dsbr;
2752-
bool apply_dsbr;
27532752
int err;
27542753

2755-
/* DSBR command needs to be sent for BlazarI + B0 step product after
2756-
* downloading IML image.
2754+
cnvi = ver->cnvi_top & 0xfff;
2755+
/* DSBR command needs to be sent for,
2756+
* 1. BlazarI or BlazarIW + B0 step product in IML image.
2757+
* 2. Gale Peak2 or BlazarU in OP image.
27572758
*/
2758-
apply_dsbr = (ver->img_type == BTINTEL_IMG_IML &&
2759-
((ver->cnvi_top & 0xfff) == BTINTEL_CNVI_BLAZARI) &&
2760-
INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01);
27612759

2762-
if (!apply_dsbr)
2760+
switch (cnvi) {
2761+
case BTINTEL_CNVI_BLAZARI:
2762+
case BTINTEL_CNVI_BLAZARIW:
2763+
if (ver->img_type == BTINTEL_IMG_IML &&
2764+
INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01)
2765+
break;
2766+
return 0;
2767+
case BTINTEL_CNVI_GAP:
2768+
case BTINTEL_CNVI_BLAZARU:
2769+
if (ver->img_type == BTINTEL_IMG_OP &&
2770+
hdev->bus == HCI_USB)
2771+
break;
27632772
return 0;
2773+
default:
2774+
return 0;
2775+
}
27642776

27652777
dsbr = 0;
27662778
err = btintel_uefi_get_dsbr(&dsbr);

drivers/bluetooth/btintel.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ struct intel_tlv {
5353
} __packed;
5454

5555
#define BTINTEL_CNVI_BLAZARI 0x900
56+
#define BTINTEL_CNVI_BLAZARIW 0x901
57+
#define BTINTEL_CNVI_GAP 0x910
58+
#define BTINTEL_CNVI_BLAZARU 0x930
5659

5760
#define BTINTEL_IMG_BOOTLOADER 0x01 /* Bootloader image */
5861
#define BTINTEL_IMG_IML 0x02 /* Intermediate image */

0 commit comments

Comments
 (0)