diff -Nru bluez-5.55/debian/changelog bluez-5.55/debian/changelog --- bluez-5.55/debian/changelog 2020-09-15 10:17:32.000000000 +0100 +++ bluez-5.55/debian/changelog 2020-11-05 13:39:07.000000000 +0000 @@ -1,3 +1,13 @@ +bluez (5.55-0ubuntu2) hirsute; urgency=medium + + * Added patches from the Raspberry Pi Foundation + - d/p/raspi-bcm43xx-load-firmware.patch + - d/p/raspi-bcm43xx-3wire.patch + - d/p/raspi-cypress-305-bdaddr.patch + * These patches fix Bluetooth operation on the Pi 400 (LP: #1903048) + + -- Dave Jones Thu, 05 Nov 2020 13:39:07 +0000 + bluez (5.55-0ubuntu1) groovy; urgency=medium * New upstream release 5.55 (LP: #1895640) diff -Nru bluez-5.55/debian/patches/raspi-bcm43xx-3wire.patch bluez-5.55/debian/patches/raspi-bcm43xx-3wire.patch --- bluez-5.55/debian/patches/raspi-bcm43xx-3wire.patch 1970-01-01 01:00:00.000000000 +0100 +++ bluez-5.55/debian/patches/raspi-bcm43xx-3wire.patch 2020-11-05 13:39:07.000000000 +0000 @@ -0,0 +1,20 @@ +Author: Simon Long +Forwarded: no +Last-Update: 2017-04-05 +Description: Patches to add BCM43xx 3-wire variant + This patch adds the bcm43xx-3wire variant to the hciattach tool; this is + for use when the mini-UART (which lacks flow-control) is used instead of the + PL011 UART to drive the bluetooth module + +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1091,6 +1091,9 @@ + { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000, + FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL }, + ++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000, ++ 0, DISABLE_PM, NULL, bcm43xx, NULL }, ++ + { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, + diff -Nru bluez-5.55/debian/patches/raspi-bcm43xx-load-firmware.patch bluez-5.55/debian/patches/raspi-bcm43xx-load-firmware.patch --- bluez-5.55/debian/patches/raspi-bcm43xx-load-firmware.patch 1970-01-01 01:00:00.000000000 +0100 +++ bluez-5.55/debian/patches/raspi-bcm43xx-load-firmware.patch 2020-11-05 13:39:07.000000000 +0000 @@ -0,0 +1,39 @@ +Author: Simon Long +Forwarded: no +Last-Update: 2017-04-05 +Description: Patches for loading the bcm43xx firmware + This patch corrects the location of the firmware from /etc/firmware to + /lib/firmware, and disables setting the UART interface speed *before* loading + the firmware (a later call sets the speed of the interface as requested). It + also introduces a short wait after the firmware load before the module is + reset. + +--- a/tools/hciattach_bcm43xx.c ++++ b/tools/hciattach_bcm43xx.c +@@ -44,7 +44,7 @@ + #include "hciattach.h" + + #ifndef FIRMWARE_DIR +-#define FIRMWARE_DIR "/etc/firmware" ++#define FIRMWARE_DIR "/lib/firmware" + #endif + + #define FW_EXT ".hcd" +@@ -369,9 +369,6 @@ + if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) { + fprintf(stderr, "Patch not found, continue anyway\n"); + } else { +- if (bcm43xx_set_speed(fd, ti, speed)) +- return -1; +- + if (bcm43xx_load_firmware(fd, fw_path)) + return -1; + +@@ -381,6 +378,7 @@ + return -1; + } + ++ sleep(1); + if (bcm43xx_reset(fd)) + return -1; + } diff -Nru bluez-5.55/debian/patches/raspi-cypress-305-bdaddr.patch bluez-5.55/debian/patches/raspi-cypress-305-bdaddr.patch --- bluez-5.55/debian/patches/raspi-cypress-305-bdaddr.patch 1970-01-01 01:00:00.000000000 +0100 +++ bluez-5.55/debian/patches/raspi-cypress-305-bdaddr.patch 2020-11-05 13:39:07.000000000 +0000 @@ -0,0 +1,23 @@ +From: Phil Elwell +Forwarded: no +Subject: Patch Cypress 305 devices to behave as Broadcom devices + +--- + tools/bdaddr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/bdaddr.c b/tools/bdaddr.c +index 952e99077..55fad4b46 100644 +--- a/tools/bdaddr.c ++++ b/tools/bdaddr.c +@@ -316,6 +316,7 @@ static struct { + { 48, st_write_bd_addr, generic_reset_device }, + { 57, ericsson_write_bd_addr, generic_reset_device }, + { 72, mrvl_write_bd_addr, generic_reset_device }, ++ { 305, bcm_write_bd_addr, generic_reset_device }, + { 65535, NULL, NULL }, + }; + +-- +2.25.1 + diff -Nru bluez-5.55/debian/patches/series bluez-5.55/debian/patches/series --- bluez-5.55/debian/patches/series 2020-09-15 10:17:32.000000000 +0100 +++ bluez-5.55/debian/patches/series 2020-11-05 13:39:07.000000000 +0000 @@ -12,3 +12,7 @@ 0002-hostname-handle-chassis-type-handset.patch ubuntu_error_restart.patch + +raspi-bcm43xx-load-firmware.patch +raspi-bcm43xx-3wire.patch +raspi-cypress-305-bdaddr.patch