All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Support patches for Raspberry Pi boards
@ 2020-12-18 19:06 Dave Jones
  2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dave Jones @ 2020-12-18 19:06 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List; +Cc: Dave Jones

These patches are derived from Raspbian's bluez variant and implement
support for the Bluetooth modules found in the Raspberry Pi boards up to
and including the Pi 400, and the two UARTs that can be used to
communicate with them.

If these would be better submitted as individual threads, or as a single
monolithic patch, please let me know - I'm happy to revise things!

Dave Jones (3):
  hciattach: Add BCM43xx 3-wire variant
  bdaddr: Treat Cypress devices as Broadcom
  hciattach: Enable loading BCM43xx firmware on RPi

 tools/bdaddr.c            | 1 +
 tools/hciattach.c         | 3 +++
 tools/hciattach_bcm43xx.c | 5 +----
 3 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant
  2020-12-18 19:06 [PATCH v1 0/3] Support patches for Raspberry Pi boards Dave Jones
@ 2020-12-18 19:06 ` Dave Jones
  2020-12-18 19:37   ` Support patches for Raspberry Pi boards bluez.test.bot
  2020-12-18 19:06 ` [PATCH v1 2/3] bdaddr: Treat Cypress devices as Broadcom Dave Jones
  2020-12-18 19:06 ` [PATCH v1 3/3] hciattach: Enable loading BCM43xx firmware on RPi Dave Jones
  2 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2020-12-18 19:06 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List; +Cc: Dave Jones

Adds the bcm43xx-3wire variant to the hciattach tool; this is for use
when the Raspberry Pi's mini-UART (which lacks flow-control) is used
instead of the PL011 UART to drive the bluetooth module.

Signed-off-by: Dave Jones <dave.jones@canonical.com>
---
 tools/hciattach.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/hciattach.c b/tools/hciattach.c
index 276a4e56e..503f067bc 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1078,6 +1078,9 @@ struct uart_t uart[] = {
 	{ "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  },
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 2/3] bdaddr: Treat Cypress devices as Broadcom
  2020-12-18 19:06 [PATCH v1 0/3] Support patches for Raspberry Pi boards Dave Jones
  2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
@ 2020-12-18 19:06 ` Dave Jones
  2020-12-18 19:06 ` [PATCH v1 3/3] hciattach: Enable loading BCM43xx firmware on RPi Dave Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2020-12-18 19:06 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List; +Cc: Dave Jones

Adds an entry to cause bdaddr to treat Cypress Semiconductor devices as
Broadcom devices; Cypress (vendor ID 305) acquired Broadcom's (vendor ID
15) wireless division in 2016.

Signed-off-by: Dave Jones <dave.jones@canonical.com>
---
 tools/bdaddr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/bdaddr.c b/tools/bdaddr.c
index bc0478d46..de17416e9 100644
--- a/tools/bdaddr.c
+++ b/tools/bdaddr.c
@@ -303,6 +303,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.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 3/3] hciattach: Enable loading BCM43xx firmware on RPi
  2020-12-18 19:06 [PATCH v1 0/3] Support patches for Raspberry Pi boards Dave Jones
  2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
  2020-12-18 19:06 ` [PATCH v1 2/3] bdaddr: Treat Cypress devices as Broadcom Dave Jones
@ 2020-12-18 19:06 ` Dave Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2020-12-18 19:06 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List; +Cc: Dave Jones

Corrects the location of the firmware from /etc/firmware to
/lib/firmware, and disables setting the UART interface speed prior to
loading the firmware. An already existing later call to
bcm43xx_set_speed still sets the speed of the interface as requested.

For certain bluetooth devices, in particular that on the Raspberry Pi
400, setting the UART speed prior to loading the firmware causes the
firmware load to fail.

Signed-off-by: Dave Jones <dave.jones@canonical.com>
---
 tools/hciattach_bcm43xx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index dbb5a3fe3..ddf9b4037 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -31,7 +31,7 @@
 #include "hciattach.h"
 
 #ifndef FIRMWARE_DIR
-#define FIRMWARE_DIR "/etc/firmware"
+#define FIRMWARE_DIR "/lib/firmware"
 #endif
 
 #define FW_EXT ".hcd"
@@ -356,9 +356,6 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
 	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;
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Support patches for Raspberry Pi boards
  2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
@ 2020-12-18 19:37   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2020-12-18 19:37 UTC (permalink / raw)
  To: linux-bluetooth, dave.jones

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=404253

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-18 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 19:06 [PATCH v1 0/3] Support patches for Raspberry Pi boards Dave Jones
2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
2020-12-18 19:37   ` Support patches for Raspberry Pi boards bluez.test.bot
2020-12-18 19:06 ` [PATCH v1 2/3] bdaddr: Treat Cypress devices as Broadcom Dave Jones
2020-12-18 19:06 ` [PATCH v1 3/3] hciattach: Enable loading BCM43xx firmware on RPi Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.