a288f5ed3cc07e8ef798024dcf57377a7883ee8c
[openwrt/staging/ldir.git] / target / linux / bcm27xx / patches-5.4 / 950-0876-Bluetooth-hci_bcm-Fix-RTS-handling-during-startup.patch
1 From 44843cf006346751e42c0f4100eea7cefe61cbdf Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <wahrenst@gmx.net>
3 Date: Sun, 6 Oct 2019 17:28:19 +0200
4 Subject: [PATCH] Bluetooth: hci_bcm: Fix RTS handling during startup
5
6 commit 3347a80965b38f096b1d6f995c00c9c9e53d4b8b upstream.
7
8 The RPi 4 uses the hardware handshake lines for CYW43455, but the chip
9 doesn't react to HCI requests during DT probe. The reason is the inproper
10 handling of the RTS line during startup. According to the startup
11 signaling sequence in the CYW43455 datasheet, the hosts RTS line must
12 be driven after BT_REG_ON and BT_HOST_WAKE.
13
14 Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
15 Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
16 ---
17 drivers/bluetooth/hci_bcm.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20 --- a/drivers/bluetooth/hci_bcm.c
21 +++ b/drivers/bluetooth/hci_bcm.c
22 @@ -448,9 +448,11 @@ static int bcm_open(struct hci_uart *hu)
23
24 out:
25 if (bcm->dev) {
26 + hci_uart_set_flow_control(hu, true);
27 hu->init_speed = bcm->dev->init_speed;
28 hu->oper_speed = bcm->dev->oper_speed;
29 err = bcm_gpio_set_power(bcm->dev, true);
30 + hci_uart_set_flow_control(hu, false);
31 if (err)
32 goto err_unset_hu;
33 }