* [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
@ 2023-05-12 13:58 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 1/4] dt-bindings: net: qualcomm: Add WCN3988 Luca Weiss
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Luca Weiss @ 2023-05-12 13:58 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm, Luca Weiss,
Krzysztof Kozlowski
Add support in the btqca/hci_qca driver for the WCN3988 and add it to
the sm7225 Fairphone 4 devicetree.
Devicetree patches go via Qualcomm tree, the rest via their respective
trees.
--
Previously with the RFC version I've had problems before with Bluetooth
scanning failing like the following:
[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.InProgress
[ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
This appears to only happen with driver built-in (=y) when the supported
local commands list doesn't get updated in the Bluetooth core and
use_ext_scan() returning false. I'll try to submit this separately since
this now works well enough with =m. But in both cases (=y, =m) it's
behaving a bit weirdly before (re-)setting the MAC address with "sudo
btmgmt public-addr fo:oo:ba:ar"
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v2:
- Add pinctrl & 'tlmm 64' irq to uart node
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
---
Luca Weiss (4):
dt-bindings: net: qualcomm: Add WCN3988
Bluetooth: btqca: Add WCN3988 support
arm64: dts: qcom: sm6350: add uart1 node
arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
.../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 +++++++++++++
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 +++++++++++++++++++++
drivers/bluetooth/btqca.c | 13 ++-
drivers/bluetooth/btqca.h | 12 ++-
drivers/bluetooth/hci_qca.c | 12 +++
6 files changed, 201 insertions(+), 4 deletions(-)
---
base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/4] dt-bindings: net: qualcomm: Add WCN3988
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
@ 2023-05-12 13:58 ` Luca Weiss
2023-05-12 13:58 ` [PATCH v2 2/4] Bluetooth: btqca: Add WCN3988 support Luca Weiss
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2023-05-12 13:58 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm, Luca Weiss,
Krzysztof Kozlowski
Add the compatible for the Bluetooth part of the Qualcomm WCN3988
chipset.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 68f78b90d23a..7a53e05ae50d 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -18,6 +18,7 @@ properties:
enum:
- qcom,qca6174-bt
- qcom,qca9377-bt
+ - qcom,wcn3988-bt
- qcom,wcn3990-bt
- qcom,wcn3991-bt
- qcom,wcn3998-bt
@@ -106,6 +107,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,wcn3988-bt
- qcom,wcn3990-bt
- qcom,wcn3991-bt
- qcom,wcn3998-bt
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/4] Bluetooth: btqca: Add WCN3988 support
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 1/4] dt-bindings: net: qualcomm: Add WCN3988 Luca Weiss
@ 2023-05-12 13:58 ` Luca Weiss
2023-05-12 13:58 ` [PATCH v2 3/4] arm64: dts: qcom: sm6350: add uart1 node Luca Weiss
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2023-05-12 13:58 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm, Luca Weiss
Add support for the Bluetooth chip codenamed APACHE which is part of
WCN3988.
The firmware for this chip has a slightly different naming scheme
compared to most others. For ROM Version 0x0200 we need to use
apbtfw10.tlv + apnv10.bin and for ROM version 0x201 apbtfw11.tlv +
apnv11.bin
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/bluetooth/btqca.c | 13 +++++++++++--
drivers/bluetooth/btqca.h | 12 ++++++++++--
drivers/bluetooth/hci_qca.c | 12 ++++++++++++
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index fd0941fe8608..3ee1ef88a640 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -594,14 +594,20 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
/* Firmware files to download are based on ROM version.
* ROM version is derived from last two bytes of soc_ver.
*/
- rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
+ if (soc_type == QCA_WCN3988)
+ rom_ver = ((soc_ver & 0x00000f00) >> 0x05) | (soc_ver & 0x0000000f);
+ else
+ rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
if (soc_type == QCA_WCN6750)
qca_send_patch_config_cmd(hdev);
/* Download rampatch file */
config.type = TLV_TYPE_PATCH;
- if (qca_is_wcn399x(soc_type)) {
+ if (soc_type == QCA_WCN3988) {
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/apbtfw%02x.tlv", rom_ver);
+ } else if (qca_is_wcn399x(soc_type)) {
snprintf(config.fwname, sizeof(config.fwname),
"qca/crbtfw%02x.tlv", rom_ver);
} else if (soc_type == QCA_QCA6390) {
@@ -636,6 +642,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
if (firmware_name)
snprintf(config.fwname, sizeof(config.fwname),
"qca/%s", firmware_name);
+ else if (soc_type == QCA_WCN3988)
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/apnv%02x.bin", rom_ver);
else if (qca_is_wcn399x(soc_type)) {
if (ver.soc_id == QCA_WCN3991_SOC_ID) {
snprintf(config.fwname, sizeof(config.fwname),
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index b884095bcd9d..fc6cf314eb0e 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -142,6 +142,7 @@ enum qca_btsoc_type {
QCA_INVALID = -1,
QCA_AR3002,
QCA_ROME,
+ QCA_WCN3988,
QCA_WCN3990,
QCA_WCN3998,
QCA_WCN3991,
@@ -162,8 +163,15 @@ int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev);
static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
{
- return soc_type == QCA_WCN3990 || soc_type == QCA_WCN3991 ||
- soc_type == QCA_WCN3998;
+ switch (soc_type) {
+ case QCA_WCN3988:
+ case QCA_WCN3990:
+ case QCA_WCN3991:
+ case QCA_WCN3998:
+ return true;
+ default:
+ return false;
+ }
}
static inline bool qca_is_wcn6750(enum qca_btsoc_type soc_type)
{
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 1b064504b388..5280236d4b96 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1835,6 +1835,17 @@ static const struct hci_uart_proto qca_proto = {
.dequeue = qca_dequeue,
};
+static const struct qca_device_data qca_soc_data_wcn3988 __maybe_unused = {
+ .soc_type = QCA_WCN3988,
+ .vregs = (struct qca_vreg []) {
+ { "vddio", 15000 },
+ { "vddxo", 80000 },
+ { "vddrf", 300000 },
+ { "vddch0", 450000 },
+ },
+ .num_vregs = 4,
+};
+
static const struct qca_device_data qca_soc_data_wcn3990 __maybe_unused = {
.soc_type = QCA_WCN3990,
.vregs = (struct qca_vreg []) {
@@ -2359,6 +2370,7 @@ 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,wcn3988-bt", .data = &qca_soc_data_wcn3988},
{ .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.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/4] arm64: dts: qcom: sm6350: add uart1 node
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 1/4] dt-bindings: net: qualcomm: Add WCN3988 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 2/4] Bluetooth: btqca: Add WCN3988 support Luca Weiss
@ 2023-05-12 13:58 ` Luca Weiss
2023-05-12 13:58 ` [PATCH v2 4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth Luca Weiss
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2023-05-12 13:58 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm, Luca Weiss
Add the node describing uart1 incl. opp table and pinctrl.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 ++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 18c4616848ce..eb46dc2d969b 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -378,6 +378,25 @@ opp-2073600000 {
};
};
+ qup_opp_table: opp-table-qup {
+ compatible = "operating-points-v2";
+
+ opp-75000000 {
+ opp-hz = /bits/ 64 <75000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-128000000 {
+ opp-hz = /bits/ 64 <128000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_LOW>;
@@ -741,6 +760,22 @@ i2c0: i2c@880000 {
status = "disabled";
};
+ uart1: serial@884000 {
+ compatible = "qcom,geni-uart";
+ reg = <0 0x00884000 0 0x4000>;
+ clock-names = "se";
+ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&qup_uart1_cts>, <&qup_uart1_rts>, <&qup_uart1_tx>, <&qup_uart1_rx>;
+ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&rpmhpd SM6350_CX>;
+ operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
+ <&aggre1_noc MASTER_QUP_0 0 &clk_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core", "qup-config";
+ status = "disabled";
+ };
+
i2c2: i2c@888000 {
compatible = "qcom,geni-i2c";
reg = <0 0x00888000 0 0x4000>;
@@ -1726,6 +1761,34 @@ qup_i2c10_default: qup-i2c10-default-state {
drive-strength = <2>;
bias-pull-up;
};
+
+ qup_uart1_cts: qup-uart1-cts-default-state {
+ pins = "gpio61";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ qup_uart1_rts: qup-uart1-rts-default-state {
+ pins = "gpio62";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ qup_uart1_rx: qup-uart1-rx-default-state {
+ pins = "gpio64";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ qup_uart1_tx: qup-uart1-tx-default-state {
+ pins = "gpio63";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
};
apps_smmu: iommu@15000000 {
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
` (2 preceding siblings ...)
2023-05-12 13:58 ` [PATCH v2 3/4] arm64: dts: qcom: sm6350: add uart1 node Luca Weiss
@ 2023-05-12 13:58 ` Luca Weiss
2023-05-12 20:53 ` [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luiz Augusto von Dentz
2023-06-13 22:30 ` (subset) " Bjorn Andersson
5 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2023-05-12 13:58 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm, Luca Weiss
The device has a WCN3988 chip for WiFi and Bluetooth. Configure the
Bluetooth node and enable the UART it is connected to, plus the
necessary pinctrl that has been borrowed with comments from
sc7280-idp.dtsi.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 ++++++++++++++++++++++
1 file changed, 103 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index 7ae6aba5d2ec..e3dc49951523 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -31,6 +31,7 @@ / {
aliases {
serial0 = &uart9;
+ serial1 = &uart1;
};
chosen {
@@ -524,6 +525,39 @@ adc-chan@644 {
};
};
+&qup_uart1_cts {
+ /*
+ * Configure a bias-bus-hold on CTS to lower power
+ * usage when Bluetooth is turned off. Bus hold will
+ * maintain a low power state regardless of whether
+ * the Bluetooth module drives the pin in either
+ * direction or leaves the pin fully unpowered.
+ */
+ bias-bus-hold;
+};
+
+&qup_uart1_rts {
+ /* We'll drive RTS, so no pull */
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qup_uart1_rx {
+ /*
+ * Configure a pull-up on RX. This is needed to avoid
+ * garbage data when the TX pin of the Bluetooth module is
+ * in tri-state (module powered off or not driving the
+ * signal yet).
+ */
+ bias-pull-up;
+};
+
+&qup_uart1_tx {
+ /* We'll drive TX, so no pull */
+ drive-strength = <2>;
+ bias-disable;
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -561,6 +595,75 @@ &sdhc_2 {
&tlmm {
gpio-reserved-ranges = <13 4>, <56 2>;
+
+ qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
+ pins = "gpio61";
+ function = "gpio";
+ /*
+ * Configure a bias-bus-hold on CTS to lower power
+ * usage when Bluetooth is turned off. Bus hold will
+ * maintain a low power state regardless of whether
+ * the Bluetooth module drives the pin in either
+ * direction or leaves the pin fully unpowered.
+ */
+ bias-bus-hold;
+ };
+
+ qup_uart1_sleep_rts: qup-uart1-sleep-rts-state {
+ pins = "gpio62";
+ function = "gpio";
+ /*
+ * Configure pull-down on RTS. As RTS is active low
+ * signal, pull it low to indicate the BT SoC that it
+ * can wakeup the system anytime from suspend state by
+ * pulling RX low (by sending wakeup bytes).
+ */
+ bias-pull-down;
+ };
+
+ qup_uart1_sleep_rx: qup-uart1-sleep-rx-state {
+ pins = "gpio64";
+ function = "gpio";
+ /*
+ * Configure a pull-up on RX. This is needed to avoid
+ * garbage data when the TX pin of the Bluetooth module
+ * is floating which may cause spurious wakeups.
+ */
+ bias-pull-up;
+ };
+
+ qup_uart1_sleep_tx: qup-uart1-sleep-tx-state {
+ pins = "gpio63";
+ function = "gpio";
+ /*
+ * Configure pull-up on TX when it isn't actively driven
+ * to prevent BT SoC from receiving garbage during sleep.
+ */
+ bias-pull-up;
+ };
+};
+
+&uart1 {
+ /delete-property/ interrupts;
+ interrupts-extended = <&intc GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
+ <&tlmm 64 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-1 = <&qup_uart1_sleep_cts>, <&qup_uart1_sleep_rts>, <&qup_uart1_sleep_tx>, <&qup_uart1_sleep_rx>;
+
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn3988-bt";
+
+ vddio-supply = <&vreg_l11a>;
+ vddxo-supply = <&vreg_l7a>;
+ vddrf-supply = <&vreg_l2e>;
+ vddch0-supply = <&vreg_l10e>;
+ swctrl-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+
+ max-speed = <3200000>;
+ };
};
&uart9 {
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
` (3 preceding siblings ...)
2023-05-12 13:58 ` [PATCH v2 4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth Luca Weiss
@ 2023-05-12 20:53 ` Luiz Augusto von Dentz
2023-05-15 6:12 ` Luca Weiss
2023-06-13 22:30 ` (subset) " Bjorn Andersson
5 siblings, 1 reply; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2023-05-12 20:53 UTC (permalink / raw)
To: Luca Weiss
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Conor Dooley,
~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm,
Krzysztof Kozlowski
Hi Luca,
On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> the sm7225 Fairphone 4 devicetree.
>
> Devicetree patches go via Qualcomm tree, the rest via their respective
> trees.
Just to be sure, patches 1-2 shall be applied to bluetooth-next the
remaining are going to be handled elsewhere?
> --
> Previously with the RFC version I've had problems before with Bluetooth
> scanning failing like the following:
>
> [bluetooth]# scan on
> Failed to start discovery: org.bluez.Error.InProgress
>
> [ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
>
> This appears to only happen with driver built-in (=y) when the supported
> local commands list doesn't get updated in the Bluetooth core and
> use_ext_scan() returning false. I'll try to submit this separately since
> this now works well enough with =m. But in both cases (=y, =m) it's
> behaving a bit weirdly before (re-)setting the MAC address with "sudo
> btmgmt public-addr fo:oo:ba:ar"
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Changes in v2:
> - Add pinctrl & 'tlmm 64' irq to uart node
> - Pick up tags
> - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
>
> ---
> Luca Weiss (4):
> dt-bindings: net: qualcomm: Add WCN3988
> Bluetooth: btqca: Add WCN3988 support
> arm64: dts: qcom: sm6350: add uart1 node
> arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
>
> .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +
> arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 +++++++++++++
> arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 +++++++++++++++++++++
> drivers/bluetooth/btqca.c | 13 ++-
> drivers/bluetooth/btqca.h | 12 ++-
> drivers/bluetooth/hci_qca.c | 12 +++
> 6 files changed, 201 insertions(+), 4 deletions(-)
> ---
> base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
>
> Best regards,
> --
> Luca Weiss <luca.weiss@fairphone.com>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
2023-05-12 20:53 ` [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luiz Augusto von Dentz
@ 2023-05-15 6:12 ` Luca Weiss
2023-08-01 10:07 ` Luca Weiss
0 siblings, 1 reply; 10+ messages in thread
From: Luca Weiss @ 2023-05-15 6:12 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Conor Dooley,
~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm,
Krzysztof Kozlowski
On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> Hi Luca,
>
> On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> >
> > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > the sm7225 Fairphone 4 devicetree.
> >
> > Devicetree patches go via Qualcomm tree, the rest via their respective
> > trees.
>
> Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> remaining are going to be handled elsewhere?
Sounds good.
>
> > --
> > Previously with the RFC version I've had problems before with Bluetooth
> > scanning failing like the following:
> >
> > [bluetooth]# scan on
> > Failed to start discovery: org.bluez.Error.InProgress
> >
> > [ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> >
> > This appears to only happen with driver built-in (=y) when the supported
> > local commands list doesn't get updated in the Bluetooth core and
> > use_ext_scan() returning false. I'll try to submit this separately since
> > this now works well enough with =m. But in both cases (=y, =m) it's
> > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > btmgmt public-addr fo:oo:ba:ar"
> >
> > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > ---
> > Changes in v2:
> > - Add pinctrl & 'tlmm 64' irq to uart node
> > - Pick up tags
> > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> >
> > ---
> > Luca Weiss (4):
> > dt-bindings: net: qualcomm: Add WCN3988
> > Bluetooth: btqca: Add WCN3988 support
> > arm64: dts: qcom: sm6350: add uart1 node
> > arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> >
> > .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +
> > arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 +++++++++++++
> > arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 +++++++++++++++++++++
> > drivers/bluetooth/btqca.c | 13 ++-
> > drivers/bluetooth/btqca.h | 12 ++-
> > drivers/bluetooth/hci_qca.c | 12 +++
> > 6 files changed, 201 insertions(+), 4 deletions(-)
> > ---
> > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> >
> > Best regards,
> > --
> > Luca Weiss <luca.weiss@fairphone.com>
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (subset) [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
` (4 preceding siblings ...)
2023-05-12 20:53 ` [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luiz Augusto von Dentz
@ 2023-06-13 22:30 ` Bjorn Andersson
5 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2023-06-13 22:30 UTC (permalink / raw)
To: Eric Dumazet, Rob Herring, Johan Hedberg, David S. Miller,
Andy Gross, Conor Dooley, Marcel Holtmann, Krzysztof Kozlowski,
Konrad Dybcio, Jakub Kicinski, Luca Weiss, Paolo Abeni,
Luiz Augusto von Dentz
Cc: linux-bluetooth, linux-arm-msm, Krzysztof Kozlowski, phone-devel,
~postmarketos/upstreaming, netdev, devicetree, linux-kernel
On Fri, 12 May 2023 15:58:22 +0200, Luca Weiss wrote:
> Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> the sm7225 Fairphone 4 devicetree.
>
> Devicetree patches go via Qualcomm tree, the rest via their respective
> trees.
>
> --
> Previously with the RFC version I've had problems before with Bluetooth
> scanning failing like the following:
>
> [...]
Applied, thanks!
[3/4] arm64: dts: qcom: sm6350: add uart1 node
commit: b179f35b887b2d17e93f1827550290669bc6b110
[4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
commit: c4ef464b24c5aefb7e23eb8fcc08250a783a529b
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
2023-05-15 6:12 ` Luca Weiss
@ 2023-08-01 10:07 ` Luca Weiss
2023-08-01 18:08 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 10+ messages in thread
From: Luca Weiss @ 2023-08-01 10:07 UTC (permalink / raw)
To: Luca Weiss, Luiz Augusto von Dentz
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Conor Dooley,
~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm,
Krzysztof Kozlowski
Hi Luiz,
On Mon May 15, 2023 at 8:12 AM CEST, Luca Weiss wrote:
> On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> > Hi Luca,
> >
> > On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> > >
> > > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > > the sm7225 Fairphone 4 devicetree.
> > >
> > > Devicetree patches go via Qualcomm tree, the rest via their respective
> > > trees.
> >
> > Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> > remaining are going to be handled elsewhere?
>
> Sounds good.
Is anything missing for the patches 1 & 2 to be applied? I don't see
them yet in linux-next. Should I resend them?
Regards
Luca
>
> >
> > > --
> > > Previously with the RFC version I've had problems before with Bluetooth
> > > scanning failing like the following:
> > >
> > > [bluetooth]# scan on
> > > Failed to start discovery: org.bluez.Error.InProgress
> > >
> > > [ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> > >
> > > This appears to only happen with driver built-in (=y) when the supported
> > > local commands list doesn't get updated in the Bluetooth core and
> > > use_ext_scan() returning false. I'll try to submit this separately since
> > > this now works well enough with =m. But in both cases (=y, =m) it's
> > > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > > btmgmt public-addr fo:oo:ba:ar"
> > >
> > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > ---
> > > Changes in v2:
> > > - Add pinctrl & 'tlmm 64' irq to uart node
> > > - Pick up tags
> > > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> > >
> > > ---
> > > Luca Weiss (4):
> > > dt-bindings: net: qualcomm: Add WCN3988
> > > Bluetooth: btqca: Add WCN3988 support
> > > arm64: dts: qcom: sm6350: add uart1 node
> > > arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> > >
> > > .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +
> > > arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 +++++++++++++
> > > arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 +++++++++++++++++++++
> > > drivers/bluetooth/btqca.c | 13 ++-
> > > drivers/bluetooth/btqca.h | 12 ++-
> > > drivers/bluetooth/hci_qca.c | 12 +++
> > > 6 files changed, 201 insertions(+), 4 deletions(-)
> > > ---
> > > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> > >
> > > Best regards,
> > > --
> > > Luca Weiss <luca.weiss@fairphone.com>
> > >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4
2023-08-01 10:07 ` Luca Weiss
@ 2023-08-01 18:08 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2023-08-01 18:08 UTC (permalink / raw)
To: Luca Weiss
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Marcel Holtmann, Johan Hedberg,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Conor Dooley,
~postmarketos/upstreaming, phone-devel, netdev, devicetree,
linux-kernel, linux-bluetooth, linux-arm-msm,
Krzysztof Kozlowski
Hi Luca,
On Tue, Aug 1, 2023 at 3:07 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> Hi Luiz,
>
> On Mon May 15, 2023 at 8:12 AM CEST, Luca Weiss wrote:
> > On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> > > Hi Luca,
> > >
> > > On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > >
> > > > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > > > the sm7225 Fairphone 4 devicetree.
> > > >
> > > > Devicetree patches go via Qualcomm tree, the rest via their respective
> > > > trees.
> > >
> > > Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> > > remaining are going to be handled elsewhere?
> >
> > Sounds good.
>
> Is anything missing for the patches 1 & 2 to be applied? I don't see
> them yet in linux-next. Should I resend them?
Looks like this set is no longer on patchwork, could you please resend?
> Regards
> Luca
>
> >
> > >
> > > > --
> > > > Previously with the RFC version I've had problems before with Bluetooth
> > > > scanning failing like the following:
> > > >
> > > > [bluetooth]# scan on
> > > > Failed to start discovery: org.bluez.Error.InProgress
> > > >
> > > > [ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> > > >
> > > > This appears to only happen with driver built-in (=y) when the supported
> > > > local commands list doesn't get updated in the Bluetooth core and
> > > > use_ext_scan() returning false. I'll try to submit this separately since
> > > > this now works well enough with =m. But in both cases (=y, =m) it's
> > > > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > > > btmgmt public-addr fo:oo:ba:ar"
> > > >
> > > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > > ---
> > > > Changes in v2:
> > > > - Add pinctrl & 'tlmm 64' irq to uart node
> > > > - Pick up tags
> > > > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> > > >
> > > > ---
> > > > Luca Weiss (4):
> > > > dt-bindings: net: qualcomm: Add WCN3988
> > > > Bluetooth: btqca: Add WCN3988 support
> > > > arm64: dts: qcom: sm6350: add uart1 node
> > > > arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> > > >
> > > > .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 +
> > > > arch/arm64/boot/dts/qcom/sm6350.dtsi | 63 +++++++++++++
> > > > arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 103 +++++++++++++++++++++
> > > > drivers/bluetooth/btqca.c | 13 ++-
> > > > drivers/bluetooth/btqca.h | 12 ++-
> > > > drivers/bluetooth/hci_qca.c | 12 +++
> > > > 6 files changed, 201 insertions(+), 4 deletions(-)
> > > > ---
> > > > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > > > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> > > >
> > > > Best regards,
> > > > --
> > > > Luca Weiss <luca.weiss@fairphone.com>
> > > >
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-08-01 18:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 13:58 [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 1/4] dt-bindings: net: qualcomm: Add WCN3988 Luca Weiss
2023-05-12 13:58 ` [PATCH v2 2/4] Bluetooth: btqca: Add WCN3988 support Luca Weiss
2023-05-12 13:58 ` [PATCH v2 3/4] arm64: dts: qcom: sm6350: add uart1 node Luca Weiss
2023-05-12 13:58 ` [PATCH v2 4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth Luca Weiss
2023-05-12 20:53 ` [PATCH v2 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Luiz Augusto von Dentz
2023-05-15 6:12 ` Luca Weiss
2023-08-01 10:07 ` Luca Weiss
2023-08-01 18:08 ` Luiz Augusto von Dentz
2023-06-13 22:30 ` (subset) " Bjorn Andersson
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).