Merge ~sil2100/bluez:groovy-pi400 into ~bluetooth/bluez:groovy

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 6bea78502a1d60c1d60278ad34a72a3929456c1f
Proposed branch: ~sil2100/bluez:groovy-pi400
Merge into: ~bluetooth/bluez:groovy
Diff against target: 130 lines (+96/-0)
5 files modified
debian/changelog (+10/-0)
debian/patches/raspi-bcm43xx-3wire.patch (+20/-0)
debian/patches/raspi-bcm43xx-load-firmware.patch (+39/-0)
debian/patches/raspi-cypress-305-bdaddr.patch (+23/-0)
debian/patches/series (+4/-0)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Bluetooth Pending
Review via email: mp+393549@code.launchpad.net

Commit message

Add patches fixing Bluetooth operation on the Pi 400.

Description of the change

Add patches fixing Bluetooth operation on the Pi 400. Real backport to groovy.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I'm not happy with the changes (comments on the bug now) but since it's uploaded already let's get the Vcs in sync at least

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 31ea352..f43f1db 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+bluez (5.55-0ubuntu1.1) groovy; urgency=medium
7+
8+ * Added patches from the Raspberry Pi Foundation
9+ - d/p/raspi-bcm43xx-load-firmware.patch
10+ - d/p/raspi-bcm43xx-3wire.patch
11+ - d/p/raspi-cypress-305-bdaddr.patch
12+ * These patches fix Bluetooth operation on the Pi 400 (LP: #1903048)
13+
14+ -- Dave Jones <dave.jones@canonical.com> Thu, 05 Nov 2020 13:39:07 +0000
15+
16 bluez (5.55-0ubuntu1) groovy; urgency=medium
17
18 * New upstream release 5.55 (LP: #1895640)
19diff --git a/debian/patches/raspi-bcm43xx-3wire.patch b/debian/patches/raspi-bcm43xx-3wire.patch
20new file mode 100644
21index 0000000..32405bd
22--- /dev/null
23+++ b/debian/patches/raspi-bcm43xx-3wire.patch
24@@ -0,0 +1,20 @@
25+Author: Simon Long <simon@raspberrypi.org>
26+Forwarded: no
27+Last-Update: 2017-04-05
28+Description: Patches to add BCM43xx 3-wire variant
29+ This patch adds the bcm43xx-3wire variant to the hciattach tool; this is
30+ for use when the mini-UART (which lacks flow-control) is used instead of the
31+ PL011 UART to drive the bluetooth module
32+
33+--- a/tools/hciattach.c
34++++ b/tools/hciattach.c
35+@@ -1091,6 +1091,9 @@
36+ { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
37+ FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
38+
39++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
40++ 0, DISABLE_PM, NULL, bcm43xx, NULL },
41++
42+ { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
43+ FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
44+
45diff --git a/debian/patches/raspi-bcm43xx-load-firmware.patch b/debian/patches/raspi-bcm43xx-load-firmware.patch
46new file mode 100644
47index 0000000..b673a3d
48--- /dev/null
49+++ b/debian/patches/raspi-bcm43xx-load-firmware.patch
50@@ -0,0 +1,39 @@
51+Author: Simon Long <simon@raspberrypi.org>
52+Forwarded: no
53+Last-Update: 2017-04-05
54+Description: Patches for loading the bcm43xx firmware
55+ This patch corrects the location of the firmware from /etc/firmware to
56+ /lib/firmware, and disables setting the UART interface speed *before* loading
57+ the firmware (a later call sets the speed of the interface as requested). It
58+ also introduces a short wait after the firmware load before the module is
59+ reset.
60+
61+--- a/tools/hciattach_bcm43xx.c
62++++ b/tools/hciattach_bcm43xx.c
63+@@ -44,7 +44,7 @@
64+ #include "hciattach.h"
65+
66+ #ifndef FIRMWARE_DIR
67+-#define FIRMWARE_DIR "/etc/firmware"
68++#define FIRMWARE_DIR "/lib/firmware"
69+ #endif
70+
71+ #define FW_EXT ".hcd"
72+@@ -369,9 +369,6 @@
73+ if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
74+ fprintf(stderr, "Patch not found, continue anyway\n");
75+ } else {
76+- if (bcm43xx_set_speed(fd, ti, speed))
77+- return -1;
78+-
79+ if (bcm43xx_load_firmware(fd, fw_path))
80+ return -1;
81+
82+@@ -381,6 +378,7 @@
83+ return -1;
84+ }
85+
86++ sleep(1);
87+ if (bcm43xx_reset(fd))
88+ return -1;
89+ }
90diff --git a/debian/patches/raspi-cypress-305-bdaddr.patch b/debian/patches/raspi-cypress-305-bdaddr.patch
91new file mode 100644
92index 0000000..9267f19
93--- /dev/null
94+++ b/debian/patches/raspi-cypress-305-bdaddr.patch
95@@ -0,0 +1,23 @@
96+From: Phil Elwell <phil@raspberrypi.com>
97+Forwarded: no
98+Subject: Patch Cypress 305 devices to behave as Broadcom devices
99+
100+---
101+ tools/bdaddr.c | 1 +
102+ 1 file changed, 1 insertion(+)
103+
104+diff --git a/tools/bdaddr.c b/tools/bdaddr.c
105+index 952e99077..55fad4b46 100644
106+--- a/tools/bdaddr.c
107++++ b/tools/bdaddr.c
108+@@ -316,6 +316,7 @@ static struct {
109+ { 48, st_write_bd_addr, generic_reset_device },
110+ { 57, ericsson_write_bd_addr, generic_reset_device },
111+ { 72, mrvl_write_bd_addr, generic_reset_device },
112++ { 305, bcm_write_bd_addr, generic_reset_device },
113+ { 65535, NULL, NULL },
114+ };
115+
116+--
117+2.25.1
118+
119diff --git a/debian/patches/series b/debian/patches/series
120index deaf0d9..5306a28 100644
121--- a/debian/patches/series
122+++ b/debian/patches/series
123@@ -12,3 +12,7 @@ lp1759836.patch
124 0002-hostname-handle-chassis-type-handset.patch
125
126 ubuntu_error_restart.patch
127+
128+raspi-bcm43xx-load-firmware.patch
129+raspi-bcm43xx-3wire.patch
130+raspi-cypress-305-bdaddr.patch

Subscribers

People subscribed via source and target branches

to all changes: