linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377
@ 2020-04-21  8:16 Christian Hewitt
  2020-04-21  8:16 ` [PATCH 1/3] dt-bindings: net: bluetooth: Add device tree bindings " Christian Hewitt
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Christian Hewitt @ 2020-04-21  8:16 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Rob Herring, netdev, devicetree,
	linux-amlogic, linux-bluetooth, linux-kernel
  Cc: Abhishek Pandit-Subedi, chewitt

From: chewitt <christianshewitt@gmail.com>

This series adds a new compatible for the QCA9377 BT device that is found
in many Android TV box devices, makes minor changes to allow max-speed
values for the device to be read from device-tree, and updates bindings
to reflect those changes.

Christian Hewitt (3):
  dt-bindings: net: bluetooth: Add device tree bindings for QCA9377
  Bluetooth: hci_qca: add compatible for QCA9377
  Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices

 .../bindings/net/qualcomm-bluetooth.txt         |  5 +++++
 drivers/bluetooth/hci_qca.c                     | 17 ++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

-- 
2.17.1


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

* [PATCH 1/3] dt-bindings: net: bluetooth: Add device tree bindings for QCA9377
  2020-04-21  8:16 [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Christian Hewitt
@ 2020-04-21  8:16 ` Christian Hewitt
  2020-04-21  8:16 ` [PATCH 2/3] Bluetooth: hci_qca: add compatible " Christian Hewitt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Christian Hewitt @ 2020-04-21  8:16 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Rob Herring, netdev, devicetree,
	linux-amlogic, linux-bluetooth, linux-kernel
  Cc: Abhishek Pandit-Subedi

QCA9377 is a QCA ROME device frequently found in Android TV boxes.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
index d2202791c1d4..2fec6912e160 100644
--- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
@@ -10,6 +10,7 @@ device the slave device is attached to.
 Required properties:
  - compatible: should contain one of the following:
    * "qcom,qca6174-bt"
+   * "qcom,qca9377-bt"
    * "qcom,wcn3990-bt"
    * "qcom,wcn3991-bt"
    * "qcom,wcn3998-bt"
@@ -20,6 +21,10 @@ Optional properties for compatible string qcom,qca6174-bt:
  - clocks: clock provided to the controller (SUSCLK_32KHZ)
  - firmware-name: specify the name of nvm firmware to load
 
+Optional properties for compatible string qcom,qca9377-bt:
+
+ - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml
+
 Required properties for compatible string qcom,wcn399x-bt:
 
  - vddio-supply: VDD_IO supply regulator handle.
-- 
2.17.1


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

* [PATCH 2/3] Bluetooth: hci_qca: add compatible for QCA9377
  2020-04-21  8:16 [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Christian Hewitt
  2020-04-21  8:16 ` [PATCH 1/3] dt-bindings: net: bluetooth: Add device tree bindings " Christian Hewitt
@ 2020-04-21  8:16 ` Christian Hewitt
  2020-04-21  8:16 ` [PATCH 3/3] Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices Christian Hewitt
  2020-04-22 17:39 ` [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Marcel Holtmann
  3 siblings, 0 replies; 6+ messages in thread
From: Christian Hewitt @ 2020-04-21  8:16 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Rob Herring, netdev, devicetree,
	linux-amlogic, linux-bluetooth, linux-kernel
  Cc: Abhishek Pandit-Subedi

Add a compatible so QCA9377 devices can be defined in device-tree.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 drivers/bluetooth/hci_qca.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 439392b1c043..6f0350fbdcd6 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2046,6 +2046,7 @@ static SIMPLE_DEV_PM_OPS(qca_pm_ops, qca_suspend, qca_resume);
 
 static const struct of_device_id qca_bluetooth_of_match[] = {
 	{ .compatible = "qcom,qca6174-bt" },
+	{ .compatible = "qcom,qca9377-bt" },
 	{ .compatible = "qcom,wcn3990-bt", .data = &qca_soc_data_wcn3990},
 	{ .compatible = "qcom,wcn3991-bt", .data = &qca_soc_data_wcn3991},
 	{ .compatible = "qcom,wcn3998-bt", .data = &qca_soc_data_wcn3998},
-- 
2.17.1


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

* [PATCH 3/3] Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices
  2020-04-21  8:16 [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Christian Hewitt
  2020-04-21  8:16 ` [PATCH 1/3] dt-bindings: net: bluetooth: Add device tree bindings " Christian Hewitt
  2020-04-21  8:16 ` [PATCH 2/3] Bluetooth: hci_qca: add compatible " Christian Hewitt
@ 2020-04-21  8:16 ` Christian Hewitt
  2020-04-22 17:39 ` [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Marcel Holtmann
  3 siblings, 0 replies; 6+ messages in thread
From: Christian Hewitt @ 2020-04-21  8:16 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Rob Herring, netdev, devicetree,
	linux-amlogic, linux-bluetooth, linux-kernel
  Cc: Abhishek Pandit-Subedi

Move the read of max-speed from device-tree out of the qca_is_wcn399x
if block so oper_speed can be set for QCA9377 devices as well.

Suggested-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 drivers/bluetooth/hci_qca.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 6f0350fbdcd6..b63ec7a0ac9e 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -596,10 +596,12 @@ static int qca_open(struct hci_uart *hu)
 
 	if (hu->serdev) {
 		qcadev = serdev_device_get_drvdata(hu->serdev);
-		if (qca_is_wcn399x(qcadev->btsoc_type)) {
+
+		if (qca_is_wcn399x(qcadev->btsoc_type))
 			hu->init_speed = qcadev->init_speed;
+
+		if (qcadev->oper_speed)
 			hu->oper_speed = qcadev->oper_speed;
-		}
 	}
 
 	timer_setup(&qca->wake_retrans_timer, hci_ibs_wake_retrans_timeout, 0);
@@ -1865,6 +1867,11 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 	serdev_device_set_drvdata(serdev, qcadev);
 	device_property_read_string(&serdev->dev, "firmware-name",
 					 &qcadev->firmware_name);
+	device_property_read_u32(&serdev->dev, "max-speed",
+				 &qcadev->oper_speed);
+	if (!qcadev->oper_speed)
+		BT_DBG("UART will pick default operating speed");
+
 	if (data && qca_is_wcn399x(data->soc_type)) {
 		qcadev->btsoc_type = data->soc_type;
 		qcadev->bt_power = devm_kzalloc(&serdev->dev,
@@ -1889,11 +1896,6 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 			return PTR_ERR(qcadev->susclk);
 		}
 
-		device_property_read_u32(&serdev->dev, "max-speed",
-					 &qcadev->oper_speed);
-		if (!qcadev->oper_speed)
-			BT_DBG("UART will pick default operating speed");
-
 		err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
 		if (err) {
 			BT_ERR("wcn3990 serdev registration failed");
-- 
2.17.1


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

* Re: [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377
  2020-04-21  8:16 [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Christian Hewitt
                   ` (2 preceding siblings ...)
  2020-04-21  8:16 ` [PATCH 3/3] Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices Christian Hewitt
@ 2020-04-22 17:39 ` Marcel Holtmann
  2020-04-23  0:39   ` Christian Hewitt
  3 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2020-04-22 17:39 UTC (permalink / raw)
  To: Christian Hewitt
  Cc: Johan Hedberg, Rob Herring, netdev, devicetree, linux-amlogic,
	Bluez mailing list, LKML, Abhishek Pandit-Subedi

Hi Christian,

> This series adds a new compatible for the QCA9377 BT device that is found
> in many Android TV box devices, makes minor changes to allow max-speed
> values for the device to be read from device-tree, and updates bindings
> to reflect those changes.
> 
> Christian Hewitt (3):
>  dt-bindings: net: bluetooth: Add device tree bindings for QCA9377
>  Bluetooth: hci_qca: add compatible for QCA9377
>  Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices
> 
> .../bindings/net/qualcomm-bluetooth.txt         |  5 +++++
> drivers/bluetooth/hci_qca.c                     | 17 ++++++++++-------
> 2 files changed, 15 insertions(+), 7 deletions(-)

the series doesn’t apply cleanly against bluetooth-next tree. Can you please respin it.

Regards

Marcel


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

* Re: [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377
  2020-04-22 17:39 ` [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Marcel Holtmann
@ 2020-04-23  0:39   ` Christian Hewitt
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Hewitt @ 2020-04-23  0:39 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Johan Hedberg, Rob Herring, netdev, devicetree, linux-amlogic,
	Bluez mailing list, LKML, Abhishek Pandit-Subedi


> On 22 Apr 2020, at 9:39 pm, Marcel Holtmann <marcel@holtmann.org> wrote:
> 
> Hi Christian,
> 
>> This series adds a new compatible for the QCA9377 BT device that is found
>> in many Android TV box devices, makes minor changes to allow max-speed
>> values for the device to be read from device-tree, and updates bindings
>> to reflect those changes.
>> 
>> Christian Hewitt (3):
>> dt-bindings: net: bluetooth: Add device tree bindings for QCA9377
>> Bluetooth: hci_qca: add compatible for QCA9377
>> Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices
>> 
>> .../bindings/net/qualcomm-bluetooth.txt         |  5 +++++
>> drivers/bluetooth/hci_qca.c                     | 17 ++++++++++-------
>> 2 files changed, 15 insertions(+), 7 deletions(-)
> 
> the series doesn’t apply cleanly against bluetooth-next tree. Can you please respin it.

Ahh, it was based on 5.7-rc1, will do, thanks.

Christian

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

end of thread, other threads:[~2020-04-23  0:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  8:16 [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Christian Hewitt
2020-04-21  8:16 ` [PATCH 1/3] dt-bindings: net: bluetooth: Add device tree bindings " Christian Hewitt
2020-04-21  8:16 ` [PATCH 2/3] Bluetooth: hci_qca: add compatible " Christian Hewitt
2020-04-21  8:16 ` [PATCH 3/3] Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices Christian Hewitt
2020-04-22 17:39 ` [PATCH 0/3] Bluetooth: hci_qca: add support for QCA9377 Marcel Holtmann
2020-04-23  0:39   ` Christian Hewitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).