2022-06-20 12:05:18

by Hakan Jansson

[permalink] [raw]
Subject: [PATCH 0/4] Bluetooth: hci_bcm: Improve FW load time on CYW55572

These patches add an optional device specific data member to specify max
baudrate of a device when in autobaud mode. This allows the host to set a
first baudrate higher than "init speed" to improve FW load time.

The host baudrate will later be changed to "init speed" (as usual) once FW
loading is complete and the device has been reset to begin normal
operation.

Hakan Jansson (4):
dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding
Bluetooth: hci_bcm: Add DT compatible for CYW55572
Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode
Bluetooth: hci_bcm: Increase host baudrate for CYW55572 in autobaud
mode

.../bindings/net/broadcom-bluetooth.yaml | 1 +
drivers/bluetooth/hci_bcm.c | 24 +++++++++++++------
2 files changed, 18 insertions(+), 7 deletions(-)


base-commit: 0b537674e072a37dec2fcefef4df2317b58aaa3f
--
2.25.1


2022-06-20 12:05:35

by Hakan Jansson

[permalink] [raw]
Subject: [PATCH 2/4] Bluetooth: hci_bcm: Add DT compatible for CYW55572

CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon.

Signed-off-by: Hakan Jansson <[email protected]>
---
drivers/bluetooth/hci_bcm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 6f834ff1b44b..9a129867a4c0 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -1557,6 +1557,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = {
{ .compatible = "brcm,bcm4349-bt", .data = &bcm43438_device_data },
{ .compatible = "brcm,bcm43540-bt", .data = &bcm4354_device_data },
{ .compatible = "brcm,bcm4335a0" },
+ { .compatible = "infineon,cyw55572-bt" },
{ },
};
MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
--
2.25.1

2022-06-20 12:05:43

by Hakan Jansson

[permalink] [raw]
Subject: [PATCH 3/4] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode

Always prevent trying to set device baudrate before calling setup() when
using autobaud mode.

This was previously happening for devices which had device specific data
with member no_early_set_baudrate set to 0.

Signed-off-by: Hakan Jansson <[email protected]>
---
drivers/bluetooth/hci_bcm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 9a129867a4c0..0ae627c293c5 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu)
/* If oper_speed is set, ldisc/serdev will set the baudrate
* before calling setup()
*/
- if (!bcm->dev->no_early_set_baudrate)
+ if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode)
hu->oper_speed = bcm->dev->oper_speed;

err = bcm_gpio_set_power(bcm->dev, true);
@@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev)
{
bdev->use_autobaud_mode = device_property_read_bool(bdev->dev,
"brcm,requires-autobaud-mode");
- if (bdev->use_autobaud_mode)
- bdev->no_early_set_baudrate = true;
-
device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed);
device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params",
bdev->pcm_int_params, 5);
--
2.25.1

2022-06-28 12:46:20

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 3/4] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode

On Mon, Jun 20, 2022 at 2:02 PM Hakan Jansson
<[email protected]> wrote:

> Always prevent trying to set device baudrate before calling setup() when
> using autobaud mode.
>
> This was previously happening for devices which had device specific data
> with member no_early_set_baudrate set to 0.
>
> Signed-off-by: Hakan Jansson <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij