Bluetooth: hci_qca: add support for QCA9377
Subsystems (6)
v2 cover Bluetooth: hci_qca: add support for QCA9377
From: Christian Hewittt <[email protected]>
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.
v2 changes: rebase against bluetooth-next
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(-)
Signature · 1 line
2.17.1
PATCH v2 1/3 dt-bindings: net: bluetooth: Add device tree bindings for QCA9377
QCA9377 is a QCA ROME device frequently found in Android TV boxes.
--- Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt +5 -0
@@ -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"
@@ -21,6 +22,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.
Signature · 7 lines
2.17.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH v2 2/3 Bluetooth: hci_qca: add compatible for QCA9377
In reply to Christian HewittAdd a compatible so QCA9377 devices can be defined in device-tree.
--- drivers/bluetooth/hci_qca.c | 1 + 1 file changed, 1 insertion(+)
drivers/bluetooth/hci_qca.c +1 -0
@@ -2058,6 +2058,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,qca6390-bt" , .data = &qca_soc_data_qca6390}, + { .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},
Signature · 1 line
2.17.1
PATCH v2 3/3 Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices
In reply to Christian HewittMove 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.
--- drivers/bluetooth/hci_qca.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/bluetooth/hci_qca.c +9 -7
@@ -597,10 +597,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 );
@@ -1871,6 +1873,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,
@@ -1895,11 +1902,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" );
Signature · 1 line
2.17.1
Marcel Holtmann
maintainerHi Christian,
Quoted 7 lines
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.
v2 changes: rebase against bluetooth-next
Quoted 8 lines
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(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel