* [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-10 16:15 ` Rob Herring (Arm)
2024-07-09 12:18 ` [PATCH v3 2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock Bartosz Golaszewski
` (7 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Drop the inputs from the host and instead expect the Bluetooth node to
consume the outputs of the internal PMU. This model is closer to reality
than how we represent it now.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
.../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 48ac9f10ef05..68c5ed111417 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -77,6 +77,9 @@ properties:
vddrfa1p7-supply:
description: VDD_RFA_1P7 supply regulator handle
+ vddrfa1p8-supply:
+ description: VDD_RFA_1P8 supply regulator handle
+
vddrfa1p2-supply:
description: VDD_RFA_1P2 supply regulator handle
@@ -89,6 +92,12 @@ properties:
vddasd-supply:
description: VDD_ASD supply regulator handle
+ vddwlcx-supply:
+ description: VDD_WLCX supply regulator handle
+
+ vddwlmx-supply:
+ description: VDD_WLMX supply regulator handle
+
max-speed:
description: see Documentation/devicetree/bindings/serial/serial.yaml
@@ -179,14 +188,13 @@ allOf:
- qcom,wcn7850-bt
then:
required:
- - enable-gpios
- - swctrl-gpios
- - vddio-supply
+ - vddrfacmn-supply
- vddaon-supply
- - vdddig-supply
+ - vddwlcx-supply
+ - vddwlmx-supply
- vddrfa0p8-supply
- vddrfa1p2-supply
- - vddrfa1p9-supply
+ - vddrfa1p8-supply
- if:
properties:
compatible:
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
2024-07-09 12:18 ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
@ 2024-07-10 16:15 ` Rob Herring (Arm)
0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2024-07-10 16:15 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Jakub Kicinski, Marcel Holtmann, Bartosz Golaszewski,
linux-bluetooth, Eric Dumazet, Rocky Liao, Paolo Abeni,
Krzysztof Kozlowski, Konrad Dybcio, netdev, Bjorn Andersson,
Luiz Augusto von Dentz, linux-kernel, Balakrishna Godavarthi,
linux-arm-msm, Conor Dooley, devicetree, David S. Miller
On Tue, 09 Jul 2024 14:18:32 +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Drop the inputs from the host and instead expect the Bluetooth node to
> consume the outputs of the internal PMU. This model is closer to reality
> than how we represent it now.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device() Bartosz Golaszewski
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
In preparation for unduplicating the hci_uart registration code,
schedule a devres action for disabling the SUSCLK rather than doing it
manually.
We cannot really use devm_clk_get_enabled() as we also set the rate
before enabling the clock. While this should in theory work, I don't
want to risk breaking existing users. One solution for the future is to
add devm_clk_get_enabled_with_rate() to the clock framework.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/bluetooth/hci_qca.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index bc6a49ba26f9..ace920261aa4 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2295,6 +2295,13 @@ static int qca_init_regulators(struct qca_power *qca,
return 0;
}
+static void qca_clk_disable_unprepare(void *data)
+{
+ struct clk *clk = data;
+
+ clk_disable_unprepare(clk);
+}
+
static int qca_serdev_probe(struct serdev_device *serdev)
{
struct qca_serdev *qcadev;
@@ -2434,10 +2441,15 @@ static int qca_serdev_probe(struct serdev_device *serdev)
if (err)
return err;
+ err = devm_add_action_or_reset(&serdev->dev,
+ qca_clk_disable_unprepare,
+ qcadev->susclk);
+ if (err)
+ return err;
+
err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
if (err) {
BT_ERR("Rome serdev registration failed");
- clk_disable_unprepare(qcadev->susclk);
return err;
}
}
@@ -2477,15 +2489,10 @@ static void qca_serdev_remove(struct serdev_device *serdev)
case QCA_WCN6750:
case QCA_WCN6855:
case QCA_WCN7850:
- if (power->vregs_on) {
+ if (power->vregs_on)
qca_power_shutdown(&qcadev->serdev_hu);
- break;
- }
- fallthrough;
-
+ break;
default:
- if (qcadev->susclk)
- clk_disable_unprepare(qcadev->susclk);
}
hci_uart_unregister_device(&qcadev->serdev_hu);
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v3 3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU " Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 4/6] Bluetooth: hci_qca: make pwrseq calls the default if available Bartosz Golaszewski
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Now that all three branches of the switch end up doing the same thing,
we can move the call to hci_uart_register_device() past it and unify the
error message.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/bluetooth/hci_qca.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index ace920261aa4..9d2b50c8fc93 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2396,12 +2396,6 @@ static int qca_serdev_probe(struct serdev_device *serdev)
dev_err(&serdev->dev, "failed to acquire clk\n");
return PTR_ERR(qcadev->susclk);
}
-
- err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
- if (err) {
- BT_ERR("wcn3990 serdev registration failed");
- return err;
- }
break;
case QCA_QCA6390:
@@ -2409,12 +2403,6 @@ static int qca_serdev_probe(struct serdev_device *serdev)
"bluetooth");
if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq);
-
- err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
- if (err) {
- BT_ERR("qca6390 serdev registration failed");
- return err;
- }
break;
default:
@@ -2447,11 +2435,12 @@ static int qca_serdev_probe(struct serdev_device *serdev)
if (err)
return err;
- err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
- if (err) {
- BT_ERR("Rome serdev registration failed");
- return err;
- }
+ }
+
+ err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
+ if (err) {
+ BT_ERR("serdev registration failed");
+ return err;
}
hdev = qcadev->serdev_hu.hdev;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v3 4/6] Bluetooth: hci_qca: make pwrseq calls the default if available
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (2 preceding siblings ...)
2024-07-09 12:18 ` [PATCH v3 3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device() Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855 Bartosz Golaszewski
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
If the device has a power sequencing handle, use it first. Otherwise
fall back to whatever code already exists.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/bluetooth/hci_qca.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 9d2b50c8fc93..49588072589e 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1718,6 +1718,7 @@ static int qca_regulator_init(struct hci_uart *hu)
* off the voltage regulator.
*/
qcadev = serdev_device_get_drvdata(hu->serdev);
+
if (!qcadev->bt_power->vregs_on) {
serdev_device_close(hu->serdev);
ret = qca_regulator_enable(qcadev);
@@ -1800,18 +1801,8 @@ static int qca_power_on(struct hci_dev *hdev)
case QCA_WCN6750:
case QCA_WCN6855:
case QCA_WCN7850:
- ret = qca_regulator_init(hu);
- break;
-
case QCA_QCA6390:
- qcadev = serdev_device_get_drvdata(hu->serdev);
- ret = pwrseq_power_on(qcadev->bt_power->pwrseq);
- if (ret)
- return ret;
-
- ret = qca_port_reopen(hu);
- if (ret)
- return ret;
+ ret = qca_regulator_init(hu);
break;
default:
@@ -2149,6 +2140,7 @@ static void qca_power_shutdown(struct hci_uart *hu)
unsigned long flags;
enum qca_btsoc_type soc_type = qca_soc_type(hu);
bool sw_ctrl_state;
+ struct qca_power *power;
/* From this point we go into power off state. But serial port is
* still open, stop queueing the IBS data and flush all the buffered
@@ -2166,6 +2158,13 @@ static void qca_power_shutdown(struct hci_uart *hu)
return;
qcadev = serdev_device_get_drvdata(hu->serdev);
+ power = qcadev->bt_power;
+
+ if (power->pwrseq) {
+ pwrseq_power_off(power->pwrseq);
+ set_bit(QCA_BT_OFF, &qca->flags);
+ return;
+ }
switch (soc_type) {
case QCA_WCN3988:
@@ -2227,6 +2226,9 @@ static int qca_regulator_enable(struct qca_serdev *qcadev)
struct qca_power *power = qcadev->bt_power;
int ret;
+ if (power->pwrseq)
+ return pwrseq_power_on(power->pwrseq);
+
/* Already enabled */
if (power->vregs_on)
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v3 5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (3 preceding siblings ...)
2024-07-09 12:18 ` [PATCH v3 4/6] Bluetooth: hci_qca: make pwrseq calls the default if available Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-09 12:18 ` [PATCH v3 6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth Bartosz Golaszewski
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
In preparation for using the power sequencing subsystem on sm8650 boards
and X13s laptop let's make pwrseq the default for wcn7850 and wcn6855.
Both these models require an enable GPIO so we can safely assume that if
the property is not there, then we should try to get the power
sequencer. Due to how the pwrseq lookup works - checking the provider at
run-time - we cannot really do it the other way around as we'd get stuck
forever on -EPROBE_DEFER.
If the relevant OF node does have the 'enable-gpios' property, we
fallback to the existing code for backward compatibility with older DTs.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/bluetooth/hci_qca.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 49588072589e..030153d468bf 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2354,13 +2354,28 @@ static int qca_serdev_probe(struct serdev_device *serdev)
}
switch (qcadev->btsoc_type) {
+ case QCA_WCN6855:
+ case QCA_WCN7850:
+ if (!device_property_present(&serdev->dev, "enable-gpios")) {
+ /*
+ * Backward compatibility with old DT sources. If the
+ * node doesn't have the 'enable-gpios' property then
+ * let's use the power sequencer. Otherwise, let's
+ * drive everything outselves.
+ */
+ qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
+ "bluetooth");
+ if (IS_ERR(qcadev->bt_power->pwrseq))
+ return PTR_ERR(qcadev->bt_power->pwrseq);
+
+ break;
+ }
+ fallthrough;
case QCA_WCN3988:
case QCA_WCN3990:
case QCA_WCN3991:
case QCA_WCN3998:
case QCA_WCN6750:
- case QCA_WCN6855:
- case QCA_WCN7850:
qcadev->bt_power->dev = &serdev->dev;
err = qca_init_regulators(qcadev->bt_power, data->vregs,
data->num_vregs);
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v3 6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (4 preceding siblings ...)
2024-07-09 12:18 ` [PATCH v3 5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855 Bartosz Golaszewski
@ 2024-07-09 12:18 ` Bartosz Golaszewski
2024-07-09 13:24 ` [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 neil.armstrong
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-09 12:18 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Bjorn Andersson, Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Change the HW model in sm8650-qrd.dts to a one closer to reality - where
the WLAN and Bluetooth modules of the WCN7850 are powered by the PMU
inside the package.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts
index b0d7927b708f..8ca0d28eba9b 100644
--- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts
@@ -208,13 +208,10 @@ wcn7850-pmu {
compatible = "qcom,wcn7850-pmu";
pinctrl-names = "default";
- pinctrl-0 = <&wlan_en>;
+ pinctrl-0 = <&wlan_en>, <&bt_default>;
wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
- /*
- * TODO Add bt-enable-gpios once the Bluetooth driver is
- * converted to using the power sequencer.
- */
+ bt-enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
vdd-supply = <&vreg_s4i_0p85>;
vddio-supply = <&vreg_l15b_1p8>;
@@ -1255,22 +1252,15 @@ &uart14 {
bluetooth {
compatible = "qcom,wcn7850-bt";
- clocks = <&rpmhcc RPMH_RF_CLK1>;
-
- vddio-supply = <&vreg_l3c_1p2>;
- vddaon-supply = <&vreg_l15b_1p8>;
- vdddig-supply = <&vreg_s3c_0p9>;
- vddrfa0p8-supply = <&vreg_s3c_0p9>;
- vddrfa1p2-supply = <&vreg_s1c_1p2>;
- vddrfa1p9-supply = <&vreg_s6c_1p8>;
+ vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+ vddaon-supply = <&vreg_pmu_aon_0p59>;
+ vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+ vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+ vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+ vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+ vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
max-speed = <3200000>;
-
- enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
- swctrl-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
-
- pinctrl-0 = <&bt_default>;
- pinctrl-names = "default";
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (5 preceding siblings ...)
2024-07-09 12:18 ` [PATCH v3 6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth Bartosz Golaszewski
@ 2024-07-09 13:24 ` neil.armstrong
2024-07-10 19:50 ` patchwork-bot+bluetooth
2024-08-01 3:22 ` (subset) " Bjorn Andersson
8 siblings, 0 replies; 14+ messages in thread
From: neil.armstrong @ 2024-07-09 13:24 UTC (permalink / raw)
To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Balakrishna Godavarthi, Rocky Liao, Bjorn Andersson,
Konrad Dybcio
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
On 09/07/2024 14:18, Bartosz Golaszewski wrote:
> The following series extend the usage of the power sequencing subsystem
> in the hci_qca driver.
>
> The end goal is to convert the entire driver to be exclusively pwrseq-based
> and simplify it in the process. However due to a large number of users we
> need to be careful and consider every case separately.
>
> Right now the only model that fully uses the power sequencer is QCA6390 on
> the RB5 board. The next steps are enabling pwrseq for Bluetooth on sm8650
> and the X13s laptop. To that end we need to make wcn7850 and wcn6855 aware
> of the power sequencing but also keep backward compatibility with older
> device trees.
>
> This series contains changes to mainline DT bindings for wcn7850, some
> refactoring of the hci_qca driver, making pwrseq the default for the two
> models mentioned above and finally modifies the device-tree for sm8650-qrd
> to correctly represent the way the Bluetooth module is powered.
>
> I made the last patch part of this series as it has a run-time dependency
> on previous changes in it and bluetooth support on the board will break
> without them.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Changes in v3:
> - Add a missing break in a switch case
> - Link to v2: https://lore.kernel.org/r/20240708-hci_qca_refactor-v2-0-b6e83b3d1ca5@linaro.org
>
> Changes in v2:
> - Fix a switch issue reported by the test bot
> - Link to v1: https://lore.kernel.org/r/20240705-hci_qca_refactor-v1-0-e2442121c13e@linaro.org
>
> ---
> Bartosz Golaszewski (6):
> dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
> Bluetooth: hci_qca: schedule a devm action for disabling the clock
> Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
> Bluetooth: hci_qca: make pwrseq calls the default if available
> Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
> arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
>
> .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 18 +++--
> arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 28 +++----
> drivers/bluetooth/hci_qca.c | 87 +++++++++++++---------
> 3 files changed, 72 insertions(+), 61 deletions(-)
> ---
> base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
> change-id: 20240704-hci_qca_refactor-0770e9931fb4
>
> Best regards,
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Still works on SM8550-QRD, and properly works with power sequencer on SM8650-QRD
Thanks,
Neil
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (6 preceding siblings ...)
2024-07-09 13:24 ` [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 neil.armstrong
@ 2024-07-10 19:50 ` patchwork-bot+bluetooth
2024-07-10 20:43 ` Luiz Augusto von Dentz
2024-08-01 3:22 ` (subset) " Bjorn Andersson
8 siblings, 1 reply; 14+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-10 19:50 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: marcel, luiz.dentz, davem, edumazet, kuba, pabeni, robh, krzk+dt,
conor+dt, quic_bgodavar, quic_rjliao, andersson, konrad.dybcio,
linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
bartosz.golaszewski
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 09 Jul 2024 14:18:31 +0200 you wrote:
> The following series extend the usage of the power sequencing subsystem
> in the hci_qca driver.
>
> The end goal is to convert the entire driver to be exclusively pwrseq-based
> and simplify it in the process. However due to a large number of users we
> need to be careful and consider every case separately.
>
> [...]
Here is the summary with links:
- [v3,1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
https://git.kernel.org/bluetooth/bluetooth-next/c/e1c54afa8526
- [v3,2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock
https://git.kernel.org/bluetooth/bluetooth-next/c/a887c8dede8e
- [v3,3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
https://git.kernel.org/bluetooth/bluetooth-next/c/cdd10964f76f
- [v3,4/6] Bluetooth: hci_qca: make pwrseq calls the default if available
https://git.kernel.org/bluetooth/bluetooth-next/c/958a33c3f9fc
- [v3,5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
https://git.kernel.org/bluetooth/bluetooth-next/c/4fa54d8731ec
- [v3,6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-10 19:50 ` patchwork-bot+bluetooth
@ 2024-07-10 20:43 ` Luiz Augusto von Dentz
2024-07-10 22:08 ` Konrad Dybcio
0 siblings, 1 reply; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-10 20:43 UTC (permalink / raw)
To: patchwork-bot+bluetooth
Cc: Bartosz Golaszewski, marcel, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, quic_bgodavar, quic_rjliao, andersson,
konrad.dybcio, linux-bluetooth, netdev, devicetree, linux-kernel,
linux-arm-msm, bartosz.golaszewski
Hi Bartosz,
On Wed, Jul 10, 2024 at 3:50 PM <patchwork-bot+bluetooth@kernel.org> wrote:
>
> Hello:
>
> This series was applied to bluetooth/bluetooth-next.git (master)
> by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
>
> On Tue, 09 Jul 2024 14:18:31 +0200 you wrote:
> > The following series extend the usage of the power sequencing subsystem
> > in the hci_qca driver.
> >
> > The end goal is to convert the entire driver to be exclusively pwrseq-based
> > and simplify it in the process. However due to a large number of users we
> > need to be careful and consider every case separately.
> >
> > [...]
>
> Here is the summary with links:
> - [v3,1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
> https://git.kernel.org/bluetooth/bluetooth-next/c/e1c54afa8526
> - [v3,2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock
> https://git.kernel.org/bluetooth/bluetooth-next/c/a887c8dede8e
> - [v3,3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
> https://git.kernel.org/bluetooth/bluetooth-next/c/cdd10964f76f
> - [v3,4/6] Bluetooth: hci_qca: make pwrseq calls the default if available
> https://git.kernel.org/bluetooth/bluetooth-next/c/958a33c3f9fc
> - [v3,5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
> https://git.kernel.org/bluetooth/bluetooth-next/c/4fa54d8731ec
> - [v3,6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
> (no matching commit)
Last one doesn't apply so you will probably need to rebase or
something if it really needs to go thru bluetooth-next.
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-10 20:43 ` Luiz Augusto von Dentz
@ 2024-07-10 22:08 ` Konrad Dybcio
2024-07-11 7:11 ` Bartosz Golaszewski
0 siblings, 1 reply; 14+ messages in thread
From: Konrad Dybcio @ 2024-07-10 22:08 UTC (permalink / raw)
To: Luiz Augusto von Dentz, patchwork-bot+bluetooth
Cc: Bartosz Golaszewski, marcel, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, quic_bgodavar, quic_rjliao, andersson,
linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
bartosz.golaszewski
On 10.07.2024 10:43 PM, Luiz Augusto von Dentz wrote:
> Hi Bartosz,
>
> On Wed, Jul 10, 2024 at 3:50 PM <patchwork-bot+bluetooth@kernel.org> wrote:
>>
>> Hello:
>>
>> This series was applied to bluetooth/bluetooth-next.git (master)
>> by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
>>
>> On Tue, 09 Jul 2024 14:18:31 +0200 you wrote:
>>> The following series extend the usage of the power sequencing subsystem
>>> in the hci_qca driver.
>>>
>>> The end goal is to convert the entire driver to be exclusively pwrseq-based
>>> and simplify it in the process. However due to a large number of users we
>>> need to be careful and consider every case separately.
>>>
>>> [...]
>>
>> Here is the summary with links:
>> - [v3,1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
>> https://git.kernel.org/bluetooth/bluetooth-next/c/e1c54afa8526
>> - [v3,2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock
>> https://git.kernel.org/bluetooth/bluetooth-next/c/a887c8dede8e
>> - [v3,3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
>> https://git.kernel.org/bluetooth/bluetooth-next/c/cdd10964f76f
>> - [v3,4/6] Bluetooth: hci_qca: make pwrseq calls the default if available
>> https://git.kernel.org/bluetooth/bluetooth-next/c/958a33c3f9fc
>> - [v3,5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
>> https://git.kernel.org/bluetooth/bluetooth-next/c/4fa54d8731ec
>> - [v3,6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
>> (no matching commit)
>
> Last one doesn't apply so you will probably need to rebase or
> something if it really needs to go thru bluetooth-next.
Bartosz forgot to mention it should go through qcom
Konrad
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-10 22:08 ` Konrad Dybcio
@ 2024-07-11 7:11 ` Bartosz Golaszewski
0 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2024-07-11 7:11 UTC (permalink / raw)
To: Konrad Dybcio, Luiz Augusto von Dentz
Cc: patchwork-bot+bluetooth, marcel, davem, edumazet, kuba, pabeni,
robh, krzk+dt, conor+dt, quic_bgodavar, quic_rjliao, andersson,
linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
bartosz.golaszewski
On Thu, Jul 11, 2024 at 12:08 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 10.07.2024 10:43 PM, Luiz Augusto von Dentz wrote:
> > Hi Bartosz,
> >
> > On Wed, Jul 10, 2024 at 3:50 PM <patchwork-bot+bluetooth@kernel.org> wrote:
> >>
> >> Hello:
> >>
> >> This series was applied to bluetooth/bluetooth-next.git (master)
> >> by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
> >>
> >> On Tue, 09 Jul 2024 14:18:31 +0200 you wrote:
> >>> The following series extend the usage of the power sequencing subsystem
> >>> in the hci_qca driver.
> >>>
> >>> The end goal is to convert the entire driver to be exclusively pwrseq-based
> >>> and simplify it in the process. However due to a large number of users we
> >>> need to be careful and consider every case separately.
> >>>
> >>> [...]
> >>
> >> Here is the summary with links:
> >> - [v3,1/6] dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850
> >> https://git.kernel.org/bluetooth/bluetooth-next/c/e1c54afa8526
> >> - [v3,2/6] Bluetooth: hci_qca: schedule a devm action for disabling the clock
> >> https://git.kernel.org/bluetooth/bluetooth-next/c/a887c8dede8e
> >> - [v3,3/6] Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()
> >> https://git.kernel.org/bluetooth/bluetooth-next/c/cdd10964f76f
> >> - [v3,4/6] Bluetooth: hci_qca: make pwrseq calls the default if available
> >> https://git.kernel.org/bluetooth/bluetooth-next/c/958a33c3f9fc
> >> - [v3,5/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
> >> https://git.kernel.org/bluetooth/bluetooth-next/c/4fa54d8731ec
> >> - [v3,6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
> >> (no matching commit)
> >
> > Last one doesn't apply so you will probably need to rebase or
> > something if it really needs to go thru bluetooth-next.
>
> Bartosz forgot to mention it should go through qcom
>
> Konrad
Yes, sorry. That's alright, if patches 1-5/6 make v6.11 then I'll just
resend patch 6/6 to Bjorn directly next release and we'll avoid a
cross-tree merge this way.
Thanks!
Bart
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: (subset) [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850
2024-07-09 12:18 [PATCH v3 0/6] Bluetooth: hci_qca: use the power sequencer for wcn7850 Bartosz Golaszewski
` (7 preceding siblings ...)
2024-07-10 19:50 ` patchwork-bot+bluetooth
@ 2024-08-01 3:22 ` Bjorn Andersson
8 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2024-08-01 3:22 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao, Konrad Dybcio, Bartosz Golaszewski
Cc: linux-bluetooth, netdev, devicetree, linux-kernel, linux-arm-msm,
Bartosz Golaszewski
On Tue, 09 Jul 2024 14:18:31 +0200, Bartosz Golaszewski wrote:
> The following series extend the usage of the power sequencing subsystem
> in the hci_qca driver.
>
> The end goal is to convert the entire driver to be exclusively pwrseq-based
> and simplify it in the process. However due to a large number of users we
> need to be careful and consider every case separately.
>
> [...]
Applied, thanks!
[6/6] arm64: dts: qcom: sm8650-qrd: use the PMU to power up bluetooth
commit: 4e71c38244dbeb6619156b417d469771bba52b83
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread