Skip to contentSkip to conversation

Bluetooth: btbcm: Add entries for BCM4364B3 UART Bluetooth

PATCH Superseded Jason Perlow 3 participants 4 messages Nov 16 – Nov 22 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: btbcm: Add entries for BCM4364B3 UART Bluetooth

The BCM4364B3 combo chip on Apple T2 Macs, e.g. the MacBookPro16,1, has a UART Bluetooth controller that reports LMP subversion 0x3032 (001.016.050) on some units and 0x305b (001.016.091) on others. Neither has an entry in bcm_uart_subver_table, so the controller is logged without a name:

Bluetooth: hci0: BCM4364B3 Trinidad Olympic GEN (MFG)
Bluetooth: hci0: BCM (001.016.091) build 0115

and the firmware lookup only tries the generic "brcm/BCM.hcd".

Add both subversions so the controller is named and its firmware is looked up as "brcm/BCM4364B3.hcd" first. Tested on two MacBookPro16,1 with a v7.4-rc3 based kernel carrying an equivalent change, one reporting 0x3032 and one reporting 0x305b. They now log:

Bluetooth: hci0: BCM4364B3 (001.016.050) build 0082
Bluetooth: hci0: BCM4364B3 (001.016.091) build 0115

---
 drivers/bluetooth/btbcm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/btbcm.c +2 -0
index 065536d4ec..92ba7aeac3 100644
@@ -519,6 +519,8 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
 	{ 0x2119, "BCM4373A0"	},	/* 001.001.025 */
 	{ 0x2128, "BCM4384A0"	},	/* 001.001.040 */
 	{ 0x4119, "BCM4384B0"	},	/* 002.001.025 */
+	{ 0x3032, "BCM4364B3"	},	/* 001.016.050 */
+	{ 0x305b, "BCM4364B3"	},	/* 001.016.091 */
 	{ }
 };
 -- 2.56.0
#1 lore raw

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: corrupt patch at line 12
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

Please resolve the issue and submit the patches again.

---
Regards,
Linux Bluetooth

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jason Perlow

Dear Jason,

Thank you for your patch.

Am 16.11.26 um 22:38 schrieb Jason Perlow:

Quoted 10 lines

The BCM4364B3 combo chip on Apple T2 Macs, e.g. the MacBookPro16,1, has a UART Bluetooth controller that reports LMP subversion 0x3032 (001.016.050) on some units and 0x305b (001.016.091) on others.  Neither has an entry in bcm_uart_subver_table, so the controller is logged without a name:

  Bluetooth: hci0: BCM4364B3 Trinidad Olympic GEN (MFG)
  Bluetooth: hci0: BCM (001.016.091) build 0115

and the firmware lookup only tries the generic "brcm/BCM.hcd".

Quoted 7 lines

Add both subversions so the controller is named and its firmware is looked up as "brcm/BCM4364B3.hcd" first.  Tested on two MacBookPro16,1 with a v7.4-rc3 based kernel carrying an equivalent change, one reporting 0x3032 and one reporting 0x305b.  They now log:

  Bluetooth: hci0: BCM4364B3 (001.016.050) build 0082
  Bluetooth: hci0: BCM4364B3 (001.016.091) build 0115

Is this only about the logs, or does functionality also change, that BT starts working, or did it work before already?

Quoted 10 lines
---
  drivers/bluetooth/btbcm.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/bluetooth/btbcm.c +0 -0
index 065536d4ec..92ba7aeac3 100644

drivers/bluetooth/btbcm.c static const struct bcm_subver_table · line 524

Quoted 6 lines
drivers/bluetooth/btbcm.c +2 -0
@@ -519,6 +519,8 @@ static const struct bcm_subver_table 
 bcm_uart_subver_table[] = {
      { 0x2119, "BCM4373A0"    },    /* 001.001.025 */
      { 0x2128, "BCM4384A0"    },    /* 001.001.040 */
      { 0x4119, "BCM4384B0"    },    /* 002.001.025 */
+    { 0x3032, "BCM4364B3"    },    /* 001.016.050 */
+    { 0x305b, "BCM4364B3"    },    /* 001.016.091 */

Sort it?

drivers/bluetooth/btbcm.c static const struct bcm_subver_table · line 526

Quoted 2 lines
drivers/bluetooth/btbcm.c +0 -0
      { }
  };

With my comments addressed, feel free to add:

Kind regards,

Paul

#3 lore raw

Hi Paul,

Thanks for looking at it. (Resending as plain text; the first copy of this reply bounced from the lists because of an HTML part.)

As tested it is about naming and the firmware lookup. The controller already came up without the entries, but it was logged without a name and the driver only tried the generic brcm/BCM.hcd. With the entries it is named BCM4364B3 and brcm/BCM4364B3.hcd is tried first. I only checked the log output and that the controller still initialises on both units; I have not compared pairing or throughput before and after, and I am not aware of a unit where Bluetooth did not work without this. The commit message now says that explicitly so it does not read as a bug fix.

You are right about the order. The table is ascending by subversion here, so v2 puts 0x3032 and 0x305b between 0x2128 and 0x4119.

v2 is already out as a separate mail (<[email protected]>) with your Reviewed-by added, as you offered.

Thanks,
Jason